Hi folks,
I hope someone can help me out.
I've been looking in PSDN-history, also the Peg-history but I'm stuck with a problem.
I'm testing a Canon Cheque Scanner (CR-190i). From openedge I can get the scanner working etc by calling external procedures in DLL (delivered by Canon). Problem is, that the scanned image is in the memory of the scanner and I want to read out the image and save it to disk.
To do that the external DLL has following procedure :
INT32 WINAPI CsdSaveImageEx(LPCEIIMAGEINFO ceiimageinfo, LPCEIIMAGEFILEINFO lpiFile, LPCSTR szFileName)
Where :
LPCEIIMAGEINFO a memptr is that I could read from a procedure in the DLL and
LCCEIIMAGEFILEINFO a structure is :
CSD_TIFF_FILE TIFF file format
nJpegQuality Used only if nCompType is CSD_COMP_JPEG. Valid
Question is : how can I place this in a memptr so I can call the 'CsdSaveImageEx' procedure.
I've seen P7765 in the knowledge base, but I just can't get it work.
Strange for me is also that, for example nFileType is a 'long' and in the manual it suggest to send CSD_JPEG_FILE which is a character.
In the attached file I've placed the complete section of the Canon manual SDK and also an example of VB-codes that works.
Any help would be very much appreciated !
Kind regards
Bart Syryn
I believe you'll need a combination of set-size and put-string, put-long,...
There is some info in here: http://www.oehive.org/book/export/html/385
The first element of the structure (size_t) is either a 4 octet integer or an 8 octet integer, depending on whether you are running a 32-bit executable or a 64-bit executable. The others are all 4 octet integers (the same as INT in the 4GL).
So the first element starts at offset 0 in the structure.
The second starts at offset 4 or 8 and is 4 octets long. Threst are the same as the second.
You need to size the memptr at 20 or 24.