Solved

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

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

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…
Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

831 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