以下是Delphi对HInstance variable的定义:<br> HInstance is the handle provided by Windows for an application or library.<br>如果能够提供这个句柄,当然可以找到文件名称,就用下面这个函数:<br>GetModuleFileName(<br> hModule: HINST; {a handle to the module}<br> lpFilename: PChar; {pointer to a null terminated string buffer}<br> nSize: DWORD {the size of the lpFilename buffer}<br>): DWORD; {returns the number of characters copied to the buffer}<br><br>This function retrieves the full path and filename of the module identified by the <br>handle in the hModule parameter.<br>