Thread View: borland.public.cppbuilder.nativeapi
4 messages
4 total messages
Started by Dan Mayo
Tue, 06 Feb 2007 15:58
Code Guard Help
Author: Dan Mayo
Date: Tue, 06 Feb 2007 15:58
Date: Tue, 06 Feb 2007 15:58
39 lines
2556 bytes
2556 bytes
Hopefully I am not blasted for posting this twice.
I am trying to use CodeGuard based on a recommendation here as I haven't
used it before. When I enable CodeGuard in my program of interest I get
odd "Method called on illegally casted object" errors, see "Re: Memory
Leak - TForm or TStringGrid or DynamicArray" for more info.
Trying to better understand this error and resolve it, I decided to
start with a basic hello world application. When I run this basic Hello
World type application using the 'Application->ExeName' that I think may
be causing the 'this->' reference error in my main program. When I run
the program with CodeGuard off, the program runs fine; when I turn
CodeGuard on, I get "The application failed to initialize properly" and
"...Project1.exe raised too many consecutive exceptions...." errors
immediately on application startup.
What am I doing wrong.
My code for Project1 is as follows, a one form application with label,
the label caption is setup in the constructor of the form:
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
const String ThePath = Application->ExeName;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
Label1->Caption = ThePath;
}
//---------------------------------------------------------------------------
Re: Code Guard Help
Author: Dan Mayo
Date: Tue, 06 Feb 2007 16:34
Date: Tue, 06 Feb 2007 16:34
51 lines
2929 bytes
2929 bytes
Perhaps this is a known bug? I am using BCB6, and have BCB2006
installed (unfortunetly I can't used BCB2006 as it is a memory hog and
my PC slows down to a snails crawl,.. hopefully my new pc will be in soon)
Is that what it is?
Dan Mayo wrote:
> Hopefully I am not blasted for posting this twice.
>
> I am trying to use CodeGuard based on a recommendation here as I haven't
> used it before. When I enable CodeGuard in my program of interest I get
> odd "Method called on illegally casted object" errors, see "Re: Memory
> Leak - TForm or TStringGrid or DynamicArray" for more info.
>
> Trying to better understand this error and resolve it, I decided to
> start with a basic hello world application. When I run this basic Hello
> World type application using the 'Application->ExeName' that I think may
> be causing the 'this->' reference error in my main program. When I run
> the program with CodeGuard off, the program runs fine; when I turn
> CodeGuard on, I get "The application failed to initialize properly" and
> "...Project1.exe raised too many consecutive exceptions...." errors
> immediately on application startup.
>
> What am I doing wrong.
>
> My code for Project1 is as follows, a one form application with label,
> the label caption is setup in the constructor of the form:
>
> //---------------------------------------------------------------------------
>
>
> #include <vcl.h>
> #pragma hdrstop
>
> #include "Unit1.h"
> //---------------------------------------------------------------------------
>
> #pragma package(smart_init)
> #pragma resource "*.dfm"
> TForm1 *Form1;
> const String ThePath = Application->ExeName;
> //---------------------------------------------------------------------------
>
> __fastcall TForm1::TForm1(TComponent* Owner)
> : TForm(Owner)
> {
> Label1->Caption = ThePath;
> }
> //---------------------------------------------------------------------------
>
Re: Code Guard Help
Author: Dan Mayo
Date: Wed, 07 Feb 2007 15:09
Date: Wed, 07 Feb 2007 15:09
4 lines
1343 bytes
1343 bytes
Well, I tried this on another development PC without BDS2006; and it didn't give me any errors; I've uninstalled BDS2006 from my slower PC and it's working now; must have been a problem with having both development environments on the same PC.
Re: Code Guard Help
Author: Dennis Cote
Date: Thu, 08 Feb 2007 02:11
Date: Thu, 08 Feb 2007 02:11
16 lines
1391 bytes
1391 bytes
On Tue, 06 Feb 2007 10:34:30 -0600, Dan Mayo wrote: > Perhaps this is a known bug? I am using BCB6, and have BCB2006 > installed (unfortunetly I can't used BCB2006 as it is a memory hog and > my PC slows down to a snails crawl,.. hopefully my new pc will be in soon) > > Is that what it is? > > Yes, this is a known issue. Check out QC 37181 http://qc.codegear.com/wc/qcmain.aspx?d=37181 and the comments in QC 28922 http://qc.codegear.com/wc/qcmain.aspx?d=28922 for more information. HTH Dennis Cote
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads