Click here to Skip to main content
15,923,168 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to change font name, font size or font color in STATIC control Pin
lamtam28-Sep-06 1:07
lamtam28-Sep-06 1:07 
GeneralRe: How to change font name, font size or font color in STATIC control Pin
Hamid_RT29-Sep-06 8:11
Hamid_RT29-Sep-06 8:11 
AnswerRe: How to change font name, font size or font color in STATIC control Pin
Hamid_RT27-Sep-06 20:52
Hamid_RT27-Sep-06 20:52 
AnswerRe: How to change font name, font size or font color in STATIC control Pin
nutkase27-Sep-06 20:57
nutkase27-Sep-06 20:57 
AnswerRe: How to change font name, font size or font color in STATIC control Pin
David Crow28-Sep-06 3:22
David Crow28-Sep-06 3:22 
QuestionAutomatically initiating a VPN connection Pin
Jain Mohit27-Sep-06 20:28
Jain Mohit27-Sep-06 20:28 
QuestionEnglish to Hindi Dictionary,English to English Dictionary with talkie Pin
ShilpiP27-Sep-06 19:45
ShilpiP27-Sep-06 19:45 
Questiondelete pChar; //ERROR Pin
Kiran Pinjala27-Sep-06 19:29
Kiran Pinjala27-Sep-06 19:29 
somefn()
{
UCHAR *pChar;<br />
ULONG bufSize=0;<br />
pChar = new UCHAR [DataLength*sizeof(UCHAR)];<br />
// some function which copies some buffer into pChar and<br />
// buffer length into bufSize<br />
memcpy(m_pAudioBuffer+previousBufSize,pChar,Datalength);<br />
// UCHAR *m_pAudioBuffer; member variable.<br />
m_previousBufSize +=bufSize;<br />
// ULONG m_prevoiusBufSize. member variable.<br />
if(m_previousBufSize >= MT_BUFFER_SIZE)<br />
  SaveToOutputFile(); // which saves this file into <br />
if(pChar != NULL)<br />
  delete pChar;<br />
pChar = NULL;<br />
return;<br />
}


this function is called in a loop and when bufsize becomes morethan MT_BUFFER_SIZE the buffer will be saved into a file(SaveToOutPutFile()).
Untill the buffer is saved into file the code is working fine. when the condition is becoming ture and after SaveToOutPutFile() is being called the statement delete pChar is giving an accertion filure.
In the SaveToOutPutFile im saving m_pAudioBuffer to a file.
The error shows
_CrtIsValidHeapPointer(pUserData).

how to solve this.Please help.



KIRAN PINJARLA

AnswerRe: delete pChar; //ERROR Pin
Anilkumar K V27-Sep-06 19:36
Anilkumar K V27-Sep-06 19:36 
AnswerRe: delete pChar; //ERROR Pin
nutkase27-Sep-06 19:43
nutkase27-Sep-06 19:43 
QuestionCPanel class Pin
zareee27-Sep-06 19:23
zareee27-Sep-06 19:23 
AnswerRe: CPanel class Pin
Cedric Moonen27-Sep-06 20:42
Cedric Moonen27-Sep-06 20:42 
GeneralRe: CPanel class Pin
zareee27-Sep-06 22:45
zareee27-Sep-06 22:45 
GeneralRe: CPanel class Pin
Cedric Moonen27-Sep-06 23:23
Cedric Moonen27-Sep-06 23:23 
GeneralRe: CPanel class Pin
zareee28-Sep-06 18:33
zareee28-Sep-06 18:33 
GeneralRe: CPanel class Pin
S Douglas30-Sep-06 23:07
professionalS Douglas30-Sep-06 23:07 
QuestionHow to intialize a pointer variable ? Pin
Sakthiu27-Sep-06 18:41
Sakthiu27-Sep-06 18:41 
AnswerRe: How to intialize a pointer variable ? Pin
Waldermort27-Sep-06 18:51
Waldermort27-Sep-06 18:51 
AnswerRe: How to intialize a pointer variable ? Pin
Shog927-Sep-06 18:52
sitebuilderShog927-Sep-06 18:52 
AnswerRe: How to intialize a pointer variable ? Pin
Rinu_Raj27-Sep-06 18:58
Rinu_Raj27-Sep-06 18:58 
AnswerRe: How to intialize a pointer variable ? Pin
Hamid_RT27-Sep-06 19:37
Hamid_RT27-Sep-06 19:37 
QuestionVS 2005 Remote Debugging Pin
Richard Andrew x6427-Sep-06 17:44
professionalRichard Andrew x6427-Sep-06 17:44 
AnswerRe: VS 2005 Remote Debugging Pin
S Douglas30-Sep-06 23:10
professionalS Douglas30-Sep-06 23:10 
QuestionDrawing Pin
Demian Panello27-Sep-06 13:26
Demian Panello27-Sep-06 13:26 
AnswerRe: Drawing Pin
Stephen Hewitt27-Sep-06 14:07
Stephen Hewitt27-Sep-06 14:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.