Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2008 Feb : GetFinalPathNameByHandle API
| Subject: | GetFinalPathNameByHandle API |
| Posted by: | "normnet" (normn..@hickorytech.net) |
| Date: | 17 Feb 2008 06:17:01 |
How code a GetFinalPathNameByHandle API?
The bottom Delphi code gets error:
[Pascal Error] SDIMAIN.PAS(1001): E2003
Undeclared identifier: 'GetFinalPathNameByHandle'
//FIRST IN C
DWORD WINAPI GetFinalPathNameByHandle(
__in HANDLE hFile,
//A handle to a file or directory.
__out LPTSTR lpszFilePath,
//A pointer to a buffer that receives the long path of hFile.
__in DWORD cchFilePath,
//The size of lpszFilePath, in TCHARS. This value does not include a NULL termination character.
__in DWORD dwFlags
//The type of result to return. This parameter can be one of the following values.
//FILE_NAME_NORMALIZED 0x0 Return the normalized drive name. This is the default.
//FILE_NAME_OPENED 0x8 Return the opened file name (not normalized).
// ETC
);
//DELPHI
VAR
h_IDE_HWND : HWND;
cs_IDE_FILE_PATH : array[0..255] of Char;
begin
h_IDE_HWND := GetForegroundWindow;
GetFinalPathNameByHandle(h_IDE_HWND, cs_IDE_FILE_PATH, 255, 0)
[Pascal Error] SDIMAIN.PAS(1001): E2003 Undeclared identifier: 'GetFinalPathNameByHandle'
Norm