Hello everybody,
I'm trying to write integrations with the operating system and with things like active directory and Ocropus.
I know a bunch of programming languages, including those listed in the title. I'm trying to learn exactly how C++/CLI works, but can't find succinct, exact and accurate descriptions online from the searching that I have done. So I ask here.
Could you tell me the pitfalls and features of C++/CLI? Assume I know all of C# and start from there. I'm not an expert in C++, so some of my questions' answers might be "just like C++", but could say that I am at C#. I would like to know things like:
Converting C++ pointers to CLI pointers,
Any differences in passing by value/doubly indirect pointers/CLI pointers from C#/C++ and what is 'recommended'.
How do gcnew, __gc, __nogc work with
Polymorphism
Structs
Inner classes
Interfaces
The "fixed" keyword; does that exist?
Compiling DLLs loaded into the kernel with C++/CLI possible? Loaded as device drivers? Invoked by the kernel? What does this mean anyway (i.e. to load something into the kernel exactly; how do I know if it is?)?
L"my string" versus "my string"? wchar_t? How many types of chars are there?
Are we safe in treating chars as uint32s or what should one treat them as to guarantee language indifference in code?
Finalizers (~ClassName() {}) are discouraged in C# because there are no garantuees they will run deterministically, but since in C++ I have to use "delete" or use copy-c'tors as to stack allocate memory, what are the recommendations between C#/C++ interactions?
What are the pitfalls when using reflection in C++/CLI?
How well does C++/CLI work with the IDisposable pattern and with SafeHandle, SafeHandleZeroOrMinusOneIsInvalid?
I've read briefly about asynchronous exceptions when doing DMA-operations, what are these?
Are there limitations you impose upon yourself when using C++ with CLI integration rather than just doing plain C++?
Attributes in C++ similar to Attributes in C#?
Can I use the full meta-programming patterns available in C++ through templates now and still have it compile like ordinary C++?
Have you tried writing C++/CLI with boost?
What are the optimal ways of interfacing the boost library with C++/CLI; can you give me an example of passing a lambda expression to an iterator/foldr function?
What is the preferred way of exception handling? Can C++/CLI catch managed exceptions now?
How well does dynamic IL generation work with C++/CLI?
Does it run on Mono?
Any other things I ought to know about?