Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

85 lines
1.9 KiB

  1. //***************************************************************************
  2. //
  3. // File:
  4. //
  5. // Module: MS SNMP Provider
  6. //
  7. // Purpose:
  8. //
  9. // Copyright (c) 1997-2001 Microsoft Corporation, All Rights Reserved
  10. //
  11. //***************************************************************************
  12. /*-----------------------------------------------------------------
  13. Filename: common.hpp
  14. Purpose : Provides common constant, typedef, macro and
  15. exception declarations.
  16. Written By: B.Rajeev
  17. -----------------------------------------------------------------*/
  18. #ifndef __COMMON__
  19. #define __COMMON__
  20. #include <stdio.h>
  21. #include <string.h>
  22. #include <windows.h>
  23. #include <provexpt.h>
  24. #include <limits.h>
  25. #include <snmptempl.h>
  26. #include <snmpmt.h>
  27. #include <snmpcont.h>
  28. #include <snmpevt.h>
  29. #include <snmpthrd.h>
  30. #include <snmplog.h>
  31. #include <iostream.h>
  32. #include <fstream.h>
  33. #include <strstrea.h>
  34. #include <winsnmp.h>
  35. #include <objbase.h>
  36. #define DllImport __declspec( dllimport )
  37. #define DllExport __declspec( dllexport )
  38. #ifdef SNMPCLINIT
  39. #define DllImportExport DllExport
  40. #else
  41. #define DllImportExport DllImport
  42. #endif
  43. // maximum length of decimal dot notation addresses
  44. #define MAX_ADDRESS_LEN 100
  45. // end of string character
  46. #define EOS '\0'
  47. #define MIN(a,b) ((a<=b)?a:b)
  48. // returns TRUE if i is in [min,max), else FALSE
  49. #define BETWEEN(i, min, max) ( ((i>=min)&&(i<max))?TRUE:FALSE )
  50. // a default community name
  51. #define COMMUNITY_NAME "public"
  52. // a default destination address is the loopback address
  53. // this way we don't have to determine the local ip address
  54. #define LOOPBACK_ADDRESS "127.0.0.1"
  55. // for exception specification
  56. #include "excep.h"
  57. // provides typedefs that encapsulate the winSNMP types
  58. #include "encap.h"
  59. #include "sync.h"
  60. extern BOOL WaitPostMessage ( HWND window , UINT user_msg_id, WPARAM wParam, LPARAM lParam);
  61. #endif // __COMMON__