GetCurrentDirectory() problems

it worked yesterday... but today, there're compilation errors. :o

1
2
3
4
5
6
string getCurrentDirectory(){
	TCHAR infoBuffer [1024];
	GetCurrentDirectory(infoBuffer, 1024);
	string infoString = infoBuffer;
	return infoString;
}


returns the following errors.


error: invalid conversion from `TCHAR*' to `DWORD'
error: initializing argument 1 of `DWORD GetCurrentDirectoryA(DWORD, CHAR*)'
error: invalid conversion from `int' to `CHAR*'
error: initializing argument 2 of `DWORD GetCurrentDirectoryA(DWORD, CHAR*)'



how do i solve this?
That code really worked yesterday??
Considering you have the parameters to the GetCurrentDirectory function the wrong way around, I am
very much surprised.
Topic archived. No new replies allowed.