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/

Reply via email to