[This is preliminary documentation and subject to change.]
The Microsoft WinSNMP implementation calls the SNMPAPI_CALLBACK function to notify a WinSNMP session that an SNMP message or asynchronous event is available.
SNMPAPI_CALLBACK is a placeholder for an application- or library-defined callback function name.
SNMPAPI_STATUS CALLBACK SNMPAPI_CALLBACK(
HSNMP_SESSION hSession, // handle to the WinSNMP session
HWND hWnd, // handle to the notification window
UINT wMsg, // window notification message number
WPARAM wParam, // type of notification
LPARAM lParam, // request identifier of PDU
LPVOID lpClientData // optional application-defined data
);
The function must return SNMPAPI_SUCCESS to continue execution of the manager application. If the function returns any other value, the implementation responds as if the manager application called the SnmpClose function for the indicated session.
When the implementation is executing the retransmission policy for the WinSNMP manager application and a transmission time-out occurs, the implementation informs the session of the error. In this situation the value of the wParam parameter would be SNMPAPI_TL_TIMEOUT. For a list of other transport layer errors, see the reference pages for the SnmpRegister, SnmpSendMsg, and SnmpRecvMsg functions.
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: User-defined.
WinSNMP Manager API Overview, WinSNMP Functions, SnmpCreateSession, SnmpClose, SnmpOpen