Re: Open Transport?
Re: Open Transport?
- Subject: Re: Open Transport?
- From: Todd Casey <email@hidden>
- Date: Fri, 3 Oct 2003 07:30:47 -0700 (PDT)
Thanks for the info Xavier. I also found that I was calling OTCloseProvider and DisposeOTNotifyUPP prematurely and that is why I was never seeing the modem port opening. I am now able to dial PPP connection using the default settings.
Will OS 8.6 to 10.2.6 support carbon and Open Transport?
Thanks,
Todd
Xavier Jubier <email@hidden> wrote:
You have to set up the connection parameters either by using
OTOptionManagment() if you want to control everything programmatically
or by setting default options in the preferences panels (Remote access
and Modem control panel under OS 9, Network pane under X).
Also you have to listen to the events returned by your notifier
function as the I_OTConnect call is always asynchronous.
Xavier
Le vendredi, 3 oct 2003, ` 15:46 Europe/Paris, Todd Casey a icrit :
>
I am trying to write an application that will run on Mac OS 8.6 -
>
10.2.6 that establishes a PPP Internet Connection programmatically
>
without the users intervention. I would also like to have the
>
username/password/access number hidden from the user (is this possible
>
using OTOptionManagment()?).
>
>
Here is what I currently have. The code compiles and runs but it does
>
not seem to even open the modem port. I am currently running OS
>
10.2.6. Is Open Transport the best method to use in establishing a PPP
>
connection?
>
>
// CODE BEGINS
>
>
// linked OpenTransportLib
>
>
err = InitOpenTransportInContext(kInitOTForApplicationMask, nil);
>
>
notifier = NewOTNotifyUPP(Notifier); // I have a Notifier callback
>
function defined earlier
>
>
ep = OTOpenEndpointInContext(OTCreateConfiguration(kPPPControlName),
>
0, NULL, &err, nil);
>
if(kOTNoError == err)
>
{
>
err = OTInstallNotifier(ep, notifier, ep);
>
err = OTSetAsynchronous(ep);
>
err = OTSetBlocking(ep);
>
err = OTIoctl(ep, I_OTGetMiscellaneousEvents, (void *)1);
>
err = OTIoctl(ep, I_OTConnect, NULL);
Listen to the events returned by the notifier before disposing of the
endpoint and handle error codes returned
>
err = OTCloseProvider(ep);
>
}
>
>
if(notifier)
>
{
Not necessary because done by OTCloseProvider()
>
DisposeOTNotifyUPP(notifier);
>
}
>
>
// CODE ENDS
>
>
What am I doing wrong? I would greatly appreciate any help/info. I am
>
new to Mac development and I have tried to search through the Internet
>
and developer.apple.com before posting here.
>
>
Thanks,
>
>
Todd
>
The New Yahoo! Shopping - with improved product search
>
_______________________________________________
>
macnetworkprog mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
>
Do not post admin requests to the list. They will be ignored.
The New Yahoo! Shopping - with improved product search
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.