Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Entertainment » microsoft.public.windowsmedia.server
Thread: Can I create a playlist on a remote server for a publishing point?

HTVi
TV Discussion Newsgroups

Can I create a playlist on a remote server for a publishing point?
tmugavero 12/30/2008 9:19:39 PM
I am trying to create a playlist for a publishing point on a remote server,
and am getting RPC_X_NULL_REF_POINTER when I call
pPlaylist->appendChild(pProc_Inst, NULL);. I am using the code from here:
http://msdn.microsoft.com/en-us/library/ms745178(VS.85).aspx

but have modified it to use a remote server. Not sure what I'm doing wrong
and there isn't much help out there. I'd greatly appreciate any direction.
Thanks, T

//Code
// Declare variables and interfaces.
IWMSServer *pServer;
IXMLDOMDocument *pPlaylist;
IXMLDOMElement *pElement_Smil, *pElement_Media;
IXMLDOMNode *pProc_Inst, *pRoot, *pNode;
CComBSTR bstrName, bstrNamespaceURI, bstrVersion;
CComVariant varPath;
HRESULT hr;
COSERVERINFO cs;
MULTI_QI mqi;
WCHAR wszServer[1024];

// Initialize the COM library and retrieve a pointer
// to an IWMSServer interface.
hr = CoInitialize(NULL);
if (FAILED(hr))goto EXIT;

// Create a COSERVERINFO structure containing information about
// the computer on which to create the IWMSServer interface.
ZeroMemory(&cs, sizeof(cs));
swprintf(wszServer, L"%S", szMediaServer);
cs.pwszName = wszServer;
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_ALL,
&cs,
1,
&mqi);

if (FAILED(hr)){
g_pAppLog->Log("ERROR: CWMEncoder::SetupPublishingPoint() - Error 0x%X
creating WMSServer object on remote server.\n", hr);
throw hr;
}

// The MULTI_QI structure contains an IUnknown pointer. Call
// QueryInterface to retrieve a pointer to IWMSServer.
hr = mqi.pItf->QueryInterface(IID_IWMSServer,
(void**) &pServer);

if (FAILED(hr)){
g_pAppLog->Log("ERROR: CWMEncoder::SetupPublishingPoint() - Error 0x%X
querying for IWMSServer interface.\n", hr);
throw hr;
}

// Create the playlist object.
hr = pServer->CreatePlaylist(&pPlaylist);
if (FAILED(hr))goto EXIT;

pPlaylist

// Create the processing instruction node.
bstrName = "wsx";
bstrNamespaceURI = "";
hr = pPlaylist->createNode((CComVariant)NODE_PROCESSING_INSTRUCTION,
bstrName,
bstrNamespaceURI,
&pProc_Inst);
if (FAILED(hr))goto EXIT;

// Add the processing instruction to the file structure.
hr = pPlaylist->appendChild(pProc_Inst, NULL);
if (FAILED(hr))goto EXIT;

I can't get past this point...


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen