I don't understand why 'nBufferLength' and 'pathBuffer' are printing out as '0' and 'NULL' respectively. Could someone please explain to me what I am doing incorrectly. I am sure I am just trying to use it wrong, but I don't see it!
[code]
DWORD nBufferLength = NULL;
LPTSTR pathBuffer= NULL;
DWORD temp = 0;
char str[MAX_PATH];
// the return value 'temp' specifies the number of characters written to the buffer,
// not including the terminating null character.
temp = GetCurrentDirectory(nBufferLength, pathBuffer);
sprintf(str,"temp is %d",temp); //this prints out as 95 which is correct
MessageBox(NULL, str, "Temp", MB_OK);
sprintf(str,"nBufferLength is %d",nBufferLength); // This prints out as 0 ???
MessageBox(NULL, str, "nBufferLength", MB_OK);
sprintf(str,"path is %s",pathBuffer); // This prints out as NULL ???
MessageBox(NULL, str, "Solution:", MB_OK);
[\code]