Hour 22



If you wanted to use MessageBox rather than the ANSI or Unicode functions, what changes need to be made to the DllImport attribute?


Change the CharSet attribute for DllImport to either Auto or remove it completely.


In an unmanaged class, are you responsible for freeing any memory that is allocated, regardless of the variable type?


No, managed types within the unmanaged class will still be garbage collected. You will, however, need to free any memory allocated for unmanaged member variables within that class.


If a DLL exports a C++ class that you wish to use within managed code, do you have to create definitions for each of the member functions within that class as well as the definition for the class?




Sams Teach Yourself Visual C++. NET in 24 Hours
Sams Teach Yourself Visual C++.NET in 24 Hours
ISBN: 0672323230
EAN: 2147483647
Year: 2002
Pages: 237

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net