Thanks for any help!
Jo...@REMOVETHISenrnews.com
I'm beginner in OLE, so all that You'll read there may be outrageous lie :)
I don't know, why RTF documentation refers to the OleSaveToStream function
only. There's many other ways to save Ole and load object ( I think they all
implement the same internal function ). In the RTF file object is stored in
the root storage of COM storage. So, If You want to read OLE object from
RTF with MS Visual C, do the following:
1 Implement COleDocument and COleClientItem classes
2 open and read RTF file until You found *\objdata tag. object data is stored
in text hex format, ie each OLE data byte is represented by 2 bytes. Reject
first line, till sequence d0 cf 11 e0 ..... Output to a new file all bytes
including d0 cf 11 e0 till "}" character. (You will need to ignore carriage
return 0D 0A pairs).
3 Use StgOpenStorage function to get pointer to a new storage - new file
You created
4 Use OleLoad with pointer to opened storage to load object
Btw, when You generate separate file with extracted OLE data, You can view
its contents using utility DfView - structured storage viewer, it comes with
VC.
Any comments accepted
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading