OTBind + Serial Endpoint
OTBind + Serial Endpoint
- Subject: OTBind + Serial Endpoint
- From: Jiri Volejnik <email@hidden>
- Date: Tue, 27 Aug 2002 11:40:35 +0200
Hi,
I'm writing simple serial port wrapper under Carbon (therefore using OT),
and have a problem with OTBind. It returns kOTBadAddressErr, even thought
Serial Endpoints don't use the address.
Anyone can see the reason?
Thanks,
Jiri.
Here is the source:
bool
CSerialPort::Open()
{
OSStatus err = noErr;
TEndpointInfo info;
OTConfigurationRef config = ::OTCreateConfiguration(mPortName.c_str());
mEndpoint = ::OTOpenEndpointInContext(config, 0, &info, &err, nil);
if (err != noErr) {
return false;
}
TBind bind;
bind.addr.maxlen = bind.addr.len = 0;
bind.addr.buf = nil;
bind.qlen = 0;
err = mEndpoint->Bind(&bind,nil);
if (err != noErr) {
mEndpoint->Close();
mEndpoint = nil;
}
return mEndpoint != nil;
}
_______________________________________________
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.