?
Solved

HEAP[xxxx.exe]: Invalid Address specified to RtlSizeHeap( 130000, 12eb24 )

Posted on 2001-06-18
4
Medium Priority
?
1,137 Views
Last Modified: 2008-03-03
hi,
 I get the above error when i return a string parameter of LPCSTR type. i have a scripting editor that runs as a part of an MFC application. whenever i try to return value that's of string type back , i get the above error.
Any help would be greatly appreciated.
brames_2000
0
Comment
Question by:brames_2000
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 6203082
>>I get the above error when i return a string parameter
>>of LPCSTR type

Is it a string literal? IOW, are you doint sth. like

LPCSTR foo()
{
 LPCSTR _p = "123";

 return _p;
}

If so, change it to use a non-const memory area, e.g.

LPCSTR foo()
{
 LPCSTR _a [] = "123";

 return _a;
}
0
 
LVL 22

Expert Comment

by:ambience
ID: 6204952
This can be a case with ownership of memory , if you are  playing around with some BSTRs and what is happening probably is that due to some reasons you releasing a BSTR twice, i had the same error once and this was what i had been doing (trying to be over cautious).
Can post some code ?
0
 
LVL 11

Expert Comment

by:griessh
ID: 6819254
I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. Unless there is objection or further activity,  I will suggest to refund the points and delete this question since you never gave more feedback.

The link to the Community Support area is: http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
0
 

Accepted Solution

by:
ComTech earned 0 total points
ID: 6837640
This dormant quesiton will be placed in PAQ.

Regards,
ComTech
CS @ EE
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
Suggested Courses
Course of the Month9 days, 21 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question