Re: FW: Jawin, P instruction
Cyril Shelest <[email protected]> Thu, 24 Aug 2006 20:40:51 +0200
| Newsgroups | gmane.comp.windows.devel.jawin |
|---|---|
| Message-ID | <[email protected]> |
Hi, if you developed right Marshal and Unmarshal algorithms then they could be used in direct calls and events. In the first case you do Marshal and Unmarshal (referenced values), in the second case you do Unmarshal and Marshal (for referenced values). So check these algorithms in jawin and do changes you need. Regard, Vitaly Shelest "Morten Andersen" <[email protected]> wrote in message news:[email protected]... > Hi Vitaliy and Sean, > > Mcnamara, Sean D wrote: >> Posting this for Vitaliy due to his issues with registering for the >> mailing list. He can use the web interface for read access, so if anyone >> replies, I'll just send him an e-mail reminder. >> > [SNIP] >> >> # I have some dll as bin formated, so i can't change it. >> # I have a function, the function has an input parameter - byte [], this >> byte[] is converted from a structure, this byte[] will be then filled up >> by the function and I need now read a pointer which points to this >> byte[] wit a new data by the native function . >> # the native function looks like this: >> >> xlCanTransmit(XLportHandle, xlAccessMask, int *messageCount, void >> *pMessages) >> >> XLportHandle - is an Integer [in] >> xlAccessMask - is an Integer [in] >> *messageCount - int Points to the amount of messages, which schould be >> send and return the number of transmited messages, I ve used "A" string >> and "n4" to read a pointer. >> *pMessages - points to user buffer with messages to be send. Al least the >> buffer must have the size oj messageCount. here i've used "P", but i >> havnt have any idea how can i read back this pointer to byte[]. >> >> >> pMessages is a structure which looks like this: >> > > > I am a little bit in doubt about how "pMessages" is allocated/filled in > the [out] part of your native xlCanTransmit-method. > > So is the following correct, when sending *1* message, and receiving *3*: > > - Calling like: xlCanTransmit(handle, mask, 1, byte[..]) > > Where the [in] byte[..] is the size of 1 x xl_event struct, and contains > the data to send? > > - when returning, will the [out]-values of: > *messageCount* be 3? > and > what size will the *pMessages* be? will it be the size we > allocated > when calling the function? And then contain the first (or last) of the 3 > received messages? How do you get the other 2 received messages then? > > or > will the pMessages be size 3 x xl_event struct? > > When you answer these, hopefully we can help you as to whether Jawin can > support this (and how). > > Best Regards > Morten >