smiOID structure (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.]

The WinSNMP smiOID structure passes object identifiers to multiple WinSNMP functions. The structure also receives the variable name of a variable binding entry in a call to the SnmpGetVb function.

The smiOID structure contains a pointer to a variable length array of a named object's subidentifiers. The structure can be a member of the smiVALUE structure.


typedef struct {
  smiUINT32   len;
  smiLPUINT32 ptr;
} smiOID, *smiLPOID;



Specifies an unsigned long integer value that indicates the number of elements in the array pointed to by the ptr member.


Pointer to an array of unsigned long integers that represent the object identifier's subidentifiers.


In an smiOID structure, the format of the array pointed to by the ptr member is one subidentifier per array element. For example, the string "" would be an array of four elements {1,3,6,1}.

The Microsoft WinSNMP implementation allocates and deallocates memory for all output smiOID structures. The WinSNMP application should not free memory that the implementation allocates for the ptr member of an smiOID structure. Instead, the application must call the SnmpFreeDescriptor function to free the memory.

Because the WinSNMP application allocates memory for input descriptor objects with variable lengths, it must free that memory. For more information, see WinSNMP Data Management Concepts.


Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Header winsnmp.h

See also







WinSNMP API Overview

WinSNMP Structures