Epsylon3
October 2nd, 2004, 17:35
the DLLProc of the sample TQN plugin is not correct
Here is the fix to correct the problem :
Here is the fix to correct the problem :
Code:
procedure DLLMain(dwReason: DWORD);
begin
case dwReason of
DLL_PROCESS_ATTACH:
begin
OutputDebugString(PChar(PLUGIN_NAME+' loaded by DLL_PROCESS_ATTACH'));
// Initialize code here
end;
DLL_PROCESS_DETACH:
begin
OutputDebugString(PChar(PLUGIN_NAME+' unloaded by DLL_PROCESS_DETACH'));
// Uninitialize code here
end;
DLL_THREAD_ATTACH:
begin
end;
DLL_THREAD_DETACH:
begin
end;
end;
end;
exports
...
begin
DllProc := @DllMain;
DllProc(DLL_PROCESS_ATTACH);
g_hmodOlly := GetModuleHandle(nil);
end.