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.

88 lines
2.8 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1994.
  5. //
  6. // File: FwEvent.hxx
  7. //
  8. // Contents: CFwEventItem class
  9. //
  10. // History: 1-02-97 mohamedn Created
  11. //
  12. //--------------------------------------------------------------------------
  13. #pragma once
  14. #include <ciintf.h>
  15. //+-------------------------------------------------------------------------
  16. //
  17. // Class: CFwEventItem
  18. //
  19. // Purpose: Encapsulates all information pertaining to a given event
  20. // and invokes ICiCAdviseStatus::NotifyEvent method.
  21. //
  22. // History: 1-02-97 mohamedn Created
  23. //
  24. //--------------------------------------------------------------------------
  25. class CFwEventItem
  26. {
  27. public:
  28. CFwEventItem( WORD fType,
  29. DWORD eventId,
  30. WORD cArgs,
  31. DWORD dataSize = 0 ,
  32. void * data = 0 );
  33. ~CFwEventItem();
  34. void AddArg ( const WCHAR * wcsString );
  35. void AddArg ( const CHAR * pszString );
  36. void AddArg ( const ULONG ulValue );
  37. void ReportEvent( ICiCAdviseStatus & adviseStatus);
  38. private:
  39. WORD _fType;
  40. DWORD _eventId;
  41. WORD _nParams;
  42. WORD _nParamsUsed;
  43. PROPVARIANT * _pPv;
  44. DWORD _dataSize;
  45. void * _data;
  46. };
  47. //+-------------------------------------------------------------------------
  48. //
  49. // Class: CDmFwEventItem
  50. //
  51. // Purpose: Like a CFwEventItem, but adds an unused argument in user space,
  52. // for use with dual mode code. This is only a patch to faciliate
  53. // CFwEventItem in code that used to be in kernel mode.
  54. //
  55. // History: 05 Mar 1996 AlanW Created
  56. // Jan 08 1997 mohamedn cut from eventlog.hxx & modified for use
  57. // with CFwEventItem.
  58. //
  59. //--------------------------------------------------------------------------
  60. class CDmFwEventItem : public CFwEventItem
  61. {
  62. public:
  63. CDmFwEventItem( WORD fType,
  64. DWORD eventId,
  65. WORD cArgs,
  66. DWORD dataSize = 0 ,
  67. void * data = 0 ) :
  68. CFwEventItem( fType, eventId, cArgs+1, dataSize, data)
  69. {
  70. AddArg( L"x" ); // dummy arg.
  71. END_CONSTRUCTION( CDmFwEventItem );
  72. }
  73. ~CDmFwEventItem() { }
  74. };