取正在运行的DLL或EXE的路径
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;
本文来自博客园,作者:{咏南中间件},转载请注明原文链接:https://www.cnblogs.com/hnxxcxg/p/3640967.html