Platform SDK: Network Management |
The WinSNMP application must call the SnmpRecvMsg function to retrieve the response to an SnmpSendMsg request.
The SnmpCreateSession function passes an application window handle and a notification message identifier to the Microsoft WinSNMP implementation. When the application window receives this message, it signals the application to call the SnmpRecvMsg function using the session handle returned by SnmpCreateSession.
The SnmpRecvMsg function returns two entity handles, a context handle, and the handle to a PDU. It is recommended that the WinSNMP application free these resources using the SnmpFreeEntity, SnmpFreeContext, and SnmpFreePdu functions.
For additional information about managing the time between a call to the SnmpSendMsg function and the receipt of the corresponding response, see About Retransmission. For additional information about using the request_id PDU field to match a response PDU with its request PDU, see Matching Response and Request PDUs.