[futurebasic] Re: [FB] Hardware address

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : February 2002 : Group Archive : Group : All Groups

From: Robert Purves <robert.purves@...>
Date: Mon, 18 Feb 2002 22:54:48 +1300
In OS 9.2 (Classic running on OS X), EGetInfo returns an error code -21, and does nothing else.  You may want to check the error code on your system.

Robert P.


>#2. Reading the hardware address.  This has proved to be elusive for me.  Below is some code that seems to follow the rules, but returns '0000 0000 0000'.  Can any of you experts point out where I'm going wrong?
>
>Much Thanks,
>
>Walter
>
>'==============================================
>TOOLBOX FN EGetInfo(POINTER, SHORT) = OSErr
>
>CLEAR LOCAL:DIM A$, err%, rslt%
> DIM eParamBlk.72
> DIM eParamPntr AS POINTER
> DIM eBuffer.78
> DIM eBuffPntr AS POINTER
>LOCAL FN Get_Hdwr_Addrs$
>  LET eParamBlk.12& = 0  ' Pointer to the completion routine (0)
>  LET eParamBlk.24% = 0  ' Driver reference number
>  LET eParamBlk.26% = _ENetGetInfo  ' _ENetGetInfo = 252 in FB^3
>  LET eBuffPntr = @eBuffer
>  LET eParamBlk.30& = eBuffPntr
>  LET eParamBlk.34% = 78
>  LET eParamPntr = @eParamBlk
>  LET err% = FN EGetInfo(eParamPntr,1)
>  DEFSTR SHORT
>  LET rslt%;2 = @eBuffer:     LET A$ =      HEX$(rslt%) + " "
>  LET rslt%;2 = @eBuffer + 2: LET A$ = A$ + HEX$(rslt%) + " "
>  LET rslt%;2 = @eBuffer + 4: LET A$ = A$ + HEX$(rslt%)
>END FN = A$
>'==============================================