[This is preliminary documentation and subject to change.]
The WinSNMP SnmpGetTranslateMode function returns the current setting of the entity and context translation mode to a WinSNMP manager application. The entity and context translation mode affects the interpretation and return of WinSNMP input and output string parameters.
SNMPAPI_STATUS SnmpGetTranslateMode(
smiLPUINT32 nTranslateMode // current entity/context translation
// mode
);
Value | Meaning |
---|---|
SNMPAPI_TRANSLATED | The implementation uses its database to translate user-friendly names for SNMP entities and managed objects. The implementation translates them into their SNMPv1 or SNMPv2C components. |
SNMPAPI_UNTRANSLATED_V1 | The implementation interprets SNMP entity parameters as SNMP transport addresses, and context parameters as SNMP community strings. |
SNMPAPI_UNTRANSLATED_V2 | The implementation interprets SNMP entity parameters as SNMP transport addresses, and context parameters as SNMP community strings. |
If the function succeeds, the return value is SNMPAPI_SUCCESS.
If the function fails, the return value is SNMPAPI_FAILURE. If SnmpGetTranslateMode fails, the value of the nTranslateMode parameter has no meaning for the application. To get extended error information, call SnmpGetLastError. 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_OTHER_ERROR | An unknown or undefined error occurred. |
The entity and context translation mode affects calls to the SnmpStrToEntity, SnmpStrToContext, SnmpContextToStr and SnmpEntityToStr functions. For additional information, see Setting the Entity and Context Translation Mode.
Windows NT: Requires version 5.0 or later. Available as a redistributable for Windows NT 4.0.
Windows: Unsupported.
Windows CE: Unsupported.
Header: Declared in winsnmp.h.
Import Library: Use wsnmp32.lib.
WinSNMP Manager API Overview, WinSNMP Functions, SnmpStrToContext, SnmpStrToEntity, SnmpContextToStr, SnmpEntityToStr, SnmpStartup, SnmpSetTranslateMode