[futurebasic] Re: [FB] AppleTalk Question

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : December 2001 : Group Archive : Group : All Groups

From: Robert Covington <artlythere@...>
Date: Sun, 9 Dec 2001 15:08:12 -0500
>Can anyone show me an example of  OTATalkGetMyZone  in use? I don't
>understand the "geek speak" on
>http://developer.apple.com/techpubs/mac/NetworkingOT/NetworkingWOT-448.html#HE
>
>ADING448-0
>
>I will post it on my project page:
>http://www.acmenet.net/~jeffny/AppleTalk/samples.html
>
>Besides using AppleTalk to print something I also have some other projects in
>mind. I have started an AppleTalk "Learning / Construction Set" on the page
>above.
>
>Thanks,
>Jeff-

Jeff,

I don't know of any examples for this, the call isn't even in the FB
headers (yet).

The below is incomplete but will give you a step up I hope.

Robert Covington

// See Toolbox MacTypes.incl

Begin Globals
Begin Record TNetbuf
DIM maxlen as UInt32
DIM len       as UInt32
DIM buf      as Ptr to UInt8 //UInt8 =  Unsigned Character
End Record

DIM zone as TNetbuf
End globals


Then I think:

Toolbox FN OTATalkGetMyZone(ATSvcRef ref, TNetbuf  *zone)

Then make the call...however there may be some setup required to initialize OT?


Info:


struct TNetbuf {
   UInt32   maxlen;
   UInt32   len;
   UInt8*   buf;
};
typedef struct TNetbuf TNetbuf;


Field Description

maxlen
The size (in bytes) of the buffer to which the buf field points. You must
set the maxlen field before passing a TNetbuf structure to a provider
function as an output parameter. Open Transport ignores this field if you
pass the TNetbuf structure as an input parameter.

len
The actual length (in bytes) of the information in the buffer to which the
buf field points. If you are using the TNetbuf structure as an input
parameter, you must set this field.
If you pass the TNetbuf structure as an output parameter, on return the
provider function sets this field to the number of bytes the function has
actually placed in the buffer referenced by the buf field.

buf
A pointer to a buffer. You must make sure that the buf field points to a
valid buffer and that the buffer is large enough to store the information
for which it is intended.