I may be talking rubbish here, but bare with me as i have little experience with DLLs.
Is it possible to send a windows message from the DLL to the engine window. When the DLL is loaded, the entry point function is called, where you can handle 'DLL_PROCESS_ATTACH'. Would it be possible to use SendMessage to send a custom window's message to the engine, saying "i'm loaded!". You could then just handle that in the engine WndProc, and set a variable like 'dll_loaded = 1;'. Then you know the action will work properly.
This might not be possible, I don't know, it's just a little theory i had. Maybe something like this...
BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpReserved )
{
switch( fdwReason )
{
case DLL_PROCESS_ATTACH: // Dll is loaded
// Get handle to caller window
// Send a custom message using SendMessage
break;
}
}
The only problem I can see from this is that the message is sent before the WndProc starts.
LoadLibrary is probably still the best solution for you if you want to know if your DLL is loaded.