I am writing a plug-in to another program in the form of a dll with VC++ .NET. Because I didnt want to have to start the host program every time I changed something, I developed the GUI part of the plug-in separately as a console-application. Now when I moved my GUI back to the dll I get compile errors with GetCurrentDirectory and SetCurrentDirectory and I have no idea why.
Code-snippets:
My compile errors:
If anyone could tell me why this happens I would be ever grateful. Other System::IO:irectory functions seem to work.
Code-snippets:
Code:
String* path = Directory::GetCurrentDirectory();
Directory::SetCurrentDirectory(myPath);
My compile errors:
Code:
error C2039: GetCurrentDirectoryA : is not a member of System::IO::Directory
D:\Program Files\Microsoft Visual Studio .NET\Vc7\include\vcclr.h(15) : see declaration of System::IO::Directory
error C2660: GetCurrentDirectoryA : function does not take 0 parameters
error C2039: SetCurrentDirectoryA : is not a member of System::IO::Directory
D:\Program Files\Microsoft Visual Studio .NET\Vc7\include\vcclr.h(15) : see declaration of System::IO::Directory
error C2664: SetCurrentDirectoryA : cannot convert parameter 1 from System::String __gc * to LPCSTR
Cannot convert a managed type to an unmanaged type
If anyone could tell me why this happens I would be ever grateful. Other System::IO:irectory functions seem to work.