Article View: borland.public.cppbuilder.nativeapi
Article #13902Re: Get cmdline args of another program?
From: Vladimir Afanasyev
Date: Tue, 16 Sep 2003 07:14
Date: Tue, 16 Sep 2003 07:14
40 lines
2494 bytes
2494 bytes
Hi,
"Islaw" <szr80@yahoo.com> wrote:
>"Vladimir Afanasyev" <avv@systema.kiev.ua> wrote in message
>news:3f64445f$1@newsgroups.borland.com...
>>
>> Hi,
>> for WinNt/2000/XP see:
>> http://www.winterdom.com/dev/ptk/cmdline.html
>> It will not work for Win98 because uses CreateRemoteThread.
>> Vladimir.
>
>Thanks. Though that c code will not compile in any Borland compiler (BC/C++
>5.02 and BCB 5). They both complain about
>
> __leave
>
>being undefined in
>
> #define SIGNAL_ERROR() { bError = TRUE; __leave; }
>
>but it compiles fine in MSVC6. Why does Borland trip on this???
Is it __leave in the code is really a very big problem
for using those way in BCB?
__leave (Platform SDK) -
"Allows for immediate termination of the __try block without
causing abnormal termination and its performance penalty. "
Another quote:
"To avoid abnormal termination, execution should continue to the end of the block. You can also execute the __leave statement. The __leave statement allows for immediate termination of the __try block without causing abnormal termination and its performance penalty. Check your compiler documentation to determine if the __leave statement is supported. "
The last sentence is Microsoft view on it.
In most cases the code for Visual C++ can be rewritten for
BCB. The problems begins near DDK but really a lot of
DDK function can be used in BCB application.
Vladimir.
Technical Details
Message-ID:
<3f66b83c$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3f64269f$1@newsgroups.borland.com> <3f64445f$1@newsgroups.borland.com> <3f65df88$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,9d54a63f4f340102 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-09-16 00:17:32 PST From: "Vladimir Afanasyev" <avv@systema.kiev.ua> Sender: "Vladimir Afanasyev" <avv@systema.kiev.ua> Reply-To: "Vladimir Afanasyev" <avv@systema.kiev.ua> Subject: Re: Get cmdline args of another program? Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 212.82.216.226 212.82.216.226 X-Forwarded-For: 192.168.0.147 References: <3f64269f$1@newsgroups.borland.com> <3f64445f$1@newsgroups.borland.com> <3f65df88$1@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.65 Message-ID: <3f66b83c$1@newsgroups.borland.com> Date: 16 Sep 2003 00:14:04 -0700 X-Trace: newsgroups.borland.com 1063696444 207.105.83.65 (16 Sep 2003 00:14:04 -0700) Lines: 41 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail