Copy an IStorage interface to an IStream interface for ATTACH_OLE attachments
- From: "na" <na@xxxxxx>
- Date: Tue, 18 Mar 2008 15:57:48 -0500
How do I copy an IStorage interface to an IStream interface?
Attachments of type ATTACH_OLE seem to require an IID_IStorage
interface.
case ATTACH_OLE:
{
LPSTORAGE pSource = NULL;
LPSTREAM pDest = NULL;
STATSTG StatInfo = {0};
hr = pAttach->OpenProperty(PR_ATTACH_DATA_OBJ,(LPIID)&IID_IStorage,0,0,(LPUNKNOWN *)&pSource);
hr = pSource->Stat(&StatInfo, STATFLAG_NONAME);
/* Copy pSource to pDest somehow, thanks forum members! */
/* Now I can read the content to file or my own buffer etc... */
hr = pStream->Read(lpBuffer, ulBufferSize, &ulRead);
}
.
- Follow-Ups:
- Prev by Date: Re: Reading PR_BODY_W Tag using IID_IStream
- Next by Date: Re: Copy an IStorage interface to an IStream interface for ATTACH_OLE attachments
- Previous by thread: Cant see images within attachment
- Next by thread: Re: Copy an IStorage interface to an IStream interface for ATTACH_OLE attachments
- Index(es):
Relevant Pages
|
Loading