|
|
Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
sorry my english.
I have 2 media servers and 1 client. one server is in LAN, the other is over internet. I have to make management application for several media servers. so, I tried create remote object of WMSServer. same code. but media server in LAN is work, other is error "The RPC Server is Unavailable". server setting is same.
why windows media encoder can push stream to server over Internet with userid/password and can't my application? what is problem?
this is code. COAUTHIDENTITY cId; cId.User = (USHORT *) L"Username"; cId.UserLength = wcslen( L"Username" ); cId.Domain = (USHORT *) L"IP Address"; // (Internet or LAN) cId.DomainLength = wcslen( L"IP Address" ); cId.Password = (USHORT *) L"Password"; cId.PasswordLength = wcslen( L"Password" ); cId.Flags = SEC_WINNT_AUTH_IDENTITY_UNICODE;
COAUTHINFO cai = { RPC_C_AUTHN_WINNT, RPC_C_AUTHZ_NONE, NULL, RPC_C_AUTHN_LEVEL_PKT_PRIVACY, RPC_C_IMP_LEVEL_IMPERSONATE, &cId, EOAC_NONE };
COSERVERINFO cs = { 0, const_cast<OLECHAR*>(L"211.220.194.42"), &cai, 0 };
//cs.pAuthInfo = NULL;
// Create a MULTI_QI structure to hold an IUnknown pointer // to an IWMSServer interface. ZeroMemory(&mqi, sizeof(mqi)); mqi.pIID = &IID_IWMSServer; mqi.pItf = NULL; mqi.hr = 0;
// Retrieve a pointer to the IWMSServer interface. hr = CoCreateInstanceEx(CLSID_WMSServer, NULL, CLSCTX_REMOTE_SERVER, &cs, 1, &mqi);
|
|
|