Im not sure why this did not work for you
I tried the following and it worked
switch (fdwReason)
{
case DLL_PROCESS_ATTACH:
if (InitCVIRTE (hinstDLL, 0, 0) == 0)
return 0; /* out of memory */
else
MessagePopup("Test","test");
break;
case DLL_PROCESS_DETACH:
CloseCVIRTE ();
break;
}
But before you try to do anything complex in DLLmain, please check out this
link here for what you can and cannot do in Dllmain.
Hope this helps.
Bilal Durrani
NI