Hier enthalten:
Delphi-Quellcode:
function GetModuleHandleFromInstance: THandle;
var s:
array[0..MAX_PATH-1]
of char;
begin
{ Find the DLL filename from the instance value. }
GetModuleFileName(hInstance, s, sizeof(s)-1);
{ Find the handle from the filename. }
Result := GetModuleHandle(s);
end;
"GetModuleFileName" sollte genau das sein, was Du benötigst