Re: OK, I'm stumped - Why doesn't this work? (Can't OTGetInetInterfaceInfo() )
Re: OK, I'm stumped - Why doesn't this work? (Can't OTGetInetInterfaceInfo() )
- Subject: Re: OK, I'm stumped - Why doesn't this work? (Can't OTGetInetInterfaceInfo() )
- From: Dakidd <email@hidden>
- Date: Tue, 9 Nov 2004 12:39:40 -0800
Igor Sez...
>The below function works fine for me on both Mac OS X and 9.2. It
>returns true if a machine has a real IP address.
>
>Boolean GetIPInterface( UInt8* szIPAddress )
>{
> Boolean bRes = false;
> SInt16 i;
>
> if ( OTInetGetInterfaceInfo( &sInetInterface, 0 ) == noErr )
Presumably, "sInetInterface" is a InetInterfaceInfo struct?
> {
> OTInetHostToString( sInetInterface.fAddress, (char*)(
Sure looks that way from how you're using it here. Who declares it?
You, or the OT headers?
<snip rest>
>Hope this helps. If it does not, reinstall OT.
Well, I'm about to give it a whirl - But I'm not holding my breath, since
the failure in my code is on the OTInetGetInterfaceInfo() call. Everything
else "just works" if I "fake it" by stuffing the fAddress field of my
InetInterfaceInfo struct with something that looks reasonably like an IP
number.
The killer for my code is the fact that OTGetInetInterfaceInfo() gives me
back a -3201 error every time I call it, rather than gathering the
information that it's supposed to.
>And, if you supply a more descriptive subject line to your message, Mr.
>Quinn is likely to answer it faster.
Better?
Test results:
Identical to orignal post: The call to OTGetInetInterfaceInfo() hands back
the -3201 error. The rest of the code works fine if I stuff a fake value
into sInetInterfaceInfo.fAddress.
AUGH!!! What's not being found???
Don Bruder - email@hidden <--- Preferred Email - unmunged
I will choose a path that's clear: I will choose Free Will! - N. Peart
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden