DCOM: running COM-server on another PC
-
Hi Guys! I'm novice in DCOM and my question will be very easy. I'm created COM-server and its COM-client. I can successfully run both on the same machine and successufully run on the separate machine (with modification in dcomcnfg). The code is not changed when remote running. I used the follows (it works fine): IEncoder * pEncoder; HRESULT hr=CoCreateInstance(CLSID_Encoder, NULL, CLSCTX_SERVER, IID_IEncoder, (void **)&pEncoder); I'm trying to specify exactrly on which machine COM-server should be run using the follows: WCHAR *wszMachineName=L"STAR\0"; COSERVERINFO srv; ZeroMemory(&srv,sizeof(srv)); srv.pwszName=wszMachineName; MULTI_QI qi; HRESULT hr=CoCreateInstanceEx(CLSID_Encoder, NULL, CLSCTX_SERVER, &srv, 1, &qi); This returns E_INVALIDARG. :( What should I do to remotely invoke my COM-server from another machine using CoCreateInstanceEx() ? Yours sincerely, Alex Bash
-
Hi Guys! I'm novice in DCOM and my question will be very easy. I'm created COM-server and its COM-client. I can successfully run both on the same machine and successufully run on the separate machine (with modification in dcomcnfg). The code is not changed when remote running. I used the follows (it works fine): IEncoder * pEncoder; HRESULT hr=CoCreateInstance(CLSID_Encoder, NULL, CLSCTX_SERVER, IID_IEncoder, (void **)&pEncoder); I'm trying to specify exactrly on which machine COM-server should be run using the follows: WCHAR *wszMachineName=L"STAR\0"; COSERVERINFO srv; ZeroMemory(&srv,sizeof(srv)); srv.pwszName=wszMachineName; MULTI_QI qi; HRESULT hr=CoCreateInstanceEx(CLSID_Encoder, NULL, CLSCTX_SERVER, &srv, 1, &qi); This returns E_INVALIDARG. :( What should I do to remotely invoke my COM-server from another machine using CoCreateInstanceEx() ? Yours sincerely, Alex Bash