Directory Operations

Under Windows 3.x, retrieving the current directory or changing directories was accomplished as:

    getcwd( DirPath, sizeof( DirPath ) );               // 3.x
    ...
    chdir( DirPath );

The equivalent operations under Windows 98/95/NT follow the same general formats, but with a change in the function names:

    GetCurrentDirectory( sizeof( DirPath ), DirPath );  // 98/95/NT
    ...
    SetCurrentDirectory( DirPath );

Notice that the order of the arguments has been reversed. The size of the buffer now precedes rather than follows the buffer variable.

© 1998 SYBEX Inc. All rights reserved.