Search the Knowledgebase |
Browse by Category or Article ID |
|
|
|
|
|
| Why does LMX_Free hang when used within a dll file? |
| User Opinions (2 votes) |
100%
0%
|
|
Thank you for rating this answer.
|
Article ID: 168
Last Updated: 27th April 2009 11:24:03 am
When you have a dll, you typically have initialization code like the following:
BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH: break; } return TRUE; }
Using this code to initialize and free LM-X handles can cause LMX_Free to hang when using the DETACH handlers, because the OS can close threads without passing the information to the LM-X library. You should instead initialize LM-X by explicitly calling code to initialize and free LM-X from the exported dll interface.
|
| Attachments |
|
No attachments were found.
|