mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 15:43:00 +00:00
22 lines
349 B
C
22 lines
349 B
C
#include <direct.h>
|
|
|
|
char* _getdcwd (int nDrive, char* caBuffer, int nBufLen)
|
|
{
|
|
int i =0;
|
|
int dr = getdrive();
|
|
|
|
if ( nDrive < 1 || nDrive > 26 )
|
|
return NULL;
|
|
|
|
if ( dr != nDrive )
|
|
chdrive(nDrive);
|
|
|
|
i = GetCurrentDirectory(nBufLen,caBuffer);
|
|
if ( i == nBufLen )
|
|
return NULL;
|
|
|
|
if ( dr != nDrive )
|
|
chdrive(dr);
|
|
|
|
return caBuffer;
|
|
}
|