473,395 Members | 1,649 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,395 software developers and data experts.

GetTempFileName() causes crush

Hello, i have an application which I am investigating the crush dump for. The application is supposed to create a tmp file under C:\DOCUME~1\<username>\LOCALS~1\Temp\

The API called is GetTempFileName()

Expand|Select|Wrap|Line Numbers
  1. GetTempFileName(lpPathBuffer, TEXT("NEW"), 0, szTempName);  
I made sure lpPathBuffer is correct (C:\DOCUME~1\<username>\LOCALS~1\Temp\). The function NEVER returns 0, which is supposed to mean that a unique tmp file is created under C:\DOCUME~1\<username>\LOCALS~1\Temp\. However, in the crush dump szTempName is 0x035801cf <Bad Ptr>. In a working scenario, szTempName is something like 0x00f32968 "C:\DOCUME~1\<username>\LOCALS~1\Temp\NEWE075. tmp"

Any idea why szTempName did get a bad value i.e. 0x035801cf <Bad Ptr> for the crush scenario? Any thought shared is really appreciated.
Feb 27 '08 #1
0 1337

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: David Walker | last post by:
Hi I've been doing a site in css recently, and have come across the problem of IE not allowing text to be selected. The problem is, sometimes it does allow it, and sometimes it doesn't, and i'm...
8
by: Glenn A. Harlan | last post by:
Why am I receiving the below error when calling - Path.GetTempFileName() The directory name is invalid. Description: An unhandled exception occurred during the execution of the current web...
1
by: Alexander Jhin | last post by:
I have this very basic Custom Control: public class TestPanel : Panel { public TestPanel() : base() { this.SetStyle( ControlStyles.AllPaintingInWmPaint | ControlStyles.Opaque |...
2
by: Dutchy | last post by:
Hi there, After spending several hours trying all I could imagine and search for in Google I gave up. In a continuous form I want to sort the choosen column by clicking the header (label) of...
0
by: Xavier Osa | last post by:
Hi, I have an ASP.Net web page that you can download a file. As Fergunson's problem, it prompts twice dialog boxes only if I select Open button. If I select Save button, it prompts once. I'm...
2
by: Jonathan Trevor | last post by:
Hi, For the last couple of releases of a product we're developing we've been running to very wierd behavior from IE and our ASP.NET web application which serves up various types of files and I'm...
2
by: Sagaert Johan | last post by:
hi Path.GetTempFileName returns a string in the form : C:\DOCUME~1\DEFAUL~1\LOCALS~1\APPLIC~1\ how can i convert it to a normal readable path C:\Documents and Settings\Default User\Local...
3
by: doubts | last post by:
Hi all, I am trying to convert my bulk of code from VC++ 6.0 to VC++.Net. when using std::string type variable, the application causes exception at one instance and does not cause an exception at...
1
by: Marco Shaw | last post by:
..NET novice** How does ::GetTempFileName() work? I'm trying to use it to avoid some kind of race condition, but I need to call it, and get the resulting temp file into a variable. Then I'll...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.