LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I associate a dll to the LabVIEW process in windows2000.

so a hardware initialization command in the dll executes only once when I start LabVIEW.
0 Kudos
Message 1 of 2
(2,586 Views)
You must place your initialization code into DllMain:

BOOL WINAPI DllMain(HINSTANCE hinstDLL,
DWORD fdwReason,
LPVOID lpvReserved)
{
switch (fdwReason)
{
case DLL_PROCESS_ATTACH:
/* Init Code here */
break;

case DLL_THREAD_ATTACH:
/* Thread-specific init code here */
break;

case DLL_THREAD_DETACH:
/* Thread-specific cleanup code here.
*/
break;

case DLL_PROCESS_DETACH:
/* Cleanup code here */
break;
}
0 Kudos
Message 2 of 2
(2,586 Views)