1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
|
// help compiles sources for mobile without having unusable
// Windows p/invoke in the assemblies
//
// Copyright 2015 Xamarin Inc.
#if MOBILE
namespace System.Runtime.Interop {
using Microsoft.Win32.SafeHandles;
using System.Runtime.Diagnostics;
using System.Runtime.InteropServices;
using FILETIME = System.Runtime.InteropServices.ComTypes.FILETIME;
sealed class SafeEventLogWriteHandle : SafeHandleZeroOrMinusOneIsInvalid {
SafeEventLogWriteHandle () : base (true)
{
}
public static SafeEventLogWriteHandle RegisterEventSource (string uncServerName, string sourceName)
{
throw new NotImplementedException ();
}
static bool DeregisterEventSource (IntPtr hEventLog)
{
throw new NotImplementedException ();
}
protected override bool ReleaseHandle ()
{
throw new NotImplementedException ();
}
}
static class UnsafeNativeMethods {
public const int ERROR_MORE_DATA = 234;
public const int ERROR_ARITHMETIC_OVERFLOW = 534;
public const int ERROR_NOT_ENOUGH_MEMORY = 8;
[StructLayout (LayoutKind.Explicit, Size = 16)]
public struct EventData {
[FieldOffset(0)]
internal UInt64 DataPointer;
[FieldOffset(8)]
internal uint Size;
[FieldOffset(12)]
internal int Reserved;
}
public static SafeWaitHandle CreateWaitableTimer (IntPtr mustBeZero, bool manualReset, string timerName)
{
throw new NotImplementedException ();
}
public static bool SetWaitableTimer (SafeWaitHandle handle, ref long dueTime, int period, IntPtr mustBeZero, IntPtr mustBeZeroAlso, bool resume)
{
throw new NotImplementedException ();
}
public static int QueryPerformanceCounter (out long time)
{
throw new NotImplementedException ();
}
public static uint GetSystemTimeAdjustment (out int adjustment, out uint increment, out uint adjustmentDisabled)
{
throw new NotImplementedException ();
}
public static void GetSystemTimeAsFileTime (out long time)
{
throw new NotImplementedException ();
}
internal static string GetComputerName (ComputerNameFormat nameType)
{
throw new NotImplementedException ();
}
internal static bool IsDebuggerPresent ()
{
throw new NotImplementedException ();
}
internal static void DebugBreak ()
{
throw new NotImplementedException ();
}
internal static void OutputDebugString (string lpOutputString)
{
throw new NotImplementedException ();
}
internal unsafe delegate void EtwEnableCallback (ref Guid sourceId, int isEnabled, byte level, long matchAnyKeywords, long matchAllKeywords, void* filterData, void* callbackContext);
internal static unsafe uint EventRegister (ref Guid providerId, EtwEnableCallback enableCallback, void* callbackContext, ref long registrationHandle)
{
throw new NotImplementedException ();
}
internal static uint EventUnregister (long registrationHandle)
{
throw new NotImplementedException ();
}
internal static bool EventEnabled (long registrationHandle, ref EventDescriptor eventDescriptor)
{
throw new NotImplementedException ();
}
internal static unsafe uint EventWrite (long registrationHandle, ref EventDescriptor eventDescriptor, uint userDataCount, EventData* userData)
{
throw new NotImplementedException ();
}
internal static unsafe uint EventWriteTransfer (long registrationHandle, ref EventDescriptor eventDescriptor, ref Guid activityId, ref Guid relatedActivityId, uint userDataCount, EventData* userData)
{
throw new NotImplementedException ();
}
internal static unsafe uint EventWriteString (long registrationHandle, byte level, long keywords, char* message)
{
throw new NotImplementedException ();
}
internal static unsafe uint EventActivityIdControl (int ControlCode, ref Guid ActivityId)
{
throw new NotImplementedException ();
}
internal static bool ReportEvent (SafeHandle hEventLog, ushort type, ushort category, uint eventID, byte[] userSID, ushort numStrings, uint dataLen, HandleRef strings, byte[] rawData)
{
throw new NotImplementedException ();
}
internal static SafeEventLogWriteHandle RegisterEventSource (string uncServerName, string sourceName)
{
throw new NotImplementedException ();
}
}
}
#endif
|