the struct is a parameter that has to be sent to a call to OMS to sign in to
OMS.
here are the pieces of the struct:
unsigned char
unsigned char
long
unsigned char
unsigned char
union:
short
short
<<<OMSConnectionListH>>>???
*FSSpec
*FSSpec
unsigned short
unsigned short.
i think i got them right. when making an OMS client in cpp, you have to
initialize this struct and then pass it to OMSSignIn. OMS uses this struct
to talk to your client, tell it things.
thanks,
vora
> -----Original Message-----
> From: realbasic-nug at lists dot realsoftware dot com
> [mailto:realbasic-nug at lists dot realsoftware dot com]On Behalf Of Thomas
> Reed
> Sent: Friday, August 30, 2002 2:35 PM
> To: REALbasic Network Users Group
> Subject: Re: toolbox questions
>
>
> >what if a toolbox function needs a struct, which would be a
> memoryblock of a
> >certain size, and the struct itself has to have a pointer to a list of
> >unknown size? how big should the memoryblock for the function be in that
> >case?
>
> First, what specific call and struct are involved? Posting those
> details will help folks give you more specific advice.
>
> As to sizes -- a pointer is just 4 bytes, so you just need a 4-byte
> MemoryBlock for that. However, you say the struct is supposed to be
> a pointer to a list. I would bet that you're crashing because you're
> sending an uninitialized pointer to the toolbox call, but it's
> expecting the pointer to already be pointing to a valid block of
> memory into which it can read and/or write.
>
> If this is the case, you need to create the pointed-to block. Try a
> declare to NewPtr:
>
> Declare Function NewPtr Lib "InterfaceLib" (byteCount as
> Integer) as Ptr
>
> dim a as MemoryBlock
>
> a = NewMemoryBlock(4)
> a.Ptr(0) = NewPtr(90)
>
> (Of course, you'll need to change that to "CarbonLib" under Carbon.)
>
> >if a service i am attempting to sign in to requires a callback function,
> >does this mean i have to create a class (datatype) in rb to
> respond to it?
>
> Toolbox callbacks cannot be done in RB. The Toolbox is expecting a
> nice, C routine, and RB methods don't fit the bill. To do anything
> involving a callback, you'll need to write a plugin.
> --
> -Thomas
>
> Personal web page: http://home.earthlink.net/~thomasareed/
> My shareware: http://home.earthlink.net/~thomasareed/shareware/
> REALbasic page: http://home.earthlink.net/~thomasareed/realbasic/
> Pixel Pen web pub. guide: http://home.earthlink.net/~thomasareed/pixelpen/
>
> How long a minute is depends on which side of the bathroom door you're on.
>
> ---
> Subscribe to the digest:
> <mailto:realbasic-nug-digest at lists dot realsoftware dot com>
> Unsubscribe:
> <mailto:realbasic-nug-off at lists dot realsoftware dot com>
---
A searchable archive of this list is available at:
<http://dbserver.realsoftware.com/KBDB/search.php>
Unsubscribe:
<mailto:realbasic-nug-off at lists dot realsoftware dot com>
Subscribe to the digest:
<mailto:realbasic-nug-digest at lists dot realsoftware dot com>
.
|