I
icysword
Unregistered / Unconfirmed
GUEST, unregistred user!
VC里面可以通过使用DllEntryPoint函数里面的参数来获得hInstance实例句柄, <br>BOOL WINAPI DllEntryPoint(<br><br> HINSTANCE hinstDLL, // handle to DLL module <br> DWORD fdwReason, // reason for calling function <br> LPVOID lpvReserved // reserved <br> <br><br>但应用在delphi好像不行, 试过 <br>function DllEntryPoint(hinstDLL:LongWord; // handle to DLL module<br> fdwReasonWORD; // reason for calling function<br> lpvReservedointer // reserved<br>  :Bool;<br>begin<br> MessageBox(0,'Load',PChar(IntToHex(hinstDLL,0)),0);<br>end;<br><br>Load对话框是显示了,但是hinstDLL的值却总是为0, 为什么?<br><br>请问在delphi中该怎样(利用该函数)获得DLL的实例句柄呢? <br>(不用delphi的全局变量hInstance,也不用GetModuleHandle('DllName')来获得).