WinSNMP Function Return Values

[This is preliminary documentation and subject to change.]

The return value from a WinSNMP function call can be a handle to a resource that the Microsoft WinSNMP implementation allocates for the WinSNMP manager application.

The following table lists the five types of resource handles that the implementation allocates.

Handle type Description
HSNMP_SESSION Handle to a WinSNMP session
HSNMP_ENTITY Handle to an SNMP entity
HSNMP_CONTEXT Handle to an SNMP context
HSNMP_PDU Handle to a protocol data unit
HSNMP_VBL Handle to a variable binding list

For additional information, see Resource Handle Objects.

The return value can also be an unsigned long integer value of the smiUINT32 type that represents an SNMPAPI_STATUS value.

The following table lists the WinSNMP status values and their meaning.

Status Description
SNMPAPI_FAILURE Indicates an error. Equates to 0 or NULL.
SNMPAPI_SUCCESS Indicates the function completed successfully. Equates to 1 or a positive count.