IWMSServer::get_OSProductType

banner art

Previous Next

IWMSServer::get_OSProductType

The get_OSProductType method retrieves the operating system product type that Windows Media Services is running on.

Syntax

  HRESULT get_OSProductType(
  WMS_OS_PRODUCT_TYPE*  pVal
);

Parameters

pVal

[out] Pointer to a WMS_OS_PRODUCT_TYPE enumeration type. This must be one of the following values.

Value Description
WMS_OS_PRODUCT_SERVER Indicates Windows Media Services is running on Windows Server 2003, Standard Edition or Windows Server 2008 Standard.
WMS_OS_PRODUCT_ADVANCED Indicates Windows Media Services is running on Windows Server 2003, Enterprise Edition or Windows Server 2008 Enterprise.

Return Values

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

Return code Number Description
E_POINTER 0x80004003 Indicates that pVal is a NULL pointer argument.

Example Code

#include <windows.h>
#include "wmsserver.h"

// Declare variables and interfaces.
IWMSServer      *pServer;
HRESULT         hr;

// 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 the operating system type that 
// the server is currently running on.
WMS_OS_PRODUCT_TYPE osType;
hr = pServer->get_OSProductType(&osType);
if (FAILED(hr)) goto EXIT;

EXIT:
    // TODO: Release temporary COM objects and uninitialize COM.

Requirements

Header: wmsserver.h.

Library: WMSServerTypeLib.dll.

Platform: Windows Server 2003 family, Windows Server 2008 family.

See Also

Previous Next