Retrieves the full path and file name of the specified file.
DWORD GetFullRtThreadPathName(
LPSTR lpFileName, // pointer to file name
DWORD nBufferLength, // length of buffer
char *lpBuffer, // pointer to buffer
char **lpFilePart // pointer within buffer to filename part
);
GetFullRtThreadPathName merges the name of the thread-specific current drive and directory with a specified file name to determine the full path and file name of a specified file. It also calculates the address of the file name portion of the full path and file name.
This function does not verify that the resulting path and file name are valid, or that they see an existing file on the associated volume.
Note that the lpFilePart parameter does not require string buffer space, but only enough for a single address. This is because it simply returns an address within the buffer that already exists for lpBuffer.
Each thread has a single current directory. If the thread current directory has not been explicitly set via a call to SetCurrentRtThreadDirectory then the process current directory is used instead.
If the function succeeds, the return value is the length, in characters, of the string copied to lpBuffer, not including the terminating null character.
If the lpBuffer buffer is too small to contain the path, the return value is the size, in characters, of the buffer that is required to hold the path and the terminating null character.
If the function fails for any other reason, the return value is zero. To get extended error information, call GetLastRtError.
Versions | Defined in | Include | Link to |
---|---|---|---|
INtime 6.0 | intime/rt/include/rtbase.h | rt.h | rt.lib |