Re: FW: Jawin, P instruction
Morten Andersen <[email protected]> Thu, 24 Aug 2006 19:10:29 +0200
| Newsgroups | gmane.comp.windows.devel.jawin |
|---|---|
| Message-ID | <[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