SnmpSetTranslateMode function (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 SnmpSetTranslateMode function enables a WinSNMP application to change the entity and context translation mode. The entity and context translation mode affects the interpretation and return of WinSNMP input and output string parameters.
Syntax
SNMPAPI_STATUS SNMPAPI_CALL SnmpSetTranslateMode(
[in] smiUINT32 nTranslateMode
);
Parameters
[in] nTranslateMode
Specifies a value for the new entity and context translation mode. This parameter must be one of the following values.
Return value
If the function succeeds, the return value is SNMPAPI_SUCCESS.
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.
Return code | Description |
---|---|
|
The SnmpStartup function did not complete successfully. |
|
An error occurred during memory allocation. |
|
The implementation does not support the requested translation mode. |
|
An unknown or undefined error occurred. |
Remarks
The new entity and context translation mode affects subsequent calls to the SnmpStrToEntity, SnmpStrToContext, SnmpContextToStr, and SnmpEntityToStr functions. The WinSNMP application can change the entity and context translation mode again by making another call to SnmpSetTranslateMode with a different nTranslateMode value.
For additional information, see Setting the Entity and Context Translation Mode.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | winsnmp.h |
Library | Wsnmp32.lib |
DLL | Wsnmp32.dll |