1 // help compiles sources for mobile without having unusable
2 // Windows p/invoke in the assemblies
4 // Copyright 2015 Xamarin Inc.
8 namespace System.Runtime.Interop {
10 using Microsoft.Win32.SafeHandles;
11 using System.Runtime.Diagnostics;
12 using System.Runtime.InteropServices;
13 using FILETIME = System.Runtime.InteropServices.ComTypes.FILETIME;
15 sealed class SafeEventLogWriteHandle : SafeHandleZeroOrMinusOneIsInvalid {
17 SafeEventLogWriteHandle () : base (true)
21 public static SafeEventLogWriteHandle RegisterEventSource (string uncServerName, string sourceName)
23 throw new NotImplementedException ();
26 static bool DeregisterEventSource (IntPtr hEventLog)
28 throw new NotImplementedException ();
31 protected override bool ReleaseHandle ()
33 throw new NotImplementedException ();
37 static class UnsafeNativeMethods {
39 public const int ERROR_MORE_DATA = 234;
40 public const int ERROR_ARITHMETIC_OVERFLOW = 534;
41 public const int ERROR_NOT_ENOUGH_MEMORY = 8;
43 [StructLayout (LayoutKind.Explicit, Size = 16)]
44 public struct EventData {
46 internal UInt64 DataPointer;
50 internal int Reserved;
53 public static SafeWaitHandle CreateWaitableTimer (IntPtr mustBeZero, bool manualReset, string timerName)
55 throw new NotImplementedException ();
58 public static bool SetWaitableTimer (SafeWaitHandle handle, ref long dueTime, int period, IntPtr mustBeZero, IntPtr mustBeZeroAlso, bool resume)
60 throw new NotImplementedException ();
63 public static int QueryPerformanceCounter (out long time)
65 throw new NotImplementedException ();
68 public static uint GetSystemTimeAdjustment (out int adjustment, out uint increment, out uint adjustmentDisabled)
70 throw new NotImplementedException ();
73 public static void GetSystemTimeAsFileTime (out long time)
75 throw new NotImplementedException ();
78 internal static string GetComputerName (ComputerNameFormat nameType)
80 throw new NotImplementedException ();
83 internal static bool IsDebuggerPresent ()
85 throw new NotImplementedException ();
88 internal static void DebugBreak ()
90 throw new NotImplementedException ();
93 internal static void OutputDebugString (string lpOutputString)
95 throw new NotImplementedException ();
98 internal unsafe delegate void EtwEnableCallback (ref Guid sourceId, int isEnabled, byte level, long matchAnyKeywords, long matchAllKeywords, void* filterData, void* callbackContext);
100 internal static unsafe uint EventRegister (ref Guid providerId, EtwEnableCallback enableCallback, void* callbackContext, ref long registrationHandle)
102 throw new NotImplementedException ();
105 internal static uint EventUnregister (long registrationHandle)
107 throw new NotImplementedException ();
110 internal static bool EventEnabled (long registrationHandle, ref EventDescriptor eventDescriptor)
112 throw new NotImplementedException ();
115 internal static unsafe uint EventWrite (long registrationHandle, ref EventDescriptor eventDescriptor, uint userDataCount, EventData* userData)
117 throw new NotImplementedException ();
120 internal static unsafe uint EventWriteTransfer (long registrationHandle, ref EventDescriptor eventDescriptor, ref Guid activityId, ref Guid relatedActivityId, uint userDataCount, EventData* userData)
122 throw new NotImplementedException ();
125 internal static unsafe uint EventWriteString (long registrationHandle, byte level, long keywords, char* message)
127 throw new NotImplementedException ();
130 internal static unsafe uint EventActivityIdControl (int ControlCode, ref Guid ActivityId)
132 throw new NotImplementedException ();
135 internal static bool ReportEvent (SafeHandle hEventLog, ushort type, ushort category, uint eventID, byte[] userSID, ushort numStrings, uint dataLen, HandleRef strings, byte[] rawData)
137 throw new NotImplementedException ();
140 internal static SafeEventLogWriteHandle RegisterEventSource (string uncServerName, string sourceName)
142 throw new NotImplementedException ();