Platform SDK: Network Management |
A WinSNMP application calls the WinSNMP SnmpCountVbl function to enumerate the variable binding entries in the specified variable bindings list.
SNMPAPI_STATUS SnmpCountVbl( HSNMP_VBL vbl // handle to the variable bindings list );
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.
Error Code | Description |
---|---|
SNMPAPI_NOT_INITIALIZED | The SnmpStartup function did not complete successfully. |
SNMPAPI_ALLOC_ERROR | An error occurred during memory allocation. |
SNMPAPI_NOOP | The variable bindings list does not contain any variable binding entries at this time. |
SNMPAPI_VBL_INVALID | The vbl parameter is invalid. |
SNMPAPI_OTHER_ERROR | An unknown or undefined error occurred. |
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.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Unsupported.
Header: Declared in Winsnmp.h.
Library: Use Wsnmp32.lib.
WinSNMP API Overview, WinSNMP Functions, SnmpGetVb, SnmpSetVb, SnmpDeleteVb