Iasphelp::get_Community method

The Community property enables an ASP Web page to obtain a print server's Simple Network Management Protocol (SNMP) community name.

Syntax

HRESULT get_Community(
  [out] BSTR *pVal
);

Parameters

pVal [out]
Caller-supplied pointer to a location to receive a pointer to a community name string.

Return value

Win32 error codes can also be returned.

Return code Description
S_OK The operation succeeded.
E_HANDLE Iasphelp::Open method has not been called.
E_OUTOFMEMORY Out of memory.

VBScript Example

If the printer is not supported by the TCP/IP port monitor, the returned string is empty.

The Iasphelp::Open method must be called before the Iasphelp::Community property can be queried.

Dim objPrinter, CommName
strPrinter = Session("MS_printer")
Set objPrinter = Server.CreateObject ("OlePrn.AspHelp")
objPrinter.Open strPrinter
CommName = objPrinter.Community

Requirements

Target platform: Desktop

See also

Iasphelp::Open