Group:  English: Entertainment ยป microsoft.public.windowsmedia.server
Thread: Create remote wmsserver instance error

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Create remote wmsserver instance error
wizcube[ at ]gmail.com 04.07.2007 09:33:59
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.
(only different is ip address. one is 192.168.80.42, the other is
211.220.194.42.
same user account/password/group)

COAUTHIDENTITY cId;
cId.User = (USHORT *) L"wms";
cId.UserLength = wcslen( L"wms" );
cId.Domain = (USHORT *) L"211.220.194.42";
cId.DomainLength = wcslen( L"211.220.194.42" );
cId.Password = (USHORT *) L"wms2";
cId.PasswordLength = wcslen( L"wms2" );
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);

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net