A
Adriano Coser
Hello.
I'm moving an application from VC 2003 to VC 2005 Beta2. In mixed mode DLLs
I need to set
System::Threading::Thread::CurrentThread->ApartmentState =
System::Threading::ApartmentState::STA;
so the drag and drop registration can work.
I used to do this in DllMain and it worked fine. But now I can't call
managed code from this point. I understand that I must provide a module
constructor (.cctor) to do managed code initializations.
I couldn't find information on how to do this. The help of my Express
Edition gives me a script error when I try to access the topic "How to:
Explicitly Define a Module Constructor (.cctor)".
Does anyone have this orientations? Is this the right way to init managed
code on a mixed mode DLL?
Thanks in advance.
Regards,
Adriano.
I'm moving an application from VC 2003 to VC 2005 Beta2. In mixed mode DLLs
I need to set
System::Threading::Thread::CurrentThread->ApartmentState =
System::Threading::ApartmentState::STA;
so the drag and drop registration can work.
I used to do this in DllMain and it worked fine. But now I can't call
managed code from this point. I understand that I must provide a module
constructor (.cctor) to do managed code initializations.
I couldn't find information on how to do this. The help of my Express
Edition gives me a script error when I try to access the topic "How to:
Explicitly Define a Module Constructor (.cctor)".
Does anyone have this orientations? Is this the right way to init managed
code on a mixed mode DLL?
Thanks in advance.
Regards,
Adriano.