>Hi George
>
>That's almost it. It should work, but it would be faster to get the data directly from the source, than to copy it to a temporary file and then read it just to dump it into the stream.
>
Oh, I agree, but mucking around with a General Field can be pretty tricky business.
I don't know if this is any help, but any bitmap always begins with the ANSI values of "BM". Included in in the header information is the size of it bitmap. I don't recall exactly where it is off-hand, but if you were to poke around Obj2Bmp, you'd find it. I could, however, look it up tomorrow. It is in the MSDN library.
>>>Hi All
>>>
>>>A colleague and I are thinking about extracting data into a stream. This results from the fact that CursorToXML doesn't support general fields. Last night we looked at the structure of the memo field. We're using a BMP picture which was displayed using MS Paint.
>>>
>>>The VFP docs explained some stuff, but we couldn't confirm this information. The docs say the general field holds a 10 byte pointer into the memo file (.FPT). Looking at the DBF with a Hex Editor, it seems this is a 4 byte number. We couldn't decode this number. Can someone help with that?
>>>
>>>The size of the image file is stored in the memo file. I know its MSB, LSB formatted, but converting this from Hex to Decimal didn't return the byte size of the file as reported by the OS.
>>>
>>>Basically, we want to return the picture as a stream of bytes from the memo field. This involves locating the data first and then reading it, probably using FOPEN/FREAD().
>>>
>>>Thanks!
>>Mike,
>>
>>Does MSKB#
Q161832 help?
George
Ubi caritas et amor, deus ibi est