I have a Notes C API program that is trying to extract OLE embedded objects from a Notes mail database. I have gotten to the point of calling NSFNoteExtractOLE2Object(), which produces a file, supposedly an OLE structured storage file. The question is what to do next to extract the actual data file (in my test case, it is a jpeg file).
I have found the Notes API sample “extract.c” which I am trying
to implement. Basically it calls ProgIDFromCLSID() to obtain a
ProgID, then it uses that to call OpenStorage(). This is where my program fails. I get the error "The storage object with the
specified name does not exist". The value of pwcsName is taken
from ProgID. In my test case, it has the value “Package” (in wide byte format).
I tried another method to obtain the value of pwcsName: I used
EnumElements(), then called Next() to obtain a STATSTG structure. The value of pwcsName in this structure happened to be “htmlfile”. But using this value caused the exact same error with OpenStorage().
Can anyone give me some guidance here? I’d be happy to post code or the actual storage file if it would help.