Retrieves the current directory for the current thread.
DWORD GetCurrentRtThreadDirectory( DWORD dwBufSize, LPSTR lpBuffer );
dwBufSize
lpBuffer
Each thread has a single current directory. To set the current directory, use the SetCurrentRtThreadDirectory function. If SetCurrentRtThreadDirectory is never called then GetCurrentRtThreadDirectory returns the process current directory.
If the function succeeds, the return value specifies the number of characters that are written to the buffer, not including the terminating null character.
If the function fails, the return value is zero. To get extended error information, call GetLastRtError.
If the buffer that is pointed to by lpBuffer is not large enough, the return value specifies the required size of the buffer, in characters, including the null-terminating character. The contents of the supplied buffer will be the empty string ("").
Specifying NULL for the buffer pointer and 0 for the buffer size causes the call to return a value indicating the size of the buffer required to store the current directory.
Versions | Defined in | Include | Link to |
---|---|---|---|
INtime 6.0 | intime/rt/include/rtbase.h | rt.h | rt.lib |