C-Style Strings

A WinSNMP application can use NULL-terminated C-style strings to convert entity and object identifier (OID) objects to and from their string representations.

The WinSNMP functions that manipulate C-style strings include SnmpStrToEntity, SnmpEntityToStr, SnmpStrToOid, and SnmpOidToStr. Because SnmpEntityToStr and SnmpOidToStr return a pointer to a C-style string variable, the WinSNMP application must pass an appropriate value in the size parameter when it makes calls to these functions. For more information, see the reference pages for these functions.

Note

The context parameter of the SnmpStrToContext and SnmpContextToStr functions must be an octet string structure, that is, an smiOCTETS structure. The context parameter cannot be a C-style string. The string contained in an smiOCTETS structure does not require a NULL-terminating byte.