Andrew Aliphanov
January 4th, 2002, 05:21 AM
Hi, All !!!
Does anybody know, how to use ComImport attribute in Managed C++ ?
I try to use next code, but it doesn't work:
#using "mscorlib.dll"
[ComImport, Guid("...")]
__gc public class SomeCOMClass
{
};
int main()
{
SomeCOMClass* ptr = new SomeCOMClass();
...
return 0;
}
When I run this code, I get System.TypeLoadException.
What to do? Similar code in C# works fine.
Does anybody know, how to use ComImport attribute in Managed C++ ?
I try to use next code, but it doesn't work:
#using "mscorlib.dll"
[ComImport, Guid("...")]
__gc public class SomeCOMClass
{
};
int main()
{
SomeCOMClass* ptr = new SomeCOMClass();
...
return 0;
}
When I run this code, I get System.TypeLoadException.
What to do? Similar code in C# works fine.