WindowsFoundationAdapter.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. #pragma once
  6. #ifdef ENABLE_FOUNDATION_OBJECT
  7. #include "Windows.Foundation.Diagnostics.h"
  8. using namespace Windows::Foundation::Diagnostics;
  9. namespace Js
  10. {
  11. class WindowsFoundationAdapter
  12. {
  13. private:
  14. AutoCOMPtr<IActivationFactory> asyncCausalityTracerActivationFactory;
  15. AutoCOMPtr<IAsyncCausalityTracerStatics> asyncCausalityTracerStatics;
  16. IActivationFactory* GetAsyncCausalityTracerActivationFactory(_In_ ScriptContext* scriptContext);
  17. IAsyncCausalityTracerStatics* GetAsyncCausalityTracerStatics(_In_ ScriptContext* scriptContext);
  18. DelayLoadWinRtString* GetWinRtStringLibrary(_In_ ScriptContext* scriptContext);
  19. DelayLoadWinRtFoundation* GetWinRtFoundationLibrary(_In_ ScriptContext* scriptContext);
  20. public:
  21. HRESULT TraceOperationCreation(
  22. _In_ ScriptContext* scriptContext,
  23. _In_ INT traceLevel,
  24. _In_ INT source,
  25. _In_ GUID platformId,
  26. _In_ UINT64 operationId,
  27. _In_z_ PCWSTR operationName,
  28. _In_ UINT64 relatedContext);
  29. HRESULT TraceOperationCompletion(
  30. _In_ ScriptContext* scriptContext,
  31. _In_ INT traceLevel,
  32. _In_ INT source,
  33. _In_ GUID platformId,
  34. _In_ UINT64 operationId,
  35. _In_ INT status);
  36. HRESULT TraceOperationRelation(
  37. _In_ ScriptContext* scriptContext,
  38. _In_ INT traceLevel,
  39. _In_ INT source,
  40. _In_ GUID platformId,
  41. _In_ UINT64 operationId,
  42. _In_ INT relation);
  43. HRESULT TraceSynchronousWorkStart(
  44. _In_ ScriptContext* scriptContext,
  45. _In_ INT traceLevel,
  46. _In_ INT source,
  47. _In_ GUID platformId,
  48. _In_ UINT64 operationId,
  49. _In_ INT work);
  50. HRESULT TraceSynchronousWorkCompletion(
  51. _In_ ScriptContext* scriptContext,
  52. _In_ INT traceLevel,
  53. _In_ INT source,
  54. _In_ INT work);
  55. };
  56. }
  57. #endif