Hi,

Maybe, this I am about to say it is not the solution to your problem but try
it.
In the last instruction:

err = NetLibClose(AppNetRefnum, false);

the "false" parameter you use mean that the connection will not be close
inmediately, it will wait some time for a new connection to be establish (I
use this in my application), if you want to cut it inmediately change that
value for "true".

Use the emulator step by step to see in what stage the problem arises.

Hope it helps.
Luck.

Sue.

----- Original Message -----
From: "Hui Min" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Friday, August 10, 2001 8:10 AM
Subject: RE: Opening and Closing Net Library


> Hi,
> I had set "Redirect Netlib calls to host TCP/IP" in v3.2 Emulator.
> But i haven't been able to dial through using a modem using the
> emulator.
> Did i miss out any steps?
>
> Thus, I had been testing using the palm.
> The actually procedure is that the user will tap on the connect
> button to dial through using a modem.
> Then the user will be able to browse the net and do emails
> After all this are done, the user will get back to the app and
> disconnect the established connection.
>
> I had been able to connect but not disconnect.
>
> Thank you.
> Regards,
> Hwee Min
>
>
> > -----Original Message-----
> > From: Gavin Maxwell [SMTP:[EMAIL PROTECTED]]
> > Sent: Friday, August 10, 2001 1:15 PM
> > To: Palm Developer Forum
> > Subject: RE: Opening and Closing Net Library
> >
> > Have you tried running it in POSE with the debugger running (don't
forget
> > to
> > enable TCP/IP redirection in POSE)? That will give you a better idea of
> > what's happening, and where exactly it's going pear-shaped. The code you
> > show looks ok-ish, but are you doing anything else between opening and
> > closing the connection?
> >
> > Gavin.
> >
> > -----Original Message-----
> > From: Hui Min [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, August 10, 2001 1:58 PM
> > To: Palm Developer Forum
> > Subject: Opening and Closing Net Library
> >
> >
> > Hi,
> >
> > I would like to know what is the proper way of opening and closing
> > the Net Library.
> > I tried the code below and even though I can establish the
> > connection, i was unable to disconnect.
> > My palm would hang at my app. Please advise.
> >
> > <My Code>
> >
==========================================================================
> > ==
> > ===
> > err = NetLibOpen(AppNetRefnum, &errIF);
> > if (err == netErrAlreadyOpen)
> > {
> > FrmCustomAlert(MessageAlert, "The network interface was already
> > established.", NULL, NULL);
> > }
> > else
> > if (err) ErrAlert(err);
> >
> > if (!err || (err == netErrAlreadyOpen))
> > {
> > err = NetLibClose(AppNetRefnum, false);
> > if (err && (err != netErrStillOpen))
> > ErrAlert(err);
> > }
> >
==========================================================================
> > ==
> > ===
> >
> > Thank you.
> > Regards,
> > Hwee Min
> >
> > --
> > For information on using the Palm Developer Forums, or to unsubscribe,
> > please see http://www.palmos.com/dev/tech/support/forums/
> >
> > --
> > For information on using the Palm Developer Forums, or to unsubscribe,
> > please see http://www.palmos.com/dev/tech/support/forums/
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to