Platform SDK: Network Management |
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 application. If the function returns any other value, the implementation responds as if the application called the SnmpClose function for the indicated session.
When the implementation is executing the retransmission policy for the WinSNMP 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/2000: Requires Windows 2000.
Windows 95/98: Unsupported.
Header: Declared in Winsnmp.h.
WinSNMP API Overview, WinSNMP Functions, SnmpCreateSession, SnmpClose