Przemyslaw Czerpak wrote: > If you do not link your program as GUI > one then you have: > hb_errInternal( 10001, "It's not a window GUI program.", "", "" );
Yes, but the user can't see the message as it goes to limbo, it is not on console, stdout or stderr. All I get is the CodeGuard box and then the program terminate. > If you are using BCC then it has special switch to create GUI > programs with WinMain() startup entry. AFAIR it was -tW. Yes. Adding -tW to CFLAGS do the trick. It all started when I was trying to run tests/gfx.prg which is now working colorfully, but gives some CodeGuard errors. Here is a small test that show the problem: ---tt12.prg--- #include "hbgtinfo.ch" #include "hbgfx.ch" REQUEST HB_GT_WVT proc test() hb_gtInfo(HB_GTI_WINTITLE, "1234") return -------------- set CFLAGS=-v -y -vG -tW bld_b32 tt12 /w/a/n tt12 //gt:wvt Error 00001. 0x130410 (Thread 0x002F): Access overrun: Attempt to access 10 byte(s) at 0x00CB2B8C, that is at offset 88 in heap block 0x00CB2B34 which is only 97 bytes long. strlen(0x00CB2B8C ["s"]) Call Tree: 0x00479051(=tt12.exe:0x01:078051) source\rtl\gtwvt\GTWVT.C#1691 0x0045A126(=tt12.exe:0x01:059126) source\rtl\GTAPI.C#893 0x0045B034(=tt12.exe:0x01:05A034) source\rtl\GTFUNC.C#108 0x0042F355(=tt12.exe:0x01:02E355) source\vm\HVM.C#4876 0x00421D15(=tt12.exe:0x01:020D15) source\vm\HVM.C#1043 0x004011BC(=tt12.exe:0x01:0001BC) tt12.c#42 The memory block (0x00CB2B34) [size: 97 bytes] was allocated with malloc Call Tree: 0x0041AD3B(=tt12.exe:0x01:019D3B) source\vm\FM.C#245 0x00475D5C(=tt12.exe:0x01:074D5C) source\rtl\gtwvt\GTWVT.C#364 0x00479042(=tt12.exe:0x01:078042) source\rtl\gtwvt\GTWVT.C#1690 0x0045A126(=tt12.exe:0x01:059126) source\rtl\GTAPI.C#893 0x0045B034(=tt12.exe:0x01:05A034) source\rtl\GTFUNC.C#108 0x0042F355(=tt12.exe:0x01:02E355) source\vm\HVM.C#4876 ------------------------------------------ Error 00002. 0x130610 (Thread 0x002F): Access overrun: Attempt to access 1 byte(s) at 0x00CB2B8C+9, that is at offset 88+9 in heap block 0x00CB2B34 which is only 97 bytes long. Call Tree: 0x0043F194(=tt12.exe:0x01:03E194) source\vm\ITEMAPI.C#387 0x0047906B(=tt12.exe:0x01:07806B) source\rtl\gtwvt\GTWVT.C#1691 0x0045A126(=tt12.exe:0x01:059126) source\rtl\GTAPI.C#893 0x0045B034(=tt12.exe:0x01:05A034) source\rtl\GTFUNC.C#108 0x0042F355(=tt12.exe:0x01:02E355) source\vm\HVM.C#4876 0x00421D15(=tt12.exe:0x01:020D15) source\vm\HVM.C#1043 The memory block (0x00CB2B34) [size: 97 bytes] was allocated with malloc Call Tree: 0x0041AD3B(=tt12.exe:0x01:019D3B) source\vm\FM.C#245 0x00475D5C(=tt12.exe:0x01:074D5C) source\rtl\gtwvt\GTWVT.C#364 0x00479042(=tt12.exe:0x01:078042) source\rtl\gtwvt\GTWVT.C#1690 0x0045A126(=tt12.exe:0x01:059126) source\rtl\GTAPI.C#893 0x0045B034(=tt12.exe:0x01:05A034) source\rtl\GTFUNC.C#108 0x0042F355(=tt12.exe:0x01:02E355) source\vm\HVM.C#4876 ------------------------------------------ Running on a Windows NT 4.0 workstation if that matter. Chen. _______________________________________________ Harbour mailing list [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
