.NET guidance
-
The C# directshow functionality is incomplete and incredibly buggy.
Christian Graus Driven to the arms of OSX by Vista.
Thanks for that. :) I hadn't tried it, just knew it was there.
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
-
The C# directshow functionality is incomplete and incredibly buggy.
Christian Graus Driven to the arms of OSX by Vista.
-
Before I venture to suggest books, it would be useful to know if you will be using WinForms or Web or whatever. With DirectX 9.0c (I think that is the most recent) the SDK installs libraries for C#, or at least it used to, so DirectShow is there, although most DirectX functionality is now available through the XNA Libraries. One advantage that you should have is that it should be reasonably easy for you to follow C# sample code and work out what it is doing, with the syntax at least looking similar.
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
-
It won't be web so Winforms sounds likely.
Visit http://www.notreadytogiveup.com/[^] and do something special today.
In that event, I have found Windows Forms 2.0 Programming[^] useful. You might also consider Programming MicroSoft Windows With C#[^]. Good old Charles Petzold. He has also got a free E-Book[^], although some on CP, Pete o'Hanlon for one, do not think much of it. There are a gazillion of them out there. With your experience, making the change should not be difficult, finding a book with a style you get on with, might be more difficult. :)
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
-
It won't be web so Winforms sounds likely.
Visit http://www.notreadytogiveup.com/[^] and do something special today.
I've just googled 'c++ to c#', which gave some potentially useful hits. Some of them are MS and so are a bit "ain't c# wonderful", but the info is in there. A well known phrase containing the words Grandmother, suck, eggs and teach, springs to mind. Sorry, I'll stop bothering you now. :-D
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
-
Work is taking a turn for the better (assuming marketing make a decision) in that I will be working one a pretty comprehensive test system. Since I will be using some peripherals that have .NET 2.0 support I'm thinking it's time to look at C#/C++ .NET and have some questions: 1. What is a good general book covering using DLLs, use interfaces etc.? I won't be doing any significant database work. 2. Compared with MFC (stop sniggering at the back!) how good is support for the likes of DirectShow? 3. Any particular pros or cons for C++ or C#? Thanks in advance. Elaine (slightly adventerous fluffy tigress)
Visit http://www.notreadytogiveup.com/[^] and do something special today.
I've done native C/C++ (3 years), managed C++ (2 years), and C# (3 years) for a while now - along with embedded stuff for a long time before that. (God I feel old now!) Anyway, my recommendation to you would be to figure out what you are going to be doing and interfacing with first before making the choice. Native C/C++ is best for speed and memory usage. Managed C++ is really good for mixed projects where you want to call native APIs or your own native libraries without using PInvoke while at the same time using the .NET framework, although some people (my old boss) don't like the managed syntax. C# is good for strict .NET programming. As was said earlier, COM objects and DLLs can be directly imported into C# and .NET projects (it creates wrapper DLLs for COM objects). Then you just instantiate them and call them like any other object and method. What is not real easy is PInvoke - especially when you are trying to convert native structures into their managed equivalents. Funny how Microsoft hasn't included a tool to do this directly in Visual Studio, but they haven't. There are free third party tools out there that help you convert an unmanaged signature into a managed one, but they aren't all that easy to use and you have to be careful with what you are doing. If you want to see an example, go to www.pinvoke.net, and look through the WLANAPI. I wrote those calls and signatures because they were about impossible to figure out and there was no managed equivalent for them. David
-
Before I venture to suggest books, it would be useful to know if you will be using WinForms or Web or whatever. With DirectX 9.0c (I think that is the most recent) the SDK installs libraries for C#, or at least it used to, so DirectShow is there, although most DirectX functionality is now available through the XNA Libraries. One advantage that you should have is that it should be reasonably easy for you to follow C# sample code and work out what it is doing, with the syntax at least looking similar.
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
-
Some of the XNA functions are written wrong see Matrix.CreateWorld(), and the audio i'm told (seen posts) can have issues when windows media player is on in the background.
Once again, thanks for the heads-up. :) This is such a good place for finding stuff out. Cheers!
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
-
I've done native C/C++ (3 years), managed C++ (2 years), and C# (3 years) for a while now - along with embedded stuff for a long time before that. (God I feel old now!) Anyway, my recommendation to you would be to figure out what you are going to be doing and interfacing with first before making the choice. Native C/C++ is best for speed and memory usage. Managed C++ is really good for mixed projects where you want to call native APIs or your own native libraries without using PInvoke while at the same time using the .NET framework, although some people (my old boss) don't like the managed syntax. C# is good for strict .NET programming. As was said earlier, COM objects and DLLs can be directly imported into C# and .NET projects (it creates wrapper DLLs for COM objects). Then you just instantiate them and call them like any other object and method. What is not real easy is PInvoke - especially when you are trying to convert native structures into their managed equivalents. Funny how Microsoft hasn't included a tool to do this directly in Visual Studio, but they haven't. There are free third party tools out there that help you convert an unmanaged signature into a managed one, but they aren't all that easy to use and you have to be careful with what you are doing. If you want to see an example, go to www.pinvoke.net, and look through the WLANAPI. I wrote those calls and signatures because they were about impossible to figure out and there was no managed equivalent for them. David
If you find yourself in need of doing PInvoke calls, it would probably help to know about the PInvoke Wiki http://www.pinvoke.net/[^]. Dave Parker IT DevWorks http://www.itdevworks.com[^]
-
I've done native C/C++ (3 years), managed C++ (2 years), and C# (3 years) for a while now - along with embedded stuff for a long time before that. (God I feel old now!) Anyway, my recommendation to you would be to figure out what you are going to be doing and interfacing with first before making the choice. Native C/C++ is best for speed and memory usage. Managed C++ is really good for mixed projects where you want to call native APIs or your own native libraries without using PInvoke while at the same time using the .NET framework, although some people (my old boss) don't like the managed syntax. C# is good for strict .NET programming. As was said earlier, COM objects and DLLs can be directly imported into C# and .NET projects (it creates wrapper DLLs for COM objects). Then you just instantiate them and call them like any other object and method. What is not real easy is PInvoke - especially when you are trying to convert native structures into their managed equivalents. Funny how Microsoft hasn't included a tool to do this directly in Visual Studio, but they haven't. There are free third party tools out there that help you convert an unmanaged signature into a managed one, but they aren't all that easy to use and you have to be careful with what you are doing. If you want to see an example, go to www.pinvoke.net, and look through the WLANAPI. I wrote those calls and signatures because they were about impossible to figure out and there was no managed equivalent for them. David
Thanks David, it looks like managed C++ is my best option. [Added] Phillipe's comments about C# for the UI work is interesting though. Elaine :rose:
Visit http://www.notreadytogiveup.com/[^] and do something special today.
modified on Saturday, March 21, 2009 10:20 AM
-
Work is taking a turn for the better (assuming marketing make a decision) in that I will be working one a pretty comprehensive test system. Since I will be using some peripherals that have .NET 2.0 support I'm thinking it's time to look at C#/C++ .NET and have some questions: 1. What is a good general book covering using DLLs, use interfaces etc.? I won't be doing any significant database work. 2. Compared with MFC (stop sniggering at the back!) how good is support for the likes of DirectShow? 3. Any particular pros or cons for C++ or C#? Thanks in advance. Elaine (slightly adventerous fluffy tigress)
Visit http://www.notreadytogiveup.com/[^] and do something special today.
Many things like Windows Forms and database development are better supported in C#... So mixed-language is probably the best option if you want to reuse lot of C++ code or if you need C++ for some part and you do have a complex UI. In my project, I uses both C++ (some algorithm that uses STL and to uses some C++ libraries) and C# (Windows Forms, Database...). At first I would have used C++ a lot more but I have found that they are more problems with auto-generated code, intellisense, compile-time and general ease of use so finally I do all database design in C# and almost all the UI. I hope that Visual Studio 2010 will fix many of these problems so that it would be easier to have larger protion of code in C++ without having the drawbacks. In my case, if C++ support would be better, I would need less DLL since some C# code would be done in C++ (well, it would be nice if it would be possible to have both C++ and C# code in the same DLL project)
Philippe Mori
-
Many things like Windows Forms and database development are better supported in C#... So mixed-language is probably the best option if you want to reuse lot of C++ code or if you need C++ for some part and you do have a complex UI. In my project, I uses both C++ (some algorithm that uses STL and to uses some C++ libraries) and C# (Windows Forms, Database...). At first I would have used C++ a lot more but I have found that they are more problems with auto-generated code, intellisense, compile-time and general ease of use so finally I do all database design in C# and almost all the UI. I hope that Visual Studio 2010 will fix many of these problems so that it would be easier to have larger protion of code in C++ without having the drawbacks. In my case, if C++ support would be better, I would need less DLL since some C# code would be done in C++ (well, it would be nice if it would be possible to have both C++ and C# code in the same DLL project)
Philippe Mori
-
Is it .Net 2.0/C#2 you'll be doing? If so you really need to read Andrew Troelsen's Pro C# 2005 and the .Net 2.0 Platform. It covers a lot of stuff, but enough of it is in-depth enough or relevant enough to be a good starter. I also have the 2008 version of the book which I want to hang on to, so if you want my 2005 copy send me an email and I'll send it to you.
print "http://www.codeproject.com".toURL().text Ain't that Groovy?
-
Martin, I'm going with C++ in VS2005 but I really appreciate the book offer. Thanks. Elaine :rose:
Visit http://www.notreadytogiveup.com/[^] and do something special today.
Not a problem.
print "http://www.codeproject.com".toURL().text Ain't that Groovy?