Solved

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

Posted on 2001-06-18
4
1,057 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
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now