tags:

views:

803

answers:

1

I know that GetCurrentDirectory() and SetCurrentDirectory() functions exist on the MFC framework, but I don't have a CFtpConnection object in my application. I have a simple CWinApp-derived class, and I would like to retrieve its working directory upon program startup. What's the easiest method to achieve this goal? Thanks in advance for the advices.

+3  A: 

GetCurrentDirectory is a simple Win32 API function, so just call it like this:

TCHAR currentDir[MAX_PATH];
GetCurrentDirectory( MAX_PATH, currentDir );
Gerald