Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / September 2004

Tip: Looking for answers? Try searching our database.

GetCurrentDirectory() leads to error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
cnickl - 13 Sep 2004 09:15 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.