INtime SDK Help
INtime SDK v7.1 > About INtime > INtime Kernel > Files > SetCurrentRtDirectory

Changes the current directory for the current process.

BOOLEAN SetCurrentRtDirectory(
    LPSTR lpPathName


A pointer to the name of the new current directory.


The string must not exceed MAX_PATH characters, including the terminating null character. 

Each process has a single current directory.

Multithreaded applications and shared library code should use the SetCurrentRtDirectory function with care, or use SetCurrentRtThreadDirectory. The current directory state written by the SetCurrentRtDirectory function is stored as a global variable in each process, therefore multithreaded applications cannot reliably use this value without possible data corruption from other threads that may also be reading or setting this value. This limitation also applies to the GetFullRtPathName function. The exception being when the application is guaranteed to be running in a single thread, for example parsing file names from the command line argument string in the main thread prior to creating any additional threads. Using relative path names in multithreaded applications or shared library code can yield unpredictable results and is not supported.

Return values

    TRUE on success. FALSE on failure. The error status may be returned by calling GetLastRtError.


Versions Defined in Include Link to
INtime 4.0 intime/rt/include/rtbase.h rt.h rt.lib
See Also

System & Status

C library