Click here to Skip to main content
16,010,673 members
Home / Discussions / COM
   

COM

 
GeneralCreateInstance Pin
25-Feb-02 5:40
suss25-Feb-02 5:40 
GeneralRe: CreateInstance Pin
Not Active25-Feb-02 6:28
mentorNot Active25-Feb-02 6:28 
GeneralInside COM Pin
23-Feb-02 4:25
suss23-Feb-02 4:25 
GeneralRe: Inside COM Pin
Paul M Watt23-Feb-02 18:17
mentorPaul M Watt23-Feb-02 18:17 
GeneralRe: Inside COM Pin
27-Feb-02 22:12
suss27-Feb-02 22:12 
GeneralRe: HTMLDOM question Pin
Not Active22-Feb-02 4:27
mentorNot Active22-Feb-02 4:27 
GeneralRe: HTMLDOM question Pin
Amit Dey22-Feb-02 8:29
Amit Dey22-Feb-02 8:29 
GeneralNobody will give me a f***ing solution.... Pin
Braulio Dez21-Feb-02 3:51
Braulio Dez21-Feb-02 3:51 
Hi,

I want to pass a metafile to an ATL server, so I encapsulated it on a PictureBox object, and then saved it on one IStream, then I try to recover it in the ATL object, and it gives me on error, the code that I use is:

MFC client:
if(IPict) {
    IStorage *pIStg;
    Res = ::StgCreateDocfile(NULL, STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_CREATE, 0, &pIStg);
   if(pIStg) {
      IStream *TempStream = NULL;


      Res = pIStg->CreateStream(OLESTR("MyPicture"), STGM_READWRITE | STGM_SHARE_EXCLUSIVE | STGM_CREATE, 0,0, &TempStream);

      HRESULT HRes = IPict->SaveAsFile(TempStream, TRUE, 0);

      m_GDIGr.SetMetafile(TempStream);

   }
}



ATL Server:
IPicture *Pict = NULL;

HRESULT Res = ::OleLoadPicture(pStream, 0, FALSE, IID_IPicture,(void **) &Pict);



What I had made wrong ?, Thanks in advance, Bye !
Braulio
GeneralRe: Nobody will give me a f***ing solution.... Pin
Kurt Muellner28-Feb-02 3:21
Kurt Muellner28-Feb-02 3:21 
GeneralConverting COM objects to SOAP Pin
21-Feb-02 1:08
suss21-Feb-02 1:08 
GeneralCatching connection points in a dll Pin
AndyC20-Feb-02 8:36
AndyC20-Feb-02 8:36 
GeneralRe: Catching connection points in a dll Pin
Amit Dey21-Feb-02 4:36
Amit Dey21-Feb-02 4:36 
GeneralIDataObjectImpl ATL Pin
Braulio Dez19-Feb-02 23:37
Braulio Dez19-Feb-02 23:37 
GeneralAbout using TLS in COM component Pin
16-Feb-02 22:11
suss16-Feb-02 22:11 
GeneralRe: About using TLS in COM component Pin
Joao Vaz21-Feb-02 4:44
Joao Vaz21-Feb-02 4:44 
GeneralDrag and Drop Pin
N.Bharadwaj7715-Feb-02 21:09
N.Bharadwaj7715-Feb-02 21:09 
GeneralDynamically Loading DLL Functions in VB Pin
Tim Rymer15-Feb-02 9:25
Tim Rymer15-Feb-02 9:25 
GeneralRe: Dynamically Loading DLL Functions in VB Pin
Not Active16-Feb-02 2:46
mentorNot Active16-Feb-02 2:46 
GeneralCOM: MSN Messenger Pin
PsychoBrat14-Feb-02 18:38
PsychoBrat14-Feb-02 18:38 
QuestionAnyone have experience with multithreaded ATL COM/COM+ DLL's and IIS? Pin
Matt Philmon13-Feb-02 17:46
Matt Philmon13-Feb-02 17:46 
GeneralExisting Applications and COM Pin
13-Feb-02 1:13
suss13-Feb-02 1:13 
GeneralRe: Existing Applications and COM Pin
13-Feb-02 6:54
suss13-Feb-02 6:54 
GeneralRe: Existing Applications and COM Pin
Serge Baltic20-Mar-02 1:05
Serge Baltic20-Mar-02 1:05 
GeneralMS WebBrowserControl versoin compatability (iE 4 and 5) Pin
noirs12-Feb-02 10:29
noirs12-Feb-02 10:29 
QuestionCOM and MS Outlook? Pin
12-Feb-02 8:25
suss12-Feb-02 8:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.