Click here to Skip to main content
15,899,935 members
Home / Discussions / COM
   

COM

 
AnswerRe: MFC to ATL ???? Pin
Not Active20-Jul-02 16:07
mentorNot Active20-Jul-02 16:07 
GeneralRe: MFC to ATL ???? Pin
Leesen22-Jul-02 18:30
Leesen22-Jul-02 18:30 
AnswerRe: MFC to ATL ???? Pin
Vivek Rajan22-Jul-02 18:52
Vivek Rajan22-Jul-02 18:52 
GeneralClick function Pin
Al_Pennyworth19-Jul-02 8:11
Al_Pennyworth19-Jul-02 8:11 
GeneralActiveX assert Pin
joblemar19-Jul-02 0:50
sussjoblemar19-Jul-02 0:50 
Generalthumbnail using IExtractImage Pin
toon18-Jul-02 20:54
toon18-Jul-02 20:54 
GeneralRe: thumbnail using IExtractImage Pin
loket21-Jul-02 7:41
loket21-Jul-02 7:41 
QuestionAnyone with experience in out-of-proc COM servers? Pin
jfugate18-Jul-02 9:31
jfugate18-Jul-02 9:31 
I'm trying to write a COM .exe server that creates a small modeless dialog box when properly called. Unfortunately, when I call the COM object from my application, it always returns E_NOINTERFACE from CoCreateInstance when given the correct IID of my COM interface (ICObject in this case, for test purposes). According to MFC documentation, this error occurs when the QueryInterface call does not support the requested interface. However, if I create the same exact COM project using an in-proc .dll file, without changing a single line of code in the calling application (except the CLSCTX_ string in CoCreateInstance), it works fine. I am using MFC's ATL/COM wizard to create both the .exe and the .dll projects. Both settings are for apartment model threading, custom interface, no aggregation and connection points. Here's my application code:


//////////////////////////////////////////////
#include "..\COMObject\COMObject.h"
#include "..\COMObject\COMObject_i.c"

...

HRESULT hr;

//instantiate it
hr = CoCreateInstance(CLSID_CObject, NULL, CLSCTX_LOCAL_SERVER /*CLSCTX_INPROC_SERVER for DLL*/, IID_ICObject, (void **) &m_pObject);

//do something with it
if(SUCCEEDED(hr))
{
m_pObject->StartDialog();
}
//////////////////////////////////////////////

Does anyone have any idea why it works with an in-proc .dll and not an out-of-proc .exe?
AnswerRe: Anyone with experience in out-of-proc COM servers? Pin
soptest18-Jul-02 9:48
soptest18-Jul-02 9:48 
GeneralRe: Anyone with experience in out-of-proc COM servers? Pin
jfugate18-Jul-02 10:04
jfugate18-Jul-02 10:04 
GeneralRe: Anyone with experience in out-of-proc COM servers? Pin
soptest18-Jul-02 13:17
soptest18-Jul-02 13:17 
AnswerRe: Anyone with experience in out-of-proc COM servers? Pin
Vi222-Jul-02 4:14
Vi222-Jul-02 4:14 
GeneralRe: Anyone with experience in out-of-proc COM servers? Pin
jfugate22-Jul-02 6:30
jfugate22-Jul-02 6:30 
Generalwhy do have to restart to get excel/ word application. every time Pin
pnpfriend18-Jul-02 5:29
pnpfriend18-Jul-02 5:29 
GeneralRe: why do have to restart to get excel/ word application. every time Pin
SHaroz18-Jul-02 5:43
SHaroz18-Jul-02 5:43 
GeneralRe: why do have to restart to get excel/ word application. every time Pin
pnpfriend18-Jul-02 6:04
pnpfriend18-Jul-02 6:04 
GeneralRe: why do have to restart to get excel/ word application. every time Pin
SHaroz18-Jul-02 6:16
SHaroz18-Jul-02 6:16 
GeneralRe: why do have to restart to get excel/ word application. every time Pin
pnpfriend18-Jul-02 6:52
pnpfriend18-Jul-02 6:52 
GeneralRe: why do have to restart to get excel/ word application. every time Pin
SHaroz18-Jul-02 7:14
SHaroz18-Jul-02 7:14 
GeneralRe: why do have to restart to get excel/ word application. every time Pin
pnpfriend18-Jul-02 8:26
pnpfriend18-Jul-02 8:26 
GeneralRe: why do have to restart to get excel/ word application. every time Pin
soptest18-Jul-02 9:57
soptest18-Jul-02 9:57 
GeneralHELP ME TO FIND AN ERROR Pin
Alex Cramer17-Jul-02 23:59
Alex Cramer17-Jul-02 23:59 
GeneralRe: HELP ME TO FIND AN ERROR Pin
soptest18-Jul-02 8:06
soptest18-Jul-02 8:06 
GeneralRe: HELP ME TO FIND AN ERROR Pin
soptest18-Jul-02 9:38
soptest18-Jul-02 9:38 
GeneralRe: HELP ME TO FIND AN ERROR Pin
Alex Cramer18-Jul-02 15:26
Alex Cramer18-Jul-02 15:26 

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.