WinSNMP Descriptors

[This is preliminary documentation and subject to change.]

In the WinSNMP programming environment a descriptor is one of the following two structures:

A WinSNMP descriptor is a structure that has two members: a length member, len, and a pointer member, ptr. The ptr member points to the octet string or object identifier of interest. The ptr member can be either the smiLPBYTE or smiLPUINT32 data type.

An smiOCTETS descriptor or an smiOID descriptor can be the value member of an smiVALUE structure. The smiVALUE structure describes the value associated with a variable name in a variable binding entry.

The Microsoft WinSNMP implementation allocates and deallocates memory for all output smiOCTETS and smiOID structures. Therefore, the application must call the SnmpFreeDescriptor function to free the memory for the ptr member of these structures.

String members in descriptors do not require a NULL terminating byte. For additional information about managing the memory allocated for descriptors, see Allocating WinSNMP Memory Objects.