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.

50 lines
1.2 KiB

  1. /*++
  2. Copyright (C) 1999-2001 Microsoft Corporation
  3. Module Name:
  4. ADAPUTIL.CPP
  5. Abstract:
  6. History:
  7. --*/
  8. #include "precomp.h"
  9. #include <stdio.h>
  10. #include <wtypes.h>
  11. #include <oleauto.h>
  12. #include <winmgmtr.h>
  13. #include "AdapUtil.h"
  14. HRESULT CAdapUtility::NTLogEvent( DWORD dwEventType,
  15. DWORD dwEventID,
  16. CInsertionString c1,
  17. CInsertionString c2,
  18. CInsertionString c3,
  19. CInsertionString c4,
  20. CInsertionString c5,
  21. CInsertionString c6,
  22. CInsertionString c7,
  23. CInsertionString c8,
  24. CInsertionString c9,
  25. CInsertionString c10 )
  26. {
  27. HRESULT hr = WBEM_E_FAILED;
  28. CEventLog el;
  29. if ( el.Open() )
  30. {
  31. if ( el.Report( dwEventType, dwEventID, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10 ) )
  32. {
  33. hr = WBEM_NO_ERROR;
  34. }
  35. }
  36. el.Close();
  37. return hr;
  38. }