My program beams records, and uses the appData field of the
ExgSocketType struct to send information about the beamed contents to
the other device. appData is a 32-bit user-defined field. I do:

typedef struct
{
    UInt8       type;
    UInt8       category;
    Boolean     exists;
    UInt8       version;

} BeamInfo;

BeamInfo     *beamInfo;
ExgSocketType       socket;

MemSet( &socket, sizeof( socket ), 0 );

socket.description = description;
socket.name        = name;
socket.target      = AurigaAppID;

beamInfo = ( BeamInfo * ) &( socket.appData );
beamInfo->exists = false;
beamInfo->type = type;    // 0
beamInfo->category = dmUnfiledCategory;   // 0
beamInfo->version = DBVersion;    // 41

if ( ( error = ExgPut( &socket ) ) != errNone )
    ExgDisconnect( &socket, error );

I checked with the CW debugger: up to the ExgPut, the socket struct is
fine, and appData contains 41 (the version field).

Yet, when hooking a m500 to the CW debugger, tracing the
StartApplication code:

ExgSocketPtr        socket;
BeamInfo           *beamInfo;

case sysAppLaunchCmdExgAskUser :
{
    ExgAskParamPtr      askParam;

    askParam = ( ExgAskParamPtr ) cmdPBP;
    socket   = askParam->socketP;
    beamInfo = ( BeamInfo * ) &( socket->appData );

I find the contents of beamInfo->version to be 0 (as the rest of the
appData field). What can go wrong?


--
Luc Le Blanc


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to