logo       

Re: Marshaling a byte array by ref: msg#00004

windows.devel.jawin

Subject: Re: Marshaling a byte array by ref

Sean,
Thanks much for your quick reply. I've been working on trying to get JAWIN
to support this for about a year now, but have been so busy I have not had
time to focus on it. I did get JACOB hacked enough to work, but would really
like to port to JAWIN because we are already using it on other projects.

Anyway, the API I'm trying to communicate with have several calls such as
the one below. If I/we get this one cracked then the rest will follow. The
straight up variant are a no braininer. It's the parms with the VT_BYREF
that are the challenge. As you can see I have 2 byte[] arrays and one
integer[] array to bass by ref.

Also I have a typelib to send you to go along with this. How would you like
it sent?

Thanks so much for whatever help you can extend.


Here is one of several methods

retCode = ifd.SetControl( vTag, vValue, vinBuff, vbuffSize, vinfLen);

Where:
vTag must be VT_UI4
vValue must be VT_BYREF|VT_UI1
vinBuff must be VT_BYREF|VT_UI1
vbuffSize must be VT_UI4
vinfLen must be VT_BYREF|VT_UI4

Here's the API reference

SetControl

Performance
Sets data necessary for the created reader/writer objects or the reader/writer.


Interface
long ifd::SetControl(
IN VARIANT tag,
IN VARIANT value,
OUT VARIANT infBuff,
IN VARIANT buffSize,
OUT VARIANT infLen
);


Parameters

Variable name Type Description
tag VARIANT Stores the control tag value for the setting contents in DWORD
value.
value VARIANT Stores the data required for setting in LPVOID value.
infBuff VARINAT Stores the information obtained when executing SetControl in
LPBYTE value. Does not store when no information is provided.
buffSize VARIANT Stores the valid buffer length of infBuff in DWORD value.
Assures writing into infBuff. When the data length to be written is larger
than buffSize, SetControl does not perform writing, but exits.
infLen VARIANT Stores the valid data length written in infBuff in LPDWORD
word. Shows No. of bytes of actual data written in infBuff by SetControl.



Al Harper
aharper@xxxxxxxxx



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise