PRB: SnmpMgrGetTrap() Fails (130564)



The information in this article applies to:

  • Microsoft Win32 Software Development Kit (SDK) for Windows NT

This article was previously published under Q130564

SYMPTOMS

If an SNMP manager application calls SnmpMgrGetTrap() to receive traps and there are traps available, it returns FALSE. If the application calls GetLastError(), the error code returned is 42 (SNMP_MGMTAPI_TRAP_ERRORS).

RESOLUTION

The SNMP Manager API SnmpMgrGetTrapListen() must be called before calling SnmpMgrGetTrap(). The event handle returned by SnmpMgrGetTrapListen() can then be ignored to poll for traps.

STATUS

This behavior is by design.

REFERENCES

For more information, please see the Microsoft Windows NT SNMP Programmer's Reference (PROGREF.RTF).

Modification Type:MinorLast Reviewed:3/7/2005
Keywords:kbAPI kbnetwork kbprb kbSNMP KB130564