I have the following statements in my code:
using namespace System::IO;
.
.
.
.
String *strFileName = Directory::GetCurrentDirectory();
When I try to compile I get the following error:
'GetCurrentDirectorryA' : is not a member of System::IO::Directory'
Well I guess that’s true, but I’m not using GetCurrentDirectioryA, nowhere
in my code is a GetCurrentDirectoryA. What I’m using is GetCurrentDirectory.
Is this Microsoft’s mistake or am I doing something wrong?
Morten Wennevik - 13 Sep 2004 09:26 GMT
Hi cnickl
Ok, I'm guessing, but I think that when compiling GetDirectory is translated to GetDirectoryA or GetDirectoryW (or the translation occurs when the code runs). Any method ending with A is used for older systems, basically Win9x/ME.
Are you compiling or running the code on a Win9x/ME platform?

Signature
Happy Coding!
Morten Wennevik [C# MVP]
Girish bharadwaj - 13 Sep 2004 12:04 GMT
It somehow feels like you are ending up with a old win32 compilation rather
than a /clr compile.

Signature
Girish Bharadwaj
http://msmvps.com/gbvb
> I have the following statements in my code:
>
[quoted text clipped - 11 lines]
> Well I guess that's true, but I'm not using GetCurrentDirectioryA, nowhere
> in my code is a GetCurrentDirectoryA. What I'm using is
GetCurrentDirectory.
> Is this Microsoft's mistake or am I doing something wrong?
Robert Jordan - 13 Sep 2004 18:16 GMT
> I have the following statements in my code:
>
[quoted text clipped - 12 lines]
> in my code is a GetCurrentDirectoryA. What I’m using is GetCurrentDirectory.
> Is this Microsoft’s mistake or am I doing something wrong?
You're including some old header files during the compilation,
something that contains:
#if UNICODE
#define GetCurrentDirectory GetCurrentDirectorryW
#else
#define GetCurrentDirectory GetCurrentDirectorryA
#endif
bye
Rob