SnmpCountVbl function (winsnmp.h)
[SNMP is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. Instead, use Windows Remote Management, which is the Microsoft implementation of WS-Man.]
A WinSNMP application calls the WinSNMP SnmpCountVbl function to enumerate the variable binding entries in the specified variable bindings list.
Syntax
SNMPAPI_STATUS SNMPAPI_CALL SnmpCountVbl(
[in] HSNMP_VBL vbl
);
Parameters
[in] vbl
Handle to the variable bindings list to enumerate.
Return value
If the function succeeds, the return value is the count of variable binding entries in the variable bindings list.
If the function fails, the return value is SNMPAPI_FAILURE. To get extended error information, call SnmpGetLastError specifying a NULL value in its session parameter. The SnmpGetLastError function can return one of the following errors.
Return code | Description |
---|---|
|
The SnmpStartup function did not complete successfully. |
|
An error occurred during memory allocation. |
|
The variable bindings list does not contain any variable binding entries at this time. |
|
The vbl parameter is invalid. |
|
An unknown or undefined error occurred. |
Remarks
The SnmpCountVbl function returns an unsigned integer value that is the maximum value the WinSNMP application can specify for the index parameter in the SnmpGetVb, SnmpSetVb, and SnmpDeleteVb functions.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | winsnmp.h |
Library | Wsnmp32.lib |
DLL | Wsnmp32.dll |