Mic*_*tum 37
我想你正在寻找GetModuleFileName.
http://www.swissdelphicenter.ch/torry/showcode.php?id=143:
{
If you are working on a DLL and are interested in the filename of the
DLL rather than the filename of the application, then you can use this function:
}
function GetModuleName: string;
var
szFileName: array[0..MAX_PATH] of Char;
begin
FillChar(szFileName, SizeOf(szFileName), #0);
GetModuleFileName(hInstance, szFileName, MAX_PATH);
Result := szFileName;
end;
Run Code Online (Sandbox Code Playgroud)
未经测试,自从我使用Delphi后已经有一段时间了:)
| 归档时间: |
|
| 查看次数: |
7903 次 |
| 最近记录: |