473,326 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

error C2039: 'GetTempFileNameA' : is not a member of 'System::IO::Path'

I tried to use :
System::String* outFile = System::IO::Path::GetTempFileName();

but I get this compile error:

error C2039: 'GetTempFileNameA' : is not a member of 'System::IO::Path'

I found this is a known bug
(http://support.microsoft.com/default...;en-us;167730), fixed in
VC++ 2003.

There is a workaround in VC++ 2002 ? An example would be great.

Thnx for any advice.
Nov 16 '05 #1
2 5665
You can #undef GetTempFileName before this line. If you want to set its
value back, use #pragma push_macro/pop_macro

pragma push_macro("GetTempFileName ")
#undef GetTempFileName
System::String* outFile = System::IO::Path::GetTempFileName();
pragma pop_macro("GetTempFileName ")

--
Regards,
Nish [VC++ MVP]

"Bragadiru" <ad****@cims.ro> wrote in message
news:OR**************@TK2MSFTNGP09.phx.gbl...
I tried to use :
System::String* outFile = System::IO::Path::GetTempFileName();

but I get this compile error:

error C2039: 'GetTempFileNameA' : is not a member of 'System::IO::Path'

I found this is a known bug
(http://support.microsoft.com/default...;en-us;167730), fixed in
VC++ 2003.

There is a workaround in VC++ 2002 ? An example would be great.

Thnx for any advice.

Nov 16 '05 #2
Thank you very much.

"Nishant S" <ni**@nospam.asianetindia.com> wrote in message
news:OR*************@TK2MSFTNGP10.phx.gbl...
You can #undef GetTempFileName before this line. If you want to set its
value back, use #pragma push_macro/pop_macro

pragma push_macro("GetTempFileName ")
#undef GetTempFileName
System::String* outFile = System::IO::Path::GetTempFileName();
pragma pop_macro("GetTempFileName ")

--
Regards,
Nish [VC++ MVP]

"Bragadiru" <ad****@cims.ro> wrote in message
news:OR**************@TK2MSFTNGP09.phx.gbl...
I tried to use :
System::String* outFile = System::IO::Path::GetTempFileName();

but I get this compile error:

error C2039: 'GetTempFileNameA' : is not a member of 'System::IO::Path'

I found this is a known bug
(http://support.microsoft.com/default...;en-us;167730), fixed in VC++ 2003.

There is a workaround in VC++ 2002 ? An example would be great.

Thnx for any advice.


Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Alex | last post by:
Hello, in my company, we have a diagnostic tool for hardware. Depending on the hardware projcet, a different project configuration is needed. The configuration file is written in XML and...
4
by: Elmo Watson | last post by:
Is there a way, with the System.IO class, to do a recursive list of a directory structure? For instance, in DirectoryInfo, you have GetDirectories and GetFiles .... In Directory, you have...
1
by: Sammy | last post by:
Can anyone please explain me the cause and resolution of this error. TIA Sammy Server Error in '/' Application. The device is not ready. Description: An unhandled exception occurred during...
1
by: WALDO | last post by:
I have a small installation app that I'm building. The user can specify an install path at the command line. How can I ensure that something they put in is valid? What I'm NOT looking for is...
6
by: SoxFan44 | last post by:
Hi, If I have a File("c:\test\subdir\file1.html"), what's the best way to get the directory of this file, ie 'c:\test\subdir'? Thanks!
2
by: jjlagtap | last post by:
Hey everyone When I try to open a file i get the Exception listed below. The weird thing is it works when I run the web app locally and when i use a remote server and open a file on my computer....
3
by: gamesforums | last post by:
How can i remove the .sql extension from my script files?? I want to read all scripts in directory into a hashtable, and use Right(scriptFile.FullName, 3) as my key and full name as value: ...
2
by: vve | last post by:
Hi, when I compile the following statement.. this->_FileDirectory = System::IO::Path::GetTempPath(); I always get this error: Error 1 error C2039: 'GetTempPathW' : is not a member of...
6
by: madankarmukta | last post by:
HI, I am getting problem while combining the path "c:" and "File1.txt".The .Net's Path.Combine('c:","File1.txt") merely returns c:File1.txt hence Path.combine(string path) always retuen false ,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.