///////////// 应用程序当前路径 ///////////// ExtractFilePath(paramstr(0))
ExtractFilePath(application.ExeName)
///////////// COM中当前路径 ///////////// .... ....
TCustomMG = class(TTypedComObject, ICustomMG)
function TCustomMG.getXmlPath: string;
var
xmlPath:string;
S:array[0..255] of char;
begin
Result:='';
GetModuleFileName(hinstance,s,length(s));
xmlPath := extractfilepath(s);
result := xmlPath;
end;
本文地址:http://com.8s8s.com/it/it4797.htm