IWMSContext::GetContextType

The GetContextType method retrieves the type of context.

HRESULT GetContextType(
  WMS_CONTEXT_TYPE*  pType
);

Arguments

pType

[out] Pointer to a WMS_CONTEXT_TYPE enumeration value specifying the type of context. This must be one of the following values.

Value

Description

WMS_UNKNOWN_CONTEXT_TYPE

The type of the context is unknown.

WMS_SERVER_CONTEXT_TYPE

The context contains information about the server.

WMS_USER_CONTEXT_TYPE

The context contains information about the client.

WMS_PRESENTATION_CONTEXT_TYPE

The context contains information about the content being streamed to clients.

WMS_CONTENT_DESCRIPTION_CONTEXT_TYPE

The context contains descriptive information about the content.

WMS_COMMAND_REQUEST_CONTEXT_TYPE

The context contains information about client requests.

WMS_COMMAND_RESPONSE_CONTEXT_TYPE

The context contains information about server responses to client requests.

WMS_TRANSPORT_SPEC_CONTEXT_TYPE

The context contains information about the transport used to deliver the stream, either UDP, TCP, or multicast.

WMS_PACKETIZER_CONTEXT_TYPE

The context contains information about data packets.

WMS_CACHE_CONTENT_INFORMATION_CONTEXT_TYPE

The context contains information about a cache.

WMS_ARCHIVE_CONTEXT_TYPE

The context contains information about an archive.

Return Value

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Return code

Number

Description

E_POINTER

0x80004003

The pType parameter is NULL.

Example

// Declare variables
HRESULT hr = S_OK;
WMS_CONTEXT_TYPE  ct;

// Retrieve the context type.
if (NULL != pContentDescCtx)
{
    hr = pContentDescCtx->GetContextType(&ct);
    if (FAILED(hr)) goto EXIT;
}

EXIT:
    // TODO: Release temporary objects.

Requirements

Header: wmscontext.h.

Library: WMSServerTypeLib.dll.

Platform: Windows Server 2003, Enterprise Edition; Windows Server 2003, Datacenter Edition; Windows Server 2008.

See Also

Concepts

IWMSContext Interface