Solved

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

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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
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 learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

726 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