Пример #1
0
        unsafe void Initialize(Guid guid)
        {
            controlGuid = guid;
            TraceGuidRegistration guidReg = new TraceGuidRegistration();
            Guid dummyGuid = new Guid("{aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaabbb}");

            etwProc = new EtwTraceCallback(EtwNotificationCallback);

            guidReg.Guid      = &dummyGuid;
            guidReg.RegHandle = null;

            uint status = EtwNativeMethods.RegisterTraceGuids(etwProc,
                                                              null,
                                                              ref controlGuid,
                                                              1,
                                                              ref guidReg,
                                                              null,
                                                              null,
                                                              out registrationHandle);

            if (status != 0)
            {
                throw new Win32Exception((int)status);
            }
            this.isDisposed = false;
        }
Пример #2
0
 internal static extern unsafe uint RegisterTraceGuids([In] EtwTraceCallback cbFunc, [In] void *context, [In] ref System.Guid controlGuid, [In] uint guidCount, ref TraceGuidRegistration guidReg, [In] string mofImagePath, [In] string mofResourceName, [Out] out ulong regHandle);
Пример #3
0
 internal static extern unsafe uint RegisterTraceGuids([In]EtwTraceCallback cbFunc, [In]void* context, [In] ref System.Guid controlGuid, [In] uint guidCount, ref TraceGuidRegistration guidReg, [In]string mofImagePath, [In] string mofResourceName, [Out] out ulong regHandle);
Пример #4
0
        unsafe void Initialize(Guid guid)
        {
            controlGuid = guid;
            TraceGuidRegistration guidReg = new TraceGuidRegistration();
            Guid dummyGuid = new Guid("{aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaabbb}");

            etwProc = new EtwTraceCallback(EtwNotificationCallback);

            guidReg.Guid = &dummyGuid;
            guidReg.RegHandle = null;

            uint status = EtwNativeMethods.RegisterTraceGuids(etwProc,
                                                           null,
                                                           ref controlGuid,
                                                           1,
                                                           ref guidReg,
                                                           null,
                                                           null,
                                                           out registrationHandle);
            if (status != 0)
            {
                throw new Win32Exception((int)status);
            }
            this.isDisposed = false;
        }