Click here to Skip to main content
16,008,175 members
Home / Discussions / COM
   

COM

 
GeneralRe: COM Object Pin
Michael Dunn26-Mar-02 19:31
sitebuilderMichael Dunn26-Mar-02 19:31 
GeneralReturning Safearray from remote DCOM Pin
David Spain25-Mar-02 12:34
David Spain25-Mar-02 12:34 
GeneralRe: Returning Safearray from remote DCOM Pin
Sayan Mukherjee26-Mar-02 2:36
Sayan Mukherjee26-Mar-02 2:36 
GeneralRe: Returning Safearray from remote DCOM Pin
David Spain26-Mar-02 3:56
David Spain26-Mar-02 3:56 
GeneralRe: Returning Safearray from remote DCOM Pin
David Spain27-Mar-02 2:55
David Spain27-Mar-02 2:55 
GeneralBuilding interface to IActiveScriptSite and IActiveScriptSiteWindow with MFC and ATL 7.0 Pin
25-Mar-02 7:50
suss25-Mar-02 7:50 
GeneralProblems with suspend/resume comm thread. Pin
dejan.n25-Mar-02 4:05
dejan.n25-Mar-02 4:05 
GeneralATL CLSCTX_LOCAL_SERVER get E_NOINTERFACE error... Pin
johnstapleton25-Mar-02 2:46
johnstapleton25-Mar-02 2:46 
Using ATL/Windows 2000 I have created an .EXE ATL (simple object) COM object named EXEServer, I then created a (client) MFC .exe to try and create the .EXE ATL COM server object on the same machine using CoCreateInstance(....,CLSCTX_LOCAL_SERVER....), shown below - no luck !!!!

I get the HRESULT return error E_NOINTERFACE when I do a simple CoCreateInstance on the ATL .EXE COM object via the client. What is going wrong ? How can I fix this...?

I've checked both the registry AND OleViewer and the ATL COM ServerEXE IS there and seems to be active....what am I missing.....? please help me I am going crazy...


// The client MFC code...

BOOL CClientEXEDlg::OnInitDialog()
{
....
CoInitialize(NULL);

IExeServer* pIHelloWorld = NULL;

HRESULT hr = CoCreateInstance (CLSID_ExeServer,
NULL, CLSCTX_LOCAL_SERVER,
CLSCTX_,
IID_IExeServer,
reinterpret_cast<void**>(&pIHelloWorld));
BSTR bstrMsg = NULL;


void *pMsgBuf;

::FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
hr,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT ),
(LPSTR)&pMsgBuf,
0,
NULL );



AfxMessageBox((LPSTR)pMsgBuf);

if (hr == E_NOINTERFACE)
{
AfxMessageBox("CLASS_E_NOINTERFACE"); // this error is always
// there
}

if (FAILED(hr))
{
AfxMessageBox("FAILED");
CoUninitialize();
EndDialog(TRUE);
return TRUE;
}
else
{
m_edit = bstrMsg;
::SysAllocString(bstrMsg);
}

hr = pIHelloWorld->SayHello(&bstrMsg);

pIHelloWorld->Release();

UpdateData(FALSE);

// TODO: Add extra initialization here

CoUninitialize();

return TRUE;

}Cry | :((

john s.
GeneralRe: ATL CLSCTX_LOCAL_SERVER get E_NOINTERFACE error... Pin
jfugate18-Jul-02 5:03
jfugate18-Jul-02 5:03 
QuestionHow do I retrieve the container window Ptr(HWND) in the COM? (eg.IE client area) Pin
xelin25-Mar-02 1:28
xelin25-Mar-02 1:28 
AnswerRe: How do I retrieve the container window Ptr(HWND) in the COM? (eg.IE client area) Pin
Amit Dey30-Mar-02 0:33
Amit Dey30-Mar-02 0:33 
GeneralRe: How do I retrieve the container window Ptr(HWND) in the COM? (eg.IE client area) Pin
xelin3-Apr-02 0:21
xelin3-Apr-02 0:21 
QuestionHow to specify an ATL server location at runtime Pin
HawkSoftware22-Mar-02 19:52
HawkSoftware22-Mar-02 19:52 
AnswerRe: How to specify an ATL server location at runtime Pin
Not Active26-Mar-02 15:04
mentorNot Active26-Mar-02 15:04 
GeneralRe: How to specify an ATL server location at runtime Pin
HawkSoftware26-Mar-02 18:28
HawkSoftware26-Mar-02 18:28 
Generalefficiency question with in proc COM methods Pin
moredip22-Mar-02 12:16
moredip22-Mar-02 12:16 
GeneralRe: efficiency question with in proc COM methods Pin
Tim Smith22-Mar-02 13:18
Tim Smith22-Mar-02 13:18 
GeneralRe: efficiency question with in proc COM methods Pin
22-Mar-02 13:52
suss22-Mar-02 13:52 
Generaldialog boxes Pin
shingai22-Mar-02 9:41
shingai22-Mar-02 9:41 
GeneralRe: dialog boxes Pin
Mazdak22-Mar-02 9:50
Mazdak22-Mar-02 9:50 
GeneralRe: dialog boxes Pin
Mazdak22-Mar-02 18:34
Mazdak22-Mar-02 18:34 
GeneralMore than one user!! Pin
hph22-Mar-02 4:09
hph22-Mar-02 4:09 
QuestionUsing OLECMDID_SAVEAS without prompting? Pin
21-Mar-02 23:58
suss21-Mar-02 23:58 
GeneralTrouble with COM Strings Pin
MightyM21-Mar-02 9:04
MightyM21-Mar-02 9:04 
GeneralRe: Trouble with COM Strings Pin
Tim Smith21-Mar-02 9:15
Tim Smith21-Mar-02 9:15 

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.