"Jeff Loucks" <[EMAIL PROTECTED]> schrieb:
> You get libRefNum from SysLibFind("Net.lib", &libRefNum). Then, you iterate
> through all the interfaces, skipping the loopback interface. When you find
> one that reports up, then you have a network. It may not be the network you
> want or can use, but you know something is up. Here's some code:
>
>
> Boolean IsAnyNetworkUp(UInt16 libRefNum)
> {
> UInt16 instance,size,index = 0;
> UInt32 creator;
> UInt8 value;
> Err err;
>
> while (1)
> {
> err = NetLibIFGet(libRefNum,index,&creator,&instance);
> if (err == netErrInvalidInterface)
> return false;
> if (err == errNone && creator != netIFCreatorLoop)
> {
> size = sizeof(value);
> if
> (NetLibIFSettingGet(libRefNum,creator,instance,netIFSettingUp,&value,&size)
> == errNone &&
> value != 0)
> return true;
> }
> }
> }
It seems, that your code go in an loop without end...
Any suggestion?
I call your function so:
if(SysLibFind("Net.lib", &AppNetRefnum) == 0)
{
if(IsAnyNetworkUp(AppNetRefnum))
StrCopy(W, "T");
else
StrCopy(W, "F");
}
else
StrCopy(W, "0");
Is if false?
Thanks
Luca Bertoncello
([EMAIL PROTECTED])
--
For information on using the ACCESS Developer Forums, or to unsubscribe, please
see http://www.access-company.com/developers/forums/