应用程序中当前路径的两中写法、COM中当前路径取得
2006-02-04 13:51:23 来源:WEB开发网核心提示:/ 应用程序当前路径 / ExtractFilePath(paramstr(0))ExtractFilePath(application.ExeName)/ COM中当前路径 / .... .... TCustomMG = class(TTypedComObject, ICustomMG)function TCus
///////////// 应用程序当前路径 /////////////
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;
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;
[]
更多精彩
赞助商链接