function GetSelfPath: string;
var
ModuleName: string;
i: Integer;
begin
SetLength(ModuleName, 255);
GetModuleFileName(HInstance, PChar(ModuleName), Length(ModuleName));
i
:= LastDelimiter(‘\‘, ModuleName);
Result := Copy(ModuleName, 1,
i);
end;
取正在运行的DLL或EXE的路径,布布扣,bubuko.com
原文:http://www.cnblogs.com/hnxxcxg/p/3640967.html