Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. COM
  4. ATL CLSCTX_LOCAL_SERVER get E_NOINTERFACE error...

ATL CLSCTX_LOCAL_SERVER get E_NOINTERFACE error...

Scheduled Pinned Locked Moved COM
helpquestionc++comsysadmin
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    johnstapleton
    wrote on last edited by
    #1

    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(&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; }:(( john s.

    J 1 Reply Last reply
    0
    • J johnstapleton

      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(&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; }:(( john s.

      J Offline
      J Offline
      jfugate
      wrote on last edited by
      #2

      I just started messing around with COM and am having this same exact problem. Are there extra settings for an out-of-process .exe server that I don't know about? Anyone?

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups