C (243/254)

From:Andreas Meyer
Date:01 Apr 00 at 09:24:11
Subject:Re: WBStartup messages

Hello Bart

On 28-Mar-00, Bart King wrote:
> From: Bart King <bart@bartman.demon.co.uk>
>
> Andrew Bell <andrewb@exl.co.uk> wrote:
>
>> Try this:
>
> Bitchin' dude, thanks. The Process structure ain't something I'm clued
> up on. :)

Sorry, I was a bit late on reading this stuff...

Anyway, VBCC supports argc and argv; at least here. I don't think fiddling with the process structure is necessary.

I just do it like this:

---------------------------------------
int main (int argc, char **argv)
{
struct WBStartup *argmsg;

if (argc)
{
//started from shell

(...) //do your CLI-stuff here
}
else
{
//started from wb

argmsg = (struct WBStartup *) argv;

(...) //do your WB-stuff here
}

(...)

}
---------------------------------------

Regards, Andreas



Big cats at a waterhole waiting for the weak and wounded
to stagger into their territoriy so they could exercise
some violence and feed their starving reputations.

------------------------------------------------------------------------
DON'T HATE YOUR RATE!
Get a NextCard Visa, in 30 seconds! Get rates as low as
0.0% Intro or 9.9% Fixed APR and no hidden fees.
Apply NOW!
http://click.egroups.com/1/2120/1/_/451227/_/954581211/
------------------------------------------------------------------------