Board index » cppbuilder » CodeGuard detecting an error before WinMain

CodeGuard detecting an error before WinMain


2003-09-05 02:47:21 PM
cppbuilder82
I wrote a program WCOM.EXE using C++ Builder 5.0. Before the program enters
WinMain function CodeGuard has
detected an error (see CodeGuard Log at the end of this e-mail). Since
CodeGuard has not been enabled
up to yesterday I do not know where in my program I wrote something causing
an error. Can somebody
help me?
Anton Mirnik
Error 00001. 0x310000 (Thread 0x05F0):
Bad parameter: A bad memory block (0xE50208) has been passed to the
function.
SysFreeMem(0x40004B7A)
Call Tree:
0x40002C52(=Vcl50.bpl:0x01:001C52)
0x0045196F(=WCOM.exe:0x01:05096F)
0x3257DF15(=CC3250MT.DLL:0x01:07CF15)
0x3257E0EB(=CC3250MT.DLL:0x01:07D0EB)
------------------------------------------
Error 00002. 0x310000 (r) (Thread 0x05F0):
Bad parameter: A bad memory block (0xE5021C) has been passed to the
function.
SysFreeMem(0x40004B7A)
Call Tree:
0x40002C52(=Vcl50.bpl:0x01:001C52)
0x004519A5(=WCOM.exe:0x01:0509A5)
0x3257DF15(=CC3250MT.DLL:0x01:07CF15)
0x3257E0EB(=CC3250MT.DLL:0x01:07D0EB)
------------------------------------------
Error 00003. 0x310000 (r) (Thread 0x05F0):
Bad parameter: A bad memory block (0xE50230) has been passed to the
function.
SysFreeMem(0x40004B7A)
Call Tree:
0x40002C52(=Vcl50.bpl:0x01:001C52)
0x004519D8(=WCOM.exe:0x01:0509D8)
0x3257DF15(=CC3250MT.DLL:0x01:07CF15)
0x3257E0EB(=CC3250MT.DLL:0x01:07D0EB)
------------------------------------------
Functions called:
delete (35 times)
memset (1 times)
atoi (1 times)
sprintf (3 times)
vsnprintf (100 times)
SysReallocMem (210 times)
SysFreeMem (4114 times)
SysGetMem (4111 times)
realloc (1 times)
memcpy (2 times)
delete[] (5 times)
free (28 times)
new[] (17 times)
new (40 times)
calloc (5 times)
malloc (22 times)
Resource types used:
object array (17 allocs, 16 max)
object (40 allocs, 28 max)
memory block (4139 allocs, 1891 max)
Modules used:
00230000 01/16/2001 03:05:00
C:\PROGRA~1\Borland\CBUILD~1\Projects\Bpl\A305_R51.BPL
00400000 09/04/2003 10:41:38 D:\BCBPRJ\CIN3_127\WCOM.exe
01970000 09/01/2000 15:42:46 C:\Program Files\Trend Micro\PC-cillin
2000\JavaHookNT.DLL
0CD00000 01/31/2000 05:00:00 C:\PROGRA~1\Borland\CBUILD~1\Bin\CG32.DLL
10000000 07/07/2003 09:50:00 C:\Program
Files\Logitech\MouseWare\System\LgWndHk.dll
20420000 05/08/2000 05:20:00 C:\WINNT\TRAYHOOK.dll
32500000 08/07/2000 05:01:00 C:\PROGRA~1\Borland\CBUILD~1\Bin\CC3250MT.DLL
40000000 01/24/2000 05:01:00 C:\WINNT\system32\Vcl50.bpl
402F0000 01/24/2000 05:01:00 C:\WINNT\system32\VCLX50.BPL
405B0000 01/24/2000 05:01:00 C:\WINNT\system32\VCLDB50.BPL
406A0000 01/24/2000 05:01:00 C:\WINNT\system32\VCLBDE50.BPL
40900000 01/24/2000 05:01:00 C:\WINNT\system32\QRPT50.BPL
41000000 02/09/1998 03:00:00 C:\WINNT\system32\BORLNDMM.DLL
695E0000 06/19/2003 21:05:04 C:\WINNT\system32\olepro32.dll
6E420000 12/07/1999 13:00:00 C:\WINNT\system32\INDICDLL.dll
70BD0000 08/29/2002 08:14:40 C:\WINNT\system32\SHLWAPI.DLL
71710000 08/29/2002 08:14:40 C:\WINNT\system32\comctl32.dll
75020000 12/07/1999 13:00:00 C:\WINNT\system32\WS2HELP.DLL
75030000 06/19/2003 21:05:04 C:\WINNT\system32\WS2_32.DLL
75050000 06/19/2003 21:05:04 C:\WINNT\system32\wsock32.dll
752F0000 12/07/1999 13:00:00 C:\WINNT\system32\oledlg.dll
759B0000 06/19/2003 21:05:04 C:\WINNT\system32\LZ32.DLL
75E60000 06/19/2003 21:05:04 C:\WINNT\system32\IMM32.dll
76620000 06/19/2003 21:05:04 C:\WINNT\system32\mpr.dll
76B30000 06/19/2003 21:05:04 C:\WINNT\system32\comdlg32.dll
77570000 12/07/1999 13:00:00 C:\WINNT\system32\winmm.dll
77800000 06/19/2003 21:05:04 C:\WINNT\system32\winspool.drv
77820000 06/19/2003 21:05:04 C:\WINNT\system32\version.dll
779B0000 06/19/2003 21:05:04 C:\WINNT\system32\oleaut32.dll
77A50000 07/05/2003 10:15:00 C:\WINNT\system32\ole32.dll
77D30000 07/05/2003 10:15:00 C:\WINNT\system32\RPCRT4.DLL
77E10000 06/19/2003 21:05:04 C:\WINNT\system32\user32.dll
77F40000 06/19/2003 21:05:04 C:\WINNT\system32\GDI32.DLL
77F80000 06/19/2003 21:05:04 C:\WINNT\system32\ntdll.dll
78000000 06/19/2003 21:05:04 C:\WINNT\system32\msvcrt.dll
782F0000 06/19/2003 21:05:04 C:\WINNT\system32\SHELL32.DLL
7C2D0000 06/19/2003 21:05:04 C:\WINNT\system32\advapi32.dll
7C4E0000 06/19/2003 21:05:04 C:\WINNT\system32\kernel32.dll
==========================================
 
 

Re:CodeGuard detecting an error before WinMain

I wrote a program WCOM.EXE using C++ Builder 5.0. Before the program enters
WinMain function CodeGuard has
detected an error (see CodeGuard Log at the end of this e-mail). Since
CodeGuard has not been enabled
up to yesterday I do not know where in my program I wrote something causing
an error. Can somebody
help me?
Anton Mirnik
Error 00001. 0x310000 (Thread 0x05F0):
Bad parameter: A bad memory block (0xE50208) has been passed to the
function.
SysFreeMem(0x40004B7A)
Call Tree:
0x40002C52(=Vcl50.bpl:0x01:001C52)
0x0045196F(=WCOM.exe:0x01:05096F)
0x3257DF15(=CC3250MT.DLL:0x01:07CF15)
0x3257E0EB(=CC3250MT.DLL:0x01:07D0EB)
------------------------------------------
Error 00002. 0x310000 (r) (Thread 0x05F0):
Bad parameter: A bad memory block (0xE5021C) has been passed to the
function.
SysFreeMem(0x40004B7A)
Call Tree:
0x40002C52(=Vcl50.bpl:0x01:001C52)
0x004519A5(=WCOM.exe:0x01:0509A5)
0x3257DF15(=CC3250MT.DLL:0x01:07CF15)
0x3257E0EB(=CC3250MT.DLL:0x01:07D0EB)
------------------------------------------
Error 00003. 0x310000 (r) (Thread 0x05F0):
Bad parameter: A bad memory block (0xE50230) has been passed to the
function.
SysFreeMem(0x40004B7A)
Call Tree:
0x40002C52(=Vcl50.bpl:0x01:001C52)
0x004519D8(=WCOM.exe:0x01:0509D8)
0x3257DF15(=CC3250MT.DLL:0x01:07CF15)
0x3257E0EB(=CC3250MT.DLL:0x01:07D0EB)
------------------------------------------
Functions called:
delete (35 times)
memset (1 times)
atoi (1 times)
sprintf (3 times)
vsnprintf (100 times)
SysReallocMem (210 times)
SysFreeMem (4114 times)
SysGetMem (4111 times)
realloc (1 times)
memcpy (2 times)
delete[] (5 times)
free (28 times)
new[] (17 times)
new (40 times)
calloc (5 times)
malloc (22 times)
Resource types used:
object array (17 allocs, 16 max)
object (40 allocs, 28 max)
memory block (4139 allocs, 1891 max)
Modules used:
00230000 01/16/2001 03:05:00
C:\PROGRA~1\Borland\CBUILD~1\Projects\Bpl\A305_R51.BPL
00400000 09/04/2003 10:41:38 D:\BCBPRJ\CIN3_127\WCOM.exe
01970000 09/01/2000 15:42:46 C:\Program Files\Trend Micro\PC-cillin
2000\JavaHookNT.DLL
0CD00000 01/31/2000 05:00:00 C:\PROGRA~1\Borland\CBUILD~1\Bin\CG32.DLL
10000000 07/07/2003 09:50:00 C:\Program
Files\Logitech\MouseWare\System\LgWndHk.dll
20420000 05/08/2000 05:20:00 C:\WINNT\TRAYHOOK.dll
32500000 08/07/2000 05:01:00 C:\PROGRA~1\Borland\CBUILD~1\Bin\CC3250MT.DLL
40000000 01/24/2000 05:01:00 C:\WINNT\system32\Vcl50.bpl
402F0000 01/24/2000 05:01:00 C:\WINNT\system32\VCLX50.BPL
405B0000 01/24/2000 05:01:00 C:\WINNT\system32\VCLDB50.BPL
406A0000 01/24/2000 05:01:00 C:\WINNT\system32\VCLBDE50.BPL
40900000 01/24/2000 05:01:00 C:\WINNT\system32\QRPT50.BPL
41000000 02/09/1998 03:00:00 C:\WINNT\system32\BORLNDMM.DLL
695E0000 06/19/2003 21:05:04 C:\WINNT\system32\olepro32.dll
6E420000 12/07/1999 13:00:00 C:\WINNT\system32\INDICDLL.dll
70BD0000 08/29/2002 08:14:40 C:\WINNT\system32\SHLWAPI.DLL
71710000 08/29/2002 08:14:40 C:\WINNT\system32\comctl32.dll
75020000 12/07/1999 13:00:00 C:\WINNT\system32\WS2HELP.DLL
75030000 06/19/2003 21:05:04 C:\WINNT\system32\WS2_32.DLL
75050000 06/19/2003 21:05:04 C:\WINNT\system32\wsock32.dll
752F0000 12/07/1999 13:00:00 C:\WINNT\system32\oledlg.dll
759B0000 06/19/2003 21:05:04 C:\WINNT\system32\LZ32.DLL
75E60000 06/19/2003 21:05:04 C:\WINNT\system32\IMM32.dll
76620000 06/19/2003 21:05:04 C:\WINNT\system32\mpr.dll
76B30000 06/19/2003 21:05:04 C:\WINNT\system32\comdlg32.dll
77570000 12/07/1999 13:00:00 C:\WINNT\system32\winmm.dll
77800000 06/19/2003 21:05:04 C:\WINNT\system32\winspool.drv
77820000 06/19/2003 21:05:04 C:\WINNT\system32\version.dll
779B0000 06/19/2003 21:05:04 C:\WINNT\system32\oleaut32.dll
77A50000 07/05/2003 10:15:00 C:\WINNT\system32\ole32.dll
77D30000 07/05/2003 10:15:00 C:\WINNT\system32\RPCRT4.DLL
77E10000 06/19/2003 21:05:04 C:\WINNT\system32\user32.dll
77F40000 06/19/2003 21:05:04 C:\WINNT\system32\GDI32.DLL
77F80000 06/19/2003 21:05:04 C:\WINNT\system32\ntdll.dll
78000000 06/19/2003 21:05:04 C:\WINNT\system32\msvcrt.dll
782F0000 06/19/2003 21:05:04 C:\WINNT\system32\SHELL32.DLL
7C2D0000 06/19/2003 21:05:04 C:\WINNT\system32\advapi32.dll
7C4E0000 06/19/2003 21:05:04 C:\WINNT\system32\kernel32.dll
==========================================
 

Re:CodeGuard detecting an error before WinMain

It can be caused by the dllmain function of a DLL/BPL which your program
uses. Also if you globally declare an instance of a class its
constructor will be executed before WinMain.
Eelke
 

{smallsort}

Re:CodeGuard detecting an error before WinMain

Wrong newsgroup. You have posted in the newsgroup for the old Borland C++
compiler's IDE. C++ Builder newsgroups are where people familiar with
Builder are found and they all have the word 'cppbuilder' in their name. A
list of the newsgroups is on Borland's newsgroups page:
info.borland.com/newsgroups
. Ed