Click here to Skip to main content
14,935,812 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

Can any one solve this problem? While I draw a control (Rich text box) on my dialog based application in visual studio 6.0 , then it compile successfully, but at the time while I run it it gets terminated automatically because of its memory leak problem.

Can any one suggest me or solved my problem that how can I solved my this problem?
the error code is as follows:
Loaded 'ntdll.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolic information found.
Loaded symbols for 'C:\WINDOWS\system32\MFC42D.DLL'
Loaded symbols for 'C:\WINDOWS\system32\MSVCRTD.DLL'
Loaded 'C:\WINDOWS\system32\gdi32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\user32.dll', no matching symbolic information found.
Loaded symbols for 'C:\WINDOWS\system32\MFCO42D.DLL'
Loaded 'C:\WINDOWS\system32\imm32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\advapi32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\rpcrt4.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\secur32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\comctl32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\uxtheme.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\msvcrt.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\MSCTF.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\version.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\MSCTFIME.IME', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\ole32.dll', no matching symbolic information found.
The thread 0xB8C has exited with code 0 (0x0).
The program 'D:\test\Debug\test.exe' has exited with code 0 (0x0).

--- this error only comes while i draw rich text box on my dialog based application.


Thankx in advanced
Ravi
Posted
Updated 17-Mar-19 8:07am
v2
Comments
Sergey Alexandrovich Kryukov 15-Apr-11 14:46pm
   
OP commented:

thnx but still no solution ... :(
Sergey Alexandrovich Kryukov 15-Apr-11 14:46pm
   
Ravi, please stop posting as Solution! -- will be deleted, not one gets e-mail notification.
--SA

Put a try/catch block around the code and run it under the debugger. There's little we can do here without being able to see your code, and besides, you really should have run it under the debugger BEFORE asking us to identify your issue.
   
kindly put following methode in ur initinstace
AfxInitRichEdit();
AfxOleInit();

Regards,
Saavi
   
Comments
Member 11950932 9-Sep-15 4:27am
   
-1 down vote
i am working with serialport programming while compling the program i am getting this error e thread 'HelperCanary::ThreadProc' (0xd40) s'est arrêté avec le code 0 (0x0). Le thread 'Thread::intermediateThreadProc' (0x202c) s'est arrêté avec le code 0 (0x0). Le thread '_TppWaiterpThread@4' (0x1d10) s'est arrêté avec le code 0 (0x0). Le programme '[7404] classc.exe: Managé (v4.0.30319)' s'est arrêté avec le code 0 (0x0). Le programme '[7404] classc.exe: Natif' s'est arrêté avec le code 0 (0x0).



and my programme is
/** Serial.cpp
*
* A very simple serial port control class that does NOT require MFC/AFX.
*
* @author Hans de Ruiter
*
* @version 0.1 -- 28 October 2008
*/

#include <iostream>
using namespace std;
#include <windows.h>
#include <tchar.h>
#include <crtdbg.h>


#include "s232.h"



int WINAPI _tWinMain
(
HINSTANCE /*hInst*/,
HINSTANCE /*hInstPrev*/,
LPTSTR /*lptszCmdLine*/,
int /*nCmdShow*/
){}



Serial::Serial(tstring &commPortName, int baudeRate)
{
commHandle = CreateFile(commPortName.c_str(), GENERIC_READ|GENERIC_WRITE, 0,NULL, OPEN_EXISTING,
0, NULL);

if(commHandle == INVALID_HANDLE_VALUE)
{
throw("ERROR: Could not open com port");
}
else
{
// set timeouts
COMMTIMEOUTS cto = { MAXDWORD, 0, 10,100, 500};
DCB dcb;
if(!SetCommTimeouts(commHandle,&cto))
{
Serial::~Serial();
throw("ERROR: Could not set com port time-outs");
}

// set DCB
memset(&dcb,0,sizeof(dcb));
dcb.DCBlength = sizeof(dcb);
dcb.BaudRate = 9600;
dcb.fBinary = 1;
dcb.fDtrControl = DTR_CONTROL_ENABLE;
dcb.fRtsControl = RTS_CONTROL_ENABLE;

dcb.Parity = NOPARITY;
dcb.StopBits = ONESTOPBIT;
dcb.ByteSize = 8;

if(!SetCommState(commHandle,&dcb))
{
Serial::~Serial();
throw("ERROR: Could not set com port parameters");
}
}
}


Serial::~Serial()
{
CloseHandle(commHandle);
}

double Serial::write(const char *buffer)
{
char cmd[] = "!GV\r";
DWORD numWritten;
WriteFile(commHandle, cmd, 5, &numWritten, NULL);

return numWritten;
}

int Serial::write(const char *buffer, int buffLen)
{
char cmd[] = "!GV\r";
DWORD numWritten;

WriteFile(commHandle, cmd, 5, &numWritten, NULL);

return numWritten;
}

int Serial::read(char *buffer, int buffLen, bool nullTerminate)
{
DWORD numRead;
if(nullTerminate)
{
--buffLen;
}

BOOL ret = ReadFile(commHandle, buffer, buffLen, &numRead, NULL);

if(!ret)
{
return 0;
}

if(nullTerminate)
{
buffer[numRead] = '\r';
}

return numRead;
}

#define FLUSH_BUFFSIZE 10

void Serial::flush()
{
char buffer[FLUSH_BUFFSIZE];
int numBytes = read(buffer, FLUSH_BUFFSIZE, false);
while(numBytes != 0)
{
numBytes = read(buffer, FLUSH_BUFFSIZE, false);
}
}
cheack if InitializeComponent() Method Exist in the form that exit app may be the problem 
;
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900