IWMSOutgoingDistributionConnection Interface
The IWMSOutgoingDistributionConnection interface manages distribution connections. Distribution connections are used to stream content between servers. For example, a cache server, acting as a client, can connect to a Windows Media server and distribute content to players or to other servers.
In addition to the methods inherited from IDispatch, the IWMSOutgoingDistributionConnection interface exposes the following methods.
Method |
Description |
---|---|
get_ID |
Retrieves a unique value identifying a client that is receiving the distributed content. |
get_NetworkAddress |
Retrieves the network address of the client receiving the distributed content. |
get_Port |
Retrieves the port number of the client receiving the distributed content. |
get_RequestedPlaylist |
Retrieves the client's playlist object. |
get_RequestedURL |
Retrieves the URL that the client used to request a distribution connection. |
get_ResolvedURL |
Retrieves the URL of the content being streamed to the distribution connection. |
get_Status |
Retrieves the status of the client. |
get_UserName |
Retrieves the authenticated name of the client. |
get_WrapperPlaylist |
Retrieves the client's wrapper playlist object. |
Example
The following example illustrates how to retrieve a pointer to an IWMSOutgoingDistributionConnection interface.
#include <windows.h>
#include <atlbase.h> // Includes CComVariant.
#include "wmsserver.h"
// Declare variables and interfaces.
IWMSServer *pServer;
IWMSOutgoingDistributionConnections *pConnections;
IWMSOutgoingDistributionConnection *pConnection;
HRESULT hr;
CComVariant varIndex;
long lCount;
// Initialize the COM library and retrieve a pointer
// to an IWMSServer interface.
hr = CoInitialize(NULL);
hr = CoCreateInstance(CLSID_WMSServer,
NULL,
CLSCTX_ALL,
IID_IWMSServer,
(void **)&pServer);
if (FAILED(hr)) goto EXIT;
// Retrieve a pointer to a collection of distribution
// connections and retrieve the total count of connections.
hr = pServer->get_OutgoingDistributionConnections(&pConnections);
if (FAILED(hr)) goto EXIT;
hr = pConnections->get_Count(&lCount);
if (FAILED(hr)) goto EXIT;
// Retrieve information about each distribution connection.
for (long x = 0; x < lCount; x++)
{
varIndex = x;
hr = pConnections->get_Item(varIndex, &pConnection);
if (FAILED(hr)) goto EXIT;
// Release temporary COM objects.
pConnection->Release();
}
EXIT:
// TODO: Release temporary COM objects and uninitialize COM.
See Also
Reference
IWMSOutgoingDistributionConnections Interface