BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Disable CodeGuard for certain lines of code

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (IDE)
View previous topic :: View next topic  
Author Message
Albert Wiersch
Guest





PostPosted: Thu Aug 17, 2006 8:55 pm    Post subject: Disable CodeGuard for certain lines of code Reply with quote



Is there anyway to prevent CodeGuard from generating messages for specific
lines of code? It would be great if I could enclose a section of code with
some directive so that CodeGuard would ignore it. This is to get around some
of the problems with CodeGuard and FILE *s.

--
Albert Wiersch
Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Thu Aug 17, 2006 9:37 pm    Post subject: Re: Disable CodeGuard for certain lines of code Reply with quote



"Albert Wiersch" <mrinternetnewsborland (AT) wiersch (DOT) com> wrote in message
news:44e49172 (AT) newsgroups (DOT) borland.com...

Quote:
Is there anyway to prevent CodeGuard from generating
messages for specific lines of code?

Look at #pragma option. CodeGuard has a few -vG options available. I don't
know if these options can be used in a localized manner, though.


Gambit
Back to top
Albert Wiersch
Guest





PostPosted: Fri Aug 18, 2006 12:47 am    Post subject: Re: Disable CodeGuard for certain lines of code Reply with quote



Thanks, but how do you turn the options OFF? The -vG options just seem to
turn things on. I need to be able to turn this off for certain sections of
code.

CodeGuard gives problems for this simple code:
FILE *fileptr;
fileptr=_wfopen(filename,L"rb");

Do you know any way to get CodeGuard to stop telling me "A bad file or pipe
stream (0x17935C4) has been passed to the function."?

Thank you..

--
Albert Wiersch
Fix your website: http://onlinewebcheck.com


"Remy Lebeau (TeamB)" <no.spam (AT) no (DOT) spam.com> wrote in message
news:44e49b76$1 (AT) newsgroups (DOT) borland.com...
Quote:

"Albert Wiersch" <mrinternetnewsborland (AT) wiersch (DOT) com> wrote in message
news:44e49172 (AT) newsgroups (DOT) borland.com...

Is there anyway to prevent CodeGuard from generating
messages for specific lines of code?

Look at #pragma option. CodeGuard has a few -vG options available. I
don't
know if these options can be used in a localized manner, though.


Gambit


Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Fri Aug 18, 2006 1:24 am    Post subject: Re: Disable CodeGuard for certain lines of code Reply with quote

"Albert Wiersch" <mrinternetnewsborland (AT) wiersch (DOT) com> wrote in message
news:44e4c7a1$1 (AT) newsgroups (DOT) borland.com...

Quote:
Thanks, but how do you turn the options OFF? The -vG options
just seem to turn things on.

You will have to turn them off in the Project Options, and then enabled them
in code on an as-needed basis.

Quote:
Do you know any way to get CodeGuard to stop telling me
"A bad file or pipe stream (0x17935C4) has been passed to
the function."?

No.


Gambit
Back to top
Ed Mulroy
Guest





PostPosted: Fri Aug 18, 2006 1:25 am    Post subject: Re: Disable CodeGuard for certain lines of code Reply with quote

Where in the IDE settings did you find the Unicode option?

.. Ed

Quote:
Albert Wiersch wrote in message
news:44e4c7a1$1 (AT) newsgroups (DOT) borland.com...

Thanks, but how do you turn the options OFF? The -vG options just seem to
turn things on. I need to be able to turn this off for certain sections of
code.

CodeGuard gives problems for this simple code:
FILE *fileptr;
fileptr=_wfopen(filename,L"rb");

Do you know any way to get CodeGuard to stop telling me "A bad file or
pipe stream (0x17935C4) has been passed to the function."?
Back to top
Christian Gudrian
Guest





PostPosted: Fri Aug 18, 2006 8:10 am    Post subject: Re: Disable CodeGuard for certain lines of code Reply with quote

Albert Wiersch wrote:

Quote:
Do you know any way to get CodeGuard to stop telling me "A bad file or pipe
stream (0x17935C4) has been passed to the function."?

Make sure, that the code that created the file stream handle has been
compiled with CodeGuard as well. Otherwise CodeGuard sees a handle it
has no knowledge of and complains -- though it might in fact be a
perfectly valid handle.

Christian
Back to top
Albert Wiersch
Guest





PostPosted: Mon Aug 21, 2006 11:45 pm    Post subject: Re: Disable CodeGuard for certain lines of code Reply with quote

What do you mean Unicode option? I don't know of any "Unicode option" in the
IDE. I am compiling my program with the UNICODE and _UNICODE defines.

I switched my program to unicode strings and am now using unicode equivalent
functions, like _wfopen().

--
Albert Wiersch
Fix your website: http://onlinewebcheck.com


"Ed Mulroy" <dont_email_me (AT) bitbuc (DOT) ket> wrote in message
news:44e4d0ce$1 (AT) newsgroups (DOT) borland.com...
Quote:
Where in the IDE settings did you find the Unicode option?

. Ed

Albert Wiersch wrote in message
news:44e4c7a1$1 (AT) newsgroups (DOT) borland.com...

Thanks, but how do you turn the options OFF? The -vG options just seem to
turn things on. I need to be able to turn this off for certain sections
of code.

CodeGuard gives problems for this simple code:
FILE *fileptr;
fileptr=_wfopen(filename,L"rb");

Do you know any way to get CodeGuard to stop telling me "A bad file or
pipe stream (0x17935C4) has been passed to the function."?

Back to top
Ed Mulroy
Guest





PostPosted: Tue Aug 22, 2006 3:06 am    Post subject: Re: Disable CodeGuard for certain lines of code Reply with quote

Quote:
What do you mean Unicode option? I don't know of any "Unicode option" in
the IDE. I am compiling my program with the UNICODE and _UNICODE defines.

So your program does not start at wmain or wWinMain?

.. Ed

Quote:
Albert Wiersch wrote in message
news:44e9ff14$1 (AT) newsgroups (DOT) borland.com...

What do you mean Unicode option? I don't know of any "Unicode option" in
the IDE. I am compiling my program with the UNICODE and _UNICODE defines.

I switched my program to unicode strings and am now using unicode
equivalent functions, like _wfopen().
Back to top
Albert Wiersch
Guest





PostPosted: Tue Aug 22, 2006 6:41 pm    Post subject: Re: Disable CodeGuard for certain lines of code Reply with quote

No, I don't think so unless there is some macro that is changing it behind
the scenes because I am defining UNICODE and _UNICODE. It starts with
WinMain().

--
Albert Wiersch


"Ed Mulroy" <dont_email_me (AT) bitbuc (DOT) ket> wrote in message
news:44ea2e49$1 (AT) newsgroups (DOT) borland.com...
Quote:
What do you mean Unicode option? I don't know of any "Unicode option" in
the IDE. I am compiling my program with the UNICODE and _UNICODE defines.

So your program does not start at wmain or wWinMain?

. Ed

Albert Wiersch wrote in message
news:44e9ff14$1 (AT) newsgroups (DOT) borland.com...

What do you mean Unicode option? I don't know of any "Unicode option" in
the IDE. I am compiling my program with the UNICODE and _UNICODE defines.

I switched my program to unicode strings and am now using unicode
equivalent functions, like _wfopen().

Back to top
Albert Wiersch
Guest





PostPosted: Tue Aug 22, 2006 6:42 pm    Post subject: Re: Disable CodeGuard for certain lines of code Reply with quote

Perhaps wWinMain is for MFC Unicode applications? Mine is a VCL application.

--
Albert Wiersch
Fix your website: http://onlinewebcheck.com


"Ed Mulroy" <dont_email_me (AT) bitbuc (DOT) ket> wrote in message
news:44ea2e49$1 (AT) newsgroups (DOT) borland.com...
Quote:
What do you mean Unicode option? I don't know of any "Unicode option" in
the IDE. I am compiling my program with the UNICODE and _UNICODE defines.

So your program does not start at wmain or wWinMain?

. Ed

Albert Wiersch wrote in message
news:44e9ff14$1 (AT) newsgroups (DOT) borland.com...

What do you mean Unicode option? I don't know of any "Unicode option" in
the IDE. I am compiling my program with the UNICODE and _UNICODE defines.

I switched my program to unicode strings and am now using unicode
equivalent functions, like _wfopen().

Back to top
Ed Mulroy
Guest





PostPosted: Tue Aug 22, 2006 9:00 pm    Post subject: Re: Disable CodeGuard for certain lines of code Reply with quote

wWinMain and wmain are the program start points in a Unicode program for GUI
and console mode programs.

I did not know that your program was a VCL app. The VCL does not do Unicode
so of course you didn't use it.

.. Ed

Quote:
Albert Wiersch wrote in message
news:44eb09ab (AT) newsgroups (DOT) borland.com...

Perhaps wWinMain is for MFC Unicode applications? Mine is a VCL
application.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (IDE) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.