private static int EventActivityIdControl( ActivityControlCode controlCode, ref Guid activityId) { object[] parameters = new object[] { (uint)controlCode, activityId }; int retCode = (int)s_EventActivityIdControl.Invoke( s_EventPipeEventProvider, parameters); // Copy the by ref activityid out of the parameters array. activityId = (Guid)parameters[1]; return(retCode); }
internal static extern unsafe uint EventActivityIdControl([In] ActivityControlCode controlCode, [In][Out] ref Guid activityId);
/* * [DllImport("advapi32.dll", CharSet=CharSet.Unicode, ExactSpelling=true)] * internal static extern int EventActivityIdControl([In] ActivityControlCode controlCode, [In, Out] ref Guid activityId); */ internal static int EventActivityIdControl([In] ActivityControlCode controlCode, [In, Out] ref Guid activityId) { activityId = Guid.NewGuid(); return(0); }