🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #2620

Re: Code Guard Help

#2620
From: Dan Mayo
Date: Tue, 06 Feb 2007 16:34
51 lines
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;
> }
> //--------------------------------------------------------------------------- 
> 
Technical Details
Message-ID: <45c8ae52$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <45c8a5ea@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,3a679ddbd3fd8858
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Tue, 06 Feb 2007 10:34:30 -0600
From: Dan Mayo <do_not_spam_dmayo2@netzero.com>
User-Agent: Thunderbird 1.5.0.9 (Windows/20061207)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Code Guard Help
References: <45c8a5ea@newsgroups.borland.com>
In-Reply-To: <45c8a5ea@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 216.174.165.174
Message-ID: <45c8ae52$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1170779730 216.174.165.174 (6 Feb 2007 08:35:30 -0800)
Lines: 51
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail