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

  • Thread starter Thread starter Bragadiru
  • Start date Start date
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 ")
 
Thank you very much.

Nishant S said:
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 said:
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.aspx?scid=kb;en-us;167730), fixed in
VC++ 2003.

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

Thnx for any advice.
 
Back
Top