IWMSServer::put_AllowClientsToConnect
Previous | Next |
IWMSServer::put_AllowClientsToConnect
The put_AllowClientsToConnect method specifies a Boolean value that indicates whether the server can receive client connections.
Syntax
HRESULT put_AllowClientsToConnect( VARIANT_BOOL newVal );
Parameters
newVal
[in] VARIANT_BOOL indicating whether client connections are allowed.
Return Values
If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.
Remarks
By default, the Boolean value is True.
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; // Set a Boolean value indicating that // clients cannot connect. hr = pServer->put_AllowClientsToConnect(VARIANT_FALSE); 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 |