PRB: SnmpMgrGetTrap() Fails

Last reviewed: September 29, 1995
Article ID: Q130564
The information in this article applies to:
  • Microsoft Win32 Software Development Kit (SDK) for Windows NT version 3.5

SYMPTOMS

If an SNMP manager application calls SnmpMgrGetTrap() to recieve 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).


Additional reference words: 3.50
KBCategory: kbnetwork kbprb
KBSubcategory: NtwkSnmp


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 29, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.