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. DCOM on Windows 2003: error in COM-client

DCOM on Windows 2003: error in COM-client

Scheduled Pinned Locked Moved COM
sysadminhelpdatabasecomquestion
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.
  • R Offline
    R Offline
    RadioShark
    wrote on last edited by
    #1

    Hi, I’ve got a strange behaviour of DCOM on Windows 2003 Server. I’ve created COM-server (out-of-process) and COM-client for that COM-server. Both work successfully on local computer under any operation system. Also server and client work fine when COM-server is installed on Windows 2003 Server and when COM-client works on other PC running Windows XP. When I try run COM-server on Windows XP and COM-client on Windows 2003 Server, COM-client told me “Can’t query COM-server at remote PC: Permission denied”. Windows XP and Windows 2003 Server are located at the same network and at the same workgroup (not used domains). All permissions are set by default. What should I do? Here is the sample code of COM-client: CoInitializeEx(NULL,COINIT_MULTITHREADED); IReqAuth * pReqAuth; WCHAR *wszMachineName=L"ALPHA\0"; COSERVERINFO srv; ZeroMemory(&srv,sizeof(srv)); srv.pwszName=wszMachineName; MULTI_QI qi; qi.pIID=&IID_IReqAuth; qi.hr=0; qi.pItf=NULL; HRESULT hr=CoCreateInstanceEx(CLSID_ReqAuth, NULL, CLSCTX_SERVER, &srv, 1, &qi); if (SUCCEEDED(hr)) { pReqAuth=(IReqAuth *)qi.pItf; printf("COM object OK\n"); char szTmp[MAX_PATH]; BSTR AppVersion; hr=pReqAuth->GetVersion(&AppVersion); if (SUCCEEDED(hr)) { memset(szTmp,0,sizeof(szTmp)); wcstombs(szTmp,AppVersion,SysStringLen(AppVersion)); printf("AppVersion: %s\n",szTmp); SysFreeString(AppVersion); } else { sprintf(szTmp, "GetVersion failed hr = %x\n", hr); printf(szTmp); }; pReqAuth->Release(); } else { printf("Error creating COM-object %d\n",GetLastError()); }; ::CoUninitialize(); Sleep(200); Please help, my brains can’t think anymore. Sincerely Yours, RadioShark

    M 1 Reply Last reply
    0
    • R RadioShark

      Hi, I’ve got a strange behaviour of DCOM on Windows 2003 Server. I’ve created COM-server (out-of-process) and COM-client for that COM-server. Both work successfully on local computer under any operation system. Also server and client work fine when COM-server is installed on Windows 2003 Server and when COM-client works on other PC running Windows XP. When I try run COM-server on Windows XP and COM-client on Windows 2003 Server, COM-client told me “Can’t query COM-server at remote PC: Permission denied”. Windows XP and Windows 2003 Server are located at the same network and at the same workgroup (not used domains). All permissions are set by default. What should I do? Here is the sample code of COM-client: CoInitializeEx(NULL,COINIT_MULTITHREADED); IReqAuth * pReqAuth; WCHAR *wszMachineName=L"ALPHA\0"; COSERVERINFO srv; ZeroMemory(&srv,sizeof(srv)); srv.pwszName=wszMachineName; MULTI_QI qi; qi.pIID=&IID_IReqAuth; qi.hr=0; qi.pItf=NULL; HRESULT hr=CoCreateInstanceEx(CLSID_ReqAuth, NULL, CLSCTX_SERVER, &srv, 1, &qi); if (SUCCEEDED(hr)) { pReqAuth=(IReqAuth *)qi.pItf; printf("COM object OK\n"); char szTmp[MAX_PATH]; BSTR AppVersion; hr=pReqAuth->GetVersion(&AppVersion); if (SUCCEEDED(hr)) { memset(szTmp,0,sizeof(szTmp)); wcstombs(szTmp,AppVersion,SysStringLen(AppVersion)); printf("AppVersion: %s\n",szTmp); SysFreeString(AppVersion); } else { sprintf(szTmp, "GetVersion failed hr = %x\n", hr); printf(szTmp); }; pReqAuth->Release(); } else { printf("Error creating COM-object %d\n",GetLastError()); }; ::CoUninitialize(); Sleep(200); Please help, my brains can’t think anymore. Sincerely Yours, RadioShark

      M Offline
      M Offline
      Milton Karimbekallil
      wrote on last edited by
      #2

      juz go thru the links below.. 1[^] 2[^] rgds..mil10

      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