diff --git a/trunk/CHANGELOG.txt b/trunk/CHANGELOG.txt index 3c1e2cde8..8069ce559 100644 --- a/trunk/CHANGELOG.txt +++ b/trunk/CHANGELOG.txt @@ -55,6 +55,7 @@ Process Hacker * Memory searching now uses KProcessHacker if possible * Incorrect labeling of process files which can't be read (due to permissions) as packed + * Now uses the proper method of detecting .NET processes * Disables "Show one graph per CPU" if there is only one CPU * Process tree weirdness for users with limited privileges * CPU usage is now correctly displayed in graphs - K+U are not overlayed anymore diff --git a/trunk/ProcessHacker/Build/release.cmd b/trunk/ProcessHacker/Build/release.cmd index 722a83674..f93767f86 100644 --- a/trunk/ProcessHacker/Build/release.cmd +++ b/trunk/ProcessHacker/Build/release.cmd @@ -1,26 +1,33 @@ -@echo off -set outd=%~p1 +@ECHO OFF +SET outd=%~p1 -copy "%outd%\..\..\..\*.txt" "%outd%\" -copy "%outd%\..\..\..\KProcessHacker\i386\kprocesshacker.sys" "%outd%\" -del "%outd%\ProcessHacker.exe.config" -del "%outd%\processhacker-*-setup.exe" -del "%outd%\ProcessHacker_in.exe" +::Copy CHANGELOG.txt, HACKING.txt, LICENSE.txt, README.txt and kprocesshacker.sys +COPY "%outd%\..\..\..\*.txt" "%outd%\" +COPY "%outd%\..\..\..\KProcessHacker\i386\kprocesshacker.sys" "%outd%\" -@rem check if ILMerge is present +::Clear older files +DEL "%outd%\ProcessHacker.exe.config" +DEL "%outd%\processhacker-*-setup.exe" +DEL "%outd%\ProcessHacker_in.exe" + +::Check if ILMerge is present ilmerge -if %errorlevel%==9009 goto end +IF %errorlevel%==9009 GOTO END rename "%outd%\ProcessHacker.exe" ProcessHacker_in.exe ilmerge /t:winexe /out:"%outd%\ProcessHacker.exe" "%outd%\ProcessHacker_in.exe" "%outd%\Aga.Controls.dll" -del "%outd%\ProcessHacker_in.exe" -del "%outd%\Aga.Controls.dll" +DEL "%outd%\ProcessHacker_in.exe" +DEL "%outd%\Aga.Controls.dll" -@rem check Inno Setup -iscc -if %errorlevel%==9009 goto end +::Set the path of Inno Setup and compile setup +FOR /f "tokens=3 skip=3 delims= " %%i in ( + 'reg query "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\Inno Setup 5_is1" /v "Inno Setup: App Path"' +) DO ( + SET InnoSetupPath=%%i +) -iscc /q /o"%outd%\..\..\bin\Release" "%outd%\..\..\Build\Installer\Process_Hacker_installer.iss" +"%InnoSetupPath%iscc.exe" /q /o"%outd%\..\..\bin\Release" "%outd%\..\..\Build\Installer\Process_Hacker_installer.iss" -:end -del "%outd%\*.pdb" \ No newline at end of file +:END +::Clean up the .pdb files +DEL "%outd%\*.pdb" \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/COR_DEBUG_STEP_RANGE.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/COR_DEBUG_STEP_RANGE.cs new file mode 100644 index 000000000..3eb7d7dfb --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/COR_DEBUG_STEP_RANGE.cs @@ -0,0 +1,22 @@ +// +// +// +// +// $Revision: 3648 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System.Runtime.InteropServices; + + [StructLayout(LayoutKind.Sequential, Pack=4)] + public struct COR_DEBUG_STEP_RANGE + { + public uint startOffset; + public uint endOffset; + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebug.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebug.cs new file mode 100644 index 000000000..2ecb28aeb --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebug.cs @@ -0,0 +1,20 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System.Runtime.InteropServices; + + [ComImport, Guid("3D6F5F61-7538-11D3-8D5B-00104B35E7EF"), CoClass(typeof(CorDebugClass))] + public interface CorDebug : ICorDebug + { + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugChainReason.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugChainReason.cs new file mode 100644 index 000000000..f89312121 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugChainReason.cs @@ -0,0 +1,31 @@ +// +// +// +// +// $Revision: 3648 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + public enum CorDebugChainReason + { + // Fields + CHAIN_CLASS_INIT = 1, + CHAIN_CONTEXT_POLICY = 8, + CHAIN_CONTEXT_SWITCH = 0x400, + CHAIN_DEBUGGER_EVAL = 0x200, + CHAIN_ENTER_MANAGED = 0x80, + CHAIN_ENTER_UNMANAGED = 0x100, + CHAIN_EXCEPTION_FILTER = 2, + CHAIN_FUNC_EVAL = 0x800, + CHAIN_INTERCEPTION = 0x10, + CHAIN_NONE = 0, + CHAIN_PROCESS_START = 0x20, + CHAIN_SECURITY = 4, + CHAIN_THREAD_START = 0x40 + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugClass.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugClass.cs new file mode 100644 index 000000000..12b786a8a --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugClass.cs @@ -0,0 +1,50 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + //[ComImport] + public class CorDebugClass : ICorDebug, CorDebug + { + // Methods + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void CanLaunchOrAttach([In] uint dwProcessId, [In] int win32DebuggingEnabled); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void CreateProcess([In, MarshalAs(UnmanagedType.LPWStr)] string lpApplicationName, [In, MarshalAs(UnmanagedType.LPWStr)] string lpCommandLine, [In] ref _SECURITY_ATTRIBUTES lpProcessAttributes, [In] ref _SECURITY_ATTRIBUTES lpThreadAttributes, [In] int bInheritHandles, [In] uint dwCreationFlags, [In] IntPtr lpEnvironment, [In, MarshalAs(UnmanagedType.LPWStr)] string lpCurrentDirectory, [In, ComAliasName("Debugger.Interop.CorDebug.ULONG_PTR")] uint lpStartupInfo, [In, ComAliasName("Debugger.Interop.CorDebug.ULONG_PTR")] uint lpProcessInformation, [In] CorDebugCreateProcessFlags debuggingFlags, [MarshalAs(UnmanagedType.Interface)] out ICorDebugProcess ppProcess); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void DebugActiveProcess([In] uint id, [In] int win32Attach, [MarshalAs(UnmanagedType.Interface)] out ICorDebugProcess ppProcess); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void EnumerateProcesses([MarshalAs(UnmanagedType.Interface)] out ICorDebugProcessEnum ppProcess); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void GetProcess([In] uint dwProcessId, [MarshalAs(UnmanagedType.Interface)] out ICorDebugProcess ppProcess); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void Initialize(); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void SetManagedHandler([In, MarshalAs(UnmanagedType.Interface)] ICorDebugManagedCallback pCallback); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void SetUnmanagedHandler([In, MarshalAs(UnmanagedType.Interface)] ICorDebugUnmanagedCallback pCallback); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void Terminate(); + + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugCreateProcessFlags.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugCreateProcessFlags.cs new file mode 100644 index 000000000..36e4c8946 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugCreateProcessFlags.cs @@ -0,0 +1,21 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + + public enum CorDebugCreateProcessFlags + { + // Fields + DEBUG_NO_SPECIAL_OPTIONS = 0 + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugExceptionCallbackType.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugExceptionCallbackType.cs new file mode 100644 index 000000000..e9f3c3fb1 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugExceptionCallbackType.cs @@ -0,0 +1,22 @@ +// +// +// +// +// $Revision: 3648 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Wrappers.CorDebug +{ + public enum CorDebugExceptionCallbackType + { + // Fields + DEBUG_EXCEPTION_CATCH_HANDLER_FOUND = 3, + DEBUG_EXCEPTION_FIRST_CHANCE = 1, + DEBUG_EXCEPTION_UNHANDLED = 4, + DEBUG_EXCEPTION_USER_FIRST_CHANCE = 2 + } +} + +#pragma warning restore 108, 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugExceptionUnwindCallbackType.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugExceptionUnwindCallbackType.cs new file mode 100644 index 000000000..d5b1dcc02 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugExceptionUnwindCallbackType.cs @@ -0,0 +1,20 @@ +// +// +// +// +// $Revision: 3648 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Wrappers.CorDebug +{ + public enum CorDebugExceptionUnwindCallbackType + { + // Fields + DEBUG_EXCEPTION_INTERCEPTED = 2, + DEBUG_EXCEPTION_UNWIND_BEGIN = 1 + } +} + +#pragma warning restore 108, 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugHandleType.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugHandleType.cs new file mode 100644 index 000000000..2f4560ba8 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugHandleType.cs @@ -0,0 +1,20 @@ +// +// +// +// +// $Revision: 3648 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + public enum CorDebugHandleType + { + // Fields + HANDLE_STRONG = 1, + HANDLE_WEAK_TRACK_RESURRECTION = 2 + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugIntercept.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugIntercept.cs new file mode 100644 index 000000000..5e496a4f5 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugIntercept.cs @@ -0,0 +1,27 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + + public enum CorDebugIntercept + { + // Fields + INTERCEPT_ALL = 0xffff, + INTERCEPT_CLASS_INIT = 1, + INTERCEPT_CONTEXT_POLICY = 8, + INTERCEPT_EXCEPTION_FILTER = 2, + INTERCEPT_INTERCEPTION = 0x10, + INTERCEPT_NONE = 0, + INTERCEPT_SECURITY = 4 + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugInternalFrameType.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugInternalFrameType.cs new file mode 100644 index 000000000..43551dd7e --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugInternalFrameType.cs @@ -0,0 +1,27 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + + public enum CorDebugInternalFrameType + { + // Fields + STUBFRAME_APPDOMAIN_TRANSITION = 3, + STUBFRAME_FUNC_EVAL = 5, + STUBFRAME_INTERNALCALL = 6, + STUBFRAME_LIGHTWEIGHT_FUNCTION = 4, + STUBFRAME_M2U = 1, + STUBFRAME_NONE = 0, + STUBFRAME_U2M = 2 + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugMDAFlags.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugMDAFlags.cs new file mode 100644 index 000000000..7f2401af5 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugMDAFlags.cs @@ -0,0 +1,21 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + + public enum CorDebugMDAFlags + { + // Fields + MDA_FLAG_SLIP = 2 + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugMappingResult.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugMappingResult.cs new file mode 100644 index 000000000..514254a9e --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugMappingResult.cs @@ -0,0 +1,26 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + + public enum CorDebugMappingResult + { + // Fields + MAPPING_APPROXIMATE = 0x20, + MAPPING_EPILOG = 2, + MAPPING_EXACT = 0x10, + MAPPING_NO_INFO = 4, + MAPPING_PROLOG = 1, + MAPPING_UNMAPPED_ADDRESS = 8 + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugRegister.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugRegister.cs new file mode 100644 index 000000000..6c6bebbe9 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugRegister.cs @@ -0,0 +1,76 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + + public enum CorDebugRegister + { + // Fields + REGISTER_AMD64_R10 = 11, + REGISTER_AMD64_R11 = 12, + REGISTER_AMD64_R12 = 13, + REGISTER_AMD64_R13 = 14, + REGISTER_AMD64_R14 = 15, + REGISTER_AMD64_R15 = 0x10, + REGISTER_AMD64_R8 = 9, + REGISTER_AMD64_R9 = 10, + REGISTER_AMD64_RAX = 3, + REGISTER_AMD64_RBP = 2, + REGISTER_AMD64_RBX = 6, + REGISTER_AMD64_RCX = 4, + REGISTER_AMD64_RDI = 8, + REGISTER_AMD64_RDX = 5, + REGISTER_AMD64_RIP = 0, + REGISTER_AMD64_RSI = 7, + REGISTER_AMD64_RSP = 1, + REGISTER_AMD64_XMM0 = 0x11, + REGISTER_AMD64_XMM1 = 0x12, + REGISTER_AMD64_XMM10 = 0x1b, + REGISTER_AMD64_XMM11 = 0x1c, + REGISTER_AMD64_XMM12 = 0x1d, + REGISTER_AMD64_XMM13 = 30, + REGISTER_AMD64_XMM14 = 0x1f, + REGISTER_AMD64_XMM15 = 0x20, + REGISTER_AMD64_XMM2 = 0x13, + REGISTER_AMD64_XMM3 = 20, + REGISTER_AMD64_XMM4 = 0x15, + REGISTER_AMD64_XMM5 = 0x16, + REGISTER_AMD64_XMM6 = 0x17, + REGISTER_AMD64_XMM7 = 0x18, + REGISTER_AMD64_XMM8 = 0x19, + REGISTER_AMD64_XMM9 = 0x1a, + REGISTER_FRAME_POINTER = 2, + REGISTER_IA64_BSP = 2, + REGISTER_IA64_F0 = 0x83, + REGISTER_IA64_R0 = 3, + REGISTER_INSTRUCTION_POINTER = 0, + REGISTER_STACK_POINTER = 1, + REGISTER_X86_EAX = 3, + REGISTER_X86_EBP = 2, + REGISTER_X86_EBX = 6, + REGISTER_X86_ECX = 4, + REGISTER_X86_EDI = 8, + REGISTER_X86_EDX = 5, + REGISTER_X86_EIP = 0, + REGISTER_X86_ESI = 7, + REGISTER_X86_ESP = 1, + REGISTER_X86_FPSTACK_0 = 9, + REGISTER_X86_FPSTACK_1 = 10, + REGISTER_X86_FPSTACK_2 = 11, + REGISTER_X86_FPSTACK_3 = 12, + REGISTER_X86_FPSTACK_4 = 13, + REGISTER_X86_FPSTACK_5 = 14, + REGISTER_X86_FPSTACK_6 = 15, + REGISTER_X86_FPSTACK_7 = 0x10 + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugStepReason.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugStepReason.cs new file mode 100644 index 000000000..056815676 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugStepReason.cs @@ -0,0 +1,27 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + public enum CorDebugStepReason + { + // Fields + STEP_CALL = 2, + STEP_EXCEPTION_FILTER = 3, + STEP_EXCEPTION_HANDLER = 4, + STEP_EXIT = 6, + STEP_INTERCEPT = 5, + STEP_NORMAL = 0, + STEP_RETURN = 1 + } +} + +#pragma warning restore 108, 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugThreadState.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugThreadState.cs new file mode 100644 index 000000000..23b3abe8e --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugThreadState.cs @@ -0,0 +1,22 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + + public enum CorDebugThreadState + { + // Fields + THREAD_RUN = 0, + THREAD_SUSPEND = 1 + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugUnmappedStop.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugUnmappedStop.cs new file mode 100644 index 000000000..fb1baddaa --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugUnmappedStop.cs @@ -0,0 +1,27 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + + public enum CorDebugUnmappedStop + { + // Fields + STOP_ALL = 0xffff, + STOP_EPILOG = 2, + STOP_NO_MAPPING_INFO = 4, + STOP_NONE = 0, + STOP_OTHER_UNMAPPED = 8, + STOP_PROLOG = 1, + STOP_UNMANAGED = 0x10 + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugUserState.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugUserState.cs new file mode 100644 index 000000000..6a900af9a --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/CorDebugUserState.cs @@ -0,0 +1,28 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + + public enum CorDebugUserState + { + // Fields + USER_BACKGROUND = 4, + USER_STOP_REQUESTED = 1, + USER_STOPPED = 0x10, + USER_SUSPEND_REQUESTED = 2, + USER_SUSPENDED = 0x40, + USER_UNSAFE_POINT = 0x80, + USER_UNSTARTED = 8, + USER_WAIT_SLEEP_JOIN = 0x20 + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/EmbeddedCLRCorDebug.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/EmbeddedCLRCorDebug.cs new file mode 100644 index 000000000..b4657ea04 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/EmbeddedCLRCorDebug.cs @@ -0,0 +1,20 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System.Runtime.InteropServices; + + [ComImport, Guid("3D6F5F61-7538-11D3-8D5B-00104B35E7EF"), CoClass(typeof(EmbeddedCLRCorDebugClass))] + public interface EmbeddedCLRCorDebug : ICorDebug + { + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/EmbeddedCLRCorDebugClass.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/EmbeddedCLRCorDebugClass.cs new file mode 100644 index 000000000..1296bd099 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/EmbeddedCLRCorDebugClass.cs @@ -0,0 +1,50 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, ClassInterface((short) 0), TypeLibType((short) 2), Guid("211F1254-BC7E-4AF5-B9AA-067308D83DD1")] + public class EmbeddedCLRCorDebugClass : ICorDebug, EmbeddedCLRCorDebug + { + // Methods + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void CanLaunchOrAttach([In] uint dwProcessId, [In] int win32DebuggingEnabled); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void CreateProcess([In, MarshalAs(UnmanagedType.LPWStr)] string lpApplicationName, [In, MarshalAs(UnmanagedType.LPWStr)] string lpCommandLine, [In] ref _SECURITY_ATTRIBUTES lpProcessAttributes, [In] ref _SECURITY_ATTRIBUTES lpThreadAttributes, [In] int bInheritHandles, [In] uint dwCreationFlags, [In] IntPtr lpEnvironment, [In, MarshalAs(UnmanagedType.LPWStr)] string lpCurrentDirectory, [In, ComAliasName("Debugger.Interop.CorDebug.ULONG_PTR")] uint lpStartupInfo, [In, ComAliasName("Debugger.Interop.CorDebug.ULONG_PTR")] uint lpProcessInformation, [In] CorDebugCreateProcessFlags debuggingFlags, [MarshalAs(UnmanagedType.Interface)] out ICorDebugProcess ppProcess); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void DebugActiveProcess([In] uint id, [In] int win32Attach, [MarshalAs(UnmanagedType.Interface)] out ICorDebugProcess ppProcess); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void EnumerateProcesses([MarshalAs(UnmanagedType.Interface)] out ICorDebugProcessEnum ppProcess); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void GetProcess([In] uint dwProcessId, [MarshalAs(UnmanagedType.Interface)] out ICorDebugProcess ppProcess); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void Initialize(); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void SetManagedHandler([In, MarshalAs(UnmanagedType.Interface)] ICorDebugManagedCallback pCallback); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void SetUnmanagedHandler([In, MarshalAs(UnmanagedType.Interface)] ICorDebugUnmanagedCallback pCallback); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void Terminate(); + + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebug.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebug.cs new file mode 100644 index 000000000..fca65d0fa --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebug.cs @@ -0,0 +1,40 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("3D6F5F61-7538-11D3-8D5B-00104B35E7EF"), InterfaceType((short) 1)] + public interface ICorDebug + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Initialize(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Terminate(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetManagedHandler([In, MarshalAs(UnmanagedType.Interface)] ICorDebugManagedCallback pCallback); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetUnmanagedHandler([In, MarshalAs(UnmanagedType.Interface)] ICorDebugUnmanagedCallback pCallback); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CreateProcess([In, MarshalAs(UnmanagedType.LPWStr)] string lpApplicationName, [In, MarshalAs(UnmanagedType.LPWStr)] string lpCommandLine, [In] ref _SECURITY_ATTRIBUTES lpProcessAttributes, [In] ref _SECURITY_ATTRIBUTES lpThreadAttributes, [In] int bInheritHandles, [In] uint dwCreationFlags, [In] IntPtr lpEnvironment, [In, MarshalAs(UnmanagedType.LPWStr)] string lpCurrentDirectory, [In, ComAliasName("Debugger.Interop.CorDebug.ULONG_PTR")] uint lpStartupInfo, [In, ComAliasName("Debugger.Interop.CorDebug.ULONG_PTR")] uint lpProcessInformation, [In] CorDebugCreateProcessFlags debuggingFlags, [MarshalAs(UnmanagedType.Interface)] out ICorDebugProcess ppProcess); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void DebugActiveProcess([In] uint id, [In] int win32Attach, [MarshalAs(UnmanagedType.Interface)] out ICorDebugProcess ppProcess); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumerateProcesses([MarshalAs(UnmanagedType.Interface)] out ICorDebugProcessEnum ppProcess); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetProcess([In] uint dwProcessId, [MarshalAs(UnmanagedType.Interface)] out ICorDebugProcess ppProcess); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CanLaunchOrAttach([In] uint dwProcessId, [In] int win32DebuggingEnabled); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugAppDomain.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugAppDomain.cs new file mode 100644 index 000000000..0b5d01d9e --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugAppDomain.cs @@ -0,0 +1,62 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("3D6F5F63-7538-11D3-8D5B-00104B35E7EF"), ComConversionLoss, InterfaceType((short) 1)] + public interface ICorDebugAppDomain : ICorDebugController + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Stop([In] uint dwTimeoutIgnored); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Continue([In] int fIsOutOfBand); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void IsRunning(out int pbRunning); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void HasQueuedCallbacks([In, MarshalAs(UnmanagedType.Interface)] ICorDebugThread pThread, out int pbQueued); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumerateThreads([MarshalAs(UnmanagedType.Interface)] out ICorDebugThreadEnum ppThreads); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetAllThreadsDebugState([In] CorDebugThreadState state, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugThread pExceptThisThread); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Detach(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Terminate([In] uint exitCode); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CanCommitChanges([In] uint cSnapshots, [In, MarshalAs(UnmanagedType.Interface)] ref ICorDebugEditAndContinueSnapshot pSnapshots, [MarshalAs(UnmanagedType.Interface)] out ICorDebugErrorInfoEnum pError); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CommitChanges([In] uint cSnapshots, [In, MarshalAs(UnmanagedType.Interface)] ref ICorDebugEditAndContinueSnapshot pSnapshots, [MarshalAs(UnmanagedType.Interface)] out ICorDebugErrorInfoEnum pError); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetProcess([MarshalAs(UnmanagedType.Interface)] out ICorDebugProcess ppProcess); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumerateAssemblies([MarshalAs(UnmanagedType.Interface)] out ICorDebugAssemblyEnum ppAssemblies); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetModuleFromMetaDataInterface([In, MarshalAs(UnmanagedType.IUnknown)] object pIMetaData, [MarshalAs(UnmanagedType.Interface)] out ICorDebugModule ppModule); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumerateBreakpoints([MarshalAs(UnmanagedType.Interface)] out ICorDebugBreakpointEnum ppBreakpoints); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumerateSteppers([MarshalAs(UnmanagedType.Interface)] out ICorDebugStepperEnum ppSteppers); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void IsAttached(out int pbAttached); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetName([In] uint cchName, out uint pcchName, [Out] IntPtr szName); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetObject([MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppObject); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Attach(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetID(out uint pId); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugAppDomain2.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugAppDomain2.cs new file mode 100644 index 000000000..7d4850bc5 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugAppDomain2.cs @@ -0,0 +1,26 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("096E81D5-ECDA-4202-83F5-C65980A9EF75"), InterfaceType((short) 1)] + public interface ICorDebugAppDomain2 + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetArrayOrPointerType([In] uint elementType, [In] uint nRank, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugType pTypeArg, [MarshalAs(UnmanagedType.Interface)] out ICorDebugType ppType); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetFunctionPointerType([In] uint nTypeArgs, [In, MarshalAs(UnmanagedType.Interface)] ref ICorDebugType ppTypeArgs, [MarshalAs(UnmanagedType.Interface)] out ICorDebugType ppType); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugAppDomainEnum.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugAppDomainEnum.cs new file mode 100644 index 000000000..47d8d220c --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugAppDomainEnum.cs @@ -0,0 +1,32 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("63CA1B24-4359-4883-BD57-13F815F58744"), InterfaceType((short) 1), ComConversionLoss] + public interface ICorDebugAppDomainEnum : ICorDebugEnum + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Skip([In] uint celt); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Reset(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Clone([MarshalAs(UnmanagedType.Interface)] out ICorDebugEnum ppEnum); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCount(out uint pcelt); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Next([In] uint celt, [Out] IntPtr values, out uint pceltFetched); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugArrayValue.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugArrayValue.cs new file mode 100644 index 000000000..27f86e0bd --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugArrayValue.cs @@ -0,0 +1,50 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, ComConversionLoss, Guid("0405B0DF-A660-11D2-BD02-0000F80849BD"), InterfaceType((short) 1)] + public interface ICorDebugArrayValue : ICorDebugHeapValue + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetType(out uint pType); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetSize(out uint pSize); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetAddress(out ulong pAddress); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CreateBreakpoint([MarshalAs(UnmanagedType.Interface)] out ICorDebugValueBreakpoint ppBreakpoint); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void IsValid(out int pbValid); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CreateRelocBreakpoint([MarshalAs(UnmanagedType.Interface)] out ICorDebugValueBreakpoint ppBreakpoint); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetElementType(out uint pType); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetRank(out uint pnRank); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCount(out uint pnCount); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetDimensions([In] uint cdim, [Out] IntPtr dims); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void HasBaseIndicies(out int pbHasBaseIndicies); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetBaseIndicies([In] uint cdim, [Out] IntPtr indicies); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetElement([In] uint cdim, [In] IntPtr indices, [MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetElementAtPosition([In] uint nPosition, [MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugAssembly.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugAssembly.cs new file mode 100644 index 000000000..3bbc448d1 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugAssembly.cs @@ -0,0 +1,32 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("DF59507C-D47A-459E-BCE2-6427EAC8FD06"), ComConversionLoss, InterfaceType((short) 1)] + public interface ICorDebugAssembly + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetProcess([MarshalAs(UnmanagedType.Interface)] out ICorDebugProcess ppProcess); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetAppDomain([MarshalAs(UnmanagedType.Interface)] out ICorDebugAppDomain ppAppDomain); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumerateModules([MarshalAs(UnmanagedType.Interface)] out ICorDebugModuleEnum ppModules); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCodeBase([In] uint cchName, out uint pcchName, [Out] IntPtr szName); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetName([In] uint cchName, out uint pcchName, [Out] IntPtr szName); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugAssemblyEnum.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugAssemblyEnum.cs new file mode 100644 index 000000000..b2986b147 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugAssemblyEnum.cs @@ -0,0 +1,32 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, InterfaceType((short) 1), ComConversionLoss, Guid("4A2A1EC9-85EC-4BFB-9F15-A89FDFE0FE83")] + public interface ICorDebugAssemblyEnum : ICorDebugEnum + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Skip([In] uint celt); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Reset(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Clone([MarshalAs(UnmanagedType.Interface)] out ICorDebugEnum ppEnum); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCount(out uint pcelt); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Next([In] uint celt, [Out] IntPtr values, out uint pceltFetched); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugBoxValue.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugBoxValue.cs new file mode 100644 index 000000000..445398bce --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugBoxValue.cs @@ -0,0 +1,36 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("CC7BCAFC-8A68-11D2-983C-0000F808342D"), InterfaceType((short) 1)] + public interface ICorDebugBoxValue : ICorDebugHeapValue + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetType(out uint pType); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetSize(out uint pSize); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetAddress(out ulong pAddress); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CreateBreakpoint([MarshalAs(UnmanagedType.Interface)] out ICorDebugValueBreakpoint ppBreakpoint); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void IsValid(out int pbValid); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CreateRelocBreakpoint([MarshalAs(UnmanagedType.Interface)] out ICorDebugValueBreakpoint ppBreakpoint); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetObject([MarshalAs(UnmanagedType.Interface)] out ICorDebugObjectValue ppObject); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugBreakpoint.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugBreakpoint.cs new file mode 100644 index 000000000..94c3ac6c5 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugBreakpoint.cs @@ -0,0 +1,26 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, InterfaceType((short) 1), Guid("CC7BCAE8-8A68-11D2-983C-0000F808342D")] + public interface ICorDebugBreakpoint + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Activate([In] int bActive); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void IsActive(out int pbActive); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugBreakpointEnum.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugBreakpointEnum.cs new file mode 100644 index 000000000..e765a8499 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugBreakpointEnum.cs @@ -0,0 +1,32 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("CC7BCB03-8A68-11D2-983C-0000F808342D"), InterfaceType((short) 1), ComConversionLoss] + public interface ICorDebugBreakpointEnum : ICorDebugEnum + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Skip([In] uint celt); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Reset(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Clone([MarshalAs(UnmanagedType.Interface)] out ICorDebugEnum ppEnum); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCount(out uint pcelt); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Next([In] uint celt, [Out] IntPtr breakpoints, out uint pceltFetched); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugChain.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugChain.cs new file mode 100644 index 000000000..a89e086d4 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugChain.cs @@ -0,0 +1,46 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("CC7BCAEE-8A68-11D2-983C-0000F808342D"), InterfaceType((short) 1)] + public interface ICorDebugChain + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetThread([MarshalAs(UnmanagedType.Interface)] out ICorDebugThread ppThread); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetStackRange(out ulong pStart, out ulong pEnd); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetContext([MarshalAs(UnmanagedType.Interface)] out ICorDebugContext ppContext); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCaller([MarshalAs(UnmanagedType.Interface)] out ICorDebugChain ppChain); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCallee([MarshalAs(UnmanagedType.Interface)] out ICorDebugChain ppChain); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetPrevious([MarshalAs(UnmanagedType.Interface)] out ICorDebugChain ppChain); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetNext([MarshalAs(UnmanagedType.Interface)] out ICorDebugChain ppChain); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void IsManaged(out int pManaged); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumerateFrames([MarshalAs(UnmanagedType.Interface)] out ICorDebugFrameEnum ppFrames); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetActiveFrame([MarshalAs(UnmanagedType.Interface)] out ICorDebugFrame ppFrame); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetRegisterSet([MarshalAs(UnmanagedType.Interface)] out ICorDebugRegisterSet ppRegisters); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetReason(out CorDebugChainReason pReason); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugChainEnum.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugChainEnum.cs new file mode 100644 index 000000000..98dc7ee34 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugChainEnum.cs @@ -0,0 +1,32 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, InterfaceType((short) 1), Guid("CC7BCB08-8A68-11D2-983C-0000F808342D"), ComConversionLoss] + public interface ICorDebugChainEnum : ICorDebugEnum + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Skip([In] uint celt); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Reset(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Clone([MarshalAs(UnmanagedType.Interface)] out ICorDebugEnum ppEnum); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCount(out uint pcelt); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Next([In] uint celt, [Out, MarshalAs(UnmanagedType.LPArray)] ICorDebugChain[] chains, out uint pceltFetched); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugClass.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugClass.cs new file mode 100644 index 000000000..c2a749afd --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugClass.cs @@ -0,0 +1,28 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, InterfaceType((short) 1), Guid("CC7BCAF5-8A68-11D2-983C-0000F808342D")] + public interface ICorDebugClass + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetModule([MarshalAs(UnmanagedType.Interface)] out ICorDebugModule pModule); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetToken(out uint pTypeDef); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetStaticFieldValue([In] uint fieldDef, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugFrame pFrame, [MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugClass2.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugClass2.cs new file mode 100644 index 000000000..5cd3f57ed --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugClass2.cs @@ -0,0 +1,26 @@ +// +// +// +// +// $Revision: 2185 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("B008EA8D-7AB1-43F7-BB20-FBB5A04038AE"), InterfaceType((short) 1)] + public interface ICorDebugClass2 + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetParameterizedType([In] uint elementType, [In] uint nTypeArgs, [In, MarshalAs(UnmanagedType.LPArray)] ICorDebugType[] ppTypeArgs, [MarshalAs(UnmanagedType.Interface)] out ICorDebugType ppType); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetJMCStatus([In] int bIsJustMyCode); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugCode.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugCode.cs new file mode 100644 index 000000000..0def3fecd --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugCode.cs @@ -0,0 +1,40 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, InterfaceType((short) 1), Guid("CC7BCAF4-8A68-11D2-983C-0000F808342D"), ComConversionLoss] + public interface ICorDebugCode + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void IsIL(out int pbIL); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetFunction([MarshalAs(UnmanagedType.Interface)] out ICorDebugFunction ppFunction); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetAddress(out ulong pStart); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetSize(out uint pcBytes); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CreateBreakpoint([In] uint offset, [MarshalAs(UnmanagedType.Interface)] out ICorDebugFunctionBreakpoint ppBreakpoint); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCode([In] uint startOffset, [In] uint endOffset, [In] uint cBufferAlloc, [Out] IntPtr buffer, out uint pcBufferSize); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetVersionNumber(out uint nVersion); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetILToNativeMapping([In] uint cMap, out uint pcMap, [Out] IntPtr map); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetEnCRemapSequencePoints([In] uint cMap, out uint pcMap, [Out] IntPtr offsets); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugCodeEnum.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugCodeEnum.cs new file mode 100644 index 000000000..fecb97548 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugCodeEnum.cs @@ -0,0 +1,32 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, ComConversionLoss, InterfaceType((short) 1), Guid("55E96461-9645-45E4-A2FF-0367877ABCDE")] + public interface ICorDebugCodeEnum : ICorDebugEnum + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Skip([In] uint celt); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Reset(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Clone([MarshalAs(UnmanagedType.Interface)] out ICorDebugEnum ppEnum); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCount(out uint pcelt); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Next([In] uint celt, [Out] IntPtr values, out uint pceltFetched); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugContext.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugContext.cs new file mode 100644 index 000000000..24af005d7 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugContext.cs @@ -0,0 +1,44 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("CC7BCB00-8A68-11D2-983C-0000F808342D"), InterfaceType((short) 1)] + public interface ICorDebugContext : ICorDebugObjectValue + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetType(out uint pType); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetSize(out uint pSize); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetAddress(out ulong pAddress); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CreateBreakpoint([MarshalAs(UnmanagedType.Interface)] out ICorDebugValueBreakpoint ppBreakpoint); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetClass([MarshalAs(UnmanagedType.Interface)] out ICorDebugClass ppClass); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetFieldValue([In, MarshalAs(UnmanagedType.Interface)] ICorDebugClass pClass, [In] uint fieldDef, [MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetVirtualMethod([In] uint memberRef, [MarshalAs(UnmanagedType.Interface)] out ICorDebugFunction ppFunction); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetContext([MarshalAs(UnmanagedType.Interface)] out ICorDebugContext ppContext); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void IsValueClass(out int pbIsValueClass); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetManagedCopy([MarshalAs(UnmanagedType.IUnknown)] out object ppObject); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetFromManagedCopy([In, MarshalAs(UnmanagedType.IUnknown)] object pObject); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugController.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugController.cs new file mode 100644 index 000000000..e7435f613 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugController.cs @@ -0,0 +1,42 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("3D6F5F62-7538-11D3-8D5B-00104B35E7EF"), InterfaceType((short) 1)] + public interface ICorDebugController + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Stop([In] uint dwTimeoutIgnored); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Continue([In] int fIsOutOfBand); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void IsRunning(out int pbRunning); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void HasQueuedCallbacks([In, MarshalAs(UnmanagedType.Interface)] ICorDebugThread pThread, out int pbQueued); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumerateThreads([MarshalAs(UnmanagedType.Interface)] out ICorDebugThreadEnum ppThreads); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetAllThreadsDebugState([In] CorDebugThreadState state, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugThread pExceptThisThread); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Detach(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Terminate([In] uint exitCode); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CanCommitChanges([In] uint cSnapshots, [In, MarshalAs(UnmanagedType.Interface)] ref ICorDebugEditAndContinueSnapshot pSnapshots, [MarshalAs(UnmanagedType.Interface)] out ICorDebugErrorInfoEnum pError); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CommitChanges([In] uint cSnapshots, [In, MarshalAs(UnmanagedType.Interface)] ref ICorDebugEditAndContinueSnapshot pSnapshots, [MarshalAs(UnmanagedType.Interface)] out ICorDebugErrorInfoEnum pError); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugEditAndContinueSnapshot.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugEditAndContinueSnapshot.cs new file mode 100644 index 000000000..e5478e0c3 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugEditAndContinueSnapshot.cs @@ -0,0 +1,36 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("6DC3FA01-D7CB-11D2-8A95-0080C792E5D8"), InterfaceType((short) 1)] + public interface ICorDebugEditAndContinueSnapshot + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CopyMetaData([In, MarshalAs(UnmanagedType.Interface)] IStream pIStream, out Guid pMvid); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetMvid(out Guid pMvid); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetRoDataRVA(out uint pRoDataRVA); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetRwDataRVA(out uint pRwDataRVA); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetPEBytes([In, MarshalAs(UnmanagedType.Interface)] IStream pIStream); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetILMap([In] uint mdFunction, [In] uint cMapSize, [In] ref _COR_IL_MAP map); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetPESymbolBytes([In, MarshalAs(UnmanagedType.Interface)] IStream pIStream); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugEnum.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugEnum.cs new file mode 100644 index 000000000..5acc31a8f --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugEnum.cs @@ -0,0 +1,30 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, InterfaceType((short) 1), Guid("CC7BCB01-8A68-11D2-983C-0000F808342D")] + public interface ICorDebugEnum + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Skip([In] uint celt); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Reset(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Clone([MarshalAs(UnmanagedType.Interface)] out ICorDebugEnum ppEnum); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCount(out uint pcelt); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugErrorInfoEnum.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugErrorInfoEnum.cs new file mode 100644 index 000000000..d2cac4aa1 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugErrorInfoEnum.cs @@ -0,0 +1,32 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, ComConversionLoss, Guid("F0E18809-72B5-11D2-976F-00A0C9B4D50C"), InterfaceType((short) 1)] + public interface ICorDebugErrorInfoEnum : ICorDebugEnum + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Skip([In] uint celt); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Reset(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Clone([MarshalAs(UnmanagedType.Interface)] out ICorDebugEnum ppEnum); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCount(out uint pcelt); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Next([In] uint celt, [Out] IntPtr errors, out uint pceltFetched); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugEval.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugEval.cs new file mode 100644 index 000000000..dd40ea900 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugEval.cs @@ -0,0 +1,42 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("CC7BCAF6-8A68-11D2-983C-0000F808342D"), InterfaceType((short) 1)] + public interface ICorDebugEval + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CallFunction([In, MarshalAs(UnmanagedType.Interface)] ICorDebugFunction pFunction, [In] uint nArgs, [In, MarshalAs(UnmanagedType.LPArray)] ICorDebugValue[] ppArgs); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void NewObject([In, MarshalAs(UnmanagedType.Interface)] ICorDebugFunction pConstructor, [In] uint nArgs, [In, MarshalAs(UnmanagedType.Interface)] ref ICorDebugValue ppArgs); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void NewObjectNoConstructor([In, MarshalAs(UnmanagedType.Interface)] ICorDebugClass pClass); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void NewString([In, MarshalAs(UnmanagedType.LPWStr)] string @string); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void NewArray([In] uint elementType, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugClass pElementClass, [In] uint rank, [In] ref uint dims, [In] ref uint lowBounds); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void IsActive(out int pbActive); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Abort(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetResult([MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppResult); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetThread([MarshalAs(UnmanagedType.Interface)] out ICorDebugThread ppThread); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CreateValue([In] uint elementType, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugClass pElementClass, [MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugEval2.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugEval2.cs new file mode 100644 index 000000000..adc58321c --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugEval2.cs @@ -0,0 +1,36 @@ +// +// +// +// +// $Revision: 2868 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("FB0D9CE7-BE66-4683-9D32-A42A04E2FD91"), InterfaceType((short) 1)] + public interface ICorDebugEval2 + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CallParameterizedFunction([In, MarshalAs(UnmanagedType.Interface)] ICorDebugFunction pFunction, [In] uint nTypeArgs, [In, MarshalAs(UnmanagedType.LPArray)] ICorDebugType[] ppTypeArgs, [In] uint nArgs, [In, MarshalAs(UnmanagedType.LPArray)] ICorDebugValue[] ppArgs); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CreateValueForType([In, MarshalAs(UnmanagedType.Interface)] ICorDebugType pType, [MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void NewParameterizedObject([In, MarshalAs(UnmanagedType.Interface)] ICorDebugFunction pConstructor, [In] uint nTypeArgs, [In, MarshalAs(UnmanagedType.LPArray)] ICorDebugType[] ppTypeArgs, [In] uint nArgs, [In, MarshalAs(UnmanagedType.LPArray)] ICorDebugValue[] ppArgs); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void NewParameterizedObjectNoConstructor([In, MarshalAs(UnmanagedType.Interface)] ICorDebugClass pClass, [In] uint nTypeArgs, [In, MarshalAs(UnmanagedType.LPArray)] ICorDebugType[] ppTypeArgs); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void NewParameterizedArray([In, MarshalAs(UnmanagedType.Interface)] ICorDebugType pElementType, [In] uint rank, [In] ref uint dims, [In] ref uint lowBounds); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void NewStringWithLength([In, MarshalAs(UnmanagedType.LPWStr)] string @string, [In] uint uiLength); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void RudeAbort(); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugFrame.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugFrame.cs new file mode 100644 index 000000000..8a0736975 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugFrame.cs @@ -0,0 +1,38 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, InterfaceType((short) 1), Guid("CC7BCAEF-8A68-11D2-983C-0000F808342D")] + public interface ICorDebugFrame + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetChain([MarshalAs(UnmanagedType.Interface)] out ICorDebugChain ppChain); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCode([MarshalAs(UnmanagedType.Interface)] out ICorDebugCode ppCode); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetFunction([MarshalAs(UnmanagedType.Interface)] out ICorDebugFunction ppFunction); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetFunctionToken(out uint pToken); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetStackRange(out ulong pStart, out ulong pEnd); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCaller([MarshalAs(UnmanagedType.Interface)] out ICorDebugFrame ppFrame); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCallee([MarshalAs(UnmanagedType.Interface)] out ICorDebugFrame ppFrame); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CreateStepper([MarshalAs(UnmanagedType.Interface)] out ICorDebugStepper ppStepper); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugFrameEnum.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugFrameEnum.cs new file mode 100644 index 000000000..aedc08a8b --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugFrameEnum.cs @@ -0,0 +1,32 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, InterfaceType((short) 1), ComConversionLoss, Guid("CC7BCB07-8A68-11D2-983C-0000F808342D")] + public interface ICorDebugFrameEnum : ICorDebugEnum + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Skip([In] uint celt); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Reset(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Clone([MarshalAs(UnmanagedType.Interface)] out ICorDebugEnum ppEnum); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCount(out uint pcelt); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Next([In] uint celt, [Out, MarshalAs(UnmanagedType.LPArray)] ICorDebugFrame[] frames, out uint pceltFetched); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugFunction.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugFunction.cs new file mode 100644 index 000000000..b709b4d3c --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugFunction.cs @@ -0,0 +1,38 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, InterfaceType((short) 1), Guid("CC7BCAF3-8A68-11D2-983C-0000F808342D")] + public interface ICorDebugFunction + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetModule([MarshalAs(UnmanagedType.Interface)] out ICorDebugModule ppModule); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetClass([MarshalAs(UnmanagedType.Interface)] out ICorDebugClass ppClass); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetToken(out uint pMethodDef); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetILCode([MarshalAs(UnmanagedType.Interface)] out ICorDebugCode ppCode); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetNativeCode([MarshalAs(UnmanagedType.Interface)] out ICorDebugCode ppCode); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CreateBreakpoint([MarshalAs(UnmanagedType.Interface)] out ICorDebugFunctionBreakpoint ppBreakpoint); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetLocalVarSigToken(out uint pmdSig); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCurrentVersionNumber(out uint pnCurrentVersion); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugFunction2.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugFunction2.cs new file mode 100644 index 000000000..ef116475a --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugFunction2.cs @@ -0,0 +1,30 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, InterfaceType((short) 1), Guid("EF0C490B-94C3-4E4D-B629-DDC134C532D8")] + public interface ICorDebugFunction2 + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetJMCStatus([In] int bIsJustMyCode); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetJMCStatus(out int pbIsJustMyCode); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumerateNativeCode([MarshalAs(UnmanagedType.Interface)] out ICorDebugCodeEnum ppCodeEnum); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetVersionNumber(out uint pnVersion); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugFunctionBreakpoint.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugFunctionBreakpoint.cs new file mode 100644 index 000000000..56d2f264e --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugFunctionBreakpoint.cs @@ -0,0 +1,30 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, InterfaceType((short) 1), Guid("CC7BCAE9-8A68-11D2-983C-0000F808342D")] + public interface ICorDebugFunctionBreakpoint : ICorDebugBreakpoint + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Activate([In] int bActive); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void IsActive(out int pbActive); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetFunction([MarshalAs(UnmanagedType.Interface)] out ICorDebugFunction ppFunction); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetOffset(out uint pnOffset); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugGenericValue.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugGenericValue.cs new file mode 100644 index 000000000..e33364aea --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugGenericValue.cs @@ -0,0 +1,34 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("CC7BCAF8-8A68-11D2-983C-0000F808342D"), InterfaceType((short) 1)] + public interface ICorDebugGenericValue : ICorDebugValue + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetType(out uint pType); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetSize(out uint pSize); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetAddress(out ulong pAddress); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CreateBreakpoint([MarshalAs(UnmanagedType.Interface)] out ICorDebugValueBreakpoint ppBreakpoint); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetValue([Out] IntPtr pTo); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetValue([In] IntPtr pFrom); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugHandleValue.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugHandleValue.cs new file mode 100644 index 000000000..78dc73e75 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugHandleValue.cs @@ -0,0 +1,44 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("029596E8-276B-46A1-9821-732E96BBB00B"), InterfaceType((short) 1)] + public interface ICorDebugHandleValue : ICorDebugReferenceValue + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetType(out uint pType); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetSize(out uint pSize); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetAddress(out ulong pAddress); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CreateBreakpoint([MarshalAs(UnmanagedType.Interface)] out ICorDebugValueBreakpoint ppBreakpoint); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void IsNull(out int pbNull); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetValue(out ulong pValue); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetValue([In] ulong value); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Dereference([MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void DereferenceStrong([MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetHandleType(out CorDebugHandleType pType); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Dispose(); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugHeapValue.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugHeapValue.cs new file mode 100644 index 000000000..c1404ae14 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugHeapValue.cs @@ -0,0 +1,33 @@ +// +// +// +// +// $Revision: 3648 $ +// + +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + [ComImport, Guid("CC7BCAFA-8A68-11D2-983C-0000F808342D"), InterfaceType((short) 1)] + public interface ICorDebugHeapValue : ICorDebugValue + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetType(out uint pType); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetSize(out uint pSize); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetAddress(out ulong pAddress); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CreateBreakpoint([MarshalAs(UnmanagedType.Interface)] out ICorDebugValueBreakpoint ppBreakpoint); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void IsValid(out int pbValid); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CreateRelocBreakpoint([MarshalAs(UnmanagedType.Interface)] out ICorDebugValueBreakpoint ppBreakpoint); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugHeapValue2.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugHeapValue2.cs new file mode 100644 index 000000000..354a5e97f --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugHeapValue2.cs @@ -0,0 +1,23 @@ +// +// +// +// +// $Revision: 3648 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("E3AC4D6C-9CB7-43E6-96CC-B21540E5083C"), InterfaceType((short) 1)] + public interface ICorDebugHeapValue2 + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CreateHandle([In] CorDebugHandleType type, [MarshalAs(UnmanagedType.Interface)] out ICorDebugHandleValue ppHandle); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugILFrame.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugILFrame.cs new file mode 100644 index 000000000..395b6f0ef --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugILFrame.cs @@ -0,0 +1,55 @@ +// +// +// +// +// $Revision: 3648 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("03E26311-4F76-11D3-88C6-006097945418"), InterfaceType((short) 1)] + public interface ICorDebugILFrame : ICorDebugFrame + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetChain([MarshalAs(UnmanagedType.Interface)] out ICorDebugChain ppChain); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCode([MarshalAs(UnmanagedType.Interface)] out ICorDebugCode ppCode); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetFunction([MarshalAs(UnmanagedType.Interface)] out ICorDebugFunction ppFunction); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetFunctionToken(out uint pToken); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetStackRange(out ulong pStart, out ulong pEnd); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCaller([MarshalAs(UnmanagedType.Interface)] out ICorDebugFrame ppFrame); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCallee([MarshalAs(UnmanagedType.Interface)] out ICorDebugFrame ppFrame); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CreateStepper([MarshalAs(UnmanagedType.Interface)] out ICorDebugStepper ppStepper); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetIP(out uint pnOffset, out CorDebugMappingResult pMappingResult); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetIP([In] uint nOffset); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumerateLocalVariables([MarshalAs(UnmanagedType.Interface)] out ICorDebugValueEnum ppValueEnum); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetLocalVariable([In] uint dwIndex, [MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumerateArguments([MarshalAs(UnmanagedType.Interface)] out ICorDebugValueEnum ppValueEnum); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetArgument([In] uint dwIndex, [MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetStackDepth(out uint pDepth); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetStackValue([In] uint dwIndex, [MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CanSetIP([In] uint nOffset); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugILFrame2.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugILFrame2.cs new file mode 100644 index 000000000..cd427d441 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugILFrame2.cs @@ -0,0 +1,25 @@ +// +// +// +// +// $Revision: 3648 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("5D88A994-6C30-479B-890F-BCEF88B129A5"), InterfaceType((short) 1)] + public interface ICorDebugILFrame2 + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void RemapFunction([In] uint newILOffset); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumerateTypeParameters([MarshalAs(UnmanagedType.Interface)] out ICorDebugTypeEnum ppTyParEnum); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugInternalFrame.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugInternalFrame.cs new file mode 100644 index 000000000..ba58caceb --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugInternalFrame.cs @@ -0,0 +1,39 @@ +// +// +// +// +// $Revision: 3648 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("B92CC7F7-9D2D-45C4-BC2B-621FCC9DFBF4"), InterfaceType((short) 1)] + public interface ICorDebugInternalFrame : ICorDebugFrame + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetChain([MarshalAs(UnmanagedType.Interface)] out ICorDebugChain ppChain); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCode([MarshalAs(UnmanagedType.Interface)] out ICorDebugCode ppCode); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetFunction([MarshalAs(UnmanagedType.Interface)] out ICorDebugFunction ppFunction); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetFunctionToken(out uint pToken); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetStackRange(out ulong pStart, out ulong pEnd); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCaller([MarshalAs(UnmanagedType.Interface)] out ICorDebugFrame ppFrame); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCallee([MarshalAs(UnmanagedType.Interface)] out ICorDebugFrame ppFrame); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CreateStepper([MarshalAs(UnmanagedType.Interface)] out ICorDebugStepper ppStepper); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetFrameType(out CorDebugInternalFrameType pType); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugMDA.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugMDA.cs new file mode 100644 index 000000000..a10d43648 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugMDA.cs @@ -0,0 +1,32 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, ComConversionLoss, InterfaceType((short) 1), Guid("CC726F2F-1DB7-459B-B0EC-05F01D841B42")] + public interface ICorDebugMDA + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetName([In] uint cchName, out uint pcchName, [Out] IntPtr szName); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetDescription([In] uint cchName, out uint pcchName, [Out] IntPtr szName); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetXML([In] uint cchName, out uint pcchName, [Out] IntPtr szName); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetFlags([In] ref CorDebugMDAFlags pFlags); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetOSThreadId(out uint pOsTid); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugManagedCallback.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugManagedCallback.cs new file mode 100644 index 000000000..46006233d --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugManagedCallback.cs @@ -0,0 +1,74 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, InterfaceType((short) 1), Guid("3D6F5F60-7538-11D3-8D5B-00104B35E7EF")] + public interface ICorDebugManagedCallback + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Breakpoint([In] IntPtr pAppDomain, [In] IntPtr pThread, [In] IntPtr pBreakpoint); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void StepComplete([In] IntPtr pAppDomain, [In] IntPtr pThread, [In] IntPtr pStepper, [In] Debugger.Wrappers.CorDebug.CorDebugStepReason reason); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Break([In] IntPtr pAppDomain, [In] IntPtr thread); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Exception([In] IntPtr pAppDomain, [In] IntPtr pThread, [In] int unhandled); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EvalComplete([In] IntPtr pAppDomain, [In] IntPtr pThread, [In] IntPtr pEval); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EvalException([In] IntPtr pAppDomain, [In] IntPtr pThread, [In] IntPtr pEval); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CreateProcess([In] IntPtr pProcess); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void ExitProcess([In] IntPtr pProcess); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CreateThread([In] IntPtr pAppDomain, [In] IntPtr thread); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void ExitThread([In] IntPtr pAppDomain, [In] IntPtr thread); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void LoadModule([In] IntPtr pAppDomain, [In] IntPtr pModule); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void UnloadModule([In] IntPtr pAppDomain, [In] IntPtr pModule); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void LoadClass([In] IntPtr pAppDomain, [In] IntPtr c); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void UnloadClass([In] IntPtr pAppDomain, [In] IntPtr c); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void DebuggerError([In] IntPtr pProcess, [In, MarshalAs(UnmanagedType.Error)] int errorHR, [In] uint errorCode); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void LogMessage([In] IntPtr pAppDomain, [In] IntPtr pThread, [In] int lLevel, [In] IntPtr pLogSwitchName, [In] IntPtr pMessage); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void LogSwitch([In] IntPtr pAppDomain, [In] IntPtr pThread, [In] int lLevel, [In] uint ulReason, [In] IntPtr pLogSwitchName, [In] IntPtr pParentName); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CreateAppDomain([In] IntPtr pProcess, [In] IntPtr pAppDomain); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void ExitAppDomain([In] IntPtr pProcess, [In] IntPtr pAppDomain); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void LoadAssembly([In] IntPtr pAppDomain, [In] IntPtr pAssembly); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void UnloadAssembly([In] IntPtr pAppDomain, [In] IntPtr pAssembly); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void ControlCTrap([In] IntPtr pProcess); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void NameChange([In] IntPtr pAppDomain, [In] IntPtr pThread); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void UpdateModuleSymbols([In] IntPtr pAppDomain, [In] IntPtr pModule, [In] IntPtr pSymbolStream); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EditAndContinueRemap([In] IntPtr pAppDomain, [In] IntPtr pThread, [In] IntPtr pFunction, [In] int fAccurate); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void BreakpointSetError([In] IntPtr pAppDomain, [In] IntPtr pThread, [In] IntPtr pBreakpoint, [In] uint dwError); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugManagedCallback2.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugManagedCallback2.cs new file mode 100644 index 000000000..9df56506a --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugManagedCallback2.cs @@ -0,0 +1,38 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("250E5EEA-DB5C-4C76-B6F3-8C46F12E3203"), InterfaceType((short) 1)] + public interface ICorDebugManagedCallback2 + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void FunctionRemapOpportunity([In] IntPtr pAppDomain, [In] IntPtr pThread, [In] IntPtr pOldFunction, [In] IntPtr pNewFunction, [In] uint oldILOffset); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CreateConnection([In] IntPtr pProcess, [In] uint dwConnectionId, [In] IntPtr pConnName); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void ChangeConnection([In] IntPtr pProcess, [In] uint dwConnectionId); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void DestroyConnection([In] IntPtr pProcess, [In] uint dwConnectionId); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Exception([In] IntPtr pAppDomain, [In] IntPtr pThread, [In] IntPtr pFrame, [In] uint nOffset, [In] Debugger.Wrappers.CorDebug.CorDebugExceptionCallbackType dwEventType, [In] uint dwFlags); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void ExceptionUnwind([In] IntPtr pAppDomain, [In] IntPtr pThread, [In] Debugger.Wrappers.CorDebug.CorDebugExceptionUnwindCallbackType dwEventType, [In] uint dwFlags); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void FunctionRemapComplete([In] IntPtr pAppDomain, [In] IntPtr pThread, [In] IntPtr pFunction); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void MDANotification([In] IntPtr pController, [In] IntPtr pThread, [In] IntPtr pMDA); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugModule.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugModule.cs new file mode 100644 index 000000000..4563c95c9 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugModule.cs @@ -0,0 +1,56 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("DBA2D8C1-E5C5-4069-8C13-10A7C6ABF43D"), InterfaceType((short) 1), ComConversionLoss] + public interface ICorDebugModule + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetProcess([MarshalAs(UnmanagedType.Interface)] out ICorDebugProcess ppProcess); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetBaseAddress(out ulong pAddress); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetAssembly([MarshalAs(UnmanagedType.Interface)] out ICorDebugAssembly ppAssembly); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetName([In] uint cchName, out uint pcchName, [Out] IntPtr szName); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnableJITDebugging([In] int bTrackJITInfo, [In] int bAllowJitOpts); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnableClassLoadCallbacks([In] int bClassLoadCallbacks); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetFunctionFromToken([In] uint methodDef, [MarshalAs(UnmanagedType.Interface)] out ICorDebugFunction ppFunction); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetFunctionFromRVA([In] ulong rva, [MarshalAs(UnmanagedType.Interface)] out ICorDebugFunction ppFunction); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetClassFromToken([In] uint typeDef, [MarshalAs(UnmanagedType.Interface)] out ICorDebugClass ppClass); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CreateBreakpoint([MarshalAs(UnmanagedType.Interface)] out ICorDebugModuleBreakpoint ppBreakpoint); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetEditAndContinueSnapshot([MarshalAs(UnmanagedType.Interface)] out ICorDebugEditAndContinueSnapshot ppEditAndContinueSnapshot); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetMetaDataInterface([In] ref Guid riid, [MarshalAs(UnmanagedType.IUnknown)] out object ppObj); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetToken(out uint pToken); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void IsDynamic(out int pDynamic); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetGlobalVariableValue([In] uint fieldDef, [MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetSize(out uint pcBytes); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void IsInMemory(out int pInMemory); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugModule2.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugModule2.cs new file mode 100644 index 000000000..ed70d563b --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugModule2.cs @@ -0,0 +1,31 @@ +// +// +// +// +// $Revision: 3648 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("7FCC5FB5-49C0-41DE-9938-3B88B5B9ADD7"), InterfaceType((short) 1)] + public interface ICorDebugModule2 + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetJMCStatus([In] int bIsJustMyCode, [In] uint cTokens, [In] ref uint pTokens); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void ApplyChanges([In] uint cbMetadata, [In, MarshalAs(UnmanagedType.LPArray)] byte[] pbMetadata, [In] uint cbIL, [In, MarshalAs(UnmanagedType.LPArray)] byte[] pbIL); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetJITCompilerFlags([In] uint dwFlags); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetJITCompilerFlags(out uint pdwFlags); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void ResolveAssembly([In] uint tkAssemblyRef, [In, MarshalAs(UnmanagedType.Interface)] ref ICorDebugAssembly ppAssembly); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugModuleBreakpoint.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugModuleBreakpoint.cs new file mode 100644 index 000000000..d7639b0b8 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugModuleBreakpoint.cs @@ -0,0 +1,27 @@ +// +// +// +// +// $Revision: 3648 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, InterfaceType((short) 1), Guid("CC7BCAEA-8A68-11D2-983C-0000F808342D")] + public interface ICorDebugModuleBreakpoint : ICorDebugBreakpoint + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Activate([In] int bActive); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void IsActive(out int pbActive); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetModule([MarshalAs(UnmanagedType.Interface)] out ICorDebugModule ppModule); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugModuleEnum.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugModuleEnum.cs new file mode 100644 index 000000000..7b3e192e3 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugModuleEnum.cs @@ -0,0 +1,32 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, InterfaceType((short) 1), ComConversionLoss, Guid("CC7BCB09-8A68-11D2-983C-0000F808342D")] + public interface ICorDebugModuleEnum : ICorDebugEnum + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Skip([In] uint celt); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Reset(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Clone([MarshalAs(UnmanagedType.Interface)] out ICorDebugEnum ppEnum); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCount(out uint pcelt); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Next([In] uint celt, [Out] IntPtr modules, out uint pceltFetched); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugNativeFrame.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugNativeFrame.cs new file mode 100644 index 000000000..ffafb8154 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugNativeFrame.cs @@ -0,0 +1,55 @@ +// +// +// +// +// $Revision: 3648 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("03E26314-4F76-11D3-88C6-006097945418"), InterfaceType((short) 1)] + public interface ICorDebugNativeFrame : ICorDebugFrame + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetChain([MarshalAs(UnmanagedType.Interface)] out ICorDebugChain ppChain); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCode([MarshalAs(UnmanagedType.Interface)] out ICorDebugCode ppCode); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetFunction([MarshalAs(UnmanagedType.Interface)] out ICorDebugFunction ppFunction); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetFunctionToken(out uint pToken); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetStackRange(out ulong pStart, out ulong pEnd); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCaller([MarshalAs(UnmanagedType.Interface)] out ICorDebugFrame ppFrame); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCallee([MarshalAs(UnmanagedType.Interface)] out ICorDebugFrame ppFrame); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CreateStepper([MarshalAs(UnmanagedType.Interface)] out ICorDebugStepper ppStepper); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetIP(out uint pnOffset); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetIP([In] uint nOffset); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetRegisterSet([MarshalAs(UnmanagedType.Interface)] out ICorDebugRegisterSet ppRegisters); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetLocalRegisterValue([In] CorDebugRegister reg, [In] uint cbSigBlob, [In, ComAliasName("Debugger.Interop.CorDebug.ULONG_PTR")] uint pvSigBlob, [MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetLocalDoubleRegisterValue([In] CorDebugRegister highWordReg, [In] CorDebugRegister lowWordReg, [In] uint cbSigBlob, [In, ComAliasName("Debugger.Interop.CorDebug.ULONG_PTR")] uint pvSigBlob, [MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetLocalMemoryValue([In] ulong address, [In] uint cbSigBlob, [In, ComAliasName("Debugger.Interop.CorDebug.ULONG_PTR")] uint pvSigBlob, [MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetLocalRegisterMemoryValue([In] CorDebugRegister highWordReg, [In] ulong lowWordAddress, [In] uint cbSigBlob, [In, ComAliasName("Debugger.Interop.CorDebug.ULONG_PTR")] uint pvSigBlob, [MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetLocalMemoryRegisterValue([In] ulong highWordAddress, [In] CorDebugRegister lowWordRegister, [In] uint cbSigBlob, [In, ComAliasName("Debugger.Interop.CorDebug.ULONG_PTR")] uint pvSigBlob, [MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CanSetIP([In] uint nOffset); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugObjectEnum.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugObjectEnum.cs new file mode 100644 index 000000000..a62435339 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugObjectEnum.cs @@ -0,0 +1,32 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, InterfaceType((short) 1), Guid("CC7BCB02-8A68-11D2-983C-0000F808342D"), ComConversionLoss] + public interface ICorDebugObjectEnum : ICorDebugEnum + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Skip([In] uint celt); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Reset(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Clone([MarshalAs(UnmanagedType.Interface)] out ICorDebugEnum ppEnum); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCount(out uint pcelt); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Next([In] uint celt, [Out] IntPtr objects, out uint pceltFetched); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugObjectValue.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugObjectValue.cs new file mode 100644 index 000000000..c23ad0ea7 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugObjectValue.cs @@ -0,0 +1,43 @@ +// +// +// +// +// $Revision: 3648 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("18AD3D6E-B7D2-11D2-BD04-0000F80849BD"), InterfaceType((short) 1)] + public interface ICorDebugObjectValue : ICorDebugValue + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetType(out uint pType); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetSize(out uint pSize); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetAddress(out ulong pAddress); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CreateBreakpoint([MarshalAs(UnmanagedType.Interface)] out ICorDebugValueBreakpoint ppBreakpoint); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetClass([MarshalAs(UnmanagedType.Interface)] out ICorDebugClass ppClass); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetFieldValue([In, MarshalAs(UnmanagedType.Interface)] ICorDebugClass pClass, [In] uint fieldDef, [MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetVirtualMethod([In] uint memberRef, [MarshalAs(UnmanagedType.Interface)] out ICorDebugFunction ppFunction); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetContext([MarshalAs(UnmanagedType.Interface)] out ICorDebugContext ppContext); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void IsValueClass(out int pbIsValueClass); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetManagedCopy([MarshalAs(UnmanagedType.IUnknown)] out object ppObject); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetFromManagedCopy([In, MarshalAs(UnmanagedType.IUnknown)] object pObject); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugObjectValue2.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugObjectValue2.cs new file mode 100644 index 000000000..85fe3e8c7 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugObjectValue2.cs @@ -0,0 +1,23 @@ +// +// +// +// +// $Revision: 3648 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("49E4A320-4A9B-4ECA-B105-229FB7D5009F"), InterfaceType((short) 1)] + public interface ICorDebugObjectValue2 + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetVirtualMethodAndType([In] uint memberRef, [MarshalAs(UnmanagedType.Interface)] out ICorDebugFunction ppFunction, [MarshalAs(UnmanagedType.Interface)] out ICorDebugType ppType); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugProcess.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugProcess.cs new file mode 100644 index 000000000..8736c6518 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugProcess.cs @@ -0,0 +1,76 @@ +// +// +// +// +// $Revision: 3585 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, InterfaceType((short) 1), Guid("3D6F5F64-7538-11D3-8D5B-00104B35E7EF"), ComConversionLoss] + public interface ICorDebugProcess : ICorDebugController + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Stop([In] uint dwTimeoutIgnored); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Continue([In] int fIsOutOfBand); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void IsRunning(out int pbRunning); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void HasQueuedCallbacks([In, MarshalAs(UnmanagedType.Interface)] ICorDebugThread pThread, out int pbQueued); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumerateThreads([MarshalAs(UnmanagedType.Interface)] out ICorDebugThreadEnum ppThreads); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetAllThreadsDebugState([In] CorDebugThreadState state, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugThread pExceptThisThread); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Detach(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Terminate([In] uint exitCode); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CanCommitChanges([In] uint cSnapshots, [In, MarshalAs(UnmanagedType.Interface)] ref ICorDebugEditAndContinueSnapshot pSnapshots, [MarshalAs(UnmanagedType.Interface)] out ICorDebugErrorInfoEnum pError); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CommitChanges([In] uint cSnapshots, [In, MarshalAs(UnmanagedType.Interface)] ref ICorDebugEditAndContinueSnapshot pSnapshots, [MarshalAs(UnmanagedType.Interface)] out ICorDebugErrorInfoEnum pError); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetID(out uint pdwProcessId); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetHandle([ComAliasName("Debugger.Interop.CorDebug.long")] out uint phProcessHandle); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetThread([In] uint dwThreadId, [MarshalAs(UnmanagedType.Interface)] out ICorDebugThread ppThread); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumerateObjects([MarshalAs(UnmanagedType.Interface)] out ICorDebugObjectEnum ppObjects); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void IsTransitionStub([In] ulong address, out int pbTransitionStub); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void IsOSSuspended([In] uint threadID, out int pbSuspended); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetThreadContext([In] uint threadID, [In] uint contextSize, [In, Out] IntPtr context); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetThreadContext([In] uint threadID, [In] uint contextSize, [In] IntPtr context); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void ReadMemory([In] ulong address, [In] uint size, [Out] IntPtr buffer, [ComAliasName("Debugger.Interop.CorDebug.ULONG_PTR")] out uint read); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void WriteMemory([In] ulong address, [In] uint size, [In] IntPtr buffer, [ComAliasName("Debugger.Interop.CorDebug.ULONG_PTR")] out uint written); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void ClearCurrentException([In] uint threadID); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnableLogMessages([In] int fOnOff); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void ModifyLogSwitch([In] IntPtr pLogSwitchName, [In] int lLevel); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumerateAppDomains([MarshalAs(UnmanagedType.Interface)] out ICorDebugAppDomainEnum ppAppDomains); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetObject([MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppObject); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void ThreadForFiberCookie([In] uint fiberCookie, [MarshalAs(UnmanagedType.Interface)] out ICorDebugThread ppThread); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetHelperThreadID(out uint pThreadID); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugProcess2.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugProcess2.cs new file mode 100644 index 000000000..e9eea6120 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugProcess2.cs @@ -0,0 +1,36 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, InterfaceType((short) 1), Guid("AD1B3588-0EF0-4744-A496-AA09A9F80371"), ComConversionLoss] + public interface ICorDebugProcess2 + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetThreadForTaskID([In] ulong taskid, [MarshalAs(UnmanagedType.Interface)] out ICorDebugThread2 ppThread); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetVersion(out _COR_VERSION version); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetUnmanagedBreakpoint([In] ulong address, [In] uint bufsize, [Out] IntPtr buffer, out uint bufLen); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void ClearUnmanagedBreakpoint([In] ulong address); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetDesiredNGENCompilerFlags([In] uint pdwFlags); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetDesiredNGENCompilerFlags(out uint pdwFlags); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetReferenceValueFromGCHandle([In, ComAliasName("Debugger.Interop.CorDebug.UINT_PTR")] uint handle, [MarshalAs(UnmanagedType.Interface)] out ICorDebugReferenceValue pOutValue); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugProcessEnum.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugProcessEnum.cs new file mode 100644 index 000000000..fab329152 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugProcessEnum.cs @@ -0,0 +1,32 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("CC7BCB05-8A68-11D2-983C-0000F808342D"), InterfaceType((short) 1), ComConversionLoss] + public interface ICorDebugProcessEnum : ICorDebugEnum + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Skip([In] uint celt); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Reset(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Clone([MarshalAs(UnmanagedType.Interface)] out ICorDebugEnum ppEnum); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCount(out uint pcelt); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Next([In] uint celt, [Out] IntPtr processes, out uint pceltFetched); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugReferenceValue.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugReferenceValue.cs new file mode 100644 index 000000000..bfbe0ec2c --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugReferenceValue.cs @@ -0,0 +1,39 @@ +// +// +// +// +// $Revision: 3648 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, InterfaceType((short) 1), Guid("CC7BCAF9-8A68-11D2-983C-0000F808342D")] + public interface ICorDebugReferenceValue : ICorDebugValue + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetType(out uint pType); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetSize(out uint pSize); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetAddress(out ulong pAddress); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CreateBreakpoint([MarshalAs(UnmanagedType.Interface)] out ICorDebugValueBreakpoint ppBreakpoint); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void IsNull(out int pbNull); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetValue(out ulong pValue); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetValue([In] ulong value); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Dereference([MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void DereferenceStrong([MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugRegisterSet.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugRegisterSet.cs new file mode 100644 index 000000000..02d5f1c7d --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugRegisterSet.cs @@ -0,0 +1,32 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("CC7BCB0B-8A68-11D2-983C-0000F808342D"), ComConversionLoss, InterfaceType((short) 1)] + public interface ICorDebugRegisterSet + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetRegistersAvailable(out ulong pAvailable); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetRegisters([In] ulong mask, [In] uint regCount, [Out] IntPtr regBuffer); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetRegisters([In] ulong mask, [In] uint regCount, [In] ref ulong regBuffer); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetThreadContext([In] uint contextSize, [In, Out] IntPtr context); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetThreadContext([In] uint contextSize, [In] IntPtr context); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugStepper.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugStepper.cs new file mode 100644 index 000000000..68382236f --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugStepper.cs @@ -0,0 +1,38 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("CC7BCAEC-8A68-11D2-983C-0000F808342D"), InterfaceType((short) 1)] + public interface ICorDebugStepper + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void IsActive(out int pbActive); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Deactivate(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetInterceptMask([In] CorDebugIntercept mask); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetUnmappedStopMask([In] CorDebugUnmappedStop mask); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Step([In] int bStepIn); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void StepRange([In] int bStepIn, [In] IntPtr ranges, [In] uint cRangeCount); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void StepOut(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetRangeIL([In] int bIL); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugStepper2.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugStepper2.cs new file mode 100644 index 000000000..22ccd1980 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugStepper2.cs @@ -0,0 +1,23 @@ +// +// +// +// +// $Revision: 3648 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, InterfaceType((short) 1), Guid("C5B6E9C3-E7D1-4A8E-873B-7F047F0706F7")] + public interface ICorDebugStepper2 + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetJMC([In] int fIsJMCStepper); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugStepperEnum.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugStepperEnum.cs new file mode 100644 index 000000000..12e4201b5 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugStepperEnum.cs @@ -0,0 +1,32 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, InterfaceType((short) 1), ComConversionLoss, Guid("CC7BCB04-8A68-11D2-983C-0000F808342D")] + public interface ICorDebugStepperEnum : ICorDebugEnum + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Skip([In] uint celt); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Reset(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Clone([MarshalAs(UnmanagedType.Interface)] out ICorDebugEnum ppEnum); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCount(out uint pcelt); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Next([In] uint celt, [Out] IntPtr steppers, out uint pceltFetched); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugStringValue.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugStringValue.cs new file mode 100644 index 000000000..3ac45b876 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugStringValue.cs @@ -0,0 +1,38 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, InterfaceType((short) 1), Guid("CC7BCAFD-8A68-11D2-983C-0000F808342D"), ComConversionLoss] + public interface ICorDebugStringValue : ICorDebugHeapValue + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetType(out uint pType); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetSize(out uint pSize); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetAddress(out ulong pAddress); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CreateBreakpoint([MarshalAs(UnmanagedType.Interface)] out ICorDebugValueBreakpoint ppBreakpoint); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void IsValid(out int pbValid); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CreateRelocBreakpoint([MarshalAs(UnmanagedType.Interface)] out ICorDebugValueBreakpoint ppBreakpoint); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetLength(out uint pcchString); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetString([In] uint cchString, out uint pcchString, [Out] IntPtr szString); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugThread.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugThread.cs new file mode 100644 index 000000000..d172b32f8 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugThread.cs @@ -0,0 +1,53 @@ +// +// +// +// +// $Revision: 3648 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, InterfaceType((short) 1), Guid("938C6D66-7FB6-4F69-B389-425B8987329B")] + public interface ICorDebugThread + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetProcess([MarshalAs(UnmanagedType.Interface)] out ICorDebugProcess ppProcess); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetID(out uint pdwThreadId); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetHandle([ComAliasName("Debugger.Interop.CorDebug.long")] out uint phThreadHandle); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetAppDomain([MarshalAs(UnmanagedType.Interface)] out ICorDebugAppDomain ppAppDomain); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetDebugState([In] CorDebugThreadState state); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetDebugState(out CorDebugThreadState pState); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetUserState(out CorDebugUserState pState); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCurrentException([MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppExceptionObject); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void ClearCurrentException(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CreateStepper([MarshalAs(UnmanagedType.Interface)] out ICorDebugStepper ppStepper); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumerateChains([MarshalAs(UnmanagedType.Interface)] out ICorDebugChainEnum ppChains); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetActiveChain([MarshalAs(UnmanagedType.Interface)] out ICorDebugChain ppChain); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetActiveFrame([MarshalAs(UnmanagedType.Interface)] out ICorDebugFrame ppFrame); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetRegisterSet([MarshalAs(UnmanagedType.Interface)] out ICorDebugRegisterSet ppRegisters); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CreateEval([MarshalAs(UnmanagedType.Interface)] out ICorDebugEval ppEval); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetObject([MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppObject); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugThread2.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugThread2.cs new file mode 100644 index 000000000..2371984f2 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugThread2.cs @@ -0,0 +1,32 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, InterfaceType((short) 1), Guid("2BD956D9-7B07-4BEF-8A98-12AA862417C5"), ComConversionLoss] + public interface ICorDebugThread2 + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetActiveFunctions([In] uint cFunctions, out uint pcFunctions, [In, Out] IntPtr pFunctions); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetConnectionID(out uint pdwConnectionId); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetTaskID(out ulong pTaskId); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetVolatileOSThreadID(out uint pdwTid); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void InterceptCurrentException([In, MarshalAs(UnmanagedType.Interface)] ICorDebugFrame pFrame); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugThreadEnum.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugThreadEnum.cs new file mode 100644 index 000000000..cede3834d --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugThreadEnum.cs @@ -0,0 +1,32 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, ComConversionLoss, Guid("CC7BCB06-8A68-11D2-983C-0000F808342D"), InterfaceType((short) 1)] + public interface ICorDebugThreadEnum : ICorDebugEnum + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Skip([In] uint celt); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Reset(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Clone([MarshalAs(UnmanagedType.Interface)] out ICorDebugEnum ppEnum); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCount(out uint pcelt); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Next([In] uint celt, [Out] IntPtr threads, out uint pceltFetched); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugType.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugType.cs new file mode 100644 index 000000000..f2b07bceb --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugType.cs @@ -0,0 +1,35 @@ +// +// +// +// +// $Revision: 3648 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("D613F0BB-ACE1-4C19-BD72-E4C08D5DA7F5"), InterfaceType((short) 1)] + public interface ICorDebugType + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetType(out uint ty); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetClass([MarshalAs(UnmanagedType.Interface)] out ICorDebugClass ppClass); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumerateTypeParameters([MarshalAs(UnmanagedType.Interface)] out ICorDebugTypeEnum ppTyParEnum); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetFirstTypeParameter([MarshalAs(UnmanagedType.Interface)] out ICorDebugType value); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetBase([MarshalAs(UnmanagedType.Interface)] out ICorDebugType pBase); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetStaticFieldValue([In] uint fieldDef, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugFrame pFrame, [MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetRank(out uint pnRank); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugTypeEnum.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugTypeEnum.cs new file mode 100644 index 000000000..42e81c32a --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugTypeEnum.cs @@ -0,0 +1,31 @@ +// +// +// +// +// $Revision: 3648 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, ComConversionLoss, Guid("10F27499-9DF2-43CE-8333-A321D7C99CB4"), InterfaceType((short) 1)] + public interface ICorDebugTypeEnum : ICorDebugEnum + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Skip([In] uint celt); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Reset(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Clone([MarshalAs(UnmanagedType.Interface)] out ICorDebugEnum ppEnum); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCount(out uint pcelt); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Next([In] uint celt, [Out, MarshalAs(UnmanagedType.LPArray)] ICorDebugType[] values, out uint pceltFetched); + } +} + +#pragma warning restore 108, 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugUnmanagedCallback.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugUnmanagedCallback.cs new file mode 100644 index 000000000..eacfb825b --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugUnmanagedCallback.cs @@ -0,0 +1,23 @@ +// +// +// +// +// $Revision: 3648 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("5263E909-8CB5-11D3-BD2F-0000F80849BD"), InterfaceType((short) 1)] + public interface ICorDebugUnmanagedCallback + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void DebugEvent([In, ComAliasName("Debugger.Interop.CorDebug.ULONG_PTR")] uint pDebugEvent, [In] int fOutOfBand); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugValue.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugValue.cs new file mode 100644 index 000000000..f7744c82b --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugValue.cs @@ -0,0 +1,29 @@ +// +// +// +// +// $Revision: 3648 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("CC7BCAF7-8A68-11D2-983C-0000F808342D"), InterfaceType((short) 1)] + public interface ICorDebugValue + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetType(out uint pType); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetSize(out uint pSize); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetAddress(out ulong pAddress); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CreateBreakpoint([MarshalAs(UnmanagedType.Interface)] out ICorDebugValueBreakpoint ppBreakpoint); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugValue2.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugValue2.cs new file mode 100644 index 000000000..1d0ad2294 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugValue2.cs @@ -0,0 +1,23 @@ +// +// +// +// +// $Revision: 3648 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("5E0B54E7-D88A-4626-9420-A691E0A78B49"), InterfaceType((short) 1)] + public interface ICorDebugValue2 + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetExactType([MarshalAs(UnmanagedType.Interface)] out ICorDebugType ppType); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugValueBreakpoint.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugValueBreakpoint.cs new file mode 100644 index 000000000..846e5ac72 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugValueBreakpoint.cs @@ -0,0 +1,27 @@ +// +// +// +// +// $Revision: 3648 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("CC7BCAEB-8A68-11D2-983C-0000F808342D"), InterfaceType((short) 1)] + public interface ICorDebugValueBreakpoint : ICorDebugBreakpoint + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Activate([In] int bActive); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void IsActive(out int pbActive); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetValue([MarshalAs(UnmanagedType.Interface)] out ICorDebugValue ppValue); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugValueEnum.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugValueEnum.cs new file mode 100644 index 000000000..a846453e2 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ICorDebugValueEnum.cs @@ -0,0 +1,32 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("CC7BCB0A-8A68-11D2-983C-0000F808342D"), InterfaceType((short) 1), ComConversionLoss] + public interface ICorDebugValueEnum : ICorDebugEnum + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Skip([In] uint celt); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Reset(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Clone([MarshalAs(UnmanagedType.Interface)] out ICorDebugEnum ppEnum); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCount(out uint pcelt); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Next([In] uint celt, [Out] IntPtr values, out uint pceltFetched); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ISequentialStream.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ISequentialStream.cs new file mode 100644 index 000000000..0efd35b71 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/ISequentialStream.cs @@ -0,0 +1,25 @@ +// +// +// +// +// $Revision: 3648 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("0C733A30-2A1C-11CE-ADE5-00AA0044773D"), InterfaceType((short) 1)] + public interface ISequentialStream + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void RemoteRead(out byte pv, [In] uint cb, out uint pcbRead); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void RemoteWrite([In] ref byte pv, [In] uint cb, out uint pcbWritten); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/IStream.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/IStream.cs new file mode 100644 index 000000000..285c29d15 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/IStream.cs @@ -0,0 +1,43 @@ +// +// +// +// +// $Revision: 3648 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, InterfaceType((short) 1), Guid("0000000C-0000-0000-C000-000000000046")] + public interface IStream : ISequentialStream + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void RemoteRead(out byte pv, [In] uint cb, out uint pcbRead); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void RemoteWrite([In] ref byte pv, [In] uint cb, out uint pcbWritten); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void RemoteSeek([In] _LARGE_INTEGER dlibMove, [In] uint dwOrigin, out _ULARGE_INTEGER plibNewPosition); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetSize([In] _ULARGE_INTEGER libNewSize); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void RemoteCopyTo([In, MarshalAs(UnmanagedType.Interface)] IStream pstm, [In] _ULARGE_INTEGER cb, out _ULARGE_INTEGER pcbRead, out _ULARGE_INTEGER pcbWritten); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Commit([In] uint grfCommitFlags); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Revert(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void LockRegion([In] _ULARGE_INTEGER libOffset, [In] _ULARGE_INTEGER cb, [In] uint dwLockType); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void UnlockRegion([In] _ULARGE_INTEGER libOffset, [In] _ULARGE_INTEGER cb, [In] uint dwLockType); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Stat(out tagSTATSTG pstatstg, [In] uint grfStatFlag); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Clone([MarshalAs(UnmanagedType.Interface)] out IStream ppstm); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/_COR_IL_MAP.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/_COR_IL_MAP.cs new file mode 100644 index 000000000..f938668ab --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/_COR_IL_MAP.cs @@ -0,0 +1,23 @@ +// +// +// +// +// $Revision: 3648 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System.Runtime.InteropServices; + + [StructLayout(LayoutKind.Sequential, Pack=4)] + public struct _COR_IL_MAP + { + public uint oldOffset; + public uint newOffset; + public int fAccurate; + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/_COR_VERSION.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/_COR_VERSION.cs new file mode 100644 index 000000000..76181e1f2 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/_COR_VERSION.cs @@ -0,0 +1,24 @@ +// +// +// +// +// $Revision: 3648 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System.Runtime.InteropServices; + + [StructLayout(LayoutKind.Sequential, Pack=4)] + public struct _COR_VERSION + { + public uint dwMajor; + public uint dwMinor; + public uint dwBuild; + public uint dwSubBuild; + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/_FILETIME.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/_FILETIME.cs new file mode 100644 index 000000000..0bc08beee --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/_FILETIME.cs @@ -0,0 +1,22 @@ +// +// +// +// +// $Revision: 3648 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System.Runtime.InteropServices; + + [StructLayout(LayoutKind.Sequential, Pack=4)] + public struct _FILETIME + { + public uint dwLowDateTime; + public uint dwHighDateTime; + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/_LARGE_INTEGER.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/_LARGE_INTEGER.cs new file mode 100644 index 000000000..80103e2a5 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/_LARGE_INTEGER.cs @@ -0,0 +1,21 @@ +// +// +// +// +// $Revision: 3648 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System.Runtime.InteropServices; + + [StructLayout(LayoutKind.Sequential, Pack=8)] + public struct _LARGE_INTEGER + { + public long QuadPart; + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/_SECURITY_ATTRIBUTES.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/_SECURITY_ATTRIBUTES.cs new file mode 100644 index 000000000..0236de20e --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/_SECURITY_ATTRIBUTES.cs @@ -0,0 +1,24 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.InteropServices; + + [StructLayout(LayoutKind.Sequential, Pack=4)] + public struct _SECURITY_ATTRIBUTES + { + public uint nLength; + public IntPtr lpSecurityDescriptor; + public int bInheritHandle; + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/_ULARGE_INTEGER.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/_ULARGE_INTEGER.cs new file mode 100644 index 000000000..3ed250561 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/_ULARGE_INTEGER.cs @@ -0,0 +1,21 @@ +// +// +// +// +// $Revision: 3648 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System.Runtime.InteropServices; + + [StructLayout(LayoutKind.Sequential, Pack=8)] + public struct _ULARGE_INTEGER + { + public ulong QuadPart; + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/tagSTATSTG.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/tagSTATSTG.cs new file mode 100644 index 000000000..a1d98924a --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorDebug/tagSTATSTG.cs @@ -0,0 +1,33 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorDebug +{ + using System; + using System.Runtime.InteropServices; + + [StructLayout(LayoutKind.Sequential, Pack=8)] + public struct tagSTATSTG + { + [MarshalAs(UnmanagedType.LPWStr)] + public string pwcsName; + public uint type; + public _ULARGE_INTEGER cbSize; + public _FILETIME mtime; + public _FILETIME ctime; + public _FILETIME atime; + public uint grfMode; + public uint grfLocksSupported; + public Guid clsid; + public uint grfStateBits; + public uint reserved; + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymAddrKind.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymAddrKind.cs new file mode 100644 index 000000000..118cd633c --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymAddrKind.cs @@ -0,0 +1,30 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorSym +{ + using System; + + public enum CorSymAddrKind + { + // Fields + ADDR_BITFIELD = 9, + ADDR_IL_OFFSET = 1, + ADDR_NATIVE_ISECTOFFSET = 10, + ADDR_NATIVE_OFFSET = 5, + ADDR_NATIVE_REGISTER = 3, + ADDR_NATIVE_REGREG = 6, + ADDR_NATIVE_REGREL = 4, + ADDR_NATIVE_REGSTK = 7, + ADDR_NATIVE_RVA = 2, + ADDR_NATIVE_STKREG = 8 + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymBinder_SxS.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymBinder_SxS.cs new file mode 100644 index 000000000..f3f50c790 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymBinder_SxS.cs @@ -0,0 +1,20 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorSym +{ + using System.Runtime.InteropServices; + + [ComImport, CoClass(typeof(CorSymBinder_SxSClass)), Guid("AA544D42-28CB-11D3-BD22-0000F80849BD")] + public interface CorSymBinder_SxS : ISymUnmanagedBinder + { + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymBinder_SxSClass.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymBinder_SxSClass.cs new file mode 100644 index 000000000..bbef05e84 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymBinder_SxSClass.cs @@ -0,0 +1,31 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorSym +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("0A29FF9E-7F9C-4437-8B11-F424491E3931"), ClassInterface((short) 0), TypeLibType((short) 2)] + public class CorSymBinder_SxSClass : ISymUnmanagedBinder, CorSymBinder_SxS + { + // Methods + [return: MarshalAs(UnmanagedType.Interface)] + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern ISymUnmanagedReader GetReaderForFile([In, MarshalAs(UnmanagedType.IUnknown)] object importer, [In] IntPtr filename, [In] IntPtr searchPath); + + [return: MarshalAs(UnmanagedType.Interface)] + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern ISymUnmanagedReader GetReaderFromStream([In, MarshalAs(UnmanagedType.IUnknown)] object importer, [In, MarshalAs(UnmanagedType.Interface)] IStream pstream); + + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymBinder_deprecated.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymBinder_deprecated.cs new file mode 100644 index 000000000..adb91797d --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymBinder_deprecated.cs @@ -0,0 +1,20 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorSym +{ + using System.Runtime.InteropServices; + + [ComImport, CoClass(typeof(CorSymBinder_deprecatedClass)), Guid("AA544D42-28CB-11D3-BD22-0000F80849BD")] + public interface CorSymBinder_deprecated : ISymUnmanagedBinder + { + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymBinder_deprecatedClass.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymBinder_deprecatedClass.cs new file mode 100644 index 000000000..e610e2553 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymBinder_deprecatedClass.cs @@ -0,0 +1,31 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorSym +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("AA544D41-28CB-11D3-BD22-0000F80849BD"), ClassInterface((short) 0), TypeLibType((short) 2)] + public class CorSymBinder_deprecatedClass : ISymUnmanagedBinder, CorSymBinder_deprecated + { + // Methods + [return: MarshalAs(UnmanagedType.Interface)] + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern ISymUnmanagedReader GetReaderForFile([In, MarshalAs(UnmanagedType.IUnknown)] object importer, [In] IntPtr filename, [In] IntPtr searchPath); + + [return: MarshalAs(UnmanagedType.Interface)] + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern ISymUnmanagedReader GetReaderFromStream([In, MarshalAs(UnmanagedType.IUnknown)] object importer, [In, MarshalAs(UnmanagedType.Interface)] IStream pstream); + + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymReader_SxS.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymReader_SxS.cs new file mode 100644 index 000000000..fd69022ea --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymReader_SxS.cs @@ -0,0 +1,20 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorSym +{ + using System.Runtime.InteropServices; + + [ComImport, CoClass(typeof(CorSymReader_SxSClass)), Guid("B4CE6286-2A6B-3712-A3B7-1EE1DAD467B5")] + public interface CorSymReader_SxS : ISymUnmanagedReader + { + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymReader_SxSClass.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymReader_SxSClass.cs new file mode 100644 index 000000000..b8b491372 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymReader_SxSClass.cs @@ -0,0 +1,78 @@ +// +// +// +// +// $Revision: 3135 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorSym +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("0A3976C5-4529-4EF8-B0B0-42EED37082CD"), TypeLibType((short) 2), ClassInterface((short) 0), ComConversionLoss] + public class CorSymReader_SxSClass : ISymUnmanagedReader, CorSymReader_SxS + { + // Methods + [return: MarshalAs(UnmanagedType.Interface)] + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern ISymUnmanagedDocument GetDocument([In] IntPtr url, [In] Guid language, [In] Guid languageVendor, [In] Guid documentType); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void GetDocuments([In] uint cDocs, out uint pcDocs, [Out, MarshalAs(UnmanagedType.LPArray)] ISymUnmanagedDocument[] pDocs); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void GetDocumentVersion([In, MarshalAs(UnmanagedType.Interface)] ISymUnmanagedDocument pDoc, out int version, out int pbCurrent); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void GetGlobalVariables([In] uint cVars, out uint pcVars, [Out] IntPtr pVars); + + [return: MarshalAs(UnmanagedType.Interface)] + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern ISymUnmanagedMethod GetMethod([In] uint token); + + [return: MarshalAs(UnmanagedType.Interface)] + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern ISymUnmanagedMethod GetMethodByVersion([In] uint token, [In] int version); + + [return: MarshalAs(UnmanagedType.Interface)] + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern ISymUnmanagedMethod GetMethodFromDocumentPosition([In, MarshalAs(UnmanagedType.Interface)] ISymUnmanagedDocument document, [In] uint line, [In] uint column); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void GetMethodsFromDocumentPosition([In, MarshalAs(UnmanagedType.Interface)] ISymUnmanagedDocument document, [In] uint line, [In] uint column, [In] uint cMethod, out uint pcMethod, [Out] IntPtr pRetVal); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void GetMethodVersion([In, MarshalAs(UnmanagedType.Interface)] ISymUnmanagedMethod pMethod, out int version); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void GetNamespaces([In] uint cNameSpaces, out uint pcNameSpaces, [Out] IntPtr namespaces); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void GetSymAttribute([In] uint parent, [In] IntPtr name, [In] uint cBuffer, out uint pcBuffer, [Out] IntPtr buffer); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void GetSymbolStoreFileName([In] uint cchName, out uint pcchName, [Out] IntPtr szName); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern uint GetUserEntryPoint(); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void GetVariables([In] uint parent, [In] uint cVars, out uint pcVars, [Out] IntPtr pVars); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void Initialize([In, MarshalAs(UnmanagedType.IUnknown)] object importer, [In] IntPtr filename, [In] IntPtr searchPath, [In, MarshalAs(UnmanagedType.Interface)] IStream pIStream); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void ReplaceSymbolStore([In] IntPtr filename, [In, MarshalAs(UnmanagedType.Interface)] IStream pIStream); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void UpdateSymbolStore([In] IntPtr filename, [In, MarshalAs(UnmanagedType.Interface)] IStream pIStream); + + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymReader_deprecated.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymReader_deprecated.cs new file mode 100644 index 000000000..083e7ad95 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymReader_deprecated.cs @@ -0,0 +1,20 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorSym +{ + using System.Runtime.InteropServices; + + [ComImport, Guid("B4CE6286-2A6B-3712-A3B7-1EE1DAD467B5"), CoClass(typeof(CorSymReader_deprecatedClass))] + public interface CorSymReader_deprecated : ISymUnmanagedReader + { + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymReader_deprecatedClass.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymReader_deprecatedClass.cs new file mode 100644 index 000000000..1902682be --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymReader_deprecatedClass.cs @@ -0,0 +1,78 @@ +// +// +// +// +// $Revision: 3135 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorSym +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, ClassInterface((short) 0), Guid("108296C2-281E-11D3-BD22-0000F80849BD"), ComConversionLoss, TypeLibType((short) 2)] + public class CorSymReader_deprecatedClass : ISymUnmanagedReader, CorSymReader_deprecated + { + // Methods + [return: MarshalAs(UnmanagedType.Interface)] + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern ISymUnmanagedDocument GetDocument([In] IntPtr url, [In] Guid language, [In] Guid languageVendor, [In] Guid documentType); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void GetDocuments([In] uint cDocs, out uint pcDocs, [Out, MarshalAs(UnmanagedType.LPArray)] ISymUnmanagedDocument[] pDocs); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void GetDocumentVersion([In, MarshalAs(UnmanagedType.Interface)] ISymUnmanagedDocument pDoc, out int version, out int pbCurrent); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void GetGlobalVariables([In] uint cVars, out uint pcVars, [Out] IntPtr pVars); + + [return: MarshalAs(UnmanagedType.Interface)] + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern ISymUnmanagedMethod GetMethod([In] uint token); + + [return: MarshalAs(UnmanagedType.Interface)] + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern ISymUnmanagedMethod GetMethodByVersion([In] uint token, [In] int version); + + [return: MarshalAs(UnmanagedType.Interface)] + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern ISymUnmanagedMethod GetMethodFromDocumentPosition([In, MarshalAs(UnmanagedType.Interface)] ISymUnmanagedDocument document, [In] uint line, [In] uint column); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void GetMethodsFromDocumentPosition([In, MarshalAs(UnmanagedType.Interface)] ISymUnmanagedDocument document, [In] uint line, [In] uint column, [In] uint cMethod, out uint pcMethod, [Out] IntPtr pRetVal); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void GetMethodVersion([In, MarshalAs(UnmanagedType.Interface)] ISymUnmanagedMethod pMethod, out int version); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void GetNamespaces([In] uint cNameSpaces, out uint pcNameSpaces, [Out] IntPtr namespaces); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void GetSymAttribute([In] uint parent, [In] IntPtr name, [In] uint cBuffer, out uint pcBuffer, [Out] IntPtr buffer); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void GetSymbolStoreFileName([In] uint cchName, out uint pcchName, [Out] IntPtr szName); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern uint GetUserEntryPoint(); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void GetVariables([In] uint parent, [In] uint cVars, out uint pcVars, [Out] IntPtr pVars); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void Initialize([In, MarshalAs(UnmanagedType.IUnknown)] object importer, [In] IntPtr filename, [In] IntPtr searchPath, [In, MarshalAs(UnmanagedType.Interface)] IStream pIStream); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void ReplaceSymbolStore([In] IntPtr filename, [In, MarshalAs(UnmanagedType.Interface)] IStream pIStream); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void UpdateSymbolStore([In] IntPtr filename, [In, MarshalAs(UnmanagedType.Interface)] IStream pIStream); + + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymSearchPolicyAttributes.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymSearchPolicyAttributes.cs new file mode 100644 index 000000000..2fe56eb8c --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymSearchPolicyAttributes.cs @@ -0,0 +1,24 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorSym +{ + using System; + + public enum CorSymSearchPolicyAttributes + { + // Fields + AllowOriginalPathAccess = 4, + AllowReferencePathAccess = 8, + AllowRegistryAccess = 1, + AllowSymbolServerAccess = 2 + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymVarFlag.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymVarFlag.cs new file mode 100644 index 000000000..302c68c3a --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymVarFlag.cs @@ -0,0 +1,21 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorSym +{ + using System; + + public enum CorSymVarFlag + { + // Fields + VAR_IS_COMP_GEN = 1 + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymWriter_SxS.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymWriter_SxS.cs new file mode 100644 index 000000000..b212d6685 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymWriter_SxS.cs @@ -0,0 +1,20 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorSym +{ + using System.Runtime.InteropServices; + + [ComImport, CoClass(typeof(CorSymWriter_SxSClass)), Guid("ED14AA72-78E2-4884-84E2-334293AE5214")] + public interface CorSymWriter_SxS : ISymUnmanagedWriter + { + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymWriter_SxSClass.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymWriter_SxSClass.cs new file mode 100644 index 000000000..97b37c769 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymWriter_SxSClass.cs @@ -0,0 +1,96 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorSym +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, TypeLibType((short) 2), Guid("0AE2DEB0-F901-478B-BB9F-881EE8066788"), ClassInterface((short) 0), ComConversionLoss] + public class CorSymWriter_SxSClass : ISymUnmanagedWriter, CorSymWriter_SxS + { + // Methods + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void Abort(); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void Close(); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void CloseMethod(); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void CloseNamespace(); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void CloseScope([In] uint endOffset); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void DefineConstant([In] IntPtr name, [In, MarshalAs(UnmanagedType.Struct)] object value, [In] uint cSig, [In] ref byte signature); + + [return: MarshalAs(UnmanagedType.Interface)] + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern ISymUnmanagedDocumentWriter DefineDocument([In] IntPtr url, [In] ref Guid language, [In] ref Guid languageVendor, [In] ref Guid documentType); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void DefineField([In] uint parent, [In] IntPtr name, [In] uint attributes, [In] uint cSig, [In] ref byte signature, [In] uint addrKind, [In] uint addr1, [In] uint addr2, [In] uint addr3); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void DefineGlobalVariable([In] IntPtr name, [In] uint attributes, [In] uint cSig, [In] ref byte signature, [In] uint addrKind, [In] uint addr1, [In] uint addr2, [In] uint addr3); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void DefineLocalVariable([In] IntPtr name, [In] uint attributes, [In] uint cSig, [In] ref byte signature, [In] uint addrKind, [In] uint addr1, [In] uint addr2, [In] uint addr3, [In] uint startOffset, [In] uint endOffset); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void DefineParameter([In] IntPtr name, [In] uint attributes, [In] uint sequence, [In] uint addrKind, [In] uint addr1, [In] uint addr2, [In] uint addr3); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void DefineSequencePoints([In, MarshalAs(UnmanagedType.Interface)] ISymUnmanagedDocumentWriter document, [In] uint spCount, [In] ref uint offsets, [In] ref uint lines, [In] ref uint columns, [In] ref uint endLines, [In] ref uint endColumns); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void GetDebugInfo([In] ref uint pIDD, [In] uint cData, out uint pcData, [Out] IntPtr data); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void Initialize([In, MarshalAs(UnmanagedType.IUnknown)] object emitter, [In] IntPtr filename, [In, MarshalAs(UnmanagedType.Interface)] IStream pIStream, [In] int fFullBuild); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void Initialize2([In, MarshalAs(UnmanagedType.IUnknown)] object emitter, [In] IntPtr tempfilename, [In, MarshalAs(UnmanagedType.Interface)] IStream pIStream, [In] int fFullBuild, [In] IntPtr finalfilename); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void OpenMethod([In] uint method); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void OpenNamespace([In] IntPtr name); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern uint OpenScope([In] uint startOffset); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void RemapToken([In] uint oldToken, [In] uint newToken); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void SetMethodSourceRange([In, MarshalAs(UnmanagedType.Interface)] ISymUnmanagedDocumentWriter startDoc, [In] uint startLine, [In] uint startColumn, [In, MarshalAs(UnmanagedType.Interface)] ISymUnmanagedDocumentWriter endDoc, [In] uint endLine, [In] uint endColumn); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void SetScopeRange([In] uint scopeID, [In] uint startOffset, [In] uint endOffset); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void SetSymAttribute([In] uint parent, [In] IntPtr name, [In] uint cData, [In] ref byte data); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void SetUserEntryPoint([In] uint entryMethod); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void UsingNamespace([In] IntPtr fullName); + + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymWriter_deprecated.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymWriter_deprecated.cs new file mode 100644 index 000000000..bed494955 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymWriter_deprecated.cs @@ -0,0 +1,20 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorSym +{ + using System.Runtime.InteropServices; + + [ComImport, Guid("ED14AA72-78E2-4884-84E2-334293AE5214"), CoClass(typeof(CorSymWriter_deprecatedClass))] + public interface CorSymWriter_deprecated : ISymUnmanagedWriter + { + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymWriter_deprecatedClass.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymWriter_deprecatedClass.cs new file mode 100644 index 000000000..3f58d975e --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/CorSymWriter_deprecatedClass.cs @@ -0,0 +1,96 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorSym +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, ClassInterface((short) 0), Guid("108296C1-281E-11D3-BD22-0000F80849BD"), ComConversionLoss, TypeLibType((short) 2)] + public class CorSymWriter_deprecatedClass : ISymUnmanagedWriter, CorSymWriter_deprecated + { + // Methods + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void Abort(); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void Close(); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void CloseMethod(); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void CloseNamespace(); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void CloseScope([In] uint endOffset); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void DefineConstant([In] IntPtr name, [In, MarshalAs(UnmanagedType.Struct)] object value, [In] uint cSig, [In] ref byte signature); + + [return: MarshalAs(UnmanagedType.Interface)] + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern ISymUnmanagedDocumentWriter DefineDocument([In] IntPtr url, [In] ref Guid language, [In] ref Guid languageVendor, [In] ref Guid documentType); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void DefineField([In] uint parent, [In] IntPtr name, [In] uint attributes, [In] uint cSig, [In] ref byte signature, [In] uint addrKind, [In] uint addr1, [In] uint addr2, [In] uint addr3); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void DefineGlobalVariable([In] IntPtr name, [In] uint attributes, [In] uint cSig, [In] ref byte signature, [In] uint addrKind, [In] uint addr1, [In] uint addr2, [In] uint addr3); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void DefineLocalVariable([In] IntPtr name, [In] uint attributes, [In] uint cSig, [In] ref byte signature, [In] uint addrKind, [In] uint addr1, [In] uint addr2, [In] uint addr3, [In] uint startOffset, [In] uint endOffset); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void DefineParameter([In] IntPtr name, [In] uint attributes, [In] uint sequence, [In] uint addrKind, [In] uint addr1, [In] uint addr2, [In] uint addr3); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void DefineSequencePoints([In, MarshalAs(UnmanagedType.Interface)] ISymUnmanagedDocumentWriter document, [In] uint spCount, [In] ref uint offsets, [In] ref uint lines, [In] ref uint columns, [In] ref uint endLines, [In] ref uint endColumns); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void GetDebugInfo([In] ref uint pIDD, [In] uint cData, out uint pcData, [Out] IntPtr data); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void Initialize([In, MarshalAs(UnmanagedType.IUnknown)] object emitter, [In] IntPtr filename, [In, MarshalAs(UnmanagedType.Interface)] IStream pIStream, [In] int fFullBuild); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void Initialize2([In, MarshalAs(UnmanagedType.IUnknown)] object emitter, [In] IntPtr tempfilename, [In, MarshalAs(UnmanagedType.Interface)] IStream pIStream, [In] int fFullBuild, [In] IntPtr finalfilename); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void OpenMethod([In] uint method); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void OpenNamespace([In] IntPtr name); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern uint OpenScope([In] uint startOffset); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void RemapToken([In] uint oldToken, [In] uint newToken); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void SetMethodSourceRange([In, MarshalAs(UnmanagedType.Interface)] ISymUnmanagedDocumentWriter startDoc, [In] uint startLine, [In] uint startColumn, [In, MarshalAs(UnmanagedType.Interface)] ISymUnmanagedDocumentWriter endDoc, [In] uint endLine, [In] uint endColumn); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void SetScopeRange([In] uint scopeID, [In] uint startOffset, [In] uint endOffset); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void SetSymAttribute([In] uint parent, [In] IntPtr name, [In] uint cData, [In] ref byte data); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void SetUserEntryPoint([In] uint entryMethod); + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void UsingNamespace([In] IntPtr fullName); + + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISequentialStream.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISequentialStream.cs new file mode 100644 index 000000000..34fa94672 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISequentialStream.cs @@ -0,0 +1,26 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorSym +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("0C733A30-2A1C-11CE-ADE5-00AA0044773D"), InterfaceType((short) 1)] + public interface ISequentialStream + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void RemoteRead(out byte pv, [In] uint cb, out uint pcbRead); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void RemoteWrite([In] ref byte pv, [In] uint cb, out uint pcbWritten); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/IStream.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/IStream.cs new file mode 100644 index 000000000..75bdd2d7d --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/IStream.cs @@ -0,0 +1,44 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorSym +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, InterfaceType((short) 1), Guid("0000000C-0000-0000-C000-000000000046")] + public interface IStream : ISequentialStream + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void RemoteRead(out byte pv, [In] uint cb, out uint pcbRead); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void RemoteWrite([In] ref byte pv, [In] uint cb, out uint pcbWritten); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void RemoteSeek([In] _LARGE_INTEGER dlibMove, [In] uint dwOrigin, out _ULARGE_INTEGER plibNewPosition); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetSize([In] _ULARGE_INTEGER libNewSize); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void RemoteCopyTo([In, MarshalAs(UnmanagedType.Interface)] IStream pstm, [In] _ULARGE_INTEGER cb, out _ULARGE_INTEGER pcbRead, out _ULARGE_INTEGER pcbWritten); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Commit([In] uint grfCommitFlags); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Revert(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void LockRegion([In] _ULARGE_INTEGER libOffset, [In] _ULARGE_INTEGER cb, [In] uint dwLockType); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void UnlockRegion([In] _ULARGE_INTEGER libOffset, [In] _ULARGE_INTEGER cb, [In] uint dwLockType); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Stat(out tagSTATSTG pstatstg, [In] uint grfStatFlag); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Clone([MarshalAs(UnmanagedType.Interface)] out IStream ppstm); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedBinder.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedBinder.cs new file mode 100644 index 000000000..2e7ce1f4e --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedBinder.cs @@ -0,0 +1,28 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorSym +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, InterfaceType((short) 1), Guid("AA544D42-28CB-11D3-BD22-0000F80849BD")] + public interface ISymUnmanagedBinder + { + [return: MarshalAs(UnmanagedType.Interface)] + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + ISymUnmanagedReader GetReaderForFile([In, MarshalAs(UnmanagedType.IUnknown)] object importer, [In] IntPtr filename, [In] IntPtr searchPath); + [return: MarshalAs(UnmanagedType.Interface)] + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + ISymUnmanagedReader GetReaderFromStream([In, MarshalAs(UnmanagedType.IUnknown)] object importer, [In, MarshalAs(UnmanagedType.Interface)] IStream pstream); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedDispose.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedDispose.cs new file mode 100644 index 000000000..7a1965843 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedDispose.cs @@ -0,0 +1,24 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorSym +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, InterfaceType((short) 1), Guid("969708D2-05E5-4861-A3B0-96E473CDF63F")] + public interface ISymUnmanagedDispose + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Destroy(); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedDocument.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedDocument.cs new file mode 100644 index 000000000..5d393d73f --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedDocument.cs @@ -0,0 +1,42 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorSym +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("40DE4037-7C81-3E1E-B022-AE1ABFF2CA08"), ComConversionLoss, InterfaceType((short) 1)] + public interface ISymUnmanagedDocument + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetURL([In] uint cchUrl, out uint pcchUrl, [Out] IntPtr szUrl); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + Guid GetDocumentType(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + Guid GetLanguage(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + Guid GetLanguageVendor(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + Guid GetCheckSumAlgorithmId(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCheckSum([In] uint cData, out uint pcData, [Out] IntPtr data); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + uint FindClosestLine([In] uint line); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + int HasEmbeddedSource(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + uint GetSourceLength(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetSourceRange([In] uint startLine, [In] uint startColumn, [In] uint endLine, [In] uint endColumn, [In] uint cSourceBytes, out uint pcSourceBytes, [Out] IntPtr source); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedDocumentWriter.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedDocumentWriter.cs new file mode 100644 index 000000000..73e8183be --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedDocumentWriter.cs @@ -0,0 +1,26 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorSym +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("B01FAFEB-C450-3A4D-BEEC-B4CEEC01E006"), InterfaceType((short) 1)] + public interface ISymUnmanagedDocumentWriter + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetSource([In] uint sourceSize, [In] ref byte source); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetCheckSum([In] Guid algorithmId, [In] uint checkSumSize, [In] ref byte checkSum); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedMethod.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedMethod.cs new file mode 100644 index 000000000..c4eaa536c --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedMethod.cs @@ -0,0 +1,44 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorSym +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, InterfaceType((short) 1), ComConversionLoss, Guid("B62B923C-B500-3158-A543-24F307A8B7E1")] + public interface ISymUnmanagedMethod + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + uint GetToken(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + uint GetSequencePointCount(); + [return: MarshalAs(UnmanagedType.Interface)] + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + ISymUnmanagedScope GetRootScope(); + [return: MarshalAs(UnmanagedType.Interface)] + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + ISymUnmanagedScope GetScopeFromOffset([In] uint offset); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + uint GetOffset([In, MarshalAs(UnmanagedType.Interface)] ISymUnmanagedDocument document, [In] uint line, [In] uint column); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetRanges([In, MarshalAs(UnmanagedType.Interface)] ISymUnmanagedDocument document, [In] uint line, [In] uint column, [In] uint cRanges, out uint pcRanges, [Out] IntPtr ranges); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetParameters([In] uint cParams, out uint pcParams, [Out] IntPtr @params); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetNamespace([MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedNamespace pRetVal); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetSourceStartEnd([In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0, SizeConst=2)] ISymUnmanagedDocument[] docs, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0, SizeConst=2)] uint[] lines, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0, SizeConst=2)] uint[] columns, out int pRetVal); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetSequencePoints([In] uint cPoints, out uint pcPoints, [Out, MarshalAs(UnmanagedType.LPArray)] uint[] offsets, [Out, MarshalAs(UnmanagedType.LPArray)] ISymUnmanagedDocument[] documents, [Out, MarshalAs(UnmanagedType.LPArray)] uint[] lines, [Out, MarshalAs(UnmanagedType.LPArray)] uint[] columns, [Out, MarshalAs(UnmanagedType.LPArray)] uint[] endLines, [Out, MarshalAs(UnmanagedType.LPArray)] uint[] endColumns); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedNamespace.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedNamespace.cs new file mode 100644 index 000000000..42ee27da5 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedNamespace.cs @@ -0,0 +1,28 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorSym +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, InterfaceType((short) 1), ComConversionLoss, Guid("0DFF7289-54F8-11D3-BD28-0000F80849BD")] + public interface ISymUnmanagedNamespace + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetName([In] uint cchName, out uint pcchName, [Out] IntPtr szName); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetNamespaces([In] uint cNameSpaces, out uint pcNameSpaces, [Out] IntPtr namespaces); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetVariables([In] uint cVars, out uint pcVars, [Out] IntPtr pVars); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedReader.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedReader.cs new file mode 100644 index 000000000..9d40bb761 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedReader.cs @@ -0,0 +1,60 @@ +// +// +// +// +// $Revision: 3135 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorSym +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, InterfaceType((short) 1), ComConversionLoss, Guid("B4CE6286-2A6B-3712-A3B7-1EE1DAD467B5")] + public interface ISymUnmanagedReader + { + [return: MarshalAs(UnmanagedType.Interface)] + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + ISymUnmanagedDocument GetDocument([In] IntPtr url, [In] Guid language, [In] Guid languageVendor, [In] Guid documentType); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetDocuments([In] uint cDocs, out uint pcDocs, [Out, MarshalAs(UnmanagedType.LPArray)] ISymUnmanagedDocument[] pDocs); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + uint GetUserEntryPoint(); + [return: MarshalAs(UnmanagedType.Interface)] + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + ISymUnmanagedMethod GetMethod([In] uint token); + [return: MarshalAs(UnmanagedType.Interface)] + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + ISymUnmanagedMethod GetMethodByVersion([In] uint token, [In] int version); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetVariables([In] uint parent, [In] uint cVars, out uint pcVars, [Out] IntPtr pVars); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetGlobalVariables([In] uint cVars, out uint pcVars, [Out] IntPtr pVars); + [return: MarshalAs(UnmanagedType.Interface)] + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + ISymUnmanagedMethod GetMethodFromDocumentPosition([In, MarshalAs(UnmanagedType.Interface)] ISymUnmanagedDocument document, [In] uint line, [In] uint column); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetSymAttribute([In] uint parent, [In] IntPtr name, [In] uint cBuffer, out uint pcBuffer, [Out] IntPtr buffer); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetNamespaces([In] uint cNameSpaces, out uint pcNameSpaces, [Out] IntPtr namespaces); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Initialize([In, MarshalAs(UnmanagedType.IUnknown)] object importer, [In] IntPtr filename, [In] IntPtr searchPath, [In, MarshalAs(UnmanagedType.Interface)] IStream pIStream); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void UpdateSymbolStore([In] IntPtr filename, [In, MarshalAs(UnmanagedType.Interface)] IStream pIStream); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void ReplaceSymbolStore([In] IntPtr filename, [In, MarshalAs(UnmanagedType.Interface)] IStream pIStream); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetSymbolStoreFileName([In] uint cchName, out uint pcchName, [Out] IntPtr szName); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetMethodsFromDocumentPosition([In, MarshalAs(UnmanagedType.Interface)] ISymUnmanagedDocument document, [In] uint line, [In] uint column, [In] uint cMethod, out uint pcMethod, [Out] IntPtr pRetVal); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetDocumentVersion([In, MarshalAs(UnmanagedType.Interface)] ISymUnmanagedDocument pDoc, out int version, out int pbCurrent); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetMethodVersion([In, MarshalAs(UnmanagedType.Interface)] ISymUnmanagedMethod pMethod, out int version); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedReaderSymbolSearchInfo.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedReaderSymbolSearchInfo.cs new file mode 100644 index 000000000..6e7c93ada --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedReaderSymbolSearchInfo.cs @@ -0,0 +1,26 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorSym +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("20D9645D-03CD-4E34-9C11-9848A5B084F1"), InterfaceType((short) 1)] + public interface ISymUnmanagedReaderSymbolSearchInfo + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetSymbolSearchInfoCount(out uint pcSearchInfo); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetSymbolSearchInfo([In] uint cSearchInfo, out uint pcSearchInfo, [MarshalAs(UnmanagedType.Interface)] out ISymUnmanagedSymbolSearchInfo rgpSearchInfo); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedScope.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedScope.cs new file mode 100644 index 000000000..2c0b2fb98 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedScope.cs @@ -0,0 +1,40 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorSym +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("68005D0F-B8E0-3B01-84D5-A11A94154942"), ComConversionLoss, InterfaceType((short) 1)] + public interface ISymUnmanagedScope + { + [return: MarshalAs(UnmanagedType.Interface)] + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + ISymUnmanagedMethod GetMethod(); + [return: MarshalAs(UnmanagedType.Interface)] + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + ISymUnmanagedScope GetParent(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetChildren([In] uint cChildren, out uint pcChildren, [Out, MarshalAs(UnmanagedType.LPArray)] ISymUnmanagedScope[] children); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + uint GetStartOffset(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + uint GetEndOffset(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + uint GetLocalCount(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetLocals([In] uint cLocals, out uint pcLocals, [Out, MarshalAs(UnmanagedType.LPArray)] ISymUnmanagedVariable[] locals); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetNamespaces([In] uint cNameSpaces, out uint pcNameSpaces, [Out, MarshalAs(UnmanagedType.LPArray)] ISymUnmanagedNamespace[] namespaces); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedSymbolSearchInfo.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedSymbolSearchInfo.cs new file mode 100644 index 000000000..4815bd334 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedSymbolSearchInfo.cs @@ -0,0 +1,28 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorSym +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, ComConversionLoss, InterfaceType((short) 1), Guid("F8B3534A-A46B-4980-B520-BEC4ACEABA8F")] + public interface ISymUnmanagedSymbolSearchInfo + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetSearchPathLength(out uint pcchPath); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetSearchPath([In] uint cchPath, out uint pcchPath, [Out] IntPtr szPath); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetHRESULT([MarshalAs(UnmanagedType.Error)] out int phr); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedVariable.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedVariable.cs new file mode 100644 index 000000000..fc1067ef5 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedVariable.cs @@ -0,0 +1,40 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorSym +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("9F60EEBE-2D9A-3F7C-BF58-80BC991C60BB"), InterfaceType((short) 1), ComConversionLoss] + public interface ISymUnmanagedVariable + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetName([In] uint cchName, out uint pcchName, [Out] IntPtr szName); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + uint GetAttributes(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetSignature([In] uint cSig, out uint pcSig, [Out] IntPtr sig); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + uint GetAddressKind(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + uint GetAddressField1(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + uint GetAddressField2(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + uint GetAddressField3(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + uint GetStartOffset(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + uint GetEndOffset(); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedWriter.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedWriter.cs new file mode 100644 index 000000000..8dc3b5c4c --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedWriter.cs @@ -0,0 +1,71 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorSym +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, ComConversionLoss, InterfaceType((short) 1), Guid("ED14AA72-78E2-4884-84E2-334293AE5214")] + public interface ISymUnmanagedWriter + { + [return: MarshalAs(UnmanagedType.Interface)] + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + ISymUnmanagedDocumentWriter DefineDocument([In] IntPtr url, [In] ref Guid language, [In] ref Guid languageVendor, [In] ref Guid documentType); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetUserEntryPoint([In] uint entryMethod); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void OpenMethod([In] uint method); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CloseMethod(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + uint OpenScope([In] uint startOffset); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CloseScope([In] uint endOffset); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetScopeRange([In] uint scopeID, [In] uint startOffset, [In] uint endOffset); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void DefineLocalVariable([In] IntPtr name, [In] uint attributes, [In] uint cSig, [In] ref byte signature, [In] uint addrKind, [In] uint addr1, [In] uint addr2, [In] uint addr3, [In] uint startOffset, [In] uint endOffset); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void DefineParameter([In] IntPtr name, [In] uint attributes, [In] uint sequence, [In] uint addrKind, [In] uint addr1, [In] uint addr2, [In] uint addr3); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void DefineField([In] uint parent, [In] IntPtr name, [In] uint attributes, [In] uint cSig, [In] ref byte signature, [In] uint addrKind, [In] uint addr1, [In] uint addr2, [In] uint addr3); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void DefineGlobalVariable([In] IntPtr name, [In] uint attributes, [In] uint cSig, [In] ref byte signature, [In] uint addrKind, [In] uint addr1, [In] uint addr2, [In] uint addr3); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Close(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetSymAttribute([In] uint parent, [In] IntPtr name, [In] uint cData, [In] ref byte data); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void OpenNamespace([In] IntPtr name); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CloseNamespace(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void UsingNamespace([In] IntPtr fullName); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetMethodSourceRange([In, MarshalAs(UnmanagedType.Interface)] ISymUnmanagedDocumentWriter startDoc, [In] uint startLine, [In] uint startColumn, [In, MarshalAs(UnmanagedType.Interface)] ISymUnmanagedDocumentWriter endDoc, [In] uint endLine, [In] uint endColumn); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Initialize([In, MarshalAs(UnmanagedType.IUnknown)] object emitter, [In] IntPtr filename, [In, MarshalAs(UnmanagedType.Interface)] IStream pIStream, [In] int fFullBuild); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetDebugInfo([In] ref uint pIDD, [In] uint cData, out uint pcData, [Out] IntPtr data); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void DefineSequencePoints([In, MarshalAs(UnmanagedType.Interface)] ISymUnmanagedDocumentWriter document, [In] uint spCount, [In] ref uint offsets, [In] ref uint lines, [In] ref uint columns, [In] ref uint endLines, [In] ref uint endColumns); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void RemapToken([In] uint oldToken, [In] uint newToken); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Initialize2([In, MarshalAs(UnmanagedType.IUnknown)] object emitter, [In] IntPtr tempfilename, [In, MarshalAs(UnmanagedType.Interface)] IStream pIStream, [In] int fFullBuild, [In] IntPtr finalfilename); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void DefineConstant([In] IntPtr name, [In, MarshalAs(UnmanagedType.Struct)] object value, [In] uint cSig, [In] ref byte signature); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Abort(); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedWriter2.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedWriter2.cs new file mode 100644 index 000000000..b52e75bd5 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/ISymUnmanagedWriter2.cs @@ -0,0 +1,77 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorSym +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("0B97726E-9E6D-4F05-9A26-424022093CAA"), InterfaceType((short) 1)] + public interface ISymUnmanagedWriter2 : ISymUnmanagedWriter + { + [return: MarshalAs(UnmanagedType.Interface)] + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + ISymUnmanagedDocumentWriter DefineDocument([In] IntPtr url, [In] ref Guid language, [In] ref Guid languageVendor, [In] ref Guid documentType); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetUserEntryPoint([In] uint entryMethod); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void OpenMethod([In] uint method); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CloseMethod(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + uint OpenScope([In] uint startOffset); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CloseScope([In] uint endOffset); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetScopeRange([In] uint scopeID, [In] uint startOffset, [In] uint endOffset); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void DefineLocalVariable([In] IntPtr name, [In] uint attributes, [In] uint cSig, [In] ref byte signature, [In] uint addrKind, [In] uint addr1, [In] uint addr2, [In] uint addr3, [In] uint startOffset, [In] uint endOffset); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void DefineParameter([In] IntPtr name, [In] uint attributes, [In] uint sequence, [In] uint addrKind, [In] uint addr1, [In] uint addr2, [In] uint addr3); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void DefineField([In] uint parent, [In] IntPtr name, [In] uint attributes, [In] uint cSig, [In] ref byte signature, [In] uint addrKind, [In] uint addr1, [In] uint addr2, [In] uint addr3); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void DefineGlobalVariable([In] IntPtr name, [In] uint attributes, [In] uint cSig, [In] ref byte signature, [In] uint addrKind, [In] uint addr1, [In] uint addr2, [In] uint addr3); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Close(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetSymAttribute([In] uint parent, [In] IntPtr name, [In] uint cData, [In] ref byte data); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void OpenNamespace([In] IntPtr name); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CloseNamespace(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void UsingNamespace([In] IntPtr fullName); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void SetMethodSourceRange([In, MarshalAs(UnmanagedType.Interface)] ISymUnmanagedDocumentWriter startDoc, [In] uint startLine, [In] uint startColumn, [In, MarshalAs(UnmanagedType.Interface)] ISymUnmanagedDocumentWriter endDoc, [In] uint endLine, [In] uint endColumn); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Initialize([In, MarshalAs(UnmanagedType.IUnknown)] object emitter, [In] IntPtr filename, [In, MarshalAs(UnmanagedType.Interface)] IStream pIStream, [In] int fFullBuild); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetDebugInfo([In] ref uint pIDD, [In] uint cData, out uint pcData, [Out] IntPtr data); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void DefineSequencePoints([In, MarshalAs(UnmanagedType.Interface)] ISymUnmanagedDocumentWriter document, [In] uint spCount, [In] ref uint offsets, [In] ref uint lines, [In] ref uint columns, [In] ref uint endLines, [In] ref uint endColumns); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void RemapToken([In] uint oldToken, [In] uint newToken); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Initialize2([In, MarshalAs(UnmanagedType.IUnknown)] object emitter, [In] IntPtr tempfilename, [In, MarshalAs(UnmanagedType.Interface)] IStream pIStream, [In] int fFullBuild, [In] IntPtr finalfilename); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void DefineConstant([In] IntPtr name, [In, MarshalAs(UnmanagedType.Struct)] object value, [In] uint cSig, [In] ref byte signature); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Abort(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void DefineLocalVariable2([In] IntPtr name, [In] uint attributes, [In] uint sigToken, [In] uint addrKind, [In] uint addr1, [In] uint addr2, [In] uint addr3, [In] uint startOffset, [In] uint endOffset); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void DefineGlobalVariable2([In] IntPtr name, [In] uint attributes, [In] uint sigToken, [In] uint addrKind, [In] uint addr1, [In] uint addr2, [In] uint addr3); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void DefineConstant2([In] IntPtr name, [In, MarshalAs(UnmanagedType.Struct)] object value, [In] uint sigToken); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/_FILETIME.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/_FILETIME.cs new file mode 100644 index 000000000..eda6b3a26 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/_FILETIME.cs @@ -0,0 +1,23 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorSym +{ + using System; + using System.Runtime.InteropServices; + + [StructLayout(LayoutKind.Sequential, Pack=4)] + public struct _FILETIME + { + public uint dwLowDateTime; + public uint dwHighDateTime; + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/_LARGE_INTEGER.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/_LARGE_INTEGER.cs new file mode 100644 index 000000000..3a4722790 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/_LARGE_INTEGER.cs @@ -0,0 +1,22 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorSym +{ + using System; + using System.Runtime.InteropServices; + + [StructLayout(LayoutKind.Sequential, Pack=8)] + public struct _LARGE_INTEGER + { + public long QuadPart; + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/_ULARGE_INTEGER.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/_ULARGE_INTEGER.cs new file mode 100644 index 000000000..8ef4a629d --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/_ULARGE_INTEGER.cs @@ -0,0 +1,22 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorSym +{ + using System; + using System.Runtime.InteropServices; + + [StructLayout(LayoutKind.Sequential, Pack=8)] + public struct _ULARGE_INTEGER + { + public ulong QuadPart; + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/tagSTATSTG.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/tagSTATSTG.cs new file mode 100644 index 000000000..666649c28 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/CorSym/tagSTATSTG.cs @@ -0,0 +1,33 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorSym +{ + using System; + using System.Runtime.InteropServices; + + [StructLayout(LayoutKind.Sequential, Pack=8)] + public struct tagSTATSTG + { + [MarshalAs(UnmanagedType.LPWStr)] + public string pwcsName; + public uint type; + public _ULARGE_INTEGER cbSize; + public _FILETIME mtime; + public _FILETIME ctime; + public _FILETIME atime; + public uint grfMode; + public uint grfLocksSupported; + public Guid clsid; + public uint grfStateBits; + public uint reserved; + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/Enums/ClassFieldAttribute.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/Enums/ClassFieldAttribute.cs new file mode 100644 index 000000000..463039198 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/Enums/ClassFieldAttribute.cs @@ -0,0 +1,42 @@ +// +// +// +// +// $Revision: 2210 $ +// + +namespace Debugger.Wrappers.MetaData +{ + [System.Flags()] + enum ClassFieldAttribute: uint + { + // member access mask - Use this mask to retrieve accessibility information. + fdFieldAccessMask = 0x0007, + fdPrivateScope = 0x0000, // Member not referenceable. + fdPrivate = 0x0001, // Accessible only by the parent type. + fdFamANDAssem = 0x0002, // Accessible by sub-types only in this Assembly. + fdAssembly = 0x0003, // Accessibly by anyone in the Assembly. + fdFamily = 0x0004, // Accessible only by type and sub-types. + fdFamORAssem = 0x0005, // Accessibly by sub-types anywhere, plus anyone in assembly. + fdPublic = 0x0006, // Accessibly by anyone who has visibility to this scope. + // end member access mask + + // field contract attributes. + fdStatic = 0x0010, // Defined on type, else per instance. + fdInitOnly = 0x0020, // Field may only be initialized, not written to after init. + fdLiteral = 0x0040, // Value is compile time constant. + fdNotSerialized = 0x0080, // Field does not have to be serialized when type is remoted. + + fdSpecialName = 0x0200, // field is special. Name describes how. + + // interop attributes + fdPinvokeImpl = 0x2000, // Implementation is forwarded through pinvoke. + + // Reserved flags for runtime use only. + fdReservedMask = 0x9500, + fdRTSpecialName = 0x0400, // Runtime(metadata internal APIs) should check name encoding. + fdHasFieldMarshal = 0x1000, // Field has marshalling information. + fdHasDefault = 0x8000, // Field has default. + fdHasFieldRVA = 0x0100, // Field has RVA. + } +} diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/Enums/CorCallingConvention.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/Enums/CorCallingConvention.cs new file mode 100644 index 000000000..c1c07b7e9 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/Enums/CorCallingConvention.cs @@ -0,0 +1,27 @@ +// +// +// +// +// $Revision: 2210 $ +// + +namespace Debugger.Wrappers.MetaData +{ + enum CorCallingConvention: uint + { + IMAGE_CEE_CS_CALLCONV_DEFAULT = 0x0, + + IMAGE_CEE_CS_CALLCONV_VARARG = 0x5, + IMAGE_CEE_CS_CALLCONV_FIELD = 0x6, + IMAGE_CEE_CS_CALLCONV_LOCAL_SIG = 0x7, + IMAGE_CEE_CS_CALLCONV_PROPERTY = 0x8, + IMAGE_CEE_CS_CALLCONV_UNMGD = 0x9, + IMAGE_CEE_CS_CALLCONV_MAX = 0x10, // first invalid calling convention + + + // The high bits of the calling convention convey additional info + IMAGE_CEE_CS_CALLCONV_MASK = 0x0f, // Calling convention is bottom 4 bits + IMAGE_CEE_CS_CALLCONV_HASTHIS = 0x20, // Top bit indicates a 'this' parameter + IMAGE_CEE_CS_CALLCONV_EXPLICITTHIS = 0x40, // This parameter is explicitly in the signature + } +} diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/Enums/CorElementType.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/Enums/CorElementType.cs new file mode 100644 index 000000000..c870b9d12 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/Enums/CorElementType.cs @@ -0,0 +1,63 @@ +// +// +// +// +// $Revision: 3189 $ +// + +namespace Debugger.Wrappers.CorDebug +{ + public enum CorElementType: uint + { + END = 0x0, + VOID = 0x1, + BOOLEAN = 0x2, + CHAR = 0x3, + I1 = 0x4, + U1 = 0x5, + I2 = 0x6, + U2 = 0x7, + I4 = 0x8, + U4 = 0x9, + I8 = 0xa, + U8 = 0xb, + R4 = 0xc, + R8 = 0xd, + STRING = 0xe, + + // every type above PTR will be simple type + PTR = 0xf, // PTR + BYREF = 0x10, // BYREF + + // Please use VALUETYPE. VALUECLASS is deprecated. + VALUETYPE = 0x11, // VALUETYPE + CLASS = 0x12, // CLASS + + ARRAY = 0x14, // MDARRAY ... ... + + TYPEDBYREF = 0x16, // This is a simple type. + + I = 0x18, // native integer size + U = 0x19, // native unsigned integer size + FNPTR = 0x1B, // FNPTR + OBJECT = 0x1C, // Shortcut for System.Object + SZARRAY = 0x1D, // Shortcut for single dimension zero lower bound array + // SZARRAY + + // This is only for binding + CMOD_REQD = 0x1F, // required C modifier : E_T_CMOD_REQD + CMOD_OPT = 0x20, // optional C modifier : E_T_CMOD_OPT + + // This is for signatures generated internally (which will not be persisted in any way). + INTERNAL = 0x21, // INTERNAL + + // Note that this is the max of base type excluding modifiers + MAX = 0x22, // first invalid element type + + + MODIFIER = 0x40, + SENTINEL = 0x01 | MODIFIER, // sentinel for varargs + PINNED = 0x05 | MODIFIER, + + } +} diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/Enums/CorMethodAttr.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/Enums/CorMethodAttr.cs new file mode 100644 index 000000000..899b58ec8 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/Enums/CorMethodAttr.cs @@ -0,0 +1,51 @@ +// +// +// +// +// $Revision: 2210 $ +// + +namespace Debugger.Wrappers.MetaData +{ + enum CorMethodAttr: uint + { + // member access mask - Use this mask to retrieve accessibility information. + mdMemberAccessMask = 0x0007, + mdPrivateScope = 0x0000, // Member not referenceable. + mdPrivate = 0x0001, // Accessible only by the parent type. + mdFamANDAssem = 0x0002, // Accessible by sub-types only in this Assembly. + mdAssem = 0x0003, // Accessibly by anyone in the Assembly. + mdFamily = 0x0004, // Accessible only by type and sub-types. + mdFamORAssem = 0x0005, // Accessibly by sub-types anywhere, plus anyone in assembly. + mdPublic = 0x0006, // Accessibly by anyone who has visibility to this scope. + // end member access mask + + // method contract attributes. + mdStatic = 0x0010, // Defined on type, else per instance. + mdFinal = 0x0020, // Method may not be overridden. + mdVirtual = 0x0040, // Method virtual. + mdHideBySig = 0x0080, // Method hides by name+sig, else just by name. + + // vtable layout mask - Use this mask to retrieve vtable attributes. + mdVtableLayoutMask = 0x0100, + mdReuseSlot = 0x0000, // The default. + mdNewSlot = 0x0100, // Method always gets a new slot in the vtable. + // end vtable layout mask + + // method implementation attributes. + mdCheckAccessOnOverride = 0x0200, // Overridability is the same as the visibility. + mdAbstract = 0x0400, // Method does not provide an implementation. + mdSpecialName = 0x0800, // Method is special. Name describes how. + + // interop attributes + mdPinvokeImpl = 0x2000, // Implementation is forwarded through pinvoke. + mdUnmanagedExport = 0x0008, // Managed method exported via thunk to unmanaged code. + + // Reserved flags for runtime use only. + mdReservedMask = 0xd000, + mdRTSpecialName = 0x1000, // Runtime should check name encoding. + mdHasSecurity = 0x4000, // Method has security associate with it. + mdRequireSecObject = 0x8000, // Method calls another method containing security code. + + } +} diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/Enums/CorTokenType.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/Enums/CorTokenType.cs new file mode 100644 index 000000000..9d0ffc963 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/Enums/CorTokenType.cs @@ -0,0 +1,37 @@ +// +// +// +// +// $Revision: 2926 $ +// + +namespace Debugger.Wrappers.MetaData +{ + public enum CorTokenType: uint + { + Module = 0x00000000, // + TypeRef = 0x01000000, // + TypeDef = 0x02000000, // + FieldDef = 0x04000000, // + MethodDef = 0x06000000, // + ParamDef = 0x08000000, // + InterfaceImpl = 0x09000000, // + MemberRef = 0x0a000000, // + CustomAttribute = 0x0c000000, // + Permission = 0x0e000000, // + Signature = 0x11000000, // + Event = 0x14000000, // + Property = 0x17000000, // + ModuleRef = 0x1a000000, // + TypeSpec = 0x1b000000, // + Assembly = 0x20000000, // + AssemblyRef = 0x23000000, // + File = 0x26000000, // + ExportedType = 0x27000000, // + ManifestResource = 0x28000000, // + + String = 0x70000000, // + Name = 0x71000000, // + BaseType = 0x72000000, // Leave this on the high end value. This does not correspond to metadata table + } +} diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/MetaData/COR_FIELD_OFFSET.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/MetaData/COR_FIELD_OFFSET.cs new file mode 100644 index 000000000..d6df2ea7a --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/MetaData/COR_FIELD_OFFSET.cs @@ -0,0 +1,23 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.MetaData +{ + using System; + using System.Runtime.InteropServices; + + [StructLayout(LayoutKind.Sequential, Pack=4)] + public struct COR_FIELD_OFFSET + { + public uint ridOfField; + public uint ulOffset; + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Interop/MetaData/IMetaDataImport.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/MetaData/IMetaDataImport.cs new file mode 100644 index 000000000..0d4d1e655 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Interop/MetaData/IMetaDataImport.cs @@ -0,0 +1,165 @@ +// +// +// +// +// $Revision: 3217 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.MetaData +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, InterfaceType((short) 1), Guid("7DAC8207-D3AE-4C75-9B67-92801A497D44"), ComConversionLoss] + public interface IMetaDataImport + { + [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CloseEnum(IntPtr hEnum); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void CountEnum(IntPtr hEnum, out uint pulCount); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void ResetEnum(IntPtr hEnum, uint ulPos); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumTypeDefs(ref IntPtr phEnum, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rTypeDefs, uint cMax, out uint pcTypeDefs); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumInterfaceImpls(ref IntPtr phEnum, uint td, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rImpls, uint cMax, out uint pcImpls); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumTypeRefs(ref IntPtr phEnum, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rTypeRefs, uint cMax, out uint pcTypeRefs); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void FindTypeDefByName([In, MarshalAs(UnmanagedType.LPWStr)] string szTypeDef, uint tkEnclosingClass, out uint ptd); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetScopeProps([Out] IntPtr szName, uint cchName, out uint pchName, out Guid pmvid); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetModuleFromScope(out uint pmd); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetTypeDefProps(uint td, [Out] IntPtr szTypeDef, uint cchTypeDef, out uint pchTypeDef, out uint pdwTypeDefFlags, out uint ptkExtends); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetInterfaceImplProps(uint iiImpl, out uint pClass, out uint ptkIface); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetTypeRefProps(uint tr, out uint ptkResolutionScope, [Out] IntPtr szName, uint cchName, out uint pchName); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void ResolveTypeRef(uint tr, ref Guid riid, [MarshalAs(UnmanagedType.IUnknown)] ref object ppIScope, ref uint ptd); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumMembers(ref IntPtr phEnum, uint cl, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rMembers, uint cMax, out uint pcTokens); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumMembersWithName(ref IntPtr phEnum, uint cl, [In, MarshalAs(UnmanagedType.LPWStr)] string szName, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rMembers, uint cMax, out uint pcTokens); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumMethods(ref IntPtr phEnum, uint cl, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rMethods, uint cMax, out uint pcTokens); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumMethodsWithName(ref IntPtr phEnum, uint cl, [In, MarshalAs(UnmanagedType.LPWStr)] string szName, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rMethods, uint cMax, out uint pcTokens); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumFields(ref IntPtr phEnum, uint cl, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rFields, uint cMax, out uint pcTokens); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumFieldsWithName(ref IntPtr phEnum, uint cl, [In, MarshalAs(UnmanagedType.LPWStr)] string szName, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rFields, uint cMax, out uint pcTokens); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumParams(ref IntPtr phEnum, uint mb, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rParams, uint cMax, out uint pcTokens); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumMemberRefs(ref IntPtr phEnum, uint tkParent, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rMemberRefs, uint cMax, out uint pcTokens); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumMethodImpls(ref IntPtr phEnum, uint td, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rMethodBody, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rMethodDecl, uint cMax, out uint pcTokens); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumPermissionSets(ref IntPtr phEnum, uint tk, uint dwActions, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rPermission, uint cMax, out uint pcTokens); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void FindMember(uint td, [In, MarshalAs(UnmanagedType.LPWStr)] string szName, [In] IntPtr pvSigBlob, uint cbSigBlob, out uint pmb); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void FindMethod(uint td, [In, MarshalAs(UnmanagedType.LPWStr)] string szName, [In] IntPtr pvSigBlob, uint cbSigBlob, out uint pmb); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void FindField(uint td, [In, MarshalAs(UnmanagedType.LPWStr)] string szName, [In] IntPtr pvSigBlob, uint cbSigBlob, out uint pmb); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void FindMemberRef(uint td, [In, MarshalAs(UnmanagedType.LPWStr)] string szName, [In] IntPtr pvSigBlob, uint cbSigBlob, out uint pmr); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetMethodProps(uint mb, out uint pClass, [Out] IntPtr szMethod, uint cchMethod, out uint pchMethod, out uint pdwAttr, out IntPtr ppvSigBlob, out uint pcbSigBlob, out uint pulCodeRVA, out uint pdwImplFlags); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetMemberRefProps(uint mr, out uint ptk, [Out] IntPtr szMember, uint cchMember, out uint pchMember, out IntPtr ppvSigBlob, out uint pbSig); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumProperties(ref IntPtr phEnum, uint td, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rProperties, uint cMax, out uint pcProperties); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumEvents(ref IntPtr phEnum, uint td, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rEvents, uint cMax, out uint pcEvents); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetEventProps(uint ev, out uint pClass, [Out] IntPtr szEvent, uint cchEvent, out uint pchEvent, out uint pdwEventFlags, out uint ptkEventType, out uint pmdAddOn, out uint pmdRemoveOn, out uint pmdFire, uint[] rmdOtherMethod, uint cMax, out uint pcOtherMethod); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumMethodSemantics(ref IntPtr phEnum, uint mb, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rEventProp, uint cMax, out uint pcEventProp); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetMethodSemantics(uint mb, uint tkEventProp, out uint pdwSemanticsFlags); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetClassLayout(uint td, out uint pdwPackSize, COR_FIELD_OFFSET[] rFieldOffset, uint cMax, out uint pcFieldOffset, out uint pulClassSize); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetFieldMarshal(uint tk, out IntPtr ppvNativeType, out uint pcbNativeType); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetRVA(uint tk, out uint pulCodeRVA, out uint pdwImplFlags); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetPermissionSetProps(uint pm, out uint pdwAction, out IntPtr ppvPermission, out uint pcbPermission); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetSigFromToken(uint mdSig, out IntPtr ppvSig, out uint pcbSig); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetModuleRefProps(uint mur, [Out] IntPtr szName, uint cchName, out uint pchName); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumModuleRefs(ref IntPtr phEnum, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rModuleRefs, uint cMax, out uint pcModuleRefs); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetTypeSpecFromToken(uint typespec, out IntPtr ppvSig, out uint pcbSig); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetNameFromToken(uint tk, [Out] IntPtr pszUtf8NamePtr); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumUnresolvedMethods(ref IntPtr phEnum, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rMethods, uint cMax, out uint pcTokens); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetUserString(uint stk, [Out] IntPtr szString, uint cchString, out uint pchString); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetPinvokeMap(uint tk, out uint pdwMappingFlags, [Out] IntPtr szImportName, uint cchImportName, out uint pchImportName, out uint pmrImportDLL); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumSignatures(ref IntPtr phEnum, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rSignatures, uint cMax, out uint pcSignatures); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumTypeSpecs(ref IntPtr phEnum, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rTypeSpecs, uint cMax, out uint pcTypeSpecs); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumUserStrings(ref IntPtr phEnum, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rStrings, uint cMax, out uint pcStrings); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetParamForMethodIndex(uint md, uint ulParamSeq, [In] ref uint ppd); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumCustomAttributes(ref IntPtr phEnum, uint tk, uint tkType, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rCustomAttributes, uint cMax, out uint pcCustomAttributes); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCustomAttributeProps(uint cv, out uint ptkObj, out uint ptkType, out IntPtr ppBlob, out uint pcbSize); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void FindTypeRef(uint tkResolutionScope, [In, MarshalAs(UnmanagedType.LPWStr)] string szName, out uint ptr); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetMemberProps(uint mb, out uint pClass, IntPtr szMember, uint cchMember, out uint pchMember, out uint pdwAttr, out IntPtr ppvSigBlob, out uint pcbSigBlob, out uint pulCodeRVA, out uint pdwImplFlags, out uint pdwCPlusTypeFlag, out IntPtr ppValue, out uint pcchValue); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetFieldProps(uint mb, out uint pClass, [In] IntPtr szField, uint cchField, out uint pchField, out uint pdwAttr, out IntPtr ppvSigBlob, out uint pcbSigBlob, out uint pdwCPlusTypeFlag, out IntPtr ppValue, out uint pcchValue); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetPropertyProps(uint prop, out uint pClass, [Out] IntPtr szProperty, uint cchProperty, out uint pchProperty, out uint pdwPropFlags, out IntPtr ppvSig, out uint pbSig, out uint pdwCPlusTypeFlag, out IntPtr ppDefaultValue, out uint pcchDefaultValue, out uint pmdSetter, out uint pmdGetter, uint[] rmdOtherMethod, uint cMax, out uint pcOtherMethod); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetParamProps(uint tk, out uint pmd, out uint pulSequence, [Out] IntPtr szName, uint cchName, out uint pchName, out uint pdwAttr, out uint pdwCPlusTypeFlag, out IntPtr ppValue, out uint pcchValue); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCustomAttributeByName(uint tkObj, [In, MarshalAs(UnmanagedType.LPWStr)] string szName, out IntPtr ppData, out uint pcbData); + [PreserveSig, MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + int IsValidToken(uint tk); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetNestedClassProps(uint tdNestedClass, out uint ptdEnclosingClass); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetNativeCallConvFromSig([In] IntPtr pvSig, uint cbSig, out uint pCallConv); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void IsGlobal(uint pd, out int pbGlobal); + + // IMetaDataImport2 + + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumGenericParams(ref IntPtr hEnum, uint tk, [Out, MarshalAsAttribute(UnmanagedType.LPArray)] uint[] rGenericParams, uint cMax, out uint pcGenericParams); + + void GetGenericParamProps(); + + void GetMethodSpecProps(); + + void EnumGenericParamConstraints(); + + void GetGenericParamConstraintProps(); + + void GetPEKind(); + + void GetVersionString(); + + void EnumMethodSpecs(); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/LICENSE.txt b/trunk/ProcessHacker/Misc/SharpDevelop/LICENSE.txt new file mode 100644 index 000000000..fce74132e --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/LICENSE.txt @@ -0,0 +1,458 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/MTA2STA.cs b/trunk/ProcessHacker/Misc/SharpDevelop/MTA2STA.cs new file mode 100644 index 000000000..1c358eea6 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/MTA2STA.cs @@ -0,0 +1,252 @@ +// +// +// +// +// $Revision: 2903 $ +// + +using System; +using System.Collections.Generic; +using System.Reflection; +using System.Runtime.InteropServices; +using System.Threading; +using System.Windows.Forms; + +namespace Debugger.Interop +{ + public delegate T MethodInvokerWithReturnValue(); + + public enum CallMethod {DirectCall, Manual, HiddenForm, HiddenFormWithTimeout}; + + public class MTA2STA + { + Form hiddenForm; + IntPtr hiddenFormHandle; + + System.Threading.Thread targetThread; + CallMethod callMethod = CallMethod.HiddenFormWithTimeout; + + Queue pendingCalls = new Queue(); + ManualResetEvent pendingCallsNotEmpty = new ManualResetEvent(false); + + WaitHandle EnqueueCall(MethodInvoker callDelegate) + { + lock (pendingCalls) { + ManualResetEvent callDone = new ManualResetEvent(false); + pendingCalls.Enqueue(delegate{ + callDelegate(); + callDone.Set(); + }); + pendingCallsNotEmpty.Set(); + return callDone; + } + } + + /// + /// Wait until a call a made + /// + public void WaitForCall() + { + pendingCallsNotEmpty.WaitOne(); + } + + public void WaitForCall(TimeSpan timeout) + { + pendingCallsNotEmpty.WaitOne(timeout, false); + } + + /// + /// Performs all waiting calls on the current thread + /// + public void PerformAllCalls() + { + while (true) { + if (!PerformCall()) { + return; + } + } + } + + /// + /// Performs all waiting calls on the current thread + /// + public bool PerformCall() + { + MethodInvoker nextMethod; + lock (pendingCalls) { + if (pendingCalls.Count > 0) { + nextMethod = pendingCalls.Dequeue(); + } else { + pendingCallsNotEmpty.Reset(); + return false; + } + } + nextMethod(); + return true; + } + + public CallMethod CallMethod { + get { + return callMethod; + } + set { + callMethod = value; + } + } + + public MTA2STA() + { + targetThread = System.Threading.Thread.CurrentThread; + + hiddenForm = new Form(); + // Force handle creation + hiddenFormHandle = hiddenForm.Handle; + } + + /// + /// SoftWait waits for any of the given WaitHandles and allows processing of calls during the wait + /// + public int SoftWait(params WaitHandle[] waitFor) + { + List waits = new List (waitFor); + waits.Add(pendingCallsNotEmpty); + while(true) { + int i = WaitHandle.WaitAny(waits.ToArray()); + PerformAllCalls(); + if (i < waits.Count - 1) { // If not pendingCallsNotEmpty + return i; + } + } + } + + /// + /// Schedules invocation of method and returns immediately + /// + public WaitHandle AsyncCall(MethodInvoker callDelegate) + { + WaitHandle callDone = EnqueueCall(callDelegate); + TriggerInvoke(); + return callDone; + } + + public T Call(MethodInvokerWithReturnValue callDelegate) + { + T returnValue = default(T); + Call(delegate { returnValue = callDelegate(); }, true); + return returnValue; + } + + public void Call(MethodInvoker callDelegate) + { + Call(callDelegate, false); + } + + void Call(MethodInvoker callDelegate, bool hasReturnValue) + { + // Enqueue the call + WaitHandle callDone = EnqueueCall(callDelegate); + + if (targetThread == System.Threading.Thread.CurrentThread) { + PerformAllCalls(); + return; + } + + // We have the call waiting in queue, we need to call it (not waiting for it to finish) + TriggerInvoke(); + + // Wait for the call to finish + if (!hasReturnValue && callMethod == CallMethod.HiddenFormWithTimeout) { + // Give it 5 seconds to run + if (!callDone.WaitOne(5000, true)) { + System.Console.WriteLine("Call time out! (continuing)"); + System.Console.WriteLine(new System.Diagnostics.StackTrace(true).ToString()); + } + } else { + callDone.WaitOne(); + } + } + + void TriggerInvoke() + { + switch (callMethod) { + case CallMethod.DirectCall: + PerformAllCalls(); + break; + case CallMethod.Manual: + // Nothing we can do - someone else must call SoftWait or Pulse + break; + case CallMethod.HiddenForm: + case CallMethod.HiddenFormWithTimeout: + hiddenForm.BeginInvoke((MethodInvoker)PerformAllCalls); + break; + } + } + + public static object MarshalParamTo(object param, Type outputType) + { + if (param is IntPtr) { + return MarshalIntPtrTo((IntPtr)param, outputType); + } else { + return param; + } + } + + public static T MarshalIntPtrTo(IntPtr param) + { + return (T)MarshalIntPtrTo(param, typeof(T)); + } + + public static object MarshalIntPtrTo(IntPtr param, Type outputType) + { + // IntPtr requested as output (must be before the null check so that we pass IntPtr.Zero) + if (outputType == typeof(IntPtr)) { + return param; + } + // The parameter is null pointer + if ((IntPtr)param == IntPtr.Zero) { + return null; + } + // String requested as output + if (outputType == typeof(string)) { + return Marshal.PtrToStringAuto((IntPtr)param); + } + // Marshal a COM object + object comObject = Marshal.GetObjectForIUnknown(param); + return Activator.CreateInstance(outputType, comObject); + } + + /// + /// Uses reflection to call method. Automaticaly marshals parameters. + /// + /// Targed object which contains the method. In case of static mehod pass the Type + /// The name of the function to call + /// Parameters which should be send to the function. Parameters will be marshaled to proper type. + /// Return value of the called function + public static object InvokeMethod(object targetObject, string functionName, object[] functionParameters) + { + System.Reflection.MethodInfo method; + if (targetObject is Type) { + method = ((Type)targetObject).GetMethod(functionName); + } else { + method = targetObject.GetType().GetMethod(functionName); + } + + ParameterInfo[] methodParamsInfo = method.GetParameters(); + object[] convertedParams = new object[methodParamsInfo.Length]; + + for (int i = 0; i < convertedParams.Length; i++) { + convertedParams[i] = MarshalParamTo(functionParameters[i], methodParamsInfo[i].ParameterType); + } + + try { + if (targetObject is Type) { + return method.Invoke(null, convertedParams); + } else { + return method.Invoke(targetObject, convertedParams); + } + } catch (System.Exception exception) { + throw new Exception("Invoke of " + functionName + " failed.", exception); + } + } + } +} diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/NDebugger.cs b/trunk/ProcessHacker/Misc/SharpDevelop/NDebugger.cs new file mode 100644 index 000000000..174f1770c --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/NDebugger.cs @@ -0,0 +1,89 @@ +using System; +using System.Diagnostics; + +namespace Debugger +{ + [Serializable] + public class DebuggerEventArgs : EventArgs + { + object debugger; + + public object Debugger + { + get { + return debugger; + } + } + + public DebuggerEventArgs(object debugger) + { + this.debugger = debugger; + } + } + + [Serializable] + public class ProcessEventArgs : DebuggerEventArgs + { + Process process; + + public Process Process + { + get + { + return process; + } + } + + public ProcessEventArgs(Process process) + : base(null) + { + this.process = process; + } + } + + [Serializable] + public class MessageEventArgs : ProcessEventArgs + { + int level; + string message; + string category; + + public int Level + { + get + { + return level; + } + } + + public string Message + { + get + { + return message; + } + } + + public string Category + { + get + { + return category; + } + } + + public MessageEventArgs(Process process, string message) + : this(process, 0, message, String.Empty) + { + this.message = message; + } + + public MessageEventArgs(Process process, int level, string message, string category) + : base(process) + { + this.level = level; + this.message = message; + this.category = category; + } + } +} diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebug.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebug.cs new file mode 100644 index 000000000..ff093daf1 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebug.cs @@ -0,0 +1,100 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class CorDebug + { + + private Debugger.Interop.CorDebug.CorDebug wrappedObject; + + internal Debugger.Interop.CorDebug.CorDebug WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public CorDebug(Debugger.Interop.CorDebug.CorDebug wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(CorDebug)); + } + + public static CorDebug Wrap(Debugger.Interop.CorDebug.CorDebug objectToWrap) + { + if ((objectToWrap != null)) + { + return new CorDebug(objectToWrap); + } else + { + return null; + } + } + + ~CorDebug() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(CorDebug)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(CorDebug o1, CorDebug o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(CorDebug o1, CorDebug o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + CorDebug casted = o as CorDebug; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebugChainReason.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebugChainReason.cs new file mode 100644 index 000000000..3521c66d9 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebugChainReason.cs @@ -0,0 +1,48 @@ +// +// +// +// +// $Revision: 2077 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public enum CorDebugChainReason : int + { + + CHAIN_NONE = 0, + + CHAIN_CLASS_INIT = 1, + + CHAIN_EXCEPTION_FILTER = 2, + + CHAIN_SECURITY = 4, + + CHAIN_CONTEXT_POLICY = 8, + + CHAIN_INTERCEPTION = 16, + + CHAIN_PROCESS_START = 32, + + CHAIN_THREAD_START = 64, + + CHAIN_ENTER_MANAGED = 128, + + CHAIN_ENTER_UNMANAGED = 256, + + CHAIN_DEBUGGER_EVAL = 512, + + CHAIN_CONTEXT_SWITCH = 1024, + + CHAIN_FUNC_EVAL = 2048, + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebugClass.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebugClass.cs new file mode 100644 index 000000000..675cf2efa --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebugClass.cs @@ -0,0 +1,161 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class CorDebugClass + { + + private Debugger.Interop.CorDebug.CorDebugClass wrappedObject; + + internal Debugger.Interop.CorDebug.CorDebugClass WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public CorDebugClass(Debugger.Interop.CorDebug.CorDebugClass wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(CorDebugClass)); + } + + public static CorDebugClass Wrap(Debugger.Interop.CorDebug.CorDebugClass objectToWrap) + { + if ((objectToWrap != null)) + { + return new CorDebugClass(objectToWrap); + } else + { + return null; + } + } + + ~CorDebugClass() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(CorDebugClass)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(CorDebugClass o1, CorDebugClass o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(CorDebugClass o1, CorDebugClass o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + CorDebugClass casted = o as CorDebugClass; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void CanLaunchOrAttach(uint dwProcessId, int win32DebuggingEnabled) + { + this.WrappedObject.CanLaunchOrAttach(dwProcessId, win32DebuggingEnabled); + } + + public ICorDebugProcess CreateProcess(string lpApplicationName, string lpCommandLine, ref Debugger.Interop.CorDebug._SECURITY_ATTRIBUTES lpProcessAttributes, ref Debugger.Interop.CorDebug._SECURITY_ATTRIBUTES lpThreadAttributes, int bInheritHandles, uint dwCreationFlags, System.IntPtr lpEnvironment, string lpCurrentDirectory, uint lpStartupInfo, uint lpProcessInformation, CorDebugCreateProcessFlags debuggingFlags) + { + ICorDebugProcess ppProcess; + Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess; + this.WrappedObject.CreateProcess(lpApplicationName, lpCommandLine, ref lpProcessAttributes, ref lpThreadAttributes, bInheritHandles, dwCreationFlags, lpEnvironment, lpCurrentDirectory, lpStartupInfo, lpProcessInformation, ((Debugger.Interop.CorDebug.CorDebugCreateProcessFlags)(debuggingFlags)), out out_ppProcess); + ppProcess = ICorDebugProcess.Wrap(out_ppProcess); + return ppProcess; + } + + public ICorDebugProcess DebugActiveProcess(uint id, int win32Attach) + { + ICorDebugProcess ppProcess; + Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess; + this.WrappedObject.DebugActiveProcess(id, win32Attach, out out_ppProcess); + ppProcess = ICorDebugProcess.Wrap(out_ppProcess); + return ppProcess; + } + + public ICorDebugProcessEnum EnumerateProcesses() + { + ICorDebugProcessEnum ppProcess; + Debugger.Interop.CorDebug.ICorDebugProcessEnum out_ppProcess; + this.WrappedObject.EnumerateProcesses(out out_ppProcess); + ppProcess = ICorDebugProcessEnum.Wrap(out_ppProcess); + return ppProcess; + } + + public ICorDebugProcess GetProcess(uint dwProcessId) + { + ICorDebugProcess ppProcess; + Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess; + this.WrappedObject.GetProcess(dwProcessId, out out_ppProcess); + ppProcess = ICorDebugProcess.Wrap(out_ppProcess); + return ppProcess; + } + + public void Initialize() + { + this.WrappedObject.Initialize(); + } + + public void SetManagedHandler(ICorDebugManagedCallback pCallback) + { + this.WrappedObject.SetManagedHandler(pCallback.WrappedObject); + } + + public void SetUnmanagedHandler(ICorDebugUnmanagedCallback pCallback) + { + this.WrappedObject.SetUnmanagedHandler(pCallback.WrappedObject); + } + + public void Terminate() + { + this.WrappedObject.Terminate(); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebugCreateProcessFlags.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebugCreateProcessFlags.cs new file mode 100644 index 000000000..56b27b53f --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebugCreateProcessFlags.cs @@ -0,0 +1,24 @@ +// +// +// +// +// $Revision: 2077 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public enum CorDebugCreateProcessFlags : int + { + + DEBUG_NO_SPECIAL_OPTIONS = 0, + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebugHandleType.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebugHandleType.cs new file mode 100644 index 000000000..7a3ddf341 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebugHandleType.cs @@ -0,0 +1,26 @@ +// +// +// +// +// $Revision: 2077 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public enum CorDebugHandleType : int + { + + HANDLE_STRONG = 1, + + HANDLE_WEAK_TRACK_RESURRECTION = 2, + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebugIntercept.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebugIntercept.cs new file mode 100644 index 000000000..4014a7be9 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebugIntercept.cs @@ -0,0 +1,36 @@ +// +// +// +// +// $Revision: 2077 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public enum CorDebugIntercept : int + { + + INTERCEPT_NONE = 0, + + INTERCEPT_CLASS_INIT = 1, + + INTERCEPT_EXCEPTION_FILTER = 2, + + INTERCEPT_SECURITY = 4, + + INTERCEPT_CONTEXT_POLICY = 8, + + INTERCEPT_INTERCEPTION = 16, + + INTERCEPT_ALL = 65535, + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebugInternalFrameType.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebugInternalFrameType.cs new file mode 100644 index 000000000..77d200b71 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebugInternalFrameType.cs @@ -0,0 +1,36 @@ +// +// +// +// +// $Revision: 2077 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public enum CorDebugInternalFrameType : int + { + + STUBFRAME_NONE = 0, + + STUBFRAME_M2U = 1, + + STUBFRAME_U2M = 2, + + STUBFRAME_APPDOMAIN_TRANSITION = 3, + + STUBFRAME_LIGHTWEIGHT_FUNCTION = 4, + + STUBFRAME_FUNC_EVAL = 5, + + STUBFRAME_INTERNALCALL = 6, + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebugMDAFlags.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebugMDAFlags.cs new file mode 100644 index 000000000..6eb299dd4 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebugMDAFlags.cs @@ -0,0 +1,24 @@ +// +// +// +// +// $Revision: 2077 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public enum CorDebugMDAFlags : int + { + + MDA_FLAG_SLIP = 2, + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebugMappingResult.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebugMappingResult.cs new file mode 100644 index 000000000..75639ef7c --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebugMappingResult.cs @@ -0,0 +1,34 @@ +// +// +// +// +// $Revision: 2077 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public enum CorDebugMappingResult : int + { + + MAPPING_PROLOG = 1, + + MAPPING_EPILOG = 2, + + MAPPING_NO_INFO = 4, + + MAPPING_UNMAPPED_ADDRESS = 8, + + MAPPING_EXACT = 16, + + MAPPING_APPROXIMATE = 32, + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebugRegister.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebugRegister.cs new file mode 100644 index 000000000..1bb33fe96 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebugRegister.cs @@ -0,0 +1,134 @@ +// +// +// +// +// $Revision: 2077 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public enum CorDebugRegister : int + { + + REGISTER_AMD64_RIP = 0, + + REGISTER_X86_EIP = 0, + + REGISTER_INSTRUCTION_POINTER = 0, + + REGISTER_AMD64_RSP = 1, + + REGISTER_STACK_POINTER = 1, + + REGISTER_X86_ESP = 1, + + REGISTER_IA64_BSP = 2, + + REGISTER_AMD64_RBP = 2, + + REGISTER_X86_EBP = 2, + + REGISTER_FRAME_POINTER = 2, + + REGISTER_X86_EAX = 3, + + REGISTER_IA64_R0 = 3, + + REGISTER_AMD64_RAX = 3, + + REGISTER_X86_ECX = 4, + + REGISTER_AMD64_RCX = 4, + + REGISTER_AMD64_RDX = 5, + + REGISTER_X86_EDX = 5, + + REGISTER_X86_EBX = 6, + + REGISTER_AMD64_RBX = 6, + + REGISTER_AMD64_RSI = 7, + + REGISTER_X86_ESI = 7, + + REGISTER_X86_EDI = 8, + + REGISTER_AMD64_RDI = 8, + + REGISTER_AMD64_R8 = 9, + + REGISTER_X86_FPSTACK_0 = 9, + + REGISTER_AMD64_R9 = 10, + + REGISTER_X86_FPSTACK_1 = 10, + + REGISTER_AMD64_R10 = 11, + + REGISTER_X86_FPSTACK_2 = 11, + + REGISTER_AMD64_R11 = 12, + + REGISTER_X86_FPSTACK_3 = 12, + + REGISTER_AMD64_R12 = 13, + + REGISTER_X86_FPSTACK_4 = 13, + + REGISTER_AMD64_R13 = 14, + + REGISTER_X86_FPSTACK_5 = 14, + + REGISTER_AMD64_R14 = 15, + + REGISTER_X86_FPSTACK_6 = 15, + + REGISTER_AMD64_R15 = 16, + + REGISTER_X86_FPSTACK_7 = 16, + + REGISTER_AMD64_XMM0 = 17, + + REGISTER_AMD64_XMM1 = 18, + + REGISTER_AMD64_XMM2 = 19, + + REGISTER_AMD64_XMM3 = 20, + + REGISTER_AMD64_XMM4 = 21, + + REGISTER_AMD64_XMM5 = 22, + + REGISTER_AMD64_XMM6 = 23, + + REGISTER_AMD64_XMM7 = 24, + + REGISTER_AMD64_XMM8 = 25, + + REGISTER_AMD64_XMM9 = 26, + + REGISTER_AMD64_XMM10 = 27, + + REGISTER_AMD64_XMM11 = 28, + + REGISTER_AMD64_XMM12 = 29, + + REGISTER_AMD64_XMM13 = 30, + + REGISTER_AMD64_XMM14 = 31, + + REGISTER_AMD64_XMM15 = 32, + + REGISTER_IA64_F0 = 131, + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebugThreadState.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebugThreadState.cs new file mode 100644 index 000000000..5bee1c430 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebugThreadState.cs @@ -0,0 +1,26 @@ +// +// +// +// +// $Revision: 3135 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public enum CorDebugThreadState : int + { + + THREAD_RUN = 0, + + THREAD_SUSPEND = 1, + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebugUnmappedStop.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebugUnmappedStop.cs new file mode 100644 index 000000000..6b0cbc165 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebugUnmappedStop.cs @@ -0,0 +1,36 @@ +// +// +// +// +// $Revision: 2077 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public enum CorDebugUnmappedStop : int + { + + STOP_NONE = 0, + + STOP_PROLOG = 1, + + STOP_EPILOG = 2, + + STOP_NO_MAPPING_INFO = 4, + + STOP_OTHER_UNMAPPED = 8, + + STOP_UNMANAGED = 16, + + STOP_ALL = 65535, + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebugUserState.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebugUserState.cs new file mode 100644 index 000000000..940a8118e --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/CorDebugUserState.cs @@ -0,0 +1,38 @@ +// +// +// +// +// $Revision: 2077 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public enum CorDebugUserState : int + { + + USER_STOP_REQUESTED = 1, + + USER_SUSPEND_REQUESTED = 2, + + USER_BACKGROUND = 4, + + USER_UNSTARTED = 8, + + USER_STOPPED = 16, + + USER_WAIT_SLEEP_JOIN = 32, + + USER_SUSPENDED = 64, + + USER_UNSAFE_POINT = 128, + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/EmbeddedCLRCorDebug.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/EmbeddedCLRCorDebug.cs new file mode 100644 index 000000000..f794940e4 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/EmbeddedCLRCorDebug.cs @@ -0,0 +1,100 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class EmbeddedCLRCorDebug + { + + private Debugger.Interop.CorDebug.EmbeddedCLRCorDebug wrappedObject; + + internal Debugger.Interop.CorDebug.EmbeddedCLRCorDebug WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public EmbeddedCLRCorDebug(Debugger.Interop.CorDebug.EmbeddedCLRCorDebug wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(EmbeddedCLRCorDebug)); + } + + public static EmbeddedCLRCorDebug Wrap(Debugger.Interop.CorDebug.EmbeddedCLRCorDebug objectToWrap) + { + if ((objectToWrap != null)) + { + return new EmbeddedCLRCorDebug(objectToWrap); + } else + { + return null; + } + } + + ~EmbeddedCLRCorDebug() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(EmbeddedCLRCorDebug)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(EmbeddedCLRCorDebug o1, EmbeddedCLRCorDebug o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(EmbeddedCLRCorDebug o1, EmbeddedCLRCorDebug o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + EmbeddedCLRCorDebug casted = o as EmbeddedCLRCorDebug; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/EmbeddedCLRCorDebugClass.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/EmbeddedCLRCorDebugClass.cs new file mode 100644 index 000000000..90ae29156 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/EmbeddedCLRCorDebugClass.cs @@ -0,0 +1,161 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class EmbeddedCLRCorDebugClass + { + + private Debugger.Interop.CorDebug.EmbeddedCLRCorDebugClass wrappedObject; + + internal Debugger.Interop.CorDebug.EmbeddedCLRCorDebugClass WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public EmbeddedCLRCorDebugClass(Debugger.Interop.CorDebug.EmbeddedCLRCorDebugClass wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(EmbeddedCLRCorDebugClass)); + } + + public static EmbeddedCLRCorDebugClass Wrap(Debugger.Interop.CorDebug.EmbeddedCLRCorDebugClass objectToWrap) + { + if ((objectToWrap != null)) + { + return new EmbeddedCLRCorDebugClass(objectToWrap); + } else + { + return null; + } + } + + ~EmbeddedCLRCorDebugClass() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(EmbeddedCLRCorDebugClass)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(EmbeddedCLRCorDebugClass o1, EmbeddedCLRCorDebugClass o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(EmbeddedCLRCorDebugClass o1, EmbeddedCLRCorDebugClass o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + EmbeddedCLRCorDebugClass casted = o as EmbeddedCLRCorDebugClass; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void CanLaunchOrAttach(uint dwProcessId, int win32DebuggingEnabled) + { + this.WrappedObject.CanLaunchOrAttach(dwProcessId, win32DebuggingEnabled); + } + + public ICorDebugProcess CreateProcess(string lpApplicationName, string lpCommandLine, ref Debugger.Interop.CorDebug._SECURITY_ATTRIBUTES lpProcessAttributes, ref Debugger.Interop.CorDebug._SECURITY_ATTRIBUTES lpThreadAttributes, int bInheritHandles, uint dwCreationFlags, System.IntPtr lpEnvironment, string lpCurrentDirectory, uint lpStartupInfo, uint lpProcessInformation, CorDebugCreateProcessFlags debuggingFlags) + { + ICorDebugProcess ppProcess; + Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess; + this.WrappedObject.CreateProcess(lpApplicationName, lpCommandLine, ref lpProcessAttributes, ref lpThreadAttributes, bInheritHandles, dwCreationFlags, lpEnvironment, lpCurrentDirectory, lpStartupInfo, lpProcessInformation, ((Debugger.Interop.CorDebug.CorDebugCreateProcessFlags)(debuggingFlags)), out out_ppProcess); + ppProcess = ICorDebugProcess.Wrap(out_ppProcess); + return ppProcess; + } + + public ICorDebugProcess DebugActiveProcess(uint id, int win32Attach) + { + ICorDebugProcess ppProcess; + Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess; + this.WrappedObject.DebugActiveProcess(id, win32Attach, out out_ppProcess); + ppProcess = ICorDebugProcess.Wrap(out_ppProcess); + return ppProcess; + } + + public ICorDebugProcessEnum EnumerateProcesses() + { + ICorDebugProcessEnum ppProcess; + Debugger.Interop.CorDebug.ICorDebugProcessEnum out_ppProcess; + this.WrappedObject.EnumerateProcesses(out out_ppProcess); + ppProcess = ICorDebugProcessEnum.Wrap(out_ppProcess); + return ppProcess; + } + + public ICorDebugProcess GetProcess(uint dwProcessId) + { + ICorDebugProcess ppProcess; + Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess; + this.WrappedObject.GetProcess(dwProcessId, out out_ppProcess); + ppProcess = ICorDebugProcess.Wrap(out_ppProcess); + return ppProcess; + } + + public void Initialize() + { + this.WrappedObject.Initialize(); + } + + public void SetManagedHandler(ICorDebugManagedCallback pCallback) + { + this.WrappedObject.SetManagedHandler(pCallback.WrappedObject); + } + + public void SetUnmanagedHandler(ICorDebugUnmanagedCallback pCallback) + { + this.WrappedObject.SetUnmanagedHandler(pCallback.WrappedObject); + } + + public void Terminate() + { + this.WrappedObject.Terminate(); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebug.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebug.cs new file mode 100644 index 000000000..02546eb3d --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebug.cs @@ -0,0 +1,161 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebug + { + + private Debugger.Interop.CorDebug.ICorDebug wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebug WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebug(Debugger.Interop.CorDebug.ICorDebug wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebug)); + } + + public static ICorDebug Wrap(Debugger.Interop.CorDebug.ICorDebug objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebug(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebug() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebug)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebug o1, ICorDebug o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebug o1, ICorDebug o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebug casted = o as ICorDebug; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void Initialize() + { + this.WrappedObject.Initialize(); + } + + public void Terminate() + { + this.WrappedObject.Terminate(); + } + + public void SetManagedHandler(ICorDebugManagedCallback pCallback) + { + this.WrappedObject.SetManagedHandler(pCallback.WrappedObject); + } + + public void SetUnmanagedHandler(ICorDebugUnmanagedCallback pCallback) + { + this.WrappedObject.SetUnmanagedHandler(pCallback.WrappedObject); + } + + public ICorDebugProcess CreateProcess(string lpApplicationName, string lpCommandLine, ref Debugger.Interop.CorDebug._SECURITY_ATTRIBUTES lpProcessAttributes, ref Debugger.Interop.CorDebug._SECURITY_ATTRIBUTES lpThreadAttributes, int bInheritHandles, uint dwCreationFlags, System.IntPtr lpEnvironment, string lpCurrentDirectory, uint lpStartupInfo, uint lpProcessInformation, CorDebugCreateProcessFlags debuggingFlags) + { + ICorDebugProcess ppProcess; + Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess; + this.WrappedObject.CreateProcess(lpApplicationName, lpCommandLine, ref lpProcessAttributes, ref lpThreadAttributes, bInheritHandles, dwCreationFlags, lpEnvironment, lpCurrentDirectory, lpStartupInfo, lpProcessInformation, ((Debugger.Interop.CorDebug.CorDebugCreateProcessFlags)(debuggingFlags)), out out_ppProcess); + ppProcess = ICorDebugProcess.Wrap(out_ppProcess); + return ppProcess; + } + + public ICorDebugProcess DebugActiveProcess(uint id, int win32Attach) + { + ICorDebugProcess ppProcess; + Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess; + this.WrappedObject.DebugActiveProcess(id, win32Attach, out out_ppProcess); + ppProcess = ICorDebugProcess.Wrap(out_ppProcess); + return ppProcess; + } + + public ICorDebugProcessEnum EnumerateProcesses() + { + ICorDebugProcessEnum ppProcess; + Debugger.Interop.CorDebug.ICorDebugProcessEnum out_ppProcess; + this.WrappedObject.EnumerateProcesses(out out_ppProcess); + ppProcess = ICorDebugProcessEnum.Wrap(out_ppProcess); + return ppProcess; + } + + public ICorDebugProcess GetProcess(uint dwProcessId) + { + ICorDebugProcess ppProcess; + Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess; + this.WrappedObject.GetProcess(dwProcessId, out out_ppProcess); + ppProcess = ICorDebugProcess.Wrap(out_ppProcess); + return ppProcess; + } + + public void CanLaunchOrAttach(uint dwProcessId, int win32DebuggingEnabled) + { + this.WrappedObject.CanLaunchOrAttach(dwProcessId, win32DebuggingEnabled); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugAppDomain.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugAppDomain.cs new file mode 100644 index 000000000..611d79ed5 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugAppDomain.cs @@ -0,0 +1,263 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugAppDomain + { + + private Debugger.Interop.CorDebug.ICorDebugAppDomain wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugAppDomain WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugAppDomain(Debugger.Interop.CorDebug.ICorDebugAppDomain wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugAppDomain)); + } + + public static ICorDebugAppDomain Wrap(Debugger.Interop.CorDebug.ICorDebugAppDomain objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugAppDomain(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugAppDomain() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugAppDomain)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugAppDomain o1, ICorDebugAppDomain o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugAppDomain o1, ICorDebugAppDomain o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugAppDomain casted = o as ICorDebugAppDomain; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void Stop(uint dwTimeoutIgnored) + { + this.WrappedObject.Stop(dwTimeoutIgnored); + } + + public void Continue(int fIsOutOfBand) + { + this.WrappedObject.Continue(fIsOutOfBand); + } + + public int IsRunning + { + get + { + int pbRunning; + this.WrappedObject.IsRunning(out pbRunning); + return pbRunning; + } + } + + public int HasQueuedCallbacks(ICorDebugThread pThread) + { + int pbQueued; + this.WrappedObject.HasQueuedCallbacks(pThread.WrappedObject, out pbQueued); + return pbQueued; + } + + public ICorDebugThreadEnum EnumerateThreads() + { + ICorDebugThreadEnum ppThreads; + Debugger.Interop.CorDebug.ICorDebugThreadEnum out_ppThreads; + this.WrappedObject.EnumerateThreads(out out_ppThreads); + ppThreads = ICorDebugThreadEnum.Wrap(out_ppThreads); + return ppThreads; + } + + public void SetAllThreadsDebugState(CorDebugThreadState state, ICorDebugThread pExceptThisThread) + { + this.WrappedObject.SetAllThreadsDebugState(((Debugger.Interop.CorDebug.CorDebugThreadState)(state)), pExceptThisThread.WrappedObject); + } + + public void Detach() + { + this.WrappedObject.Detach(); + } + + public void Terminate(uint exitCode) + { + this.WrappedObject.Terminate(exitCode); + } + + public ICorDebugErrorInfoEnum CanCommitChanges(uint cSnapshots, ref ICorDebugEditAndContinueSnapshot pSnapshots) + { + ICorDebugErrorInfoEnum pError; + Debugger.Interop.CorDebug.ICorDebugEditAndContinueSnapshot ref_pSnapshots = pSnapshots.WrappedObject; + Debugger.Interop.CorDebug.ICorDebugErrorInfoEnum out_pError; + this.WrappedObject.CanCommitChanges(cSnapshots, ref ref_pSnapshots, out out_pError); + pSnapshots = ICorDebugEditAndContinueSnapshot.Wrap(ref_pSnapshots); + pError = ICorDebugErrorInfoEnum.Wrap(out_pError); + return pError; + } + + public ICorDebugErrorInfoEnum CommitChanges(uint cSnapshots, ref ICorDebugEditAndContinueSnapshot pSnapshots) + { + ICorDebugErrorInfoEnum pError; + Debugger.Interop.CorDebug.ICorDebugEditAndContinueSnapshot ref_pSnapshots = pSnapshots.WrappedObject; + Debugger.Interop.CorDebug.ICorDebugErrorInfoEnum out_pError; + this.WrappedObject.CommitChanges(cSnapshots, ref ref_pSnapshots, out out_pError); + pSnapshots = ICorDebugEditAndContinueSnapshot.Wrap(ref_pSnapshots); + pError = ICorDebugErrorInfoEnum.Wrap(out_pError); + return pError; + } + + public ICorDebugProcess Process + { + get + { + ICorDebugProcess ppProcess; + Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess; + this.WrappedObject.GetProcess(out out_ppProcess); + ppProcess = ICorDebugProcess.Wrap(out_ppProcess); + return ppProcess; + } + } + + public ICorDebugAssemblyEnum EnumerateAssemblies() + { + ICorDebugAssemblyEnum ppAssemblies; + Debugger.Interop.CorDebug.ICorDebugAssemblyEnum out_ppAssemblies; + this.WrappedObject.EnumerateAssemblies(out out_ppAssemblies); + ppAssemblies = ICorDebugAssemblyEnum.Wrap(out_ppAssemblies); + return ppAssemblies; + } + + public ICorDebugModule GetModuleFromMetaDataInterface(object pIMetaData) + { + ICorDebugModule ppModule; + Debugger.Interop.CorDebug.ICorDebugModule out_ppModule; + this.WrappedObject.GetModuleFromMetaDataInterface(pIMetaData, out out_ppModule); + ppModule = ICorDebugModule.Wrap(out_ppModule); + return ppModule; + } + + public ICorDebugBreakpointEnum EnumerateBreakpoints() + { + ICorDebugBreakpointEnum ppBreakpoints; + Debugger.Interop.CorDebug.ICorDebugBreakpointEnum out_ppBreakpoints; + this.WrappedObject.EnumerateBreakpoints(out out_ppBreakpoints); + ppBreakpoints = ICorDebugBreakpointEnum.Wrap(out_ppBreakpoints); + return ppBreakpoints; + } + + public ICorDebugStepperEnum EnumerateSteppers() + { + ICorDebugStepperEnum ppSteppers; + Debugger.Interop.CorDebug.ICorDebugStepperEnum out_ppSteppers; + this.WrappedObject.EnumerateSteppers(out out_ppSteppers); + ppSteppers = ICorDebugStepperEnum.Wrap(out_ppSteppers); + return ppSteppers; + } + + public int IsAttached + { + get + { + int pbAttached; + this.WrappedObject.IsAttached(out pbAttached); + return pbAttached; + } + } + + public void GetName(uint cchName, out uint pcchName, System.IntPtr szName) + { + this.WrappedObject.GetName(cchName, out pcchName, szName); + } + + public ICorDebugValue Object + { + get + { + ICorDebugValue ppObject; + Debugger.Interop.CorDebug.ICorDebugValue out_ppObject; + this.WrappedObject.GetObject(out out_ppObject); + ppObject = ICorDebugValue.Wrap(out_ppObject); + return ppObject; + } + } + + public void Attach() + { + this.WrappedObject.Attach(); + } + + public uint ID + { + get + { + uint pId; + this.WrappedObject.GetID(out pId); + return pId; + } + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugAppDomain2.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugAppDomain2.cs new file mode 100644 index 000000000..48f1df8f3 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugAppDomain2.cs @@ -0,0 +1,120 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugAppDomain2 + { + + private Debugger.Interop.CorDebug.ICorDebugAppDomain2 wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugAppDomain2 WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugAppDomain2(Debugger.Interop.CorDebug.ICorDebugAppDomain2 wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugAppDomain2)); + } + + public static ICorDebugAppDomain2 Wrap(Debugger.Interop.CorDebug.ICorDebugAppDomain2 objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugAppDomain2(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugAppDomain2() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugAppDomain2)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugAppDomain2 o1, ICorDebugAppDomain2 o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugAppDomain2 o1, ICorDebugAppDomain2 o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugAppDomain2 casted = o as ICorDebugAppDomain2; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public ICorDebugType GetArrayOrPointerType(uint elementType, uint nRank, ICorDebugType pTypeArg) + { + ICorDebugType ppType; + Debugger.Interop.CorDebug.ICorDebugType out_ppType; + this.WrappedObject.GetArrayOrPointerType(elementType, nRank, pTypeArg.WrappedObject, out out_ppType); + ppType = ICorDebugType.Wrap(out_ppType); + return ppType; + } + + public ICorDebugType GetFunctionPointerType(uint nTypeArgs, ref ICorDebugType ppTypeArgs) + { + ICorDebugType ppType; + Debugger.Interop.CorDebug.ICorDebugType ref_ppTypeArgs = ppTypeArgs.WrappedObject; + Debugger.Interop.CorDebug.ICorDebugType out_ppType; + this.WrappedObject.GetFunctionPointerType(nTypeArgs, ref ref_ppTypeArgs, out out_ppType); + ppTypeArgs = ICorDebugType.Wrap(ref_ppTypeArgs); + ppType = ICorDebugType.Wrap(out_ppType); + return ppType; + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugAppDomainEnum.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugAppDomainEnum.cs new file mode 100644 index 000000000..e020fee0c --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugAppDomainEnum.cs @@ -0,0 +1,136 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugAppDomainEnum + { + + private Debugger.Interop.CorDebug.ICorDebugAppDomainEnum wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugAppDomainEnum WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugAppDomainEnum(Debugger.Interop.CorDebug.ICorDebugAppDomainEnum wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugAppDomainEnum)); + } + + public static ICorDebugAppDomainEnum Wrap(Debugger.Interop.CorDebug.ICorDebugAppDomainEnum objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugAppDomainEnum(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugAppDomainEnum() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugAppDomainEnum)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugAppDomainEnum o1, ICorDebugAppDomainEnum o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugAppDomainEnum o1, ICorDebugAppDomainEnum o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugAppDomainEnum casted = o as ICorDebugAppDomainEnum; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void Skip(uint celt) + { + this.WrappedObject.Skip(celt); + } + + public void Reset() + { + this.WrappedObject.Reset(); + } + + public ICorDebugEnum Clone() + { + ICorDebugEnum ppEnum; + Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum; + this.WrappedObject.Clone(out out_ppEnum); + ppEnum = ICorDebugEnum.Wrap(out_ppEnum); + return ppEnum; + } + + public uint Count + { + get + { + uint pcelt; + this.WrappedObject.GetCount(out pcelt); + return pcelt; + } + } + + public uint Next(uint celt, System.IntPtr values) + { + uint pceltFetched; + this.WrappedObject.Next(celt, values, out pceltFetched); + return pceltFetched; + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugArrayValue.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugArrayValue.cs new file mode 100644 index 000000000..ffd1d0dec --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugArrayValue.cs @@ -0,0 +1,223 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugArrayValue + { + + private Debugger.Interop.CorDebug.ICorDebugArrayValue wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugArrayValue WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugArrayValue(Debugger.Interop.CorDebug.ICorDebugArrayValue wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugArrayValue)); + } + + public static ICorDebugArrayValue Wrap(Debugger.Interop.CorDebug.ICorDebugArrayValue objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugArrayValue(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugArrayValue() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugArrayValue)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugArrayValue o1, ICorDebugArrayValue o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugArrayValue o1, ICorDebugArrayValue o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugArrayValue casted = o as ICorDebugArrayValue; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public uint Type + { + get + { + uint pType; + this.WrappedObject.GetType(out pType); + return pType; + } + } + + public uint Size + { + get + { + uint pSize; + this.WrappedObject.GetSize(out pSize); + return pSize; + } + } + + public ulong Address + { + get + { + ulong pAddress; + this.WrappedObject.GetAddress(out pAddress); + return pAddress; + } + } + + public ICorDebugValueBreakpoint CreateBreakpoint() + { + ICorDebugValueBreakpoint ppBreakpoint; + Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint; + this.WrappedObject.CreateBreakpoint(out out_ppBreakpoint); + ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint); + return ppBreakpoint; + } + + public int IsValid + { + get + { + int pbValid; + this.WrappedObject.IsValid(out pbValid); + return pbValid; + } + } + + public ICorDebugValueBreakpoint CreateRelocBreakpoint() + { + ICorDebugValueBreakpoint ppBreakpoint; + Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint; + this.WrappedObject.CreateRelocBreakpoint(out out_ppBreakpoint); + ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint); + return ppBreakpoint; + } + + public uint ElementType + { + get + { + uint pType; + this.WrappedObject.GetElementType(out pType); + return pType; + } + } + + public uint Rank + { + get + { + uint pnRank; + this.WrappedObject.GetRank(out pnRank); + return pnRank; + } + } + + public uint Count + { + get + { + uint pnCount; + this.WrappedObject.GetCount(out pnCount); + return pnCount; + } + } + + public void GetDimensions(uint cdim, System.IntPtr dims) + { + this.WrappedObject.GetDimensions(cdim, dims); + } + + public int HasBaseIndicies() + { + int pbHasBaseIndicies; + this.WrappedObject.HasBaseIndicies(out pbHasBaseIndicies); + return pbHasBaseIndicies; + } + + public void GetBaseIndicies(uint cdim, System.IntPtr indicies) + { + this.WrappedObject.GetBaseIndicies(cdim, indicies); + } + + public ICorDebugValue GetElement(uint cdim, System.IntPtr indices) + { + ICorDebugValue ppValue; + Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; + this.WrappedObject.GetElement(cdim, indices, out out_ppValue); + ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; + } + + public ICorDebugValue GetElementAtPosition(uint nPosition) + { + ICorDebugValue ppValue; + Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; + this.WrappedObject.GetElementAtPosition(nPosition, out out_ppValue); + ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugAssembly.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugAssembly.cs new file mode 100644 index 000000000..ff3abc0c9 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugAssembly.cs @@ -0,0 +1,143 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugAssembly + { + + private Debugger.Interop.CorDebug.ICorDebugAssembly wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugAssembly WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugAssembly(Debugger.Interop.CorDebug.ICorDebugAssembly wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugAssembly)); + } + + public static ICorDebugAssembly Wrap(Debugger.Interop.CorDebug.ICorDebugAssembly objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugAssembly(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugAssembly() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugAssembly)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugAssembly o1, ICorDebugAssembly o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugAssembly o1, ICorDebugAssembly o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugAssembly casted = o as ICorDebugAssembly; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public ICorDebugProcess Process + { + get + { + ICorDebugProcess ppProcess; + Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess; + this.WrappedObject.GetProcess(out out_ppProcess); + ppProcess = ICorDebugProcess.Wrap(out_ppProcess); + return ppProcess; + } + } + + public ICorDebugAppDomain AppDomain + { + get + { + ICorDebugAppDomain ppAppDomain; + Debugger.Interop.CorDebug.ICorDebugAppDomain out_ppAppDomain; + this.WrappedObject.GetAppDomain(out out_ppAppDomain); + ppAppDomain = ICorDebugAppDomain.Wrap(out_ppAppDomain); + return ppAppDomain; + } + } + + public ICorDebugModuleEnum EnumerateModules() + { + ICorDebugModuleEnum ppModules; + Debugger.Interop.CorDebug.ICorDebugModuleEnum out_ppModules; + this.WrappedObject.EnumerateModules(out out_ppModules); + ppModules = ICorDebugModuleEnum.Wrap(out_ppModules); + return ppModules; + } + + public void GetCodeBase(uint cchName, out uint pcchName, System.IntPtr szName) + { + this.WrappedObject.GetCodeBase(cchName, out pcchName, szName); + } + + public void GetName(uint cchName, out uint pcchName, System.IntPtr szName) + { + this.WrappedObject.GetName(cchName, out pcchName, szName); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugAssemblyEnum.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugAssemblyEnum.cs new file mode 100644 index 000000000..93173b0b3 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugAssemblyEnum.cs @@ -0,0 +1,136 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugAssemblyEnum + { + + private Debugger.Interop.CorDebug.ICorDebugAssemblyEnum wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugAssemblyEnum WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugAssemblyEnum(Debugger.Interop.CorDebug.ICorDebugAssemblyEnum wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugAssemblyEnum)); + } + + public static ICorDebugAssemblyEnum Wrap(Debugger.Interop.CorDebug.ICorDebugAssemblyEnum objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugAssemblyEnum(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugAssemblyEnum() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugAssemblyEnum)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugAssemblyEnum o1, ICorDebugAssemblyEnum o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugAssemblyEnum o1, ICorDebugAssemblyEnum o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugAssemblyEnum casted = o as ICorDebugAssemblyEnum; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void Skip(uint celt) + { + this.WrappedObject.Skip(celt); + } + + public void Reset() + { + this.WrappedObject.Reset(); + } + + public ICorDebugEnum Clone() + { + ICorDebugEnum ppEnum; + Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum; + this.WrappedObject.Clone(out out_ppEnum); + ppEnum = ICorDebugEnum.Wrap(out_ppEnum); + return ppEnum; + } + + public uint Count + { + get + { + uint pcelt; + this.WrappedObject.GetCount(out pcelt); + return pcelt; + } + } + + public uint Next(uint celt, System.IntPtr values) + { + uint pceltFetched; + this.WrappedObject.Next(celt, values, out pceltFetched); + return pceltFetched; + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugBoxValue.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugBoxValue.cs new file mode 100644 index 000000000..52ff69c3f --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugBoxValue.cs @@ -0,0 +1,170 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugBoxValue + { + + private Debugger.Interop.CorDebug.ICorDebugBoxValue wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugBoxValue WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugBoxValue(Debugger.Interop.CorDebug.ICorDebugBoxValue wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugBoxValue)); + } + + public static ICorDebugBoxValue Wrap(Debugger.Interop.CorDebug.ICorDebugBoxValue objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugBoxValue(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugBoxValue() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugBoxValue)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugBoxValue o1, ICorDebugBoxValue o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugBoxValue o1, ICorDebugBoxValue o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugBoxValue casted = o as ICorDebugBoxValue; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public uint Type + { + get + { + uint pType; + this.WrappedObject.GetType(out pType); + return pType; + } + } + + public uint Size + { + get + { + uint pSize; + this.WrappedObject.GetSize(out pSize); + return pSize; + } + } + + public ulong Address + { + get + { + ulong pAddress; + this.WrappedObject.GetAddress(out pAddress); + return pAddress; + } + } + + public ICorDebugValueBreakpoint CreateBreakpoint() + { + ICorDebugValueBreakpoint ppBreakpoint; + Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint; + this.WrappedObject.CreateBreakpoint(out out_ppBreakpoint); + ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint); + return ppBreakpoint; + } + + public int IsValid + { + get + { + int pbValid; + this.WrappedObject.IsValid(out pbValid); + return pbValid; + } + } + + public ICorDebugValueBreakpoint CreateRelocBreakpoint() + { + ICorDebugValueBreakpoint ppBreakpoint; + Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint; + this.WrappedObject.CreateRelocBreakpoint(out out_ppBreakpoint); + ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint); + return ppBreakpoint; + } + + public ICorDebugObjectValue Object + { + get + { + ICorDebugObjectValue ppObject; + Debugger.Interop.CorDebug.ICorDebugObjectValue out_ppObject; + this.WrappedObject.GetObject(out out_ppObject); + ppObject = ICorDebugObjectValue.Wrap(out_ppObject); + return ppObject; + } + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugBreakpoint.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugBreakpoint.cs new file mode 100644 index 000000000..53bda72cb --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugBreakpoint.cs @@ -0,0 +1,115 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugBreakpoint + { + + private Debugger.Interop.CorDebug.ICorDebugBreakpoint wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugBreakpoint WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugBreakpoint(Debugger.Interop.CorDebug.ICorDebugBreakpoint wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugBreakpoint)); + } + + public static ICorDebugBreakpoint Wrap(Debugger.Interop.CorDebug.ICorDebugBreakpoint objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugBreakpoint(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugBreakpoint() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugBreakpoint)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugBreakpoint o1, ICorDebugBreakpoint o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugBreakpoint o1, ICorDebugBreakpoint o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugBreakpoint casted = o as ICorDebugBreakpoint; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void Activate(int bActive) + { + this.WrappedObject.Activate(bActive); + } + + public int IsActive + { + get + { + int pbActive; + this.WrappedObject.IsActive(out pbActive); + return pbActive; + } + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugBreakpointEnum.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugBreakpointEnum.cs new file mode 100644 index 000000000..99eb11bcd --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugBreakpointEnum.cs @@ -0,0 +1,136 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugBreakpointEnum + { + + private Debugger.Interop.CorDebug.ICorDebugBreakpointEnum wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugBreakpointEnum WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugBreakpointEnum(Debugger.Interop.CorDebug.ICorDebugBreakpointEnum wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugBreakpointEnum)); + } + + public static ICorDebugBreakpointEnum Wrap(Debugger.Interop.CorDebug.ICorDebugBreakpointEnum objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugBreakpointEnum(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugBreakpointEnum() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugBreakpointEnum)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugBreakpointEnum o1, ICorDebugBreakpointEnum o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugBreakpointEnum o1, ICorDebugBreakpointEnum o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugBreakpointEnum casted = o as ICorDebugBreakpointEnum; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void Skip(uint celt) + { + this.WrappedObject.Skip(celt); + } + + public void Reset() + { + this.WrappedObject.Reset(); + } + + public ICorDebugEnum Clone() + { + ICorDebugEnum ppEnum; + Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum; + this.WrappedObject.Clone(out out_ppEnum); + ppEnum = ICorDebugEnum.Wrap(out_ppEnum); + return ppEnum; + } + + public uint Count + { + get + { + uint pcelt; + this.WrappedObject.GetCount(out pcelt); + return pcelt; + } + } + + public uint Next(uint celt, System.IntPtr breakpoints) + { + uint pceltFetched; + this.WrappedObject.Next(celt, breakpoints, out pceltFetched); + return pceltFetched; + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugChain.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugChain.cs new file mode 100644 index 000000000..2fbc96cb8 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugChain.cs @@ -0,0 +1,234 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugChain + { + + private Debugger.Interop.CorDebug.ICorDebugChain wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugChain WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugChain(Debugger.Interop.CorDebug.ICorDebugChain wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugChain)); + } + + public static ICorDebugChain Wrap(Debugger.Interop.CorDebug.ICorDebugChain objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugChain(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugChain() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugChain)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugChain o1, ICorDebugChain o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugChain o1, ICorDebugChain o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugChain casted = o as ICorDebugChain; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public ICorDebugThread Thread + { + get + { + ICorDebugThread ppThread; + Debugger.Interop.CorDebug.ICorDebugThread out_ppThread; + this.WrappedObject.GetThread(out out_ppThread); + ppThread = ICorDebugThread.Wrap(out_ppThread); + return ppThread; + } + } + + public ulong GetStackRange(out ulong pStart) + { + ulong pEnd; + this.WrappedObject.GetStackRange(out pStart, out pEnd); + return pEnd; + } + + public ICorDebugContext Context + { + get + { + ICorDebugContext ppContext; + Debugger.Interop.CorDebug.ICorDebugContext out_ppContext; + this.WrappedObject.GetContext(out out_ppContext); + ppContext = ICorDebugContext.Wrap(out_ppContext); + return ppContext; + } + } + + public ICorDebugChain Caller + { + get + { + ICorDebugChain ppChain; + Debugger.Interop.CorDebug.ICorDebugChain out_ppChain; + this.WrappedObject.GetCaller(out out_ppChain); + ppChain = ICorDebugChain.Wrap(out_ppChain); + return ppChain; + } + } + + public ICorDebugChain Callee + { + get + { + ICorDebugChain ppChain; + Debugger.Interop.CorDebug.ICorDebugChain out_ppChain; + this.WrappedObject.GetCallee(out out_ppChain); + ppChain = ICorDebugChain.Wrap(out_ppChain); + return ppChain; + } + } + + public ICorDebugChain Previous + { + get + { + ICorDebugChain ppChain; + Debugger.Interop.CorDebug.ICorDebugChain out_ppChain; + this.WrappedObject.GetPrevious(out out_ppChain); + ppChain = ICorDebugChain.Wrap(out_ppChain); + return ppChain; + } + } + + public ICorDebugChain Next + { + get + { + ICorDebugChain ppChain; + Debugger.Interop.CorDebug.ICorDebugChain out_ppChain; + this.WrappedObject.GetNext(out out_ppChain); + ppChain = ICorDebugChain.Wrap(out_ppChain); + return ppChain; + } + } + + public int IsManaged + { + get + { + int pManaged; + this.WrappedObject.IsManaged(out pManaged); + return pManaged; + } + } + + public ICorDebugFrameEnum EnumerateFrames() + { + ICorDebugFrameEnum ppFrames; + Debugger.Interop.CorDebug.ICorDebugFrameEnum out_ppFrames; + this.WrappedObject.EnumerateFrames(out out_ppFrames); + ppFrames = ICorDebugFrameEnum.Wrap(out_ppFrames); + return ppFrames; + } + + public ICorDebugFrame ActiveFrame + { + get + { + ICorDebugFrame ppFrame; + Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame; + this.WrappedObject.GetActiveFrame(out out_ppFrame); + ppFrame = ICorDebugFrame.Wrap(out_ppFrame); + return ppFrame; + } + } + + public ICorDebugRegisterSet RegisterSet + { + get + { + ICorDebugRegisterSet ppRegisters; + Debugger.Interop.CorDebug.ICorDebugRegisterSet out_ppRegisters; + this.WrappedObject.GetRegisterSet(out out_ppRegisters); + ppRegisters = ICorDebugRegisterSet.Wrap(out_ppRegisters); + return ppRegisters; + } + } + + public CorDebugChainReason Reason + { + get + { + CorDebugChainReason pReason; + Debugger.Interop.CorDebug.CorDebugChainReason out_pReason; + this.WrappedObject.GetReason(out out_pReason); + pReason = ((CorDebugChainReason)(out_pReason)); + return pReason; + } + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugChainEnum.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugChainEnum.cs new file mode 100644 index 000000000..d007cfcae --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugChainEnum.cs @@ -0,0 +1,154 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugChainEnum + { + + private Debugger.Interop.CorDebug.ICorDebugChainEnum wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugChainEnum WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugChainEnum(Debugger.Interop.CorDebug.ICorDebugChainEnum wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugChainEnum)); + } + + public static ICorDebugChainEnum Wrap(Debugger.Interop.CorDebug.ICorDebugChainEnum objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugChainEnum(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugChainEnum() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugChainEnum)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugChainEnum o1, ICorDebugChainEnum o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugChainEnum o1, ICorDebugChainEnum o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugChainEnum casted = o as ICorDebugChainEnum; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void Skip(uint celt) + { + this.WrappedObject.Skip(celt); + } + + public void Reset() + { + this.WrappedObject.Reset(); + } + + public ICorDebugEnum Clone() + { + ICorDebugEnum ppEnum; + Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum; + this.WrappedObject.Clone(out out_ppEnum); + ppEnum = ICorDebugEnum.Wrap(out_ppEnum); + return ppEnum; + } + + public uint Count + { + get + { + uint pcelt; + this.WrappedObject.GetCount(out pcelt); + return pcelt; + } + } + + public uint Next(uint celt, ICorDebugChain[] chains) + { + uint pceltFetched; + Debugger.Interop.CorDebug.ICorDebugChain[] array_chains = new Debugger.Interop.CorDebug.ICorDebugChain[chains.Length]; + for (int i = 0; (i < chains.Length); i = (i + 1)) + { + if ((chains[i] != null)) + { + array_chains[i] = chains[i].WrappedObject; + } + } + this.WrappedObject.Next(celt, array_chains, out pceltFetched); + for (int i = 0; (i < chains.Length); i = (i + 1)) + { + if ((array_chains[i] != null)) + { + chains[i] = ICorDebugChain.Wrap(array_chains[i]); + } else + { + chains[i] = null; + } + } + return pceltFetched; + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugClass.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugClass.cs new file mode 100644 index 000000000..ebe4be166 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugClass.cs @@ -0,0 +1,131 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugClass + { + + private Debugger.Interop.CorDebug.ICorDebugClass wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugClass WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugClass(Debugger.Interop.CorDebug.ICorDebugClass wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugClass)); + } + + public static ICorDebugClass Wrap(Debugger.Interop.CorDebug.ICorDebugClass objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugClass(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugClass() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugClass)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugClass o1, ICorDebugClass o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugClass o1, ICorDebugClass o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugClass casted = o as ICorDebugClass; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public ICorDebugModule Module + { + get + { + ICorDebugModule pModule; + Debugger.Interop.CorDebug.ICorDebugModule out_pModule; + this.WrappedObject.GetModule(out out_pModule); + pModule = ICorDebugModule.Wrap(out_pModule); + return pModule; + } + } + + public uint Token + { + get + { + uint pTypeDef; + this.WrappedObject.GetToken(out pTypeDef); + return pTypeDef; + } + } + + public ICorDebugValue GetStaticFieldValue(uint fieldDef, ICorDebugFrame pFrame) + { + ICorDebugValue ppValue; + Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; + this.WrappedObject.GetStaticFieldValue(fieldDef, pFrame.WrappedObject, out out_ppValue); + ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugClass2.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugClass2.cs new file mode 100644 index 000000000..43864ecdb --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugClass2.cs @@ -0,0 +1,132 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugClass2 + { + + private Debugger.Interop.CorDebug.ICorDebugClass2 wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugClass2 WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugClass2(Debugger.Interop.CorDebug.ICorDebugClass2 wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugClass2)); + } + + public static ICorDebugClass2 Wrap(Debugger.Interop.CorDebug.ICorDebugClass2 objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugClass2(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugClass2() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugClass2)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugClass2 o1, ICorDebugClass2 o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugClass2 o1, ICorDebugClass2 o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugClass2 casted = o as ICorDebugClass2; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public ICorDebugType GetParameterizedType(uint elementType, uint nTypeArgs, ICorDebugType[] ppTypeArgs) + { + ICorDebugType ppType; + Debugger.Interop.CorDebug.ICorDebugType[] array_ppTypeArgs = new Debugger.Interop.CorDebug.ICorDebugType[ppTypeArgs.Length]; + for (int i = 0; (i < ppTypeArgs.Length); i = (i + 1)) + { + if ((ppTypeArgs[i] != null)) + { + array_ppTypeArgs[i] = ppTypeArgs[i].WrappedObject; + } + } + Debugger.Interop.CorDebug.ICorDebugType out_ppType; + this.WrappedObject.GetParameterizedType(elementType, nTypeArgs, array_ppTypeArgs, out out_ppType); + for (int i = 0; (i < ppTypeArgs.Length); i = (i + 1)) + { + if ((array_ppTypeArgs[i] != null)) + { + ppTypeArgs[i] = ICorDebugType.Wrap(array_ppTypeArgs[i]); + } else + { + ppTypeArgs[i] = null; + } + } + ppType = ICorDebugType.Wrap(out_ppType); + return ppType; + } + + public void SetJMCStatus(int bIsJustMyCode) + { + this.WrappedObject.SetJMCStatus(bIsJustMyCode); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugCode.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugCode.cs new file mode 100644 index 000000000..2790a4133 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugCode.cs @@ -0,0 +1,178 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugCode + { + + private Debugger.Interop.CorDebug.ICorDebugCode wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugCode WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugCode(Debugger.Interop.CorDebug.ICorDebugCode wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugCode)); + } + + public static ICorDebugCode Wrap(Debugger.Interop.CorDebug.ICorDebugCode objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugCode(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugCode() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugCode)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugCode o1, ICorDebugCode o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugCode o1, ICorDebugCode o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugCode casted = o as ICorDebugCode; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public int IsIL + { + get + { + int pbIL; + this.WrappedObject.IsIL(out pbIL); + return pbIL; + } + } + + public ICorDebugFunction Function + { + get + { + ICorDebugFunction ppFunction; + Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction; + this.WrappedObject.GetFunction(out out_ppFunction); + ppFunction = ICorDebugFunction.Wrap(out_ppFunction); + return ppFunction; + } + } + + public ulong Address + { + get + { + ulong pStart; + this.WrappedObject.GetAddress(out pStart); + return pStart; + } + } + + public uint Size + { + get + { + uint pcBytes; + this.WrappedObject.GetSize(out pcBytes); + return pcBytes; + } + } + + public ICorDebugFunctionBreakpoint CreateBreakpoint(uint offset) + { + ICorDebugFunctionBreakpoint ppBreakpoint; + Debugger.Interop.CorDebug.ICorDebugFunctionBreakpoint out_ppBreakpoint; + this.WrappedObject.CreateBreakpoint(offset, out out_ppBreakpoint); + ppBreakpoint = ICorDebugFunctionBreakpoint.Wrap(out_ppBreakpoint); + return ppBreakpoint; + } + + public uint GetCode(uint startOffset, uint endOffset, uint cBufferAlloc, System.IntPtr buffer) + { + uint pcBufferSize; + this.WrappedObject.GetCode(startOffset, endOffset, cBufferAlloc, buffer, out pcBufferSize); + return pcBufferSize; + } + + public uint VersionNumber + { + get + { + uint nVersion; + this.WrappedObject.GetVersionNumber(out nVersion); + return nVersion; + } + } + + public void GetILToNativeMapping(uint cMap, out uint pcMap, System.IntPtr map) + { + this.WrappedObject.GetILToNativeMapping(cMap, out pcMap, map); + } + + public void GetEnCRemapSequencePoints(uint cMap, out uint pcMap, System.IntPtr offsets) + { + this.WrappedObject.GetEnCRemapSequencePoints(cMap, out pcMap, offsets); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugCodeEnum.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugCodeEnum.cs new file mode 100644 index 000000000..73a560513 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugCodeEnum.cs @@ -0,0 +1,136 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugCodeEnum + { + + private Debugger.Interop.CorDebug.ICorDebugCodeEnum wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugCodeEnum WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugCodeEnum(Debugger.Interop.CorDebug.ICorDebugCodeEnum wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugCodeEnum)); + } + + public static ICorDebugCodeEnum Wrap(Debugger.Interop.CorDebug.ICorDebugCodeEnum objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugCodeEnum(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugCodeEnum() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugCodeEnum)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugCodeEnum o1, ICorDebugCodeEnum o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugCodeEnum o1, ICorDebugCodeEnum o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugCodeEnum casted = o as ICorDebugCodeEnum; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void Skip(uint celt) + { + this.WrappedObject.Skip(celt); + } + + public void Reset() + { + this.WrappedObject.Reset(); + } + + public ICorDebugEnum Clone() + { + ICorDebugEnum ppEnum; + Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum; + this.WrappedObject.Clone(out out_ppEnum); + ppEnum = ICorDebugEnum.Wrap(out_ppEnum); + return ppEnum; + } + + public uint Count + { + get + { + uint pcelt; + this.WrappedObject.GetCount(out pcelt); + return pcelt; + } + } + + public uint Next(uint celt, System.IntPtr values) + { + uint pceltFetched; + this.WrappedObject.Next(celt, values, out pceltFetched); + return pceltFetched; + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugContext.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugContext.cs new file mode 100644 index 000000000..8420b5fbf --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugContext.cs @@ -0,0 +1,206 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugContext + { + + private Debugger.Interop.CorDebug.ICorDebugContext wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugContext WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugContext(Debugger.Interop.CorDebug.ICorDebugContext wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugContext)); + } + + public static ICorDebugContext Wrap(Debugger.Interop.CorDebug.ICorDebugContext objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugContext(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugContext() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugContext)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugContext o1, ICorDebugContext o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugContext o1, ICorDebugContext o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugContext casted = o as ICorDebugContext; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public uint Type + { + get + { + uint pType; + this.WrappedObject.GetType(out pType); + return pType; + } + } + + public uint Size + { + get + { + uint pSize; + this.WrappedObject.GetSize(out pSize); + return pSize; + } + } + + public ulong Address + { + get + { + ulong pAddress; + this.WrappedObject.GetAddress(out pAddress); + return pAddress; + } + } + + public ICorDebugValueBreakpoint CreateBreakpoint() + { + ICorDebugValueBreakpoint ppBreakpoint; + Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint; + this.WrappedObject.CreateBreakpoint(out out_ppBreakpoint); + ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint); + return ppBreakpoint; + } + + public ICorDebugClass Class + { + get + { + ICorDebugClass ppClass; + Debugger.Interop.CorDebug.ICorDebugClass out_ppClass; + this.WrappedObject.GetClass(out out_ppClass); + ppClass = ICorDebugClass.Wrap(out_ppClass); + return ppClass; + } + } + + public ICorDebugValue GetFieldValue(ICorDebugClass pClass, uint fieldDef) + { + ICorDebugValue ppValue; + Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; + this.WrappedObject.GetFieldValue(pClass.WrappedObject, fieldDef, out out_ppValue); + ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; + } + + public ICorDebugFunction GetVirtualMethod(uint memberRef) + { + ICorDebugFunction ppFunction; + Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction; + this.WrappedObject.GetVirtualMethod(memberRef, out out_ppFunction); + ppFunction = ICorDebugFunction.Wrap(out_ppFunction); + return ppFunction; + } + + public ICorDebugContext Context + { + get + { + ICorDebugContext ppContext; + Debugger.Interop.CorDebug.ICorDebugContext out_ppContext; + this.WrappedObject.GetContext(out out_ppContext); + ppContext = ICorDebugContext.Wrap(out_ppContext); + return ppContext; + } + } + + public int IsValueClass + { + get + { + int pbIsValueClass; + this.WrappedObject.IsValueClass(out pbIsValueClass); + return pbIsValueClass; + } + } + + public object ManagedCopy + { + get + { + object ppObject; + this.WrappedObject.GetManagedCopy(out ppObject); + return ppObject; + } + } + + public void SetFromManagedCopy(object pObject) + { + this.WrappedObject.SetFromManagedCopy(pObject); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugController.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugController.cs new file mode 100644 index 000000000..d067b7e99 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugController.cs @@ -0,0 +1,173 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugController + { + + private Debugger.Interop.CorDebug.ICorDebugController wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugController WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugController(Debugger.Interop.CorDebug.ICorDebugController wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugController)); + } + + public static ICorDebugController Wrap(Debugger.Interop.CorDebug.ICorDebugController objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugController(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugController() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugController)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugController o1, ICorDebugController o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugController o1, ICorDebugController o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugController casted = o as ICorDebugController; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void Stop(uint dwTimeoutIgnored) + { + this.WrappedObject.Stop(dwTimeoutIgnored); + } + + public void Continue(int fIsOutOfBand) + { + this.WrappedObject.Continue(fIsOutOfBand); + } + + public int IsRunning + { + get + { + int pbRunning; + this.WrappedObject.IsRunning(out pbRunning); + return pbRunning; + } + } + + public int HasQueuedCallbacks(ICorDebugThread pThread) + { + int pbQueued; + this.WrappedObject.HasQueuedCallbacks(pThread.WrappedObject, out pbQueued); + return pbQueued; + } + + public ICorDebugThreadEnum EnumerateThreads() + { + ICorDebugThreadEnum ppThreads; + Debugger.Interop.CorDebug.ICorDebugThreadEnum out_ppThreads; + this.WrappedObject.EnumerateThreads(out out_ppThreads); + ppThreads = ICorDebugThreadEnum.Wrap(out_ppThreads); + return ppThreads; + } + + public void SetAllThreadsDebugState(CorDebugThreadState state, ICorDebugThread pExceptThisThread) + { + this.WrappedObject.SetAllThreadsDebugState(((Debugger.Interop.CorDebug.CorDebugThreadState)(state)), pExceptThisThread.WrappedObject); + } + + public void Detach() + { + this.WrappedObject.Detach(); + } + + public void Terminate(uint exitCode) + { + this.WrappedObject.Terminate(exitCode); + } + + public ICorDebugErrorInfoEnum CanCommitChanges(uint cSnapshots, ref ICorDebugEditAndContinueSnapshot pSnapshots) + { + ICorDebugErrorInfoEnum pError; + Debugger.Interop.CorDebug.ICorDebugEditAndContinueSnapshot ref_pSnapshots = pSnapshots.WrappedObject; + Debugger.Interop.CorDebug.ICorDebugErrorInfoEnum out_pError; + this.WrappedObject.CanCommitChanges(cSnapshots, ref ref_pSnapshots, out out_pError); + pSnapshots = ICorDebugEditAndContinueSnapshot.Wrap(ref_pSnapshots); + pError = ICorDebugErrorInfoEnum.Wrap(out_pError); + return pError; + } + + public ICorDebugErrorInfoEnum CommitChanges(uint cSnapshots, ref ICorDebugEditAndContinueSnapshot pSnapshots) + { + ICorDebugErrorInfoEnum pError; + Debugger.Interop.CorDebug.ICorDebugEditAndContinueSnapshot ref_pSnapshots = pSnapshots.WrappedObject; + Debugger.Interop.CorDebug.ICorDebugErrorInfoEnum out_pError; + this.WrappedObject.CommitChanges(cSnapshots, ref ref_pSnapshots, out out_pError); + pSnapshots = ICorDebugEditAndContinueSnapshot.Wrap(ref_pSnapshots); + pError = ICorDebugErrorInfoEnum.Wrap(out_pError); + return pError; + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugEditAndContinueSnapshot.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugEditAndContinueSnapshot.cs new file mode 100644 index 000000000..094162d73 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugEditAndContinueSnapshot.cs @@ -0,0 +1,152 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugEditAndContinueSnapshot + { + + private Debugger.Interop.CorDebug.ICorDebugEditAndContinueSnapshot wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugEditAndContinueSnapshot WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugEditAndContinueSnapshot(Debugger.Interop.CorDebug.ICorDebugEditAndContinueSnapshot wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugEditAndContinueSnapshot)); + } + + public static ICorDebugEditAndContinueSnapshot Wrap(Debugger.Interop.CorDebug.ICorDebugEditAndContinueSnapshot objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugEditAndContinueSnapshot(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugEditAndContinueSnapshot() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugEditAndContinueSnapshot)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugEditAndContinueSnapshot o1, ICorDebugEditAndContinueSnapshot o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugEditAndContinueSnapshot o1, ICorDebugEditAndContinueSnapshot o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugEditAndContinueSnapshot casted = o as ICorDebugEditAndContinueSnapshot; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public System.Guid CopyMetaData(IStream pIStream) + { + System.Guid pMvid; + this.WrappedObject.CopyMetaData(pIStream.WrappedObject, out pMvid); + return pMvid; + } + + public System.Guid Mvid + { + get + { + System.Guid pMvid; + this.WrappedObject.GetMvid(out pMvid); + return pMvid; + } + } + + public uint RoDataRVA + { + get + { + uint pRoDataRVA; + this.WrappedObject.GetRoDataRVA(out pRoDataRVA); + return pRoDataRVA; + } + } + + public uint RwDataRVA + { + get + { + uint pRwDataRVA; + this.WrappedObject.GetRwDataRVA(out pRwDataRVA); + return pRwDataRVA; + } + } + + public void SetPEBytes(IStream pIStream) + { + this.WrappedObject.SetPEBytes(pIStream.WrappedObject); + } + + public void SetILMap(uint mdFunction, uint cMapSize, ref Debugger.Interop.CorDebug._COR_IL_MAP map) + { + this.WrappedObject.SetILMap(mdFunction, cMapSize, ref map); + } + + public void SetPESymbolBytes(IStream pIStream) + { + this.WrappedObject.SetPESymbolBytes(pIStream.WrappedObject); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugEnum.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugEnum.cs new file mode 100644 index 000000000..19b58b58a --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugEnum.cs @@ -0,0 +1,129 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugEnum + { + + private Debugger.Interop.CorDebug.ICorDebugEnum wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugEnum WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugEnum(Debugger.Interop.CorDebug.ICorDebugEnum wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugEnum)); + } + + public static ICorDebugEnum Wrap(Debugger.Interop.CorDebug.ICorDebugEnum objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugEnum(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugEnum() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugEnum)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugEnum o1, ICorDebugEnum o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugEnum o1, ICorDebugEnum o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugEnum casted = o as ICorDebugEnum; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void Skip(uint celt) + { + this.WrappedObject.Skip(celt); + } + + public void Reset() + { + this.WrappedObject.Reset(); + } + + public ICorDebugEnum Clone() + { + ICorDebugEnum ppEnum; + Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum; + this.WrappedObject.Clone(out out_ppEnum); + ppEnum = ICorDebugEnum.Wrap(out_ppEnum); + return ppEnum; + } + + public uint Count + { + get + { + uint pcelt; + this.WrappedObject.GetCount(out pcelt); + return pcelt; + } + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugErrorInfoEnum.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugErrorInfoEnum.cs new file mode 100644 index 000000000..5260b9009 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugErrorInfoEnum.cs @@ -0,0 +1,136 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugErrorInfoEnum + { + + private Debugger.Interop.CorDebug.ICorDebugErrorInfoEnum wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugErrorInfoEnum WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugErrorInfoEnum(Debugger.Interop.CorDebug.ICorDebugErrorInfoEnum wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugErrorInfoEnum)); + } + + public static ICorDebugErrorInfoEnum Wrap(Debugger.Interop.CorDebug.ICorDebugErrorInfoEnum objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugErrorInfoEnum(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugErrorInfoEnum() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugErrorInfoEnum)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugErrorInfoEnum o1, ICorDebugErrorInfoEnum o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugErrorInfoEnum o1, ICorDebugErrorInfoEnum o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugErrorInfoEnum casted = o as ICorDebugErrorInfoEnum; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void Skip(uint celt) + { + this.WrappedObject.Skip(celt); + } + + public void Reset() + { + this.WrappedObject.Reset(); + } + + public ICorDebugEnum Clone() + { + ICorDebugEnum ppEnum; + Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum; + this.WrappedObject.Clone(out out_ppEnum); + ppEnum = ICorDebugEnum.Wrap(out_ppEnum); + return ppEnum; + } + + public uint Count + { + get + { + uint pcelt; + this.WrappedObject.GetCount(out pcelt); + return pcelt; + } + } + + public uint Next(uint celt, System.IntPtr errors) + { + uint pceltFetched; + this.WrappedObject.Next(celt, errors, out pceltFetched); + return pceltFetched; + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugEval.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugEval.cs new file mode 100644 index 000000000..8bf5a5f2b --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugEval.cs @@ -0,0 +1,193 @@ +// +// +// +// +// $Revision: 2928 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugEval + { + + private Debugger.Interop.CorDebug.ICorDebugEval wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugEval WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugEval(Debugger.Interop.CorDebug.ICorDebugEval wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugEval)); + } + + public static ICorDebugEval Wrap(Debugger.Interop.CorDebug.ICorDebugEval objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugEval(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugEval() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugEval)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugEval o1, ICorDebugEval o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugEval o1, ICorDebugEval o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugEval casted = o as ICorDebugEval; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void CallFunction(ICorDebugFunction pFunction, uint nArgs, ICorDebugValue[] ppArgs) + { + Debugger.Interop.CorDebug.ICorDebugValue[] array_ppArgs = new Debugger.Interop.CorDebug.ICorDebugValue[ppArgs.Length]; + for (int i = 0; (i < ppArgs.Length); i = (i + 1)) + { + if ((ppArgs[i] != null)) + { + array_ppArgs[i] = ppArgs[i].WrappedObject; + } + } + this.WrappedObject.CallFunction(pFunction.WrappedObject, nArgs, array_ppArgs); + for (int i = 0; (i < ppArgs.Length); i = (i + 1)) + { + if ((array_ppArgs[i] != null)) + { + ppArgs[i] = ICorDebugValue.Wrap(array_ppArgs[i]); + } else + { + ppArgs[i] = null; + } + } + } + + public void NewObject(ICorDebugFunction pConstructor, uint nArgs, ref ICorDebugValue ppArgs) + { + Debugger.Interop.CorDebug.ICorDebugValue ref_ppArgs = ppArgs.WrappedObject; + this.WrappedObject.NewObject(pConstructor.WrappedObject, nArgs, ref ref_ppArgs); + ppArgs = ICorDebugValue.Wrap(ref_ppArgs); + } + + public void NewObjectNoConstructor(ICorDebugClass pClass) + { + this.WrappedObject.NewObjectNoConstructor(pClass.WrappedObject); + } + + public void NewString(string @string) + { + this.WrappedObject.NewString(@string); + } + + public void NewArray(uint elementType, ICorDebugClass pElementClass, uint rank, ref uint dims, ref uint lowBounds) + { + this.WrappedObject.NewArray(elementType, pElementClass.WrappedObject, rank, ref dims, ref lowBounds); + } + + public int IsActive + { + get + { + int pbActive; + this.WrappedObject.IsActive(out pbActive); + return pbActive; + } + } + + public void Abort() + { + this.WrappedObject.Abort(); + } + + public ICorDebugValue Result + { + get + { + ICorDebugValue ppResult; + Debugger.Interop.CorDebug.ICorDebugValue out_ppResult; + this.WrappedObject.GetResult(out out_ppResult); + ppResult = ICorDebugValue.Wrap(out_ppResult); + return ppResult; + } + } + + public ICorDebugThread Thread + { + get + { + ICorDebugThread ppThread; + Debugger.Interop.CorDebug.ICorDebugThread out_ppThread; + this.WrappedObject.GetThread(out out_ppThread); + ppThread = ICorDebugThread.Wrap(out_ppThread); + return ppThread; + } + } + + public ICorDebugValue CreateValue(uint elementType, ICorDebugClass pElementClass) + { + ICorDebugValue ppValue; + Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; + this.WrappedObject.CreateValue(elementType, pElementClass == null ? null : pElementClass.WrappedObject, out out_ppValue); + ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugEval2.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugEval2.cs new file mode 100644 index 000000000..1522e12bd --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugEval2.cs @@ -0,0 +1,229 @@ +// +// +// +// +// $Revision: 2868 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugEval2 + { + + private Debugger.Interop.CorDebug.ICorDebugEval2 wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugEval2 WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugEval2(Debugger.Interop.CorDebug.ICorDebugEval2 wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugEval2)); + } + + public static ICorDebugEval2 Wrap(Debugger.Interop.CorDebug.ICorDebugEval2 objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugEval2(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugEval2() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugEval2)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugEval2 o1, ICorDebugEval2 o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugEval2 o1, ICorDebugEval2 o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugEval2 casted = o as ICorDebugEval2; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void CallParameterizedFunction(ICorDebugFunction pFunction, uint nTypeArgs, ICorDebugType[] ppTypeArgs, uint nArgs, ICorDebugValue[] ppArgs) + { + Debugger.Interop.CorDebug.ICorDebugType[] array_ppTypeArgs = new Debugger.Interop.CorDebug.ICorDebugType[ppTypeArgs.Length]; + for (int i = 0; (i < ppTypeArgs.Length); i = (i + 1)) + { + if ((ppTypeArgs[i] != null)) + { + array_ppTypeArgs[i] = ppTypeArgs[i].WrappedObject; + } + } + Debugger.Interop.CorDebug.ICorDebugValue[] array_ppArgs = new Debugger.Interop.CorDebug.ICorDebugValue[ppArgs.Length]; + for (int i = 0; (i < ppArgs.Length); i = (i + 1)) + { + if ((ppArgs[i] != null)) + { + array_ppArgs[i] = ppArgs[i].WrappedObject; + } + } + this.WrappedObject.CallParameterizedFunction(pFunction.WrappedObject, nTypeArgs, array_ppTypeArgs, nArgs, array_ppArgs); + for (int i = 0; (i < ppTypeArgs.Length); i = (i + 1)) + { + if ((array_ppTypeArgs[i] != null)) + { + ppTypeArgs[i] = ICorDebugType.Wrap(array_ppTypeArgs[i]); + } else + { + ppTypeArgs[i] = null; + } + } + for (int i = 0; (i < ppArgs.Length); i = (i + 1)) + { + if ((array_ppArgs[i] != null)) + { + ppArgs[i] = ICorDebugValue.Wrap(array_ppArgs[i]); + } else + { + ppArgs[i] = null; + } + } + } + + public ICorDebugValue CreateValueForType(ICorDebugType pType) + { + ICorDebugValue ppValue; + Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; + this.WrappedObject.CreateValueForType(pType.WrappedObject, out out_ppValue); + ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; + } + + public void NewParameterizedObject(ICorDebugFunction pConstructor, uint nTypeArgs, ICorDebugType[] ppTypeArgs, uint nArgs, ICorDebugValue[] ppArgs) + { + Debugger.Interop.CorDebug.ICorDebugType[] array_ppTypeArgs = new Debugger.Interop.CorDebug.ICorDebugType[ppTypeArgs.Length]; + for (int i = 0; (i < ppTypeArgs.Length); i = (i + 1)) + { + if ((ppTypeArgs[i] != null)) + { + array_ppTypeArgs[i] = ppTypeArgs[i].WrappedObject; + } + } + Debugger.Interop.CorDebug.ICorDebugValue[] array_ppArgs = new Debugger.Interop.CorDebug.ICorDebugValue[ppArgs.Length]; + for (int i = 0; (i < ppArgs.Length); i = (i + 1)) + { + if ((ppArgs[i] != null)) + { + array_ppArgs[i] = ppArgs[i].WrappedObject; + } + } + this.WrappedObject.NewParameterizedObject(pConstructor.WrappedObject, nTypeArgs, array_ppTypeArgs, nArgs, array_ppArgs); + for (int i = 0; (i < ppTypeArgs.Length); i = (i + 1)) + { + if ((array_ppTypeArgs[i] != null)) + { + ppTypeArgs[i] = ICorDebugType.Wrap(array_ppTypeArgs[i]); + } else + { + ppTypeArgs[i] = null; + } + } + for (int i = 0; (i < ppArgs.Length); i = (i + 1)) + { + if ((array_ppArgs[i] != null)) + { + ppArgs[i] = ICorDebugValue.Wrap(array_ppArgs[i]); + } else + { + ppArgs[i] = null; + } + } + } + + public void NewParameterizedObjectNoConstructor(ICorDebugClass pClass, uint nTypeArgs, ICorDebugType[] ppTypeArgs) + { + Debugger.Interop.CorDebug.ICorDebugType[] array_ppTypeArgs = new Debugger.Interop.CorDebug.ICorDebugType[ppTypeArgs.Length]; + for (int i = 0; (i < ppTypeArgs.Length); i = (i + 1)) + { + if ((ppTypeArgs[i] != null)) + { + array_ppTypeArgs[i] = ppTypeArgs[i].WrappedObject; + } + } + this.WrappedObject.NewParameterizedObjectNoConstructor(pClass.WrappedObject, nTypeArgs, array_ppTypeArgs); + for (int i = 0; (i < ppTypeArgs.Length); i = (i + 1)) + { + if ((array_ppTypeArgs[i] != null)) + { + ppTypeArgs[i] = ICorDebugType.Wrap(array_ppTypeArgs[i]); + } else + { + ppTypeArgs[i] = null; + } + } + } + + public void NewParameterizedArray(ICorDebugType pElementType, uint rank, ref uint dims, ref uint lowBounds) + { + this.WrappedObject.NewParameterizedArray(pElementType.WrappedObject, rank, ref dims, ref lowBounds); + } + + public void NewStringWithLength(string @string, uint uiLength) + { + this.WrappedObject.NewStringWithLength(@string, uiLength); + } + + public void RudeAbort() + { + this.WrappedObject.RudeAbort(); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugFrame.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugFrame.cs new file mode 100644 index 000000000..e152ce792 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugFrame.cs @@ -0,0 +1,186 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugFrame + { + + private Debugger.Interop.CorDebug.ICorDebugFrame wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugFrame WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugFrame(Debugger.Interop.CorDebug.ICorDebugFrame wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugFrame)); + } + + public static ICorDebugFrame Wrap(Debugger.Interop.CorDebug.ICorDebugFrame objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugFrame(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugFrame() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugFrame)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugFrame o1, ICorDebugFrame o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugFrame o1, ICorDebugFrame o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugFrame casted = o as ICorDebugFrame; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public ICorDebugChain Chain + { + get + { + ICorDebugChain ppChain; + Debugger.Interop.CorDebug.ICorDebugChain out_ppChain; + this.WrappedObject.GetChain(out out_ppChain); + ppChain = ICorDebugChain.Wrap(out_ppChain); + return ppChain; + } + } + + public ICorDebugCode Code + { + get + { + ICorDebugCode ppCode; + Debugger.Interop.CorDebug.ICorDebugCode out_ppCode; + this.WrappedObject.GetCode(out out_ppCode); + ppCode = ICorDebugCode.Wrap(out_ppCode); + return ppCode; + } + } + + public ICorDebugFunction Function + { + get + { + ICorDebugFunction ppFunction; + Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction; + this.WrappedObject.GetFunction(out out_ppFunction); + ppFunction = ICorDebugFunction.Wrap(out_ppFunction); + return ppFunction; + } + } + + public uint FunctionToken + { + get + { + uint pToken; + this.WrappedObject.GetFunctionToken(out pToken); + return pToken; + } + } + + public ulong GetStackRange(out ulong pStart) + { + ulong pEnd; + this.WrappedObject.GetStackRange(out pStart, out pEnd); + return pEnd; + } + + public ICorDebugFrame Caller + { + get + { + ICorDebugFrame ppFrame; + Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame; + this.WrappedObject.GetCaller(out out_ppFrame); + ppFrame = ICorDebugFrame.Wrap(out_ppFrame); + return ppFrame; + } + } + + public ICorDebugFrame Callee + { + get + { + ICorDebugFrame ppFrame; + Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame; + this.WrappedObject.GetCallee(out out_ppFrame); + ppFrame = ICorDebugFrame.Wrap(out_ppFrame); + return ppFrame; + } + } + + public ICorDebugStepper CreateStepper() + { + ICorDebugStepper ppStepper; + Debugger.Interop.CorDebug.ICorDebugStepper out_ppStepper; + this.WrappedObject.CreateStepper(out out_ppStepper); + ppStepper = ICorDebugStepper.Wrap(out_ppStepper); + return ppStepper; + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugFrameEnum.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugFrameEnum.cs new file mode 100644 index 000000000..7567080ff --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugFrameEnum.cs @@ -0,0 +1,154 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugFrameEnum + { + + private Debugger.Interop.CorDebug.ICorDebugFrameEnum wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugFrameEnum WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugFrameEnum(Debugger.Interop.CorDebug.ICorDebugFrameEnum wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugFrameEnum)); + } + + public static ICorDebugFrameEnum Wrap(Debugger.Interop.CorDebug.ICorDebugFrameEnum objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugFrameEnum(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugFrameEnum() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugFrameEnum)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugFrameEnum o1, ICorDebugFrameEnum o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugFrameEnum o1, ICorDebugFrameEnum o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugFrameEnum casted = o as ICorDebugFrameEnum; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void Skip(uint celt) + { + this.WrappedObject.Skip(celt); + } + + public void Reset() + { + this.WrappedObject.Reset(); + } + + public ICorDebugEnum Clone() + { + ICorDebugEnum ppEnum; + Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum; + this.WrappedObject.Clone(out out_ppEnum); + ppEnum = ICorDebugEnum.Wrap(out_ppEnum); + return ppEnum; + } + + public uint Count + { + get + { + uint pcelt; + this.WrappedObject.GetCount(out pcelt); + return pcelt; + } + } + + public uint Next(uint celt, ICorDebugFrame[] frames) + { + uint pceltFetched; + Debugger.Interop.CorDebug.ICorDebugFrame[] array_frames = new Debugger.Interop.CorDebug.ICorDebugFrame[frames.Length]; + for (int i = 0; (i < frames.Length); i = (i + 1)) + { + if ((frames[i] != null)) + { + array_frames[i] = frames[i].WrappedObject; + } + } + this.WrappedObject.Next(celt, array_frames, out pceltFetched); + for (int i = 0; (i < frames.Length); i = (i + 1)) + { + if ((array_frames[i] != null)) + { + frames[i] = ICorDebugFrame.Wrap(array_frames[i]); + } else + { + frames[i] = null; + } + } + return pceltFetched; + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugFunction.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugFunction.cs new file mode 100644 index 000000000..3f98d4813 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugFunction.cs @@ -0,0 +1,187 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugFunction + { + + private Debugger.Interop.CorDebug.ICorDebugFunction wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugFunction WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugFunction(Debugger.Interop.CorDebug.ICorDebugFunction wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugFunction)); + } + + public static ICorDebugFunction Wrap(Debugger.Interop.CorDebug.ICorDebugFunction objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugFunction(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugFunction() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugFunction)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugFunction o1, ICorDebugFunction o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugFunction o1, ICorDebugFunction o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugFunction casted = o as ICorDebugFunction; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public ICorDebugModule Module + { + get + { + ICorDebugModule ppModule; + Debugger.Interop.CorDebug.ICorDebugModule out_ppModule; + this.WrappedObject.GetModule(out out_ppModule); + ppModule = ICorDebugModule.Wrap(out_ppModule); + return ppModule; + } + } + + public ICorDebugClass Class + { + get + { + ICorDebugClass ppClass; + Debugger.Interop.CorDebug.ICorDebugClass out_ppClass; + this.WrappedObject.GetClass(out out_ppClass); + ppClass = ICorDebugClass.Wrap(out_ppClass); + return ppClass; + } + } + + public uint Token + { + get + { + uint pMethodDef; + this.WrappedObject.GetToken(out pMethodDef); + return pMethodDef; + } + } + + public ICorDebugCode ILCode + { + get + { + ICorDebugCode ppCode; + Debugger.Interop.CorDebug.ICorDebugCode out_ppCode; + this.WrappedObject.GetILCode(out out_ppCode); + ppCode = ICorDebugCode.Wrap(out_ppCode); + return ppCode; + } + } + + public ICorDebugCode NativeCode + { + get + { + ICorDebugCode ppCode; + Debugger.Interop.CorDebug.ICorDebugCode out_ppCode; + this.WrappedObject.GetNativeCode(out out_ppCode); + ppCode = ICorDebugCode.Wrap(out_ppCode); + return ppCode; + } + } + + public ICorDebugFunctionBreakpoint CreateBreakpoint() + { + ICorDebugFunctionBreakpoint ppBreakpoint; + Debugger.Interop.CorDebug.ICorDebugFunctionBreakpoint out_ppBreakpoint; + this.WrappedObject.CreateBreakpoint(out out_ppBreakpoint); + ppBreakpoint = ICorDebugFunctionBreakpoint.Wrap(out_ppBreakpoint); + return ppBreakpoint; + } + + public uint LocalVarSigToken + { + get + { + uint pmdSig; + this.WrappedObject.GetLocalVarSigToken(out pmdSig); + return pmdSig; + } + } + + public uint CurrentVersionNumber + { + get + { + uint pnCurrentVersion; + this.WrappedObject.GetCurrentVersionNumber(out pnCurrentVersion); + return pnCurrentVersion; + } + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugFunction2.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugFunction2.cs new file mode 100644 index 000000000..ba6d4764b --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugFunction2.cs @@ -0,0 +1,134 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugFunction2 + { + + private Debugger.Interop.CorDebug.ICorDebugFunction2 wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugFunction2 WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugFunction2(Debugger.Interop.CorDebug.ICorDebugFunction2 wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugFunction2)); + } + + public static ICorDebugFunction2 Wrap(Debugger.Interop.CorDebug.ICorDebugFunction2 objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugFunction2(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugFunction2() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugFunction2)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugFunction2 o1, ICorDebugFunction2 o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugFunction2 o1, ICorDebugFunction2 o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugFunction2 casted = o as ICorDebugFunction2; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void SetJMCStatus(int bIsJustMyCode) + { + this.WrappedObject.SetJMCStatus(bIsJustMyCode); + } + + public int JMCStatus + { + get + { + int pbIsJustMyCode; + this.WrappedObject.GetJMCStatus(out pbIsJustMyCode); + return pbIsJustMyCode; + } + } + + public ICorDebugCodeEnum EnumerateNativeCode() + { + ICorDebugCodeEnum ppCodeEnum; + Debugger.Interop.CorDebug.ICorDebugCodeEnum out_ppCodeEnum; + this.WrappedObject.EnumerateNativeCode(out out_ppCodeEnum); + ppCodeEnum = ICorDebugCodeEnum.Wrap(out_ppCodeEnum); + return ppCodeEnum; + } + + public uint VersionNumber + { + get + { + uint pnVersion; + this.WrappedObject.GetVersionNumber(out pnVersion); + return pnVersion; + } + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugFunctionBreakpoint.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugFunctionBreakpoint.cs new file mode 100644 index 000000000..7fa744ee0 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugFunctionBreakpoint.cs @@ -0,0 +1,137 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugFunctionBreakpoint + { + + private Debugger.Interop.CorDebug.ICorDebugFunctionBreakpoint wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugFunctionBreakpoint WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugFunctionBreakpoint(Debugger.Interop.CorDebug.ICorDebugFunctionBreakpoint wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugFunctionBreakpoint)); + } + + public static ICorDebugFunctionBreakpoint Wrap(Debugger.Interop.CorDebug.ICorDebugFunctionBreakpoint objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugFunctionBreakpoint(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugFunctionBreakpoint() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugFunctionBreakpoint)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugFunctionBreakpoint o1, ICorDebugFunctionBreakpoint o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugFunctionBreakpoint o1, ICorDebugFunctionBreakpoint o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugFunctionBreakpoint casted = o as ICorDebugFunctionBreakpoint; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void Activate(int bActive) + { + this.WrappedObject.Activate(bActive); + } + + public int IsActive + { + get + { + int pbActive; + this.WrappedObject.IsActive(out pbActive); + return pbActive; + } + } + + public ICorDebugFunction Function + { + get + { + ICorDebugFunction ppFunction; + Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction; + this.WrappedObject.GetFunction(out out_ppFunction); + ppFunction = ICorDebugFunction.Wrap(out_ppFunction); + return ppFunction; + } + } + + public uint Offset + { + get + { + uint pnOffset; + this.WrappedObject.GetOffset(out pnOffset); + return pnOffset; + } + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugGenericValue.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugGenericValue.cs new file mode 100644 index 000000000..629f6a454 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugGenericValue.cs @@ -0,0 +1,149 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugGenericValue + { + + private Debugger.Interop.CorDebug.ICorDebugGenericValue wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugGenericValue WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugGenericValue(Debugger.Interop.CorDebug.ICorDebugGenericValue wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugGenericValue)); + } + + public static ICorDebugGenericValue Wrap(Debugger.Interop.CorDebug.ICorDebugGenericValue objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugGenericValue(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugGenericValue() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugGenericValue)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugGenericValue o1, ICorDebugGenericValue o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugGenericValue o1, ICorDebugGenericValue o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugGenericValue casted = o as ICorDebugGenericValue; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public uint Type + { + get + { + uint pType; + this.WrappedObject.GetType(out pType); + return pType; + } + } + + public uint Size + { + get + { + uint pSize; + this.WrappedObject.GetSize(out pSize); + return pSize; + } + } + + public ulong Address + { + get + { + ulong pAddress; + this.WrappedObject.GetAddress(out pAddress); + return pAddress; + } + } + + public ICorDebugValueBreakpoint CreateBreakpoint() + { + ICorDebugValueBreakpoint ppBreakpoint; + Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint; + this.WrappedObject.CreateBreakpoint(out out_ppBreakpoint); + ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint); + return ppBreakpoint; + } + + public void GetValue(System.IntPtr pTo) + { + this.WrappedObject.GetValue(pTo); + } + + public void SetValue(System.IntPtr pFrom) + { + this.WrappedObject.SetValue(pFrom); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugHandleValue.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugHandleValue.cs new file mode 100644 index 000000000..15a511cd9 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugHandleValue.cs @@ -0,0 +1,199 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugHandleValue + { + + private Debugger.Interop.CorDebug.ICorDebugHandleValue wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugHandleValue WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugHandleValue(Debugger.Interop.CorDebug.ICorDebugHandleValue wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugHandleValue)); + } + + public static ICorDebugHandleValue Wrap(Debugger.Interop.CorDebug.ICorDebugHandleValue objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugHandleValue(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugHandleValue() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugHandleValue)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugHandleValue o1, ICorDebugHandleValue o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugHandleValue o1, ICorDebugHandleValue o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugHandleValue casted = o as ICorDebugHandleValue; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public uint Type + { + get + { + uint pType; + this.WrappedObject.GetType(out pType); + return pType; + } + } + + public uint Size + { + get + { + uint pSize; + this.WrappedObject.GetSize(out pSize); + return pSize; + } + } + + public ulong Address + { + get + { + ulong pAddress; + this.WrappedObject.GetAddress(out pAddress); + return pAddress; + } + } + + public ICorDebugValueBreakpoint CreateBreakpoint() + { + ICorDebugValueBreakpoint ppBreakpoint; + Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint; + this.WrappedObject.CreateBreakpoint(out out_ppBreakpoint); + ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint); + return ppBreakpoint; + } + + public int IsNull + { + get + { + int pbNull; + this.WrappedObject.IsNull(out pbNull); + return pbNull; + } + } + + public ulong Value + { + get + { + ulong pValue; + this.WrappedObject.GetValue(out pValue); + return pValue; + } + } + + public void SetValue(ulong value) + { + this.WrappedObject.SetValue(value); + } + + public ICorDebugValue Dereference() + { + ICorDebugValue ppValue; + Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; + this.WrappedObject.Dereference(out out_ppValue); + ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; + } + + public ICorDebugValue DereferenceStrong() + { + ICorDebugValue ppValue; + Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; + this.WrappedObject.DereferenceStrong(out out_ppValue); + ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; + } + + public CorDebugHandleType HandleType + { + get + { + CorDebugHandleType pType; + Debugger.Interop.CorDebug.CorDebugHandleType out_pType; + this.WrappedObject.GetHandleType(out out_pType); + pType = ((CorDebugHandleType)(out_pType)); + return pType; + } + } + + public void Dispose() + { + this.WrappedObject.Dispose(); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugHeapValue.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugHeapValue.cs new file mode 100644 index 000000000..526cda880 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugHeapValue.cs @@ -0,0 +1,158 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugHeapValue + { + + private Debugger.Interop.CorDebug.ICorDebugHeapValue wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugHeapValue WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugHeapValue(Debugger.Interop.CorDebug.ICorDebugHeapValue wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugHeapValue)); + } + + public static ICorDebugHeapValue Wrap(Debugger.Interop.CorDebug.ICorDebugHeapValue objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugHeapValue(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugHeapValue() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugHeapValue)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugHeapValue o1, ICorDebugHeapValue o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugHeapValue o1, ICorDebugHeapValue o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugHeapValue casted = o as ICorDebugHeapValue; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public uint Type + { + get + { + uint pType; + this.WrappedObject.GetType(out pType); + return pType; + } + } + + public uint Size + { + get + { + uint pSize; + this.WrappedObject.GetSize(out pSize); + return pSize; + } + } + + public ulong Address + { + get + { + ulong pAddress; + this.WrappedObject.GetAddress(out pAddress); + return pAddress; + } + } + + public ICorDebugValueBreakpoint CreateBreakpoint() + { + ICorDebugValueBreakpoint ppBreakpoint; + Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint; + this.WrappedObject.CreateBreakpoint(out out_ppBreakpoint); + ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint); + return ppBreakpoint; + } + + public int IsValid + { + get + { + int pbValid; + this.WrappedObject.IsValid(out pbValid); + return pbValid; + } + } + + public ICorDebugValueBreakpoint CreateRelocBreakpoint() + { + ICorDebugValueBreakpoint ppBreakpoint; + Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint; + this.WrappedObject.CreateRelocBreakpoint(out out_ppBreakpoint); + ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint); + return ppBreakpoint; + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugHeapValue2.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugHeapValue2.cs new file mode 100644 index 000000000..0fd801b91 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugHeapValue2.cs @@ -0,0 +1,109 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugHeapValue2 + { + + private Debugger.Interop.CorDebug.ICorDebugHeapValue2 wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugHeapValue2 WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugHeapValue2(Debugger.Interop.CorDebug.ICorDebugHeapValue2 wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugHeapValue2)); + } + + public static ICorDebugHeapValue2 Wrap(Debugger.Interop.CorDebug.ICorDebugHeapValue2 objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugHeapValue2(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugHeapValue2() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugHeapValue2)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugHeapValue2 o1, ICorDebugHeapValue2 o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugHeapValue2 o1, ICorDebugHeapValue2 o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugHeapValue2 casted = o as ICorDebugHeapValue2; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public ICorDebugHandleValue CreateHandle(CorDebugHandleType type) + { + ICorDebugHandleValue ppHandle; + Debugger.Interop.CorDebug.ICorDebugHandleValue out_ppHandle; + this.WrappedObject.CreateHandle(((Debugger.Interop.CorDebug.CorDebugHandleType)(type)), out out_ppHandle); + ppHandle = ICorDebugHandleValue.Wrap(out_ppHandle); + return ppHandle; + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugILFrame.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugILFrame.cs new file mode 100644 index 000000000..6d642e08d --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugILFrame.cs @@ -0,0 +1,260 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugILFrame + { + + private Debugger.Interop.CorDebug.ICorDebugILFrame wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugILFrame WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugILFrame(Debugger.Interop.CorDebug.ICorDebugILFrame wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugILFrame)); + } + + public static ICorDebugILFrame Wrap(Debugger.Interop.CorDebug.ICorDebugILFrame objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugILFrame(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugILFrame() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugILFrame)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugILFrame o1, ICorDebugILFrame o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugILFrame o1, ICorDebugILFrame o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugILFrame casted = o as ICorDebugILFrame; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public ICorDebugChain Chain + { + get + { + ICorDebugChain ppChain; + Debugger.Interop.CorDebug.ICorDebugChain out_ppChain; + this.WrappedObject.GetChain(out out_ppChain); + ppChain = ICorDebugChain.Wrap(out_ppChain); + return ppChain; + } + } + + public ICorDebugCode Code + { + get + { + ICorDebugCode ppCode; + Debugger.Interop.CorDebug.ICorDebugCode out_ppCode; + this.WrappedObject.GetCode(out out_ppCode); + ppCode = ICorDebugCode.Wrap(out_ppCode); + return ppCode; + } + } + + public ICorDebugFunction Function + { + get + { + ICorDebugFunction ppFunction; + Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction; + this.WrappedObject.GetFunction(out out_ppFunction); + ppFunction = ICorDebugFunction.Wrap(out_ppFunction); + return ppFunction; + } + } + + public uint FunctionToken + { + get + { + uint pToken; + this.WrappedObject.GetFunctionToken(out pToken); + return pToken; + } + } + + public ulong GetStackRange(out ulong pStart) + { + ulong pEnd; + this.WrappedObject.GetStackRange(out pStart, out pEnd); + return pEnd; + } + + public ICorDebugFrame Caller + { + get + { + ICorDebugFrame ppFrame; + Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame; + this.WrappedObject.GetCaller(out out_ppFrame); + ppFrame = ICorDebugFrame.Wrap(out_ppFrame); + return ppFrame; + } + } + + public ICorDebugFrame Callee + { + get + { + ICorDebugFrame ppFrame; + Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame; + this.WrappedObject.GetCallee(out out_ppFrame); + ppFrame = ICorDebugFrame.Wrap(out_ppFrame); + return ppFrame; + } + } + + public ICorDebugStepper CreateStepper() + { + ICorDebugStepper ppStepper; + Debugger.Interop.CorDebug.ICorDebugStepper out_ppStepper; + this.WrappedObject.CreateStepper(out out_ppStepper); + ppStepper = ICorDebugStepper.Wrap(out_ppStepper); + return ppStepper; + } + + public CorDebugMappingResult GetIP(out uint pnOffset) + { + CorDebugMappingResult pMappingResult; + Debugger.Interop.CorDebug.CorDebugMappingResult out_pMappingResult; + this.WrappedObject.GetIP(out pnOffset, out out_pMappingResult); + pMappingResult = ((CorDebugMappingResult)(out_pMappingResult)); + return pMappingResult; + } + + public void SetIP(uint nOffset) + { + this.WrappedObject.SetIP(nOffset); + } + + public ICorDebugValueEnum EnumerateLocalVariables() + { + ICorDebugValueEnum ppValueEnum; + Debugger.Interop.CorDebug.ICorDebugValueEnum out_ppValueEnum; + this.WrappedObject.EnumerateLocalVariables(out out_ppValueEnum); + ppValueEnum = ICorDebugValueEnum.Wrap(out_ppValueEnum); + return ppValueEnum; + } + + public ICorDebugValue GetLocalVariable(uint dwIndex) + { + ICorDebugValue ppValue; + Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; + this.WrappedObject.GetLocalVariable(dwIndex, out out_ppValue); + ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; + } + + public ICorDebugValueEnum EnumerateArguments() + { + ICorDebugValueEnum ppValueEnum; + Debugger.Interop.CorDebug.ICorDebugValueEnum out_ppValueEnum; + this.WrappedObject.EnumerateArguments(out out_ppValueEnum); + ppValueEnum = ICorDebugValueEnum.Wrap(out_ppValueEnum); + return ppValueEnum; + } + + public ICorDebugValue GetArgument(uint dwIndex) + { + ICorDebugValue ppValue; + Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; + this.WrappedObject.GetArgument(dwIndex, out out_ppValue); + ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; + } + + public uint StackDepth + { + get + { + uint pDepth; + this.WrappedObject.GetStackDepth(out pDepth); + return pDepth; + } + } + + public ICorDebugValue GetStackValue(uint dwIndex) + { + ICorDebugValue ppValue; + Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; + this.WrappedObject.GetStackValue(dwIndex, out out_ppValue); + ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; + } + + public void CanSetIP(uint nOffset) + { + this.WrappedObject.CanSetIP(nOffset); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugILFrame2.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugILFrame2.cs new file mode 100644 index 000000000..94d8bbc37 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugILFrame2.cs @@ -0,0 +1,114 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugILFrame2 + { + + private Debugger.Interop.CorDebug.ICorDebugILFrame2 wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugILFrame2 WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugILFrame2(Debugger.Interop.CorDebug.ICorDebugILFrame2 wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugILFrame2)); + } + + public static ICorDebugILFrame2 Wrap(Debugger.Interop.CorDebug.ICorDebugILFrame2 objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugILFrame2(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugILFrame2() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugILFrame2)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugILFrame2 o1, ICorDebugILFrame2 o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugILFrame2 o1, ICorDebugILFrame2 o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugILFrame2 casted = o as ICorDebugILFrame2; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void RemapFunction(uint newILOffset) + { + this.WrappedObject.RemapFunction(newILOffset); + } + + public ICorDebugTypeEnum EnumerateTypeParameters() + { + ICorDebugTypeEnum ppTyParEnum; + Debugger.Interop.CorDebug.ICorDebugTypeEnum out_ppTyParEnum; + this.WrappedObject.EnumerateTypeParameters(out out_ppTyParEnum); + ppTyParEnum = ICorDebugTypeEnum.Wrap(out_ppTyParEnum); + return ppTyParEnum; + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugInternalFrame.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugInternalFrame.cs new file mode 100644 index 000000000..23ddc1563 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugInternalFrame.cs @@ -0,0 +1,198 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugInternalFrame + { + + private Debugger.Interop.CorDebug.ICorDebugInternalFrame wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugInternalFrame WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugInternalFrame(Debugger.Interop.CorDebug.ICorDebugInternalFrame wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugInternalFrame)); + } + + public static ICorDebugInternalFrame Wrap(Debugger.Interop.CorDebug.ICorDebugInternalFrame objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugInternalFrame(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugInternalFrame() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugInternalFrame)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugInternalFrame o1, ICorDebugInternalFrame o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugInternalFrame o1, ICorDebugInternalFrame o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugInternalFrame casted = o as ICorDebugInternalFrame; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public ICorDebugChain Chain + { + get + { + ICorDebugChain ppChain; + Debugger.Interop.CorDebug.ICorDebugChain out_ppChain; + this.WrappedObject.GetChain(out out_ppChain); + ppChain = ICorDebugChain.Wrap(out_ppChain); + return ppChain; + } + } + + public ICorDebugCode Code + { + get + { + ICorDebugCode ppCode; + Debugger.Interop.CorDebug.ICorDebugCode out_ppCode; + this.WrappedObject.GetCode(out out_ppCode); + ppCode = ICorDebugCode.Wrap(out_ppCode); + return ppCode; + } + } + + public ICorDebugFunction Function + { + get + { + ICorDebugFunction ppFunction; + Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction; + this.WrappedObject.GetFunction(out out_ppFunction); + ppFunction = ICorDebugFunction.Wrap(out_ppFunction); + return ppFunction; + } + } + + public uint FunctionToken + { + get + { + uint pToken; + this.WrappedObject.GetFunctionToken(out pToken); + return pToken; + } + } + + public ulong GetStackRange(out ulong pStart) + { + ulong pEnd; + this.WrappedObject.GetStackRange(out pStart, out pEnd); + return pEnd; + } + + public ICorDebugFrame Caller + { + get + { + ICorDebugFrame ppFrame; + Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame; + this.WrappedObject.GetCaller(out out_ppFrame); + ppFrame = ICorDebugFrame.Wrap(out_ppFrame); + return ppFrame; + } + } + + public ICorDebugFrame Callee + { + get + { + ICorDebugFrame ppFrame; + Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame; + this.WrappedObject.GetCallee(out out_ppFrame); + ppFrame = ICorDebugFrame.Wrap(out_ppFrame); + return ppFrame; + } + } + + public ICorDebugStepper CreateStepper() + { + ICorDebugStepper ppStepper; + Debugger.Interop.CorDebug.ICorDebugStepper out_ppStepper; + this.WrappedObject.CreateStepper(out out_ppStepper); + ppStepper = ICorDebugStepper.Wrap(out_ppStepper); + return ppStepper; + } + + public CorDebugInternalFrameType FrameType + { + get + { + CorDebugInternalFrameType pType; + Debugger.Interop.CorDebug.CorDebugInternalFrameType out_pType; + this.WrappedObject.GetFrameType(out out_pType); + pType = ((CorDebugInternalFrameType)(out_pType)); + return pType; + } + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugMDA.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugMDA.cs new file mode 100644 index 000000000..8f26b32e1 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugMDA.cs @@ -0,0 +1,132 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugMDA + { + + private Debugger.Interop.CorDebug.ICorDebugMDA wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugMDA WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugMDA(Debugger.Interop.CorDebug.ICorDebugMDA wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugMDA)); + } + + public static ICorDebugMDA Wrap(Debugger.Interop.CorDebug.ICorDebugMDA objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugMDA(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugMDA() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugMDA)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugMDA o1, ICorDebugMDA o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugMDA o1, ICorDebugMDA o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugMDA casted = o as ICorDebugMDA; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void GetName(uint cchName, out uint pcchName, System.IntPtr szName) + { + this.WrappedObject.GetName(cchName, out pcchName, szName); + } + + public void GetDescription(uint cchName, out uint pcchName, System.IntPtr szName) + { + this.WrappedObject.GetDescription(cchName, out pcchName, szName); + } + + public void GetXML(uint cchName, out uint pcchName, System.IntPtr szName) + { + this.WrappedObject.GetXML(cchName, out pcchName, szName); + } + + public void GetFlags(ref CorDebugMDAFlags pFlags) + { + Debugger.Interop.CorDebug.CorDebugMDAFlags ref_pFlags = ((Debugger.Interop.CorDebug.CorDebugMDAFlags)(pFlags)); + this.WrappedObject.GetFlags(ref ref_pFlags); + pFlags = ((CorDebugMDAFlags)(ref_pFlags)); + } + + public uint OSThreadId + { + get + { + uint pOsTid; + this.WrappedObject.GetOSThreadId(out pOsTid); + return pOsTid; + } + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugManagedCallback.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugManagedCallback.cs new file mode 100644 index 000000000..3544b4ece --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugManagedCallback.cs @@ -0,0 +1,230 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugManagedCallback + { + + private Debugger.Interop.CorDebug.ICorDebugManagedCallback wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugManagedCallback WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugManagedCallback(Debugger.Interop.CorDebug.ICorDebugManagedCallback wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugManagedCallback)); + } + + public static ICorDebugManagedCallback Wrap(Debugger.Interop.CorDebug.ICorDebugManagedCallback objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugManagedCallback(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugManagedCallback() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugManagedCallback)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugManagedCallback o1, ICorDebugManagedCallback o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugManagedCallback o1, ICorDebugManagedCallback o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugManagedCallback casted = o as ICorDebugManagedCallback; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void Breakpoint(System.IntPtr pAppDomain, System.IntPtr pThread, System.IntPtr pBreakpoint) + { + this.WrappedObject.Breakpoint(pAppDomain, pThread, pBreakpoint); + } + + public void StepComplete(System.IntPtr pAppDomain, System.IntPtr pThread, System.IntPtr pStepper, Debugger.Wrappers.CorDebug.CorDebugStepReason reason) + { + this.WrappedObject.StepComplete(pAppDomain, pThread, pStepper, reason); + } + + public void Break(System.IntPtr pAppDomain, System.IntPtr thread) + { + this.WrappedObject.Break(pAppDomain, thread); + } + + public void Exception(System.IntPtr pAppDomain, System.IntPtr pThread, int unhandled) + { + this.WrappedObject.Exception(pAppDomain, pThread, unhandled); + } + + public void EvalComplete(System.IntPtr pAppDomain, System.IntPtr pThread, System.IntPtr pEval) + { + this.WrappedObject.EvalComplete(pAppDomain, pThread, pEval); + } + + public void EvalException(System.IntPtr pAppDomain, System.IntPtr pThread, System.IntPtr pEval) + { + this.WrappedObject.EvalException(pAppDomain, pThread, pEval); + } + + public void CreateProcess(System.IntPtr pProcess) + { + this.WrappedObject.CreateProcess(pProcess); + } + + public void ExitProcess(System.IntPtr pProcess) + { + this.WrappedObject.ExitProcess(pProcess); + } + + public void CreateThread(System.IntPtr pAppDomain, System.IntPtr thread) + { + this.WrappedObject.CreateThread(pAppDomain, thread); + } + + public void ExitThread(System.IntPtr pAppDomain, System.IntPtr thread) + { + this.WrappedObject.ExitThread(pAppDomain, thread); + } + + public void LoadModule(System.IntPtr pAppDomain, System.IntPtr pModule) + { + this.WrappedObject.LoadModule(pAppDomain, pModule); + } + + public void UnloadModule(System.IntPtr pAppDomain, System.IntPtr pModule) + { + this.WrappedObject.UnloadModule(pAppDomain, pModule); + } + + public void LoadClass(System.IntPtr pAppDomain, System.IntPtr c) + { + this.WrappedObject.LoadClass(pAppDomain, c); + } + + public void UnloadClass(System.IntPtr pAppDomain, System.IntPtr c) + { + this.WrappedObject.UnloadClass(pAppDomain, c); + } + + public void DebuggerError(System.IntPtr pProcess, int errorHR, uint errorCode) + { + this.WrappedObject.DebuggerError(pProcess, errorHR, errorCode); + } + + public void LogMessage(System.IntPtr pAppDomain, System.IntPtr pThread, int lLevel, System.IntPtr pLogSwitchName, System.IntPtr pMessage) + { + this.WrappedObject.LogMessage(pAppDomain, pThread, lLevel, pLogSwitchName, pMessage); + } + + public void LogSwitch(System.IntPtr pAppDomain, System.IntPtr pThread, int lLevel, uint ulReason, System.IntPtr pLogSwitchName, System.IntPtr pParentName) + { + this.WrappedObject.LogSwitch(pAppDomain, pThread, lLevel, ulReason, pLogSwitchName, pParentName); + } + + public void CreateAppDomain(System.IntPtr pProcess, System.IntPtr pAppDomain) + { + this.WrappedObject.CreateAppDomain(pProcess, pAppDomain); + } + + public void ExitAppDomain(System.IntPtr pProcess, System.IntPtr pAppDomain) + { + this.WrappedObject.ExitAppDomain(pProcess, pAppDomain); + } + + public void LoadAssembly(System.IntPtr pAppDomain, System.IntPtr pAssembly) + { + this.WrappedObject.LoadAssembly(pAppDomain, pAssembly); + } + + public void UnloadAssembly(System.IntPtr pAppDomain, System.IntPtr pAssembly) + { + this.WrappedObject.UnloadAssembly(pAppDomain, pAssembly); + } + + public void ControlCTrap(System.IntPtr pProcess) + { + this.WrappedObject.ControlCTrap(pProcess); + } + + public void NameChange(System.IntPtr pAppDomain, System.IntPtr pThread) + { + this.WrappedObject.NameChange(pAppDomain, pThread); + } + + public void UpdateModuleSymbols(System.IntPtr pAppDomain, System.IntPtr pModule, System.IntPtr pSymbolStream) + { + this.WrappedObject.UpdateModuleSymbols(pAppDomain, pModule, pSymbolStream); + } + + public void EditAndContinueRemap(System.IntPtr pAppDomain, System.IntPtr pThread, System.IntPtr pFunction, int fAccurate) + { + this.WrappedObject.EditAndContinueRemap(pAppDomain, pThread, pFunction, fAccurate); + } + + public void BreakpointSetError(System.IntPtr pAppDomain, System.IntPtr pThread, System.IntPtr pBreakpoint, uint dwError) + { + this.WrappedObject.BreakpointSetError(pAppDomain, pThread, pBreakpoint, dwError); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugManagedCallback2.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugManagedCallback2.cs new file mode 100644 index 000000000..c218cb53f --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugManagedCallback2.cs @@ -0,0 +1,140 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugManagedCallback2 + { + + private Debugger.Interop.CorDebug.ICorDebugManagedCallback2 wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugManagedCallback2 WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugManagedCallback2(Debugger.Interop.CorDebug.ICorDebugManagedCallback2 wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugManagedCallback2)); + } + + public static ICorDebugManagedCallback2 Wrap(Debugger.Interop.CorDebug.ICorDebugManagedCallback2 objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugManagedCallback2(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugManagedCallback2() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugManagedCallback2)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugManagedCallback2 o1, ICorDebugManagedCallback2 o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugManagedCallback2 o1, ICorDebugManagedCallback2 o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugManagedCallback2 casted = o as ICorDebugManagedCallback2; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void FunctionRemapOpportunity(System.IntPtr pAppDomain, System.IntPtr pThread, System.IntPtr pOldFunction, System.IntPtr pNewFunction, uint oldILOffset) + { + this.WrappedObject.FunctionRemapOpportunity(pAppDomain, pThread, pOldFunction, pNewFunction, oldILOffset); + } + + public void CreateConnection(System.IntPtr pProcess, uint dwConnectionId, System.IntPtr pConnName) + { + this.WrappedObject.CreateConnection(pProcess, dwConnectionId, pConnName); + } + + public void ChangeConnection(System.IntPtr pProcess, uint dwConnectionId) + { + this.WrappedObject.ChangeConnection(pProcess, dwConnectionId); + } + + public void DestroyConnection(System.IntPtr pProcess, uint dwConnectionId) + { + this.WrappedObject.DestroyConnection(pProcess, dwConnectionId); + } + + public void Exception(System.IntPtr pAppDomain, System.IntPtr pThread, System.IntPtr pFrame, uint nOffset, Debugger.Wrappers.CorDebug.CorDebugExceptionCallbackType dwEventType, uint dwFlags) + { + this.WrappedObject.Exception(pAppDomain, pThread, pFrame, nOffset, dwEventType, dwFlags); + } + + public void ExceptionUnwind(System.IntPtr pAppDomain, System.IntPtr pThread, Debugger.Wrappers.CorDebug.CorDebugExceptionUnwindCallbackType dwEventType, uint dwFlags) + { + this.WrappedObject.ExceptionUnwind(pAppDomain, pThread, dwEventType, dwFlags); + } + + public void FunctionRemapComplete(System.IntPtr pAppDomain, System.IntPtr pThread, System.IntPtr pFunction) + { + this.WrappedObject.FunctionRemapComplete(pAppDomain, pThread, pFunction); + } + + public void MDANotification(System.IntPtr pController, System.IntPtr pThread, System.IntPtr pMDA) + { + this.WrappedObject.MDANotification(pController, pThread, pMDA); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugModule.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugModule.cs new file mode 100644 index 000000000..9a56518cb --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugModule.cs @@ -0,0 +1,253 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugModule + { + + private Debugger.Interop.CorDebug.ICorDebugModule wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugModule WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugModule(Debugger.Interop.CorDebug.ICorDebugModule wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugModule)); + } + + public static ICorDebugModule Wrap(Debugger.Interop.CorDebug.ICorDebugModule objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugModule(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugModule() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugModule)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugModule o1, ICorDebugModule o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugModule o1, ICorDebugModule o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugModule casted = o as ICorDebugModule; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public ICorDebugProcess Process + { + get + { + ICorDebugProcess ppProcess; + Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess; + this.WrappedObject.GetProcess(out out_ppProcess); + ppProcess = ICorDebugProcess.Wrap(out_ppProcess); + return ppProcess; + } + } + + public ulong BaseAddress + { + get + { + ulong pAddress; + this.WrappedObject.GetBaseAddress(out pAddress); + return pAddress; + } + } + + public ICorDebugAssembly Assembly + { + get + { + ICorDebugAssembly ppAssembly; + Debugger.Interop.CorDebug.ICorDebugAssembly out_ppAssembly; + this.WrappedObject.GetAssembly(out out_ppAssembly); + ppAssembly = ICorDebugAssembly.Wrap(out_ppAssembly); + return ppAssembly; + } + } + + public void GetName(uint cchName, out uint pcchName, System.IntPtr szName) + { + this.WrappedObject.GetName(cchName, out pcchName, szName); + } + + public void EnableJITDebugging(int bTrackJITInfo, int bAllowJitOpts) + { + this.WrappedObject.EnableJITDebugging(bTrackJITInfo, bAllowJitOpts); + } + + public void EnableClassLoadCallbacks(int bClassLoadCallbacks) + { + this.WrappedObject.EnableClassLoadCallbacks(bClassLoadCallbacks); + } + + public ICorDebugFunction GetFunctionFromToken(uint methodDef) + { + ICorDebugFunction ppFunction; + Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction; + this.WrappedObject.GetFunctionFromToken(methodDef, out out_ppFunction); + ppFunction = ICorDebugFunction.Wrap(out_ppFunction); + return ppFunction; + } + + public ICorDebugFunction GetFunctionFromRVA(ulong rva) + { + ICorDebugFunction ppFunction; + Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction; + this.WrappedObject.GetFunctionFromRVA(rva, out out_ppFunction); + ppFunction = ICorDebugFunction.Wrap(out_ppFunction); + return ppFunction; + } + + public ICorDebugClass GetClassFromToken(uint typeDef) + { + ICorDebugClass ppClass; + Debugger.Interop.CorDebug.ICorDebugClass out_ppClass; + this.WrappedObject.GetClassFromToken(typeDef, out out_ppClass); + ppClass = ICorDebugClass.Wrap(out_ppClass); + return ppClass; + } + + public ICorDebugModuleBreakpoint CreateBreakpoint() + { + ICorDebugModuleBreakpoint ppBreakpoint; + Debugger.Interop.CorDebug.ICorDebugModuleBreakpoint out_ppBreakpoint; + this.WrappedObject.CreateBreakpoint(out out_ppBreakpoint); + ppBreakpoint = ICorDebugModuleBreakpoint.Wrap(out_ppBreakpoint); + return ppBreakpoint; + } + + public ICorDebugEditAndContinueSnapshot EditAndContinueSnapshot + { + get + { + ICorDebugEditAndContinueSnapshot ppEditAndContinueSnapshot; + Debugger.Interop.CorDebug.ICorDebugEditAndContinueSnapshot out_ppEditAndContinueSnapshot; + this.WrappedObject.GetEditAndContinueSnapshot(out out_ppEditAndContinueSnapshot); + ppEditAndContinueSnapshot = ICorDebugEditAndContinueSnapshot.Wrap(out_ppEditAndContinueSnapshot); + return ppEditAndContinueSnapshot; + } + } + + public object GetMetaDataInterface(ref System.Guid riid) + { + object ppObj; + this.WrappedObject.GetMetaDataInterface(ref riid, out ppObj); + return ppObj; + } + + public uint Token + { + get + { + uint pToken; + this.WrappedObject.GetToken(out pToken); + return pToken; + } + } + + public int IsDynamic + { + get + { + int pDynamic; + this.WrappedObject.IsDynamic(out pDynamic); + return pDynamic; + } + } + + public ICorDebugValue GetGlobalVariableValue(uint fieldDef) + { + ICorDebugValue ppValue; + Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; + this.WrappedObject.GetGlobalVariableValue(fieldDef, out out_ppValue); + ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; + } + + public uint Size + { + get + { + uint pcBytes; + this.WrappedObject.GetSize(out pcBytes); + return pcBytes; + } + } + + public int IsInMemory + { + get + { + int pInMemory; + this.WrappedObject.IsInMemory(out pInMemory); + return pInMemory; + } + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugModule2.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugModule2.cs new file mode 100644 index 000000000..195cd0658 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugModule2.cs @@ -0,0 +1,132 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugModule2 + { + + private Debugger.Interop.CorDebug.ICorDebugModule2 wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugModule2 WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugModule2(Debugger.Interop.CorDebug.ICorDebugModule2 wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugModule2)); + } + + public static ICorDebugModule2 Wrap(Debugger.Interop.CorDebug.ICorDebugModule2 objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugModule2(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugModule2() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugModule2)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugModule2 o1, ICorDebugModule2 o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugModule2 o1, ICorDebugModule2 o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugModule2 casted = o as ICorDebugModule2; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void SetJMCStatus(int bIsJustMyCode, uint cTokens, ref uint pTokens) + { + this.WrappedObject.SetJMCStatus(bIsJustMyCode, cTokens, ref pTokens); + } + + public void ApplyChanges(uint cbMetadata, byte[] pbMetadata, uint cbIL, byte[] pbIL) + { + this.WrappedObject.ApplyChanges(cbMetadata, pbMetadata, cbIL, pbIL); + } + + public void SetJITCompilerFlags(uint dwFlags) + { + this.WrappedObject.SetJITCompilerFlags(dwFlags); + } + + public uint JITCompilerFlags + { + get + { + uint pdwFlags; + this.WrappedObject.GetJITCompilerFlags(out pdwFlags); + return pdwFlags; + } + } + + public void ResolveAssembly(uint tkAssemblyRef, ref ICorDebugAssembly ppAssembly) + { + Debugger.Interop.CorDebug.ICorDebugAssembly ref_ppAssembly = ppAssembly.WrappedObject; + this.WrappedObject.ResolveAssembly(tkAssemblyRef, ref ref_ppAssembly); + ppAssembly = ICorDebugAssembly.Wrap(ref_ppAssembly); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugModuleBreakpoint.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugModuleBreakpoint.cs new file mode 100644 index 000000000..42fc860f7 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugModuleBreakpoint.cs @@ -0,0 +1,127 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugModuleBreakpoint + { + + private Debugger.Interop.CorDebug.ICorDebugModuleBreakpoint wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugModuleBreakpoint WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugModuleBreakpoint(Debugger.Interop.CorDebug.ICorDebugModuleBreakpoint wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugModuleBreakpoint)); + } + + public static ICorDebugModuleBreakpoint Wrap(Debugger.Interop.CorDebug.ICorDebugModuleBreakpoint objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugModuleBreakpoint(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugModuleBreakpoint() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugModuleBreakpoint)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugModuleBreakpoint o1, ICorDebugModuleBreakpoint o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugModuleBreakpoint o1, ICorDebugModuleBreakpoint o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugModuleBreakpoint casted = o as ICorDebugModuleBreakpoint; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void Activate(int bActive) + { + this.WrappedObject.Activate(bActive); + } + + public int IsActive + { + get + { + int pbActive; + this.WrappedObject.IsActive(out pbActive); + return pbActive; + } + } + + public ICorDebugModule Module + { + get + { + ICorDebugModule ppModule; + Debugger.Interop.CorDebug.ICorDebugModule out_ppModule; + this.WrappedObject.GetModule(out out_ppModule); + ppModule = ICorDebugModule.Wrap(out_ppModule); + return ppModule; + } + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugModuleEnum.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugModuleEnum.cs new file mode 100644 index 000000000..36205c0fb --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugModuleEnum.cs @@ -0,0 +1,136 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugModuleEnum + { + + private Debugger.Interop.CorDebug.ICorDebugModuleEnum wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugModuleEnum WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugModuleEnum(Debugger.Interop.CorDebug.ICorDebugModuleEnum wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugModuleEnum)); + } + + public static ICorDebugModuleEnum Wrap(Debugger.Interop.CorDebug.ICorDebugModuleEnum objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugModuleEnum(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugModuleEnum() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugModuleEnum)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugModuleEnum o1, ICorDebugModuleEnum o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugModuleEnum o1, ICorDebugModuleEnum o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugModuleEnum casted = o as ICorDebugModuleEnum; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void Skip(uint celt) + { + this.WrappedObject.Skip(celt); + } + + public void Reset() + { + this.WrappedObject.Reset(); + } + + public ICorDebugEnum Clone() + { + ICorDebugEnum ppEnum; + Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum; + this.WrappedObject.Clone(out out_ppEnum); + ppEnum = ICorDebugEnum.Wrap(out_ppEnum); + return ppEnum; + } + + public uint Count + { + get + { + uint pcelt; + this.WrappedObject.GetCount(out pcelt); + return pcelt; + } + } + + public uint Next(uint celt, System.IntPtr modules) + { + uint pceltFetched; + this.WrappedObject.Next(celt, modules, out pceltFetched); + return pceltFetched; + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugNativeFrame.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugNativeFrame.cs new file mode 100644 index 000000000..e4583d70c --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugNativeFrame.cs @@ -0,0 +1,263 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugNativeFrame + { + + private Debugger.Interop.CorDebug.ICorDebugNativeFrame wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugNativeFrame WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugNativeFrame(Debugger.Interop.CorDebug.ICorDebugNativeFrame wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugNativeFrame)); + } + + public static ICorDebugNativeFrame Wrap(Debugger.Interop.CorDebug.ICorDebugNativeFrame objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugNativeFrame(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugNativeFrame() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugNativeFrame)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugNativeFrame o1, ICorDebugNativeFrame o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugNativeFrame o1, ICorDebugNativeFrame o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugNativeFrame casted = o as ICorDebugNativeFrame; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public ICorDebugChain Chain + { + get + { + ICorDebugChain ppChain; + Debugger.Interop.CorDebug.ICorDebugChain out_ppChain; + this.WrappedObject.GetChain(out out_ppChain); + ppChain = ICorDebugChain.Wrap(out_ppChain); + return ppChain; + } + } + + public ICorDebugCode Code + { + get + { + ICorDebugCode ppCode; + Debugger.Interop.CorDebug.ICorDebugCode out_ppCode; + this.WrappedObject.GetCode(out out_ppCode); + ppCode = ICorDebugCode.Wrap(out_ppCode); + return ppCode; + } + } + + public ICorDebugFunction Function + { + get + { + ICorDebugFunction ppFunction; + Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction; + this.WrappedObject.GetFunction(out out_ppFunction); + ppFunction = ICorDebugFunction.Wrap(out_ppFunction); + return ppFunction; + } + } + + public uint FunctionToken + { + get + { + uint pToken; + this.WrappedObject.GetFunctionToken(out pToken); + return pToken; + } + } + + public ulong GetStackRange(out ulong pStart) + { + ulong pEnd; + this.WrappedObject.GetStackRange(out pStart, out pEnd); + return pEnd; + } + + public ICorDebugFrame Caller + { + get + { + ICorDebugFrame ppFrame; + Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame; + this.WrappedObject.GetCaller(out out_ppFrame); + ppFrame = ICorDebugFrame.Wrap(out_ppFrame); + return ppFrame; + } + } + + public ICorDebugFrame Callee + { + get + { + ICorDebugFrame ppFrame; + Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame; + this.WrappedObject.GetCallee(out out_ppFrame); + ppFrame = ICorDebugFrame.Wrap(out_ppFrame); + return ppFrame; + } + } + + public ICorDebugStepper CreateStepper() + { + ICorDebugStepper ppStepper; + Debugger.Interop.CorDebug.ICorDebugStepper out_ppStepper; + this.WrappedObject.CreateStepper(out out_ppStepper); + ppStepper = ICorDebugStepper.Wrap(out_ppStepper); + return ppStepper; + } + + public uint IP + { + get + { + uint pnOffset; + this.WrappedObject.GetIP(out pnOffset); + return pnOffset; + } + } + + public void SetIP(uint nOffset) + { + this.WrappedObject.SetIP(nOffset); + } + + public ICorDebugRegisterSet RegisterSet + { + get + { + ICorDebugRegisterSet ppRegisters; + Debugger.Interop.CorDebug.ICorDebugRegisterSet out_ppRegisters; + this.WrappedObject.GetRegisterSet(out out_ppRegisters); + ppRegisters = ICorDebugRegisterSet.Wrap(out_ppRegisters); + return ppRegisters; + } + } + + public ICorDebugValue GetLocalRegisterValue(CorDebugRegister reg, uint cbSigBlob, uint pvSigBlob) + { + ICorDebugValue ppValue; + Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; + this.WrappedObject.GetLocalRegisterValue(((Debugger.Interop.CorDebug.CorDebugRegister)(reg)), cbSigBlob, pvSigBlob, out out_ppValue); + ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; + } + + public ICorDebugValue GetLocalDoubleRegisterValue(CorDebugRegister highWordReg, CorDebugRegister lowWordReg, uint cbSigBlob, uint pvSigBlob) + { + ICorDebugValue ppValue; + Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; + this.WrappedObject.GetLocalDoubleRegisterValue(((Debugger.Interop.CorDebug.CorDebugRegister)(highWordReg)), ((Debugger.Interop.CorDebug.CorDebugRegister)(lowWordReg)), cbSigBlob, pvSigBlob, out out_ppValue); + ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; + } + + public ICorDebugValue GetLocalMemoryValue(ulong address, uint cbSigBlob, uint pvSigBlob) + { + ICorDebugValue ppValue; + Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; + this.WrappedObject.GetLocalMemoryValue(address, cbSigBlob, pvSigBlob, out out_ppValue); + ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; + } + + public ICorDebugValue GetLocalRegisterMemoryValue(CorDebugRegister highWordReg, ulong lowWordAddress, uint cbSigBlob, uint pvSigBlob) + { + ICorDebugValue ppValue; + Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; + this.WrappedObject.GetLocalRegisterMemoryValue(((Debugger.Interop.CorDebug.CorDebugRegister)(highWordReg)), lowWordAddress, cbSigBlob, pvSigBlob, out out_ppValue); + ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; + } + + public ICorDebugValue GetLocalMemoryRegisterValue(ulong highWordAddress, CorDebugRegister lowWordRegister, uint cbSigBlob, uint pvSigBlob) + { + ICorDebugValue ppValue; + Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; + this.WrappedObject.GetLocalMemoryRegisterValue(highWordAddress, ((Debugger.Interop.CorDebug.CorDebugRegister)(lowWordRegister)), cbSigBlob, pvSigBlob, out out_ppValue); + ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; + } + + public void CanSetIP(uint nOffset) + { + this.WrappedObject.CanSetIP(nOffset); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugObjectEnum.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugObjectEnum.cs new file mode 100644 index 000000000..41f7ae288 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugObjectEnum.cs @@ -0,0 +1,136 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugObjectEnum + { + + private Debugger.Interop.CorDebug.ICorDebugObjectEnum wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugObjectEnum WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugObjectEnum(Debugger.Interop.CorDebug.ICorDebugObjectEnum wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugObjectEnum)); + } + + public static ICorDebugObjectEnum Wrap(Debugger.Interop.CorDebug.ICorDebugObjectEnum objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugObjectEnum(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugObjectEnum() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugObjectEnum)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugObjectEnum o1, ICorDebugObjectEnum o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugObjectEnum o1, ICorDebugObjectEnum o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugObjectEnum casted = o as ICorDebugObjectEnum; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void Skip(uint celt) + { + this.WrappedObject.Skip(celt); + } + + public void Reset() + { + this.WrappedObject.Reset(); + } + + public ICorDebugEnum Clone() + { + ICorDebugEnum ppEnum; + Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum; + this.WrappedObject.Clone(out out_ppEnum); + ppEnum = ICorDebugEnum.Wrap(out_ppEnum); + return ppEnum; + } + + public uint Count + { + get + { + uint pcelt; + this.WrappedObject.GetCount(out pcelt); + return pcelt; + } + } + + public uint Next(uint celt, System.IntPtr objects) + { + uint pceltFetched; + this.WrappedObject.Next(celt, objects, out pceltFetched); + return pceltFetched; + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugObjectValue.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugObjectValue.cs new file mode 100644 index 000000000..d63b48c76 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugObjectValue.cs @@ -0,0 +1,206 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugObjectValue + { + + private Debugger.Interop.CorDebug.ICorDebugObjectValue wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugObjectValue WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugObjectValue(Debugger.Interop.CorDebug.ICorDebugObjectValue wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugObjectValue)); + } + + public static ICorDebugObjectValue Wrap(Debugger.Interop.CorDebug.ICorDebugObjectValue objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugObjectValue(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugObjectValue() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugObjectValue)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugObjectValue o1, ICorDebugObjectValue o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugObjectValue o1, ICorDebugObjectValue o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugObjectValue casted = o as ICorDebugObjectValue; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public uint Type + { + get + { + uint pType; + this.WrappedObject.GetType(out pType); + return pType; + } + } + + public uint Size + { + get + { + uint pSize; + this.WrappedObject.GetSize(out pSize); + return pSize; + } + } + + public ulong Address + { + get + { + ulong pAddress; + this.WrappedObject.GetAddress(out pAddress); + return pAddress; + } + } + + public ICorDebugValueBreakpoint CreateBreakpoint() + { + ICorDebugValueBreakpoint ppBreakpoint; + Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint; + this.WrappedObject.CreateBreakpoint(out out_ppBreakpoint); + ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint); + return ppBreakpoint; + } + + public ICorDebugClass Class + { + get + { + ICorDebugClass ppClass; + Debugger.Interop.CorDebug.ICorDebugClass out_ppClass; + this.WrappedObject.GetClass(out out_ppClass); + ppClass = ICorDebugClass.Wrap(out_ppClass); + return ppClass; + } + } + + public ICorDebugValue GetFieldValue(ICorDebugClass pClass, uint fieldDef) + { + ICorDebugValue ppValue; + Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; + this.WrappedObject.GetFieldValue(pClass.WrappedObject, fieldDef, out out_ppValue); + ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; + } + + public ICorDebugFunction GetVirtualMethod(uint memberRef) + { + ICorDebugFunction ppFunction; + Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction; + this.WrappedObject.GetVirtualMethod(memberRef, out out_ppFunction); + ppFunction = ICorDebugFunction.Wrap(out_ppFunction); + return ppFunction; + } + + public ICorDebugContext Context + { + get + { + ICorDebugContext ppContext; + Debugger.Interop.CorDebug.ICorDebugContext out_ppContext; + this.WrappedObject.GetContext(out out_ppContext); + ppContext = ICorDebugContext.Wrap(out_ppContext); + return ppContext; + } + } + + public int IsValueClass + { + get + { + int pbIsValueClass; + this.WrappedObject.IsValueClass(out pbIsValueClass); + return pbIsValueClass; + } + } + + public object ManagedCopy + { + get + { + object ppObject; + this.WrappedObject.GetManagedCopy(out ppObject); + return ppObject; + } + } + + public void SetFromManagedCopy(object pObject) + { + this.WrappedObject.SetFromManagedCopy(pObject); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugObjectValue2.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugObjectValue2.cs new file mode 100644 index 000000000..6bad5461a --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugObjectValue2.cs @@ -0,0 +1,111 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugObjectValue2 + { + + private Debugger.Interop.CorDebug.ICorDebugObjectValue2 wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugObjectValue2 WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugObjectValue2(Debugger.Interop.CorDebug.ICorDebugObjectValue2 wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugObjectValue2)); + } + + public static ICorDebugObjectValue2 Wrap(Debugger.Interop.CorDebug.ICorDebugObjectValue2 objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugObjectValue2(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugObjectValue2() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugObjectValue2)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugObjectValue2 o1, ICorDebugObjectValue2 o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugObjectValue2 o1, ICorDebugObjectValue2 o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugObjectValue2 casted = o as ICorDebugObjectValue2; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public ICorDebugType GetVirtualMethodAndType(uint memberRef, out ICorDebugFunction ppFunction) + { + ICorDebugType ppType; + Debugger.Interop.CorDebug.ICorDebugFunction out_ppFunction; + Debugger.Interop.CorDebug.ICorDebugType out_ppType; + this.WrappedObject.GetVirtualMethodAndType(memberRef, out out_ppFunction, out out_ppType); + ppFunction = ICorDebugFunction.Wrap(out_ppFunction); + ppType = ICorDebugType.Wrap(out_ppType); + return ppType; + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugProcess.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugProcess.cs new file mode 100644 index 000000000..e2af99724 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugProcess.cs @@ -0,0 +1,304 @@ +// +// +// +// +// $Revision: 3585 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugProcess + { + + private Debugger.Interop.CorDebug.ICorDebugProcess wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugProcess WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugProcess(Debugger.Interop.CorDebug.ICorDebugProcess wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugProcess)); + } + + public static ICorDebugProcess Wrap(Debugger.Interop.CorDebug.ICorDebugProcess objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugProcess(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugProcess() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugProcess)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugProcess o1, ICorDebugProcess o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugProcess o1, ICorDebugProcess o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugProcess casted = o as ICorDebugProcess; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void Stop(uint dwTimeoutIgnored) + { + this.WrappedObject.Stop(dwTimeoutIgnored); + } + + public void Continue(int fIsOutOfBand) + { + this.WrappedObject.Continue(fIsOutOfBand); + } + + public int IsRunning + { + get + { + int pbRunning; + this.WrappedObject.IsRunning(out pbRunning); + return pbRunning; + } + } + + public int HasQueuedCallbacks(ICorDebugThread pThread) + { + int pbQueued; + this.WrappedObject.HasQueuedCallbacks(pThread.WrappedObject, out pbQueued); + return pbQueued; + } + + public ICorDebugThreadEnum EnumerateThreads() + { + ICorDebugThreadEnum ppThreads; + Debugger.Interop.CorDebug.ICorDebugThreadEnum out_ppThreads; + this.WrappedObject.EnumerateThreads(out out_ppThreads); + ppThreads = ICorDebugThreadEnum.Wrap(out_ppThreads); + return ppThreads; + } + + public void SetAllThreadsDebugState(CorDebugThreadState state, ICorDebugThread pExceptThisThread) + { + this.WrappedObject.SetAllThreadsDebugState(((Debugger.Interop.CorDebug.CorDebugThreadState)(state)), pExceptThisThread.WrappedObject); + } + + public void Detach() + { + this.WrappedObject.Detach(); + } + + public void Terminate(uint exitCode) + { + this.WrappedObject.Terminate(exitCode); + } + + public ICorDebugErrorInfoEnum CanCommitChanges(uint cSnapshots, ref ICorDebugEditAndContinueSnapshot pSnapshots) + { + ICorDebugErrorInfoEnum pError; + Debugger.Interop.CorDebug.ICorDebugEditAndContinueSnapshot ref_pSnapshots = pSnapshots.WrappedObject; + Debugger.Interop.CorDebug.ICorDebugErrorInfoEnum out_pError; + this.WrappedObject.CanCommitChanges(cSnapshots, ref ref_pSnapshots, out out_pError); + pSnapshots = ICorDebugEditAndContinueSnapshot.Wrap(ref_pSnapshots); + pError = ICorDebugErrorInfoEnum.Wrap(out_pError); + return pError; + } + + public ICorDebugErrorInfoEnum CommitChanges(uint cSnapshots, ref ICorDebugEditAndContinueSnapshot pSnapshots) + { + ICorDebugErrorInfoEnum pError; + Debugger.Interop.CorDebug.ICorDebugEditAndContinueSnapshot ref_pSnapshots = pSnapshots.WrappedObject; + Debugger.Interop.CorDebug.ICorDebugErrorInfoEnum out_pError; + this.WrappedObject.CommitChanges(cSnapshots, ref ref_pSnapshots, out out_pError); + pSnapshots = ICorDebugEditAndContinueSnapshot.Wrap(ref_pSnapshots); + pError = ICorDebugErrorInfoEnum.Wrap(out_pError); + return pError; + } + + public uint ID + { + get + { + uint pdwProcessId; + this.WrappedObject.GetID(out pdwProcessId); + return pdwProcessId; + } + } + + public uint Handle + { + get + { + uint phProcessHandle; + this.WrappedObject.GetHandle(out phProcessHandle); + return phProcessHandle; + } + } + + public ICorDebugThread GetThread(uint dwThreadId) + { + ICorDebugThread ppThread; + Debugger.Interop.CorDebug.ICorDebugThread out_ppThread; + this.WrappedObject.GetThread(dwThreadId, out out_ppThread); + ppThread = ICorDebugThread.Wrap(out_ppThread); + return ppThread; + } + + public ICorDebugObjectEnum EnumerateObjects() + { + ICorDebugObjectEnum ppObjects; + Debugger.Interop.CorDebug.ICorDebugObjectEnum out_ppObjects; + this.WrappedObject.EnumerateObjects(out out_ppObjects); + ppObjects = ICorDebugObjectEnum.Wrap(out_ppObjects); + return ppObjects; + } + + public int IsTransitionStub(ulong address) + { + int pbTransitionStub; + this.WrappedObject.IsTransitionStub(address, out pbTransitionStub); + return pbTransitionStub; + } + + public int IsOSSuspended(uint threadID) + { + int pbSuspended; + this.WrappedObject.IsOSSuspended(threadID, out pbSuspended); + return pbSuspended; + } + + public void GetThreadContext(uint threadID, uint contextSize, System.IntPtr context) + { + this.WrappedObject.GetThreadContext(threadID, contextSize, context); + } + + public void SetThreadContext(uint threadID, uint contextSize, System.IntPtr context) + { + this.WrappedObject.SetThreadContext(threadID, contextSize, context); + } + + public uint ReadMemory(ulong address, uint size, System.IntPtr buffer) + { + uint read; + this.WrappedObject.ReadMemory(address, size, buffer, out read); + return read; + } + + public uint WriteMemory(ulong address, uint size, System.IntPtr buffer) + { + uint written; + this.WrappedObject.WriteMemory(address, size, buffer, out written); + return written; + } + + public void ClearCurrentException(uint threadID) + { + this.WrappedObject.ClearCurrentException(threadID); + } + + public void EnableLogMessages(int fOnOff) + { + this.WrappedObject.EnableLogMessages(fOnOff); + } + + public void ModifyLogSwitch(System.IntPtr pLogSwitchName, int lLevel) + { + this.WrappedObject.ModifyLogSwitch(pLogSwitchName, lLevel); + } + + public ICorDebugAppDomainEnum EnumerateAppDomains() + { + ICorDebugAppDomainEnum ppAppDomains; + Debugger.Interop.CorDebug.ICorDebugAppDomainEnum out_ppAppDomains; + this.WrappedObject.EnumerateAppDomains(out out_ppAppDomains); + ppAppDomains = ICorDebugAppDomainEnum.Wrap(out_ppAppDomains); + return ppAppDomains; + } + + public ICorDebugValue Object + { + get + { + ICorDebugValue ppObject; + Debugger.Interop.CorDebug.ICorDebugValue out_ppObject; + this.WrappedObject.GetObject(out out_ppObject); + ppObject = ICorDebugValue.Wrap(out_ppObject); + return ppObject; + } + } + + public ICorDebugThread ThreadForFiberCookie(uint fiberCookie) + { + ICorDebugThread ppThread; + Debugger.Interop.CorDebug.ICorDebugThread out_ppThread; + this.WrappedObject.ThreadForFiberCookie(fiberCookie, out out_ppThread); + ppThread = ICorDebugThread.Wrap(out_ppThread); + return ppThread; + } + + public uint HelperThreadID + { + get + { + uint pThreadID; + this.WrappedObject.GetHelperThreadID(out pThreadID); + return pThreadID; + } + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugProcess2.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugProcess2.cs new file mode 100644 index 000000000..8e01710c5 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugProcess2.cs @@ -0,0 +1,155 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugProcess2 + { + + private Debugger.Interop.CorDebug.ICorDebugProcess2 wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugProcess2 WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugProcess2(Debugger.Interop.CorDebug.ICorDebugProcess2 wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugProcess2)); + } + + public static ICorDebugProcess2 Wrap(Debugger.Interop.CorDebug.ICorDebugProcess2 objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugProcess2(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugProcess2() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugProcess2)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugProcess2 o1, ICorDebugProcess2 o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugProcess2 o1, ICorDebugProcess2 o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugProcess2 casted = o as ICorDebugProcess2; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public ICorDebugThread2 GetThreadForTaskID(ulong taskid) + { + ICorDebugThread2 ppThread; + Debugger.Interop.CorDebug.ICorDebugThread2 out_ppThread; + this.WrappedObject.GetThreadForTaskID(taskid, out out_ppThread); + ppThread = ICorDebugThread2.Wrap(out_ppThread); + return ppThread; + } + + public Debugger.Interop.CorDebug._COR_VERSION Version + { + get + { + Debugger.Interop.CorDebug._COR_VERSION version; + this.WrappedObject.GetVersion(out version); + return version; + } + } + + public uint SetUnmanagedBreakpoint(ulong address, uint bufsize, System.IntPtr buffer) + { + uint bufLen; + this.WrappedObject.SetUnmanagedBreakpoint(address, bufsize, buffer, out bufLen); + return bufLen; + } + + public void ClearUnmanagedBreakpoint(ulong address) + { + this.WrappedObject.ClearUnmanagedBreakpoint(address); + } + + public void SetDesiredNGENCompilerFlags(uint pdwFlags) + { + this.WrappedObject.SetDesiredNGENCompilerFlags(pdwFlags); + } + + public uint DesiredNGENCompilerFlags + { + get + { + uint pdwFlags; + this.WrappedObject.GetDesiredNGENCompilerFlags(out pdwFlags); + return pdwFlags; + } + } + + public ICorDebugReferenceValue GetReferenceValueFromGCHandle(uint handle) + { + ICorDebugReferenceValue pOutValue; + Debugger.Interop.CorDebug.ICorDebugReferenceValue out_pOutValue; + this.WrappedObject.GetReferenceValueFromGCHandle(handle, out out_pOutValue); + pOutValue = ICorDebugReferenceValue.Wrap(out_pOutValue); + return pOutValue; + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugProcessEnum.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugProcessEnum.cs new file mode 100644 index 000000000..919d5de3b --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugProcessEnum.cs @@ -0,0 +1,136 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugProcessEnum + { + + private Debugger.Interop.CorDebug.ICorDebugProcessEnum wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugProcessEnum WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugProcessEnum(Debugger.Interop.CorDebug.ICorDebugProcessEnum wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugProcessEnum)); + } + + public static ICorDebugProcessEnum Wrap(Debugger.Interop.CorDebug.ICorDebugProcessEnum objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugProcessEnum(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugProcessEnum() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugProcessEnum)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugProcessEnum o1, ICorDebugProcessEnum o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugProcessEnum o1, ICorDebugProcessEnum o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugProcessEnum casted = o as ICorDebugProcessEnum; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void Skip(uint celt) + { + this.WrappedObject.Skip(celt); + } + + public void Reset() + { + this.WrappedObject.Reset(); + } + + public ICorDebugEnum Clone() + { + ICorDebugEnum ppEnum; + Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum; + this.WrappedObject.Clone(out out_ppEnum); + ppEnum = ICorDebugEnum.Wrap(out_ppEnum); + return ppEnum; + } + + public uint Count + { + get + { + uint pcelt; + this.WrappedObject.GetCount(out pcelt); + return pcelt; + } + } + + public uint Next(uint celt, System.IntPtr processes) + { + uint pceltFetched; + this.WrappedObject.Next(celt, processes, out pceltFetched); + return pceltFetched; + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugReferenceValue.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugReferenceValue.cs new file mode 100644 index 000000000..7ad71060b --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugReferenceValue.cs @@ -0,0 +1,182 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugReferenceValue + { + + private Debugger.Interop.CorDebug.ICorDebugReferenceValue wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugReferenceValue WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugReferenceValue(Debugger.Interop.CorDebug.ICorDebugReferenceValue wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugReferenceValue)); + } + + public static ICorDebugReferenceValue Wrap(Debugger.Interop.CorDebug.ICorDebugReferenceValue objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugReferenceValue(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugReferenceValue() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugReferenceValue)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugReferenceValue o1, ICorDebugReferenceValue o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugReferenceValue o1, ICorDebugReferenceValue o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugReferenceValue casted = o as ICorDebugReferenceValue; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public uint Type + { + get + { + uint pType; + this.WrappedObject.GetType(out pType); + return pType; + } + } + + public uint Size + { + get + { + uint pSize; + this.WrappedObject.GetSize(out pSize); + return pSize; + } + } + + public ulong Address + { + get + { + ulong pAddress; + this.WrappedObject.GetAddress(out pAddress); + return pAddress; + } + } + + public ICorDebugValueBreakpoint CreateBreakpoint() + { + ICorDebugValueBreakpoint ppBreakpoint; + Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint; + this.WrappedObject.CreateBreakpoint(out out_ppBreakpoint); + ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint); + return ppBreakpoint; + } + + public int IsNull + { + get + { + int pbNull; + this.WrappedObject.IsNull(out pbNull); + return pbNull; + } + } + + public ulong Value + { + get + { + ulong pValue; + this.WrappedObject.GetValue(out pValue); + return pValue; + } + } + + public void SetValue(ulong value) + { + this.WrappedObject.SetValue(value); + } + + public ICorDebugValue Dereference() + { + ICorDebugValue ppValue; + Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; + this.WrappedObject.Dereference(out out_ppValue); + ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; + } + + public ICorDebugValue DereferenceStrong() + { + ICorDebugValue ppValue; + Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; + this.WrappedObject.DereferenceStrong(out out_ppValue); + ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugRegisterSet.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugRegisterSet.cs new file mode 100644 index 000000000..6d6ddfb43 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugRegisterSet.cs @@ -0,0 +1,130 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugRegisterSet + { + + private Debugger.Interop.CorDebug.ICorDebugRegisterSet wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugRegisterSet WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugRegisterSet(Debugger.Interop.CorDebug.ICorDebugRegisterSet wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugRegisterSet)); + } + + public static ICorDebugRegisterSet Wrap(Debugger.Interop.CorDebug.ICorDebugRegisterSet objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugRegisterSet(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugRegisterSet() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugRegisterSet)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugRegisterSet o1, ICorDebugRegisterSet o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugRegisterSet o1, ICorDebugRegisterSet o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugRegisterSet casted = o as ICorDebugRegisterSet; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public ulong RegistersAvailable + { + get + { + ulong pAvailable; + this.WrappedObject.GetRegistersAvailable(out pAvailable); + return pAvailable; + } + } + + public void GetRegisters(ulong mask, uint regCount, System.IntPtr regBuffer) + { + this.WrappedObject.GetRegisters(mask, regCount, regBuffer); + } + + public void SetRegisters(ulong mask, uint regCount, ref ulong regBuffer) + { + this.WrappedObject.SetRegisters(mask, regCount, ref regBuffer); + } + + public void GetThreadContext(uint contextSize, System.IntPtr context) + { + this.WrappedObject.GetThreadContext(contextSize, context); + } + + public void SetThreadContext(uint contextSize, System.IntPtr context) + { + this.WrappedObject.SetThreadContext(contextSize, context); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugStepper.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugStepper.cs new file mode 100644 index 000000000..463c9ae85 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugStepper.cs @@ -0,0 +1,145 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugStepper + { + + private Debugger.Interop.CorDebug.ICorDebugStepper wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugStepper WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugStepper(Debugger.Interop.CorDebug.ICorDebugStepper wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugStepper)); + } + + public static ICorDebugStepper Wrap(Debugger.Interop.CorDebug.ICorDebugStepper objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugStepper(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugStepper() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugStepper)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugStepper o1, ICorDebugStepper o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugStepper o1, ICorDebugStepper o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugStepper casted = o as ICorDebugStepper; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public int IsActive + { + get + { + int pbActive; + this.WrappedObject.IsActive(out pbActive); + return pbActive; + } + } + + public void Deactivate() + { + this.WrappedObject.Deactivate(); + } + + public void SetInterceptMask(CorDebugIntercept mask) + { + this.WrappedObject.SetInterceptMask(((Debugger.Interop.CorDebug.CorDebugIntercept)(mask))); + } + + public void SetUnmappedStopMask(CorDebugUnmappedStop mask) + { + this.WrappedObject.SetUnmappedStopMask(((Debugger.Interop.CorDebug.CorDebugUnmappedStop)(mask))); + } + + public void Step(int bStepIn) + { + this.WrappedObject.Step(bStepIn); + } + + public void StepRange(int bStepIn, System.IntPtr ranges, uint cRangeCount) + { + this.WrappedObject.StepRange(bStepIn, ranges, cRangeCount); + } + + public void StepOut() + { + this.WrappedObject.StepOut(); + } + + public void SetRangeIL(int bIL) + { + this.WrappedObject.SetRangeIL(bIL); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugStepper2.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugStepper2.cs new file mode 100644 index 000000000..a3e7187a8 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugStepper2.cs @@ -0,0 +1,105 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugStepper2 + { + + private Debugger.Interop.CorDebug.ICorDebugStepper2 wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugStepper2 WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugStepper2(Debugger.Interop.CorDebug.ICorDebugStepper2 wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugStepper2)); + } + + public static ICorDebugStepper2 Wrap(Debugger.Interop.CorDebug.ICorDebugStepper2 objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugStepper2(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugStepper2() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugStepper2)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugStepper2 o1, ICorDebugStepper2 o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugStepper2 o1, ICorDebugStepper2 o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugStepper2 casted = o as ICorDebugStepper2; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void SetJMC(int fIsJMCStepper) + { + this.WrappedObject.SetJMC(fIsJMCStepper); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugStepperEnum.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugStepperEnum.cs new file mode 100644 index 000000000..201086df4 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugStepperEnum.cs @@ -0,0 +1,136 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugStepperEnum + { + + private Debugger.Interop.CorDebug.ICorDebugStepperEnum wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugStepperEnum WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugStepperEnum(Debugger.Interop.CorDebug.ICorDebugStepperEnum wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugStepperEnum)); + } + + public static ICorDebugStepperEnum Wrap(Debugger.Interop.CorDebug.ICorDebugStepperEnum objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugStepperEnum(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugStepperEnum() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugStepperEnum)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugStepperEnum o1, ICorDebugStepperEnum o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugStepperEnum o1, ICorDebugStepperEnum o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugStepperEnum casted = o as ICorDebugStepperEnum; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void Skip(uint celt) + { + this.WrappedObject.Skip(celt); + } + + public void Reset() + { + this.WrappedObject.Reset(); + } + + public ICorDebugEnum Clone() + { + ICorDebugEnum ppEnum; + Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum; + this.WrappedObject.Clone(out out_ppEnum); + ppEnum = ICorDebugEnum.Wrap(out_ppEnum); + return ppEnum; + } + + public uint Count + { + get + { + uint pcelt; + this.WrappedObject.GetCount(out pcelt); + return pcelt; + } + } + + public uint Next(uint celt, System.IntPtr steppers) + { + uint pceltFetched; + this.WrappedObject.Next(celt, steppers, out pceltFetched); + return pceltFetched; + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugStringValue.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugStringValue.cs new file mode 100644 index 000000000..f3d07be09 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugStringValue.cs @@ -0,0 +1,173 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugStringValue + { + + private Debugger.Interop.CorDebug.ICorDebugStringValue wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugStringValue WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugStringValue(Debugger.Interop.CorDebug.ICorDebugStringValue wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugStringValue)); + } + + public static ICorDebugStringValue Wrap(Debugger.Interop.CorDebug.ICorDebugStringValue objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugStringValue(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugStringValue() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugStringValue)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugStringValue o1, ICorDebugStringValue o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugStringValue o1, ICorDebugStringValue o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugStringValue casted = o as ICorDebugStringValue; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public uint Type + { + get + { + uint pType; + this.WrappedObject.GetType(out pType); + return pType; + } + } + + public uint Size + { + get + { + uint pSize; + this.WrappedObject.GetSize(out pSize); + return pSize; + } + } + + public ulong Address + { + get + { + ulong pAddress; + this.WrappedObject.GetAddress(out pAddress); + return pAddress; + } + } + + public ICorDebugValueBreakpoint CreateBreakpoint() + { + ICorDebugValueBreakpoint ppBreakpoint; + Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint; + this.WrappedObject.CreateBreakpoint(out out_ppBreakpoint); + ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint); + return ppBreakpoint; + } + + public int IsValid + { + get + { + int pbValid; + this.WrappedObject.IsValid(out pbValid); + return pbValid; + } + } + + public ICorDebugValueBreakpoint CreateRelocBreakpoint() + { + ICorDebugValueBreakpoint ppBreakpoint; + Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint; + this.WrappedObject.CreateRelocBreakpoint(out out_ppBreakpoint); + ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint); + return ppBreakpoint; + } + + public uint Length + { + get + { + uint pcchString; + this.WrappedObject.GetLength(out pcchString); + return pcchString; + } + } + + public void GetString(uint cchString, out uint pcchString, System.IntPtr szString) + { + this.WrappedObject.GetString(cchString, out pcchString, szString); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugThread.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugThread.cs new file mode 100644 index 000000000..52ee826dd --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugThread.cs @@ -0,0 +1,265 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugThread + { + + private Debugger.Interop.CorDebug.ICorDebugThread wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugThread WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugThread(Debugger.Interop.CorDebug.ICorDebugThread wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugThread)); + } + + public static ICorDebugThread Wrap(Debugger.Interop.CorDebug.ICorDebugThread objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugThread(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugThread() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugThread)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugThread o1, ICorDebugThread o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugThread o1, ICorDebugThread o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugThread casted = o as ICorDebugThread; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public ICorDebugProcess Process + { + get + { + ICorDebugProcess ppProcess; + Debugger.Interop.CorDebug.ICorDebugProcess out_ppProcess; + this.WrappedObject.GetProcess(out out_ppProcess); + ppProcess = ICorDebugProcess.Wrap(out_ppProcess); + return ppProcess; + } + } + + public uint ID + { + get + { + uint pdwThreadId; + this.WrappedObject.GetID(out pdwThreadId); + return pdwThreadId; + } + } + + public uint Handle + { + get + { + uint phThreadHandle; + this.WrappedObject.GetHandle(out phThreadHandle); + return phThreadHandle; + } + } + + public ICorDebugAppDomain AppDomain + { + get + { + ICorDebugAppDomain ppAppDomain; + Debugger.Interop.CorDebug.ICorDebugAppDomain out_ppAppDomain; + this.WrappedObject.GetAppDomain(out out_ppAppDomain); + ppAppDomain = ICorDebugAppDomain.Wrap(out_ppAppDomain); + return ppAppDomain; + } + } + + public void SetDebugState(CorDebugThreadState state) + { + this.WrappedObject.SetDebugState(((Debugger.Interop.CorDebug.CorDebugThreadState)(state))); + } + + public CorDebugThreadState DebugState + { + get + { + CorDebugThreadState pState; + Debugger.Interop.CorDebug.CorDebugThreadState out_pState; + this.WrappedObject.GetDebugState(out out_pState); + pState = ((CorDebugThreadState)(out_pState)); + return pState; + } + } + + public CorDebugUserState UserState + { + get + { + CorDebugUserState pState; + Debugger.Interop.CorDebug.CorDebugUserState out_pState; + this.WrappedObject.GetUserState(out out_pState); + pState = ((CorDebugUserState)(out_pState)); + return pState; + } + } + + public ICorDebugValue CurrentException + { + get + { + ICorDebugValue ppExceptionObject; + Debugger.Interop.CorDebug.ICorDebugValue out_ppExceptionObject; + this.WrappedObject.GetCurrentException(out out_ppExceptionObject); + ppExceptionObject = ICorDebugValue.Wrap(out_ppExceptionObject); + return ppExceptionObject; + } + } + + public void ClearCurrentException() + { + this.WrappedObject.ClearCurrentException(); + } + + public ICorDebugStepper CreateStepper() + { + ICorDebugStepper ppStepper; + Debugger.Interop.CorDebug.ICorDebugStepper out_ppStepper; + this.WrappedObject.CreateStepper(out out_ppStepper); + ppStepper = ICorDebugStepper.Wrap(out_ppStepper); + return ppStepper; + } + + public ICorDebugChainEnum EnumerateChains() + { + ICorDebugChainEnum ppChains; + Debugger.Interop.CorDebug.ICorDebugChainEnum out_ppChains; + this.WrappedObject.EnumerateChains(out out_ppChains); + ppChains = ICorDebugChainEnum.Wrap(out_ppChains); + return ppChains; + } + + public ICorDebugChain ActiveChain + { + get + { + ICorDebugChain ppChain; + Debugger.Interop.CorDebug.ICorDebugChain out_ppChain; + this.WrappedObject.GetActiveChain(out out_ppChain); + ppChain = ICorDebugChain.Wrap(out_ppChain); + return ppChain; + } + } + + public ICorDebugFrame ActiveFrame + { + get + { + ICorDebugFrame ppFrame; + Debugger.Interop.CorDebug.ICorDebugFrame out_ppFrame; + this.WrappedObject.GetActiveFrame(out out_ppFrame); + ppFrame = ICorDebugFrame.Wrap(out_ppFrame); + return ppFrame; + } + } + + public ICorDebugRegisterSet RegisterSet + { + get + { + ICorDebugRegisterSet ppRegisters; + Debugger.Interop.CorDebug.ICorDebugRegisterSet out_ppRegisters; + this.WrappedObject.GetRegisterSet(out out_ppRegisters); + ppRegisters = ICorDebugRegisterSet.Wrap(out_ppRegisters); + return ppRegisters; + } + } + + public ICorDebugEval CreateEval() + { + ICorDebugEval ppEval; + Debugger.Interop.CorDebug.ICorDebugEval out_ppEval; + this.WrappedObject.CreateEval(out out_ppEval); + ppEval = ICorDebugEval.Wrap(out_ppEval); + return ppEval; + } + + public ICorDebugValue Object + { + get + { + ICorDebugValue ppObject; + Debugger.Interop.CorDebug.ICorDebugValue out_ppObject; + this.WrappedObject.GetObject(out out_ppObject); + ppObject = ICorDebugValue.Wrap(out_ppObject); + return ppObject; + } + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugThread2.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugThread2.cs new file mode 100644 index 000000000..0dee47944 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugThread2.cs @@ -0,0 +1,140 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugThread2 + { + + private Debugger.Interop.CorDebug.ICorDebugThread2 wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugThread2 WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugThread2(Debugger.Interop.CorDebug.ICorDebugThread2 wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugThread2)); + } + + public static ICorDebugThread2 Wrap(Debugger.Interop.CorDebug.ICorDebugThread2 objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugThread2(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugThread2() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugThread2)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugThread2 o1, ICorDebugThread2 o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugThread2 o1, ICorDebugThread2 o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugThread2 casted = o as ICorDebugThread2; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void GetActiveFunctions(uint cFunctions, out uint pcFunctions, System.IntPtr pFunctions) + { + this.WrappedObject.GetActiveFunctions(cFunctions, out pcFunctions, pFunctions); + } + + public uint ConnectionID + { + get + { + uint pdwConnectionId; + this.WrappedObject.GetConnectionID(out pdwConnectionId); + return pdwConnectionId; + } + } + + public ulong TaskID + { + get + { + ulong pTaskId; + this.WrappedObject.GetTaskID(out pTaskId); + return pTaskId; + } + } + + public uint VolatileOSThreadID + { + get + { + uint pdwTid; + this.WrappedObject.GetVolatileOSThreadID(out pdwTid); + return pdwTid; + } + } + + public void InterceptCurrentException(ICorDebugFrame pFrame) + { + this.WrappedObject.InterceptCurrentException(pFrame.WrappedObject); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugThreadEnum.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugThreadEnum.cs new file mode 100644 index 000000000..54a42bb9d --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugThreadEnum.cs @@ -0,0 +1,136 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugThreadEnum + { + + private Debugger.Interop.CorDebug.ICorDebugThreadEnum wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugThreadEnum WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugThreadEnum(Debugger.Interop.CorDebug.ICorDebugThreadEnum wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugThreadEnum)); + } + + public static ICorDebugThreadEnum Wrap(Debugger.Interop.CorDebug.ICorDebugThreadEnum objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugThreadEnum(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugThreadEnum() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugThreadEnum)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugThreadEnum o1, ICorDebugThreadEnum o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugThreadEnum o1, ICorDebugThreadEnum o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugThreadEnum casted = o as ICorDebugThreadEnum; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void Skip(uint celt) + { + this.WrappedObject.Skip(celt); + } + + public void Reset() + { + this.WrappedObject.Reset(); + } + + public ICorDebugEnum Clone() + { + ICorDebugEnum ppEnum; + Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum; + this.WrappedObject.Clone(out out_ppEnum); + ppEnum = ICorDebugEnum.Wrap(out_ppEnum); + return ppEnum; + } + + public uint Count + { + get + { + uint pcelt; + this.WrappedObject.GetCount(out pcelt); + return pcelt; + } + } + + public uint Next(uint celt, System.IntPtr threads) + { + uint pceltFetched; + this.WrappedObject.Next(celt, threads, out pceltFetched); + return pceltFetched; + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugType.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugType.cs new file mode 100644 index 000000000..2324bd5e4 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugType.cs @@ -0,0 +1,174 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugType + { + + private Debugger.Interop.CorDebug.ICorDebugType wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugType WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugType(Debugger.Interop.CorDebug.ICorDebugType wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugType)); + } + + public static ICorDebugType Wrap(Debugger.Interop.CorDebug.ICorDebugType objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugType(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugType() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugType)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugType o1, ICorDebugType o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugType o1, ICorDebugType o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugType casted = o as ICorDebugType; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public uint Type + { + get + { + uint ty; + this.WrappedObject.GetType(out ty); + return ty; + } + } + + public ICorDebugClass Class + { + get + { + ICorDebugClass ppClass; + Debugger.Interop.CorDebug.ICorDebugClass out_ppClass; + this.WrappedObject.GetClass(out out_ppClass); + ppClass = ICorDebugClass.Wrap(out_ppClass); + return ppClass; + } + } + + public ICorDebugTypeEnum EnumerateTypeParameters() + { + ICorDebugTypeEnum ppTyParEnum; + Debugger.Interop.CorDebug.ICorDebugTypeEnum out_ppTyParEnum; + this.WrappedObject.EnumerateTypeParameters(out out_ppTyParEnum); + ppTyParEnum = ICorDebugTypeEnum.Wrap(out_ppTyParEnum); + return ppTyParEnum; + } + + public ICorDebugType FirstTypeParameter + { + get + { + ICorDebugType value; + Debugger.Interop.CorDebug.ICorDebugType out_value; + this.WrappedObject.GetFirstTypeParameter(out out_value); + value = ICorDebugType.Wrap(out_value); + return value; + } + } + + public ICorDebugType Base + { + get + { + ICorDebugType pBase; + Debugger.Interop.CorDebug.ICorDebugType out_pBase; + this.WrappedObject.GetBase(out out_pBase); + pBase = ICorDebugType.Wrap(out_pBase); + return pBase; + } + } + + public ICorDebugValue GetStaticFieldValue(uint fieldDef, ICorDebugFrame pFrame) + { + ICorDebugValue ppValue; + Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; + this.WrappedObject.GetStaticFieldValue(fieldDef, pFrame.WrappedObject, out out_ppValue); + ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; + } + + public uint Rank + { + get + { + uint pnRank; + this.WrappedObject.GetRank(out pnRank); + return pnRank; + } + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugTypeEnum.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugTypeEnum.cs new file mode 100644 index 000000000..9e1b2f8ed --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugTypeEnum.cs @@ -0,0 +1,154 @@ +// +// +// +// +// $Revision: 2209 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugTypeEnum + { + + private Debugger.Interop.CorDebug.ICorDebugTypeEnum wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugTypeEnum WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugTypeEnum(Debugger.Interop.CorDebug.ICorDebugTypeEnum wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugTypeEnum)); + } + + public static ICorDebugTypeEnum Wrap(Debugger.Interop.CorDebug.ICorDebugTypeEnum objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugTypeEnum(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugTypeEnum() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugTypeEnum)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugTypeEnum o1, ICorDebugTypeEnum o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugTypeEnum o1, ICorDebugTypeEnum o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugTypeEnum casted = o as ICorDebugTypeEnum; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void Skip(uint celt) + { + this.WrappedObject.Skip(celt); + } + + public void Reset() + { + this.WrappedObject.Reset(); + } + + public ICorDebugEnum Clone() + { + ICorDebugEnum ppEnum; + Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum; + this.WrappedObject.Clone(out out_ppEnum); + ppEnum = ICorDebugEnum.Wrap(out_ppEnum); + return ppEnum; + } + + public uint Count + { + get + { + uint pcelt; + this.WrappedObject.GetCount(out pcelt); + return pcelt; + } + } + + public uint Next(uint celt, ICorDebugType[] values) + { + uint pceltFetched; + Debugger.Interop.CorDebug.ICorDebugType[] array_values = new Debugger.Interop.CorDebug.ICorDebugType[values.Length]; + for (int i = 0; (i < values.Length); i = (i + 1)) + { + if ((values[i] != null)) + { + array_values[i] = values[i].WrappedObject; + } + } + this.WrappedObject.Next(celt, array_values, out pceltFetched); + for (int i = 0; (i < values.Length); i = (i + 1)) + { + if ((array_values[i] != null)) + { + values[i] = ICorDebugType.Wrap(array_values[i]); + } else + { + values[i] = null; + } + } + return pceltFetched; + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugUnmanagedCallback.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugUnmanagedCallback.cs new file mode 100644 index 000000000..c2420e795 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugUnmanagedCallback.cs @@ -0,0 +1,105 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugUnmanagedCallback + { + + private Debugger.Interop.CorDebug.ICorDebugUnmanagedCallback wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugUnmanagedCallback WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugUnmanagedCallback(Debugger.Interop.CorDebug.ICorDebugUnmanagedCallback wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugUnmanagedCallback)); + } + + public static ICorDebugUnmanagedCallback Wrap(Debugger.Interop.CorDebug.ICorDebugUnmanagedCallback objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugUnmanagedCallback(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugUnmanagedCallback() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugUnmanagedCallback)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugUnmanagedCallback o1, ICorDebugUnmanagedCallback o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugUnmanagedCallback o1, ICorDebugUnmanagedCallback o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugUnmanagedCallback casted = o as ICorDebugUnmanagedCallback; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void DebugEvent(uint pDebugEvent, int fOutOfBand) + { + this.WrappedObject.DebugEvent(pDebugEvent, fOutOfBand); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugValue.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugValue.cs new file mode 100644 index 000000000..a5029f729 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugValue.cs @@ -0,0 +1,139 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugValue + { + + private Debugger.Interop.CorDebug.ICorDebugValue wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugValue WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugValue(Debugger.Interop.CorDebug.ICorDebugValue wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugValue)); + } + + public static ICorDebugValue Wrap(Debugger.Interop.CorDebug.ICorDebugValue objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugValue(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugValue() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugValue)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugValue o1, ICorDebugValue o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugValue o1, ICorDebugValue o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugValue casted = o as ICorDebugValue; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public uint Type + { + get + { + uint pType; + this.WrappedObject.GetType(out pType); + return pType; + } + } + + public uint Size + { + get + { + uint pSize; + this.WrappedObject.GetSize(out pSize); + return pSize; + } + } + + public ulong Address + { + get + { + ulong pAddress; + this.WrappedObject.GetAddress(out pAddress); + return pAddress; + } + } + + public ICorDebugValueBreakpoint CreateBreakpoint() + { + ICorDebugValueBreakpoint ppBreakpoint; + Debugger.Interop.CorDebug.ICorDebugValueBreakpoint out_ppBreakpoint; + this.WrappedObject.CreateBreakpoint(out out_ppBreakpoint); + ppBreakpoint = ICorDebugValueBreakpoint.Wrap(out_ppBreakpoint); + return ppBreakpoint; + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugValue2.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugValue2.cs new file mode 100644 index 000000000..5ce7b59b1 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugValue2.cs @@ -0,0 +1,112 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugValue2 + { + + private Debugger.Interop.CorDebug.ICorDebugValue2 wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugValue2 WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugValue2(Debugger.Interop.CorDebug.ICorDebugValue2 wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugValue2)); + } + + public static ICorDebugValue2 Wrap(Debugger.Interop.CorDebug.ICorDebugValue2 objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugValue2(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugValue2() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugValue2)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugValue2 o1, ICorDebugValue2 o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugValue2 o1, ICorDebugValue2 o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugValue2 casted = o as ICorDebugValue2; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public ICorDebugType ExactType + { + get + { + ICorDebugType ppType; + Debugger.Interop.CorDebug.ICorDebugType out_ppType; + this.WrappedObject.GetExactType(out out_ppType); + ppType = ICorDebugType.Wrap(out_ppType); + return ppType; + } + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugValueBreakpoint.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugValueBreakpoint.cs new file mode 100644 index 000000000..03a2c5c6f --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugValueBreakpoint.cs @@ -0,0 +1,127 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugValueBreakpoint + { + + private Debugger.Interop.CorDebug.ICorDebugValueBreakpoint wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugValueBreakpoint WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugValueBreakpoint(Debugger.Interop.CorDebug.ICorDebugValueBreakpoint wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugValueBreakpoint)); + } + + public static ICorDebugValueBreakpoint Wrap(Debugger.Interop.CorDebug.ICorDebugValueBreakpoint objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugValueBreakpoint(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugValueBreakpoint() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugValueBreakpoint)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugValueBreakpoint o1, ICorDebugValueBreakpoint o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugValueBreakpoint o1, ICorDebugValueBreakpoint o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugValueBreakpoint casted = o as ICorDebugValueBreakpoint; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void Activate(int bActive) + { + this.WrappedObject.Activate(bActive); + } + + public int IsActive + { + get + { + int pbActive; + this.WrappedObject.IsActive(out pbActive); + return pbActive; + } + } + + public ICorDebugValue Value + { + get + { + ICorDebugValue ppValue; + Debugger.Interop.CorDebug.ICorDebugValue out_ppValue; + this.WrappedObject.GetValue(out out_ppValue); + ppValue = ICorDebugValue.Wrap(out_ppValue); + return ppValue; + } + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugValueEnum.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugValueEnum.cs new file mode 100644 index 000000000..398b5bf8b --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ICorDebugValueEnum.cs @@ -0,0 +1,136 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugValueEnum + { + + private Debugger.Interop.CorDebug.ICorDebugValueEnum wrappedObject; + + internal Debugger.Interop.CorDebug.ICorDebugValueEnum WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorDebugValueEnum(Debugger.Interop.CorDebug.ICorDebugValueEnum wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorDebugValueEnum)); + } + + public static ICorDebugValueEnum Wrap(Debugger.Interop.CorDebug.ICorDebugValueEnum objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorDebugValueEnum(objectToWrap); + } else + { + return null; + } + } + + ~ICorDebugValueEnum() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ICorDebugValueEnum)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ICorDebugValueEnum o1, ICorDebugValueEnum o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ICorDebugValueEnum o1, ICorDebugValueEnum o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ICorDebugValueEnum casted = o as ICorDebugValueEnum; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void Skip(uint celt) + { + this.WrappedObject.Skip(celt); + } + + public void Reset() + { + this.WrappedObject.Reset(); + } + + public ICorDebugEnum Clone() + { + ICorDebugEnum ppEnum; + Debugger.Interop.CorDebug.ICorDebugEnum out_ppEnum; + this.WrappedObject.Clone(out out_ppEnum); + ppEnum = ICorDebugEnum.Wrap(out_ppEnum); + return ppEnum; + } + + public uint Count + { + get + { + uint pcelt; + this.WrappedObject.GetCount(out pcelt); + return pcelt; + } + } + + public uint Next(uint celt, System.IntPtr values) + { + uint pceltFetched; + this.WrappedObject.Next(celt, values, out pceltFetched); + return pceltFetched; + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ISequentialStream.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ISequentialStream.cs new file mode 100644 index 000000000..5ee5701ed --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/ISequentialStream.cs @@ -0,0 +1,114 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ISequentialStream + { + + private Debugger.Interop.CorDebug.ISequentialStream wrappedObject; + + internal Debugger.Interop.CorDebug.ISequentialStream WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ISequentialStream(Debugger.Interop.CorDebug.ISequentialStream wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ISequentialStream)); + } + + public static ISequentialStream Wrap(Debugger.Interop.CorDebug.ISequentialStream objectToWrap) + { + if ((objectToWrap != null)) + { + return new ISequentialStream(objectToWrap); + } else + { + return null; + } + } + + ~ISequentialStream() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ISequentialStream)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ISequentialStream o1, ISequentialStream o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ISequentialStream o1, ISequentialStream o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ISequentialStream casted = o as ISequentialStream; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public uint RemoteRead(out byte pv, uint cb) + { + uint pcbRead; + this.WrappedObject.RemoteRead(out pv, cb, out pcbRead); + return pcbRead; + } + + public uint RemoteWrite(ref byte pv, uint cb) + { + uint pcbWritten; + this.WrappedObject.RemoteWrite(ref pv, cb, out pcbWritten); + return pcbWritten; + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/IStream.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/IStream.cs new file mode 100644 index 000000000..9467c5740 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/Autogenerated/IStream.cs @@ -0,0 +1,167 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class IStream + { + + private Debugger.Interop.CorDebug.IStream wrappedObject; + + internal Debugger.Interop.CorDebug.IStream WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public IStream(Debugger.Interop.CorDebug.IStream wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(IStream)); + } + + public static IStream Wrap(Debugger.Interop.CorDebug.IStream objectToWrap) + { + if ((objectToWrap != null)) + { + return new IStream(objectToWrap); + } else + { + return null; + } + } + + ~IStream() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(IStream)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(IStream o1, IStream o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(IStream o1, IStream o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + IStream casted = o as IStream; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public uint RemoteRead(out byte pv, uint cb) + { + uint pcbRead; + this.WrappedObject.RemoteRead(out pv, cb, out pcbRead); + return pcbRead; + } + + public uint RemoteWrite(ref byte pv, uint cb) + { + uint pcbWritten; + this.WrappedObject.RemoteWrite(ref pv, cb, out pcbWritten); + return pcbWritten; + } + + public Debugger.Interop.CorDebug._ULARGE_INTEGER RemoteSeek(Debugger.Interop.CorDebug._LARGE_INTEGER dlibMove, uint dwOrigin) + { + Debugger.Interop.CorDebug._ULARGE_INTEGER plibNewPosition; + this.WrappedObject.RemoteSeek(dlibMove, dwOrigin, out plibNewPosition); + return plibNewPosition; + } + + public void SetSize(Debugger.Interop.CorDebug._ULARGE_INTEGER libNewSize) + { + this.WrappedObject.SetSize(libNewSize); + } + + public Debugger.Interop.CorDebug._ULARGE_INTEGER RemoteCopyTo(IStream pstm, Debugger.Interop.CorDebug._ULARGE_INTEGER cb, out Debugger.Interop.CorDebug._ULARGE_INTEGER pcbRead) + { + Debugger.Interop.CorDebug._ULARGE_INTEGER pcbWritten; + this.WrappedObject.RemoteCopyTo(pstm.WrappedObject, cb, out pcbRead, out pcbWritten); + return pcbWritten; + } + + public void Commit(uint grfCommitFlags) + { + this.WrappedObject.Commit(grfCommitFlags); + } + + public void Revert() + { + this.WrappedObject.Revert(); + } + + public void LockRegion(Debugger.Interop.CorDebug._ULARGE_INTEGER libOffset, Debugger.Interop.CorDebug._ULARGE_INTEGER cb, uint dwLockType) + { + this.WrappedObject.LockRegion(libOffset, cb, dwLockType); + } + + public void UnlockRegion(Debugger.Interop.CorDebug._ULARGE_INTEGER libOffset, Debugger.Interop.CorDebug._ULARGE_INTEGER cb, uint dwLockType) + { + this.WrappedObject.UnlockRegion(libOffset, cb, dwLockType); + } + + public void Stat(out Debugger.Interop.CorDebug.tagSTATSTG pstatstg, uint grfStatFlag) + { + this.WrappedObject.Stat(out pstatstg, grfStatFlag); + } + + public IStream Clone() + { + IStream ppstm; + Debugger.Interop.CorDebug.IStream out_ppstm; + this.WrappedObject.Clone(out out_ppstm); + ppstm = IStream.Wrap(out_ppstm); + return ppstm; + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugArrayValue.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugArrayValue.cs new file mode 100644 index 000000000..ecc5ce39b --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugArrayValue.cs @@ -0,0 +1,52 @@ +// +// +// +// +// $Revision: 2787 $ +// + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + public partial class ICorDebugArrayValue + { + public unsafe uint[] Dimensions { + get { + uint[] dimensions = new uint[this.Rank]; + fixed (void* pDimensions = dimensions) { + this.GetDimensions((uint)dimensions.Length, new IntPtr(pDimensions)); + } + return dimensions; + } + } + + public unsafe uint[] BaseIndicies { + get { + uint[] baseIndicies = new uint[this.Rank]; + fixed (void* pBaseIndicies = baseIndicies) { + this.GetBaseIndicies((uint)baseIndicies.Length, new IntPtr(pBaseIndicies)); + } + return baseIndicies; + } + } + + public unsafe ICorDebugValue GetElement(uint[] indices) + { + fixed (void* pIndices = indices) { + return this.GetElement((uint)indices.Length, new IntPtr(pIndices)); + } + } + + public unsafe ICorDebugValue GetElement(int[] indices) + { + fixed (void* pIndices = indices) { + return this.GetElement((uint)indices.Length, new IntPtr(pIndices)); + } + } + } +} + +#pragma warning restore 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugChain.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugChain.cs new file mode 100644 index 000000000..4b1516310 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugChain.cs @@ -0,0 +1,29 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + public partial class ICorDebugChain + { + uint index; + + public uint Index { + get { + return index; + } + set { + index = value; + } + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugChainEnum.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugChainEnum.cs new file mode 100644 index 000000000..b1aa62374 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugChainEnum.cs @@ -0,0 +1,47 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + using System.Collections.Generic; + + + public partial class ICorDebugChainEnum + { + public IEnumerable Enumerator { + get { + Reset(); + uint index = this.Count - 1; + while (true) { + ICorDebugChain corChain = Next(); + if (corChain != null) { + corChain.Index = index--; + yield return corChain; + } else { + break; + } + } + } + } + + public ICorDebugChain Next() + { + ICorDebugChain[] corChains = new ICorDebugChain[1]; + uint chainsFetched = this.Next(1, corChains); + if (chainsFetched == 0) { + return null; + } else { + return corChains[0]; + } + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugClass2.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugClass2.cs new file mode 100644 index 000000000..a81842f80 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugClass2.cs @@ -0,0 +1,23 @@ +// +// +// +// +// $Revision: 2813 $ +// + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + public partial class ICorDebugClass2 + { + public ICorDebugType GetParameterizedType(uint elementType, ICorDebugType[] ppTypeArgs) + { + return this.GetParameterizedType(elementType, (uint)ppTypeArgs.Length, ppTypeArgs); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugCode.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugCode.cs new file mode 100644 index 000000000..b4edc3d1b --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugCode.cs @@ -0,0 +1,26 @@ +// +// +// +// +// $Revision: 2895 $ +// + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + public partial class ICorDebugCode + { + public unsafe byte[] GetCode() + { + if (this.IsIL == 0) return null; + byte[] code = new byte[this.Size]; + fixed(void* pCode = code) { + this.GetCode(0, (uint)code.Length, (uint)code.Length, new IntPtr(pCode)); + } + return code; + } + } +} diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugFrame.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugFrame.cs new file mode 100644 index 000000000..3386790ea --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugFrame.cs @@ -0,0 +1,29 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + public partial class ICorDebugFrame + { + uint index; + + public uint Index { + get { + return index; + } + set { + index = value; + } + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugFrameEnum.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugFrameEnum.cs new file mode 100644 index 000000000..0067debcb --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugFrameEnum.cs @@ -0,0 +1,47 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + using System.Collections.Generic; + + + public partial class ICorDebugFrameEnum + { + public IEnumerable Enumerator { + get { + Reset(); + uint index = this.Count - 1; + while (true) { + ICorDebugFrame corFrame = Next(); + if (corFrame != null) { + corFrame.Index = index--; + yield return corFrame; + } else { + break; + } + } + } + } + + public ICorDebugFrame Next() + { + ICorDebugFrame[] corFrames = new ICorDebugFrame[1]; + uint framesFetched = this.Next(1, corFrames); + if (framesFetched == 0) { + return null; + } else { + return corFrames[0]; + } + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugGenericValue.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugGenericValue.cs new file mode 100644 index 000000000..e1f903aec --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugGenericValue.cs @@ -0,0 +1,87 @@ +// +// +// +// +// $Revision: 3238 $ +// + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + using System.Runtime.InteropServices; + + public partial class ICorDebugGenericValue + { + public unsafe Byte[] RawValue { + get { + Byte[] retValue = new Byte[(int)Size]; + IntPtr pValue = Marshal.AllocHGlobal(retValue.Length); + GetValue(pValue); + Marshal.Copy(pValue, retValue, 0, retValue.Length); + Marshal.FreeHGlobal(pValue); + return retValue; + } + set { + if (Size != value.Length) throw new ArgumentException("Incorrect length"); + IntPtr pValue = Marshal.AllocHGlobal(value.Length); + Marshal.Copy(value, 0, pValue, value.Length); + SetValue(pValue); + Marshal.FreeHGlobal(pValue); + } + } + + public unsafe object GetValue(Type type) + { + object retValue; + IntPtr pValue = Marshal.AllocHGlobal((int)Size); + GetValue(pValue); + switch(type.FullName) { + case "System.Boolean": retValue = *((System.Boolean*)pValue); break; + case "System.Char": retValue = *((System.Char*) pValue); break; + case "System.SByte": retValue = *((System.SByte*) pValue); break; + case "System.Byte": retValue = *((System.Byte*) pValue); break; + case "System.Int16": retValue = *((System.Int16*) pValue); break; + case "System.UInt16": retValue = *((System.UInt16*) pValue); break; + case "System.Int32": retValue = *((System.Int32*) pValue); break; + case "System.UInt32": retValue = *((System.UInt32*) pValue); break; + case "System.Int64": retValue = *((System.Int64*) pValue); break; + case "System.UInt64": retValue = *((System.UInt64*) pValue); break; + case "System.Single": retValue = *((System.Single*) pValue); break; + case "System.Double": retValue = *((System.Double*) pValue); break; + case "System.IntPtr": retValue = *((System.IntPtr*) pValue); break; + case "System.UIntPtr": retValue = *((System.UIntPtr*)pValue); break; + default: throw new NotSupportedException(); + } + Marshal.FreeHGlobal(pValue); + return retValue; + } + + public unsafe void SetValue(Type type, object value) + { + IntPtr pValue = Marshal.AllocHGlobal((int)Size); + switch(type.FullName) { + case "System.Boolean": *((System.Boolean*)pValue) = (System.Boolean)value; break; + case "System.Char": *((System.Char*) pValue) = (System.Char) value; break; + case "System.SByte": *((System.SByte*) pValue) = (System.SByte) value; break; + case "System.Byte": *((System.Byte*) pValue) = (System.Byte) value; break; + case "System.Int16": *((System.Int16*) pValue) = (System.Int16) value; break; + case "System.UInt16": *((System.UInt16*) pValue) = (System.UInt16) value; break; + case "System.Int32": *((System.Int32*) pValue) = (System.Int32) value; break; + case "System.UInt32": *((System.UInt32*) pValue) = (System.UInt32) value; break; + case "System.Int64": *((System.Int64*) pValue) = (System.Int64) value; break; + case "System.UInt64": *((System.UInt64*) pValue) = (System.UInt64) value; break; + case "System.Single": *((System.Single*) pValue) = (System.Single) value; break; + case "System.Double": *((System.Double*) pValue) = (System.Double) value; break; + case "System.IntPtr": *((System.IntPtr*) pValue) = (System.IntPtr) value; break; + case "System.UIntPtr": *((System.UIntPtr*)pValue) = (System.UIntPtr)value; break; + default: throw new NotSupportedException(); + } + SetValue(pValue); + Marshal.FreeHGlobal(pValue); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugModule.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugModule.cs new file mode 100644 index 000000000..48da9f8a3 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugModule.cs @@ -0,0 +1,25 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugModule + { + public string Name { + get { + return Util.GetString(GetName); + } + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugProcess.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugProcess.cs new file mode 100644 index 000000000..e6d6742af --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugProcess.cs @@ -0,0 +1,23 @@ +// +// +// +// +// $Revision: 2921 $ +// + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + public partial class ICorDebugProcess + { + public bool HasQueuedCallbacks() + { + int pbQueued; + this.WrappedObject.HasQueuedCallbacks(null, out pbQueued); + return pbQueued != 0; + } + } +} diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugStepper.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugStepper.cs new file mode 100644 index 000000000..ca11bb4df --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugStepper.cs @@ -0,0 +1,26 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugStepper + { + public unsafe void StepRange(bool bStepIn, int[] ranges) + { + fixed (int* pRanges = ranges) { + this.StepRange(bStepIn?1:0, (IntPtr)pRanges, (uint)ranges.Length / 2); + } + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugStringValue.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugStringValue.cs new file mode 100644 index 000000000..d25bbe6c7 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugStringValue.cs @@ -0,0 +1,25 @@ +// +// +// +// +// $Revision: 2284 $ +// + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public partial class ICorDebugStringValue + { + public string String { + get { + return Util.GetString(GetString, 64, false); + } + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugTypeEnum.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugTypeEnum.cs new file mode 100644 index 000000000..cbd52561f --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorDebug/ICorDebugTypeEnum.cs @@ -0,0 +1,50 @@ +// +// +// +// +// $Revision: 2781 $ +// + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + using System.Collections.Generic; + + + public partial class ICorDebugTypeEnum + { + public IEnumerable Enumerator { + get { + Reset(); + while (true) { + ICorDebugType corType = Next(); + if (corType != null) { + yield return corType; + } else { + break; + } + } + } + } + + public ICorDebugType Next() + { + ICorDebugType[] corTypes = new ICorDebugType[1]; + uint typesFetched = this.Next(1, corTypes); + if (typesFetched == 0) { + return null; + } else { + return corTypes[0]; + } + } + + public List ToList() + { + return new List(this.Enumerator); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorPub/Autogenerated/CorPublishClass.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorPub/Autogenerated/CorPublishClass.cs new file mode 100644 index 000000000..7785149c1 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorPub/Autogenerated/CorPublishClass.cs @@ -0,0 +1,60 @@ +// +// +// +// +// $Revision: 3165 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorPub +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + using System.Text; + + [ComImport, TypeLibType((short) 2), ClassInterface((short) 0), Guid("047A9A40-657E-11D3-8D5B-00104B35E7EF")] + public class CorpubPublishClass : ICorPublish, CorpubPublish, ICorPublishProcess, ICorPublishAppDomain, ICorPublishProcessEnum, ICorPublishAppDomainEnum + { + // Methods + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void Clone([MarshalAs(UnmanagedType.Interface)] out ICorPublishEnum ppEnum); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void EnumAppDomains([MarshalAs(UnmanagedType.Interface)] out ICorPublishAppDomainEnum ppEnum); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void EnumProcesses([In, ComAliasName("CorpubProcessLib.COR_PUB_ENUMPROCESS")] COR_PUB_ENUMPROCESS Type, [MarshalAs(UnmanagedType.Interface)] out ICorPublishProcessEnum ppIEnum); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void GetCount(out uint pcelt); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void GetDisplayName([In] uint cchName, out uint pcchName, [Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder szName); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void GetID(out uint puId); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void GetName([In] uint cchName, out uint pcchName, [Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder szName); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void GetProcess([In] uint pid, [MarshalAs(UnmanagedType.Interface)] out ICorPublishProcess ppProcess); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void GetProcessID(out uint pid); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void ICorPublishAppDomainEnum_Clone([MarshalAs(UnmanagedType.Interface)] out ICorPublishEnum ppEnum); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void ICorPublishAppDomainEnum_GetCount(out uint pcelt); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void ICorPublishAppDomainEnum_Reset(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void ICorPublishAppDomainEnum_Skip([In] uint celt); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void IsManaged(out int pbManaged); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void Next([In] uint celt, [MarshalAs(UnmanagedType.Interface)] out ICorPublishAppDomain objects, out uint pceltFetched); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void Next([In] uint celt, [MarshalAs(UnmanagedType.Interface)] out ICorPublishProcess objects, out uint pceltFetched); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void Reset(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + public virtual extern void Skip([In] uint celt); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorPub/Autogenerated/CorpubPublish.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorPub/Autogenerated/CorpubPublish.cs new file mode 100644 index 000000000..d71d4953a --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorPub/Autogenerated/CorpubPublish.cs @@ -0,0 +1,23 @@ +// +// +// +// +// $Revision: 3165 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorPub +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, CoClass(typeof(CorpubPublishClass)), Guid("9613A0E7-5A68-11D3-8F84-00A0C9B4D50C")] + public interface CorpubPublish : ICorPublish + { + } +} + +#pragma warning restore 108, 1591 + diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorPub/Autogenerated/ICorPublish.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorPub/Autogenerated/ICorPublish.cs new file mode 100644 index 000000000..cd221916a --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorPub/Autogenerated/ICorPublish.cs @@ -0,0 +1,31 @@ +// +// +// +// +// $Revision: 3165 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorPub +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + public enum COR_PUB_ENUMPROCESS + { + COR_PUB_MANAGEDONLY = 1 + } + + [ComImport, Guid("9613A0E7-5A68-11D3-8F84-00A0C9B4D50C"), InterfaceType((short) 1)] + public interface ICorPublish + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumProcesses([In, ComAliasName("CorpubProcessLib.COR_PUB_ENUMPROCESS")] COR_PUB_ENUMPROCESS Type, [MarshalAs(UnmanagedType.Interface)] out ICorPublishProcessEnum ppIEnum); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetProcess([In] uint pid, [MarshalAs(UnmanagedType.Interface)] out ICorPublishProcess ppProcess); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorPub/Autogenerated/ICorPublishAppDomain.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorPub/Autogenerated/ICorPublishAppDomain.cs new file mode 100644 index 000000000..fc0e2cf95 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorPub/Autogenerated/ICorPublishAppDomain.cs @@ -0,0 +1,27 @@ +// +// +// +// +// $Revision: 3165 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorPub +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + using System.Text; + + [ComImport, Guid("D6315C8F-5A6A-11D3-8F84-00A0C9B4D50C"), InterfaceType((short) 1)] + public interface ICorPublishAppDomain + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetID(out uint puId); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetName([In] uint cchName, out uint pcchName, [Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder szName); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorPub/Autogenerated/ICorPublishAppDomainEnum.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorPub/Autogenerated/ICorPublishAppDomainEnum.cs new file mode 100644 index 000000000..e0e81a88c --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorPub/Autogenerated/ICorPublishAppDomainEnum.cs @@ -0,0 +1,35 @@ +// +// +// +// +// $Revision: 3165 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorPub +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("9F0C98F5-5A6A-11D3-8F84-00A0C9B4D50C"), InterfaceType((short) 1),] + public interface ICorPublishAppDomainEnum : ICorPublishEnum + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Skip([In] uint celt); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Reset(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Clone([MarshalAs(UnmanagedType.Interface)] out ICorPublishEnum ppEnum); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCount(out uint pcelt); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Next([In] uint celt, [MarshalAs(UnmanagedType.Interface)] out ICorPublishAppDomain objects, out uint pceltFetched); + } +} + +#pragma warning restore 108, 1591 + + + diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorPub/Autogenerated/ICorPublishEnum.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorPub/Autogenerated/ICorPublishEnum.cs new file mode 100644 index 000000000..859dc1000 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorPub/Autogenerated/ICorPublishEnum.cs @@ -0,0 +1,30 @@ +// +// +// +// +// $Revision: 3165 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorPub +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("C0B22967-5A69-11D3-8F84-00A0C9B4D50C"), InterfaceType((short) 1)] + public interface ICorPublishEnum + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Skip([In] uint celt); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Reset(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Clone([MarshalAs(UnmanagedType.Interface)] out ICorPublishEnum ppEnum); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCount(out uint pcelt); + } +} + +#pragma warning restore 108, 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorPub/Autogenerated/ICorPublishProcess.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorPub/Autogenerated/ICorPublishProcess.cs new file mode 100644 index 000000000..aaf20cfba --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorPub/Autogenerated/ICorPublishProcess.cs @@ -0,0 +1,31 @@ +// +// +// +// +// $Revision: 3165 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorPub +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + using System.Text; + + [ComImport, Guid("18D87AF1-5A6A-11D3-8F84-00A0C9B4D50C"), InterfaceType((short) 1)] + public interface ICorPublishProcess + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void IsManaged(out int pbManaged); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void EnumAppDomains([MarshalAs(UnmanagedType.Interface)] out ICorPublishAppDomainEnum ppEnum); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetProcessID(out uint pid); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetDisplayName([In] uint cchName, out uint pcchName, [Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder szName); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorPub/Autogenerated/ICorPublishProcessEnum.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorPub/Autogenerated/ICorPublishProcessEnum.cs new file mode 100644 index 000000000..89c3bf473 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorPub/Autogenerated/ICorPublishProcessEnum.cs @@ -0,0 +1,32 @@ +// +// +// +// +// $Revision: 3165 $ +// + +#pragma warning disable 108, 1591 + +namespace Debugger.Interop.CorPub +{ + using System; + using System.Runtime.CompilerServices; + using System.Runtime.InteropServices; + + [ComImport, Guid("A37FBD41-5A69-11D3-8F84-00A0C9B4D50C"), InterfaceType((short) 1)] + public interface ICorPublishProcessEnum : ICorPublishEnum + { + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Skip([In] uint celt); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Reset(); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Clone([MarshalAs(UnmanagedType.Interface)] out ICorPublishEnum ppEnum); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void GetCount(out uint pcelt); + [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] + void Next([In] uint celt, [MarshalAs(UnmanagedType.Interface)] out ICorPublishProcess objects, out uint pceltFetched); + } +} + +#pragma warning restore 108, 1591 \ No newline at end of file diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorPub/ICorPublish.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorPub/ICorPublish.cs new file mode 100644 index 000000000..d73cbdf1e --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorPub/ICorPublish.cs @@ -0,0 +1,34 @@ +// +// +// +// +// $Revision: 3165 $ +// + +#pragma warning disable 1591 + +namespace Debugger.Core.Wrappers.CorPub +{ + using System; + using System.Runtime.InteropServices; + using Debugger.Wrappers; + + public partial class ICorPublish + { + private Debugger.Interop.CorPub.CorpubPublishClass corpubPublishClass; + + public ICorPublish() + { + corpubPublishClass = new Debugger.Interop.CorPub.CorpubPublishClass(); + } + + public ICorPublishProcess GetProcess(int id) + { + Debugger.Interop.CorPub.ICorPublishProcess process; + this.corpubPublishClass.GetProcess((uint)id, out process); + return ICorPublishProcess.Wrap(process); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorPub/ICorPublishProcess.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorPub/ICorPublishProcess.cs new file mode 100644 index 000000000..ec20015f6 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorPub/ICorPublishProcess.cs @@ -0,0 +1,68 @@ +// +// +// +// +// $Revision: 3165 $ +// + +#pragma warning disable 1591 + +namespace Debugger.Core.Wrappers.CorPub +{ + using System; + using System.Runtime.InteropServices; + using System.Text; + using Debugger.Wrappers; + + public partial class ICorPublishProcess + { + private Debugger.Interop.CorPub.ICorPublishProcess wrappedObject; + + internal Debugger.Interop.CorPub.ICorPublishProcess WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ICorPublishProcess(Debugger.Interop.CorPub.ICorPublishProcess wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ICorPublishProcess)); + } + + public static ICorPublishProcess Wrap(Debugger.Interop.CorPub.ICorPublishProcess objectToWrap) + { + if ((objectToWrap != null)) + { + return new ICorPublishProcess(objectToWrap); + } else + { + return null; + } + } + + public int ProcessId + { + get + { + uint id; + wrappedObject.GetProcessID(out id); + return (int)id; + } + } + + public bool IsManaged + { + get + { + int managed; + wrappedObject.IsManaged(out managed); + return managed != 0; + } + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymAddrKind.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymAddrKind.cs new file mode 100644 index 000000000..99d95c47c --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymAddrKind.cs @@ -0,0 +1,42 @@ +// +// +// +// +// $Revision: 2077 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorSym +{ + using System; + + + public enum CorSymAddrKind : int + { + + ADDR_IL_OFFSET = 1, + + ADDR_NATIVE_RVA = 2, + + ADDR_NATIVE_REGISTER = 3, + + ADDR_NATIVE_REGREL = 4, + + ADDR_NATIVE_OFFSET = 5, + + ADDR_NATIVE_REGREG = 6, + + ADDR_NATIVE_REGSTK = 7, + + ADDR_NATIVE_STKREG = 8, + + ADDR_BITFIELD = 9, + + ADDR_NATIVE_ISECTOFFSET = 10, + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymBinder_SxS.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymBinder_SxS.cs new file mode 100644 index 000000000..b0a4b9bc2 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymBinder_SxS.cs @@ -0,0 +1,100 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorSym +{ + using System; + + + public partial class CorSymBinder_SxS + { + + private Debugger.Interop.CorSym.CorSymBinder_SxS wrappedObject; + + internal Debugger.Interop.CorSym.CorSymBinder_SxS WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public CorSymBinder_SxS(Debugger.Interop.CorSym.CorSymBinder_SxS wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(CorSymBinder_SxS)); + } + + public static CorSymBinder_SxS Wrap(Debugger.Interop.CorSym.CorSymBinder_SxS objectToWrap) + { + if ((objectToWrap != null)) + { + return new CorSymBinder_SxS(objectToWrap); + } else + { + return null; + } + } + + ~CorSymBinder_SxS() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(CorSymBinder_SxS)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(CorSymBinder_SxS o1, CorSymBinder_SxS o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(CorSymBinder_SxS o1, CorSymBinder_SxS o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + CorSymBinder_SxS casted = o as CorSymBinder_SxS; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymBinder_SxSClass.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymBinder_SxSClass.cs new file mode 100644 index 000000000..9c9c270de --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymBinder_SxSClass.cs @@ -0,0 +1,110 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorSym +{ + using System; + + + public partial class CorSymBinder_SxSClass + { + + private Debugger.Interop.CorSym.CorSymBinder_SxSClass wrappedObject; + + internal Debugger.Interop.CorSym.CorSymBinder_SxSClass WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public CorSymBinder_SxSClass(Debugger.Interop.CorSym.CorSymBinder_SxSClass wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(CorSymBinder_SxSClass)); + } + + public static CorSymBinder_SxSClass Wrap(Debugger.Interop.CorSym.CorSymBinder_SxSClass objectToWrap) + { + if ((objectToWrap != null)) + { + return new CorSymBinder_SxSClass(objectToWrap); + } else + { + return null; + } + } + + ~CorSymBinder_SxSClass() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(CorSymBinder_SxSClass)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(CorSymBinder_SxSClass o1, CorSymBinder_SxSClass o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(CorSymBinder_SxSClass o1, CorSymBinder_SxSClass o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + CorSymBinder_SxSClass casted = o as CorSymBinder_SxSClass; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public ISymUnmanagedReader GetReaderForFile(object importer, System.IntPtr filename, System.IntPtr searchPath) + { + return ISymUnmanagedReader.Wrap(this.WrappedObject.GetReaderForFile(importer, filename, searchPath)); + } + + public ISymUnmanagedReader GetReaderFromStream(object importer, IStream pstream) + { + return ISymUnmanagedReader.Wrap(this.WrappedObject.GetReaderFromStream(importer, pstream.WrappedObject)); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymBinder_deprecated.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymBinder_deprecated.cs new file mode 100644 index 000000000..cf2a9c348 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymBinder_deprecated.cs @@ -0,0 +1,100 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorSym +{ + using System; + + + public partial class CorSymBinder_deprecated + { + + private Debugger.Interop.CorSym.CorSymBinder_deprecated wrappedObject; + + internal Debugger.Interop.CorSym.CorSymBinder_deprecated WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public CorSymBinder_deprecated(Debugger.Interop.CorSym.CorSymBinder_deprecated wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(CorSymBinder_deprecated)); + } + + public static CorSymBinder_deprecated Wrap(Debugger.Interop.CorSym.CorSymBinder_deprecated objectToWrap) + { + if ((objectToWrap != null)) + { + return new CorSymBinder_deprecated(objectToWrap); + } else + { + return null; + } + } + + ~CorSymBinder_deprecated() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(CorSymBinder_deprecated)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(CorSymBinder_deprecated o1, CorSymBinder_deprecated o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(CorSymBinder_deprecated o1, CorSymBinder_deprecated o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + CorSymBinder_deprecated casted = o as CorSymBinder_deprecated; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymBinder_deprecatedClass.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymBinder_deprecatedClass.cs new file mode 100644 index 000000000..4a314ccab --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymBinder_deprecatedClass.cs @@ -0,0 +1,110 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorSym +{ + using System; + + + public partial class CorSymBinder_deprecatedClass + { + + private Debugger.Interop.CorSym.CorSymBinder_deprecatedClass wrappedObject; + + internal Debugger.Interop.CorSym.CorSymBinder_deprecatedClass WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public CorSymBinder_deprecatedClass(Debugger.Interop.CorSym.CorSymBinder_deprecatedClass wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(CorSymBinder_deprecatedClass)); + } + + public static CorSymBinder_deprecatedClass Wrap(Debugger.Interop.CorSym.CorSymBinder_deprecatedClass objectToWrap) + { + if ((objectToWrap != null)) + { + return new CorSymBinder_deprecatedClass(objectToWrap); + } else + { + return null; + } + } + + ~CorSymBinder_deprecatedClass() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(CorSymBinder_deprecatedClass)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(CorSymBinder_deprecatedClass o1, CorSymBinder_deprecatedClass o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(CorSymBinder_deprecatedClass o1, CorSymBinder_deprecatedClass o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + CorSymBinder_deprecatedClass casted = o as CorSymBinder_deprecatedClass; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public ISymUnmanagedReader GetReaderForFile(object importer, System.IntPtr filename, System.IntPtr searchPath) + { + return ISymUnmanagedReader.Wrap(this.WrappedObject.GetReaderForFile(importer, filename, searchPath)); + } + + public ISymUnmanagedReader GetReaderFromStream(object importer, IStream pstream) + { + return ISymUnmanagedReader.Wrap(this.WrappedObject.GetReaderFromStream(importer, pstream.WrappedObject)); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymReader_SxS.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymReader_SxS.cs new file mode 100644 index 000000000..adac29ca5 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymReader_SxS.cs @@ -0,0 +1,100 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorSym +{ + using System; + + + public partial class CorSymReader_SxS + { + + private Debugger.Interop.CorSym.CorSymReader_SxS wrappedObject; + + internal Debugger.Interop.CorSym.CorSymReader_SxS WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public CorSymReader_SxS(Debugger.Interop.CorSym.CorSymReader_SxS wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(CorSymReader_SxS)); + } + + public static CorSymReader_SxS Wrap(Debugger.Interop.CorSym.CorSymReader_SxS objectToWrap) + { + if ((objectToWrap != null)) + { + return new CorSymReader_SxS(objectToWrap); + } else + { + return null; + } + } + + ~CorSymReader_SxS() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(CorSymReader_SxS)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(CorSymReader_SxS o1, CorSymReader_SxS o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(CorSymReader_SxS o1, CorSymReader_SxS o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + CorSymReader_SxS casted = o as CorSymReader_SxS; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymReader_SxSClass.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymReader_SxSClass.cs new file mode 100644 index 000000000..c6fdcd18f --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymReader_SxSClass.cs @@ -0,0 +1,210 @@ +// +// +// +// +// $Revision: 3135 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorSym +{ + using System; + + + public partial class CorSymReader_SxSClass + { + + private Debugger.Interop.CorSym.CorSymReader_SxSClass wrappedObject; + + internal Debugger.Interop.CorSym.CorSymReader_SxSClass WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public CorSymReader_SxSClass(Debugger.Interop.CorSym.CorSymReader_SxSClass wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(CorSymReader_SxSClass)); + } + + public static CorSymReader_SxSClass Wrap(Debugger.Interop.CorSym.CorSymReader_SxSClass objectToWrap) + { + if ((objectToWrap != null)) + { + return new CorSymReader_SxSClass(objectToWrap); + } else + { + return null; + } + } + + ~CorSymReader_SxSClass() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(CorSymReader_SxSClass)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(CorSymReader_SxSClass o1, CorSymReader_SxSClass o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(CorSymReader_SxSClass o1, CorSymReader_SxSClass o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + CorSymReader_SxSClass casted = o as CorSymReader_SxSClass; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public ISymUnmanagedDocument GetDocument(System.IntPtr url, System.Guid language, System.Guid languageVendor, System.Guid documentType) + { + return ISymUnmanagedDocument.Wrap(this.WrappedObject.GetDocument(url, language, languageVendor, documentType)); + } + + public void GetDocuments(uint cDocs, out uint pcDocs, ISymUnmanagedDocument[] pDocs) + { + Debugger.Interop.CorSym.ISymUnmanagedDocument[] array_pDocs = new Debugger.Interop.CorSym.ISymUnmanagedDocument[pDocs.Length]; + for (int i = 0; (i < pDocs.Length); i = (i + 1)) + { + if ((pDocs[i] != null)) + { + array_pDocs[i] = pDocs[i].WrappedObject; + } + } + this.WrappedObject.GetDocuments(cDocs, out pcDocs, array_pDocs); + for (int i = 0; (i < pDocs.Length); i = (i + 1)) + { + if ((array_pDocs[i] != null)) + { + pDocs[i] = ISymUnmanagedDocument.Wrap(array_pDocs[i]); + } else + { + pDocs[i] = null; + } + } + } + + public int GetDocumentVersion(ISymUnmanagedDocument pDoc, out int version) + { + int pbCurrent; + this.WrappedObject.GetDocumentVersion(pDoc.WrappedObject, out version, out pbCurrent); + return pbCurrent; + } + + public void GetGlobalVariables(uint cVars, out uint pcVars, System.IntPtr pVars) + { + this.WrappedObject.GetGlobalVariables(cVars, out pcVars, pVars); + } + + public ISymUnmanagedMethod GetMethod(uint token) + { + return ISymUnmanagedMethod.Wrap(this.WrappedObject.GetMethod(token)); + } + + public ISymUnmanagedMethod GetMethodByVersion(uint token, int version) + { + return ISymUnmanagedMethod.Wrap(this.WrappedObject.GetMethodByVersion(token, version)); + } + + public ISymUnmanagedMethod GetMethodFromDocumentPosition(ISymUnmanagedDocument document, uint line, uint column) + { + return ISymUnmanagedMethod.Wrap(this.WrappedObject.GetMethodFromDocumentPosition(document.WrappedObject, line, column)); + } + + public void GetMethodsFromDocumentPosition(ISymUnmanagedDocument document, uint line, uint column, uint cMethod, out uint pcMethod, System.IntPtr pRetVal) + { + this.WrappedObject.GetMethodsFromDocumentPosition(document.WrappedObject, line, column, cMethod, out pcMethod, pRetVal); + } + + public int GetMethodVersion(ISymUnmanagedMethod pMethod) + { + int version; + this.WrappedObject.GetMethodVersion(pMethod.WrappedObject, out version); + return version; + } + + public void GetNamespaces(uint cNameSpaces, out uint pcNameSpaces, System.IntPtr namespaces) + { + this.WrappedObject.GetNamespaces(cNameSpaces, out pcNameSpaces, namespaces); + } + + public void GetSymAttribute(uint parent, System.IntPtr name, uint cBuffer, out uint pcBuffer, System.IntPtr buffer) + { + this.WrappedObject.GetSymAttribute(parent, name, cBuffer, out pcBuffer, buffer); + } + + public void GetSymbolStoreFileName(uint cchName, out uint pcchName, System.IntPtr szName) + { + this.WrappedObject.GetSymbolStoreFileName(cchName, out pcchName, szName); + } + + public uint UserEntryPoint + { + get + { + return this.WrappedObject.GetUserEntryPoint(); + } + } + + public void GetVariables(uint parent, uint cVars, out uint pcVars, System.IntPtr pVars) + { + this.WrappedObject.GetVariables(parent, cVars, out pcVars, pVars); + } + + public void Initialize(object importer, System.IntPtr filename, System.IntPtr searchPath, IStream pIStream) + { + this.WrappedObject.Initialize(importer, filename, searchPath, pIStream.WrappedObject); + } + + public void ReplaceSymbolStore(System.IntPtr filename, IStream pIStream) + { + this.WrappedObject.ReplaceSymbolStore(filename, pIStream.WrappedObject); + } + + public void UpdateSymbolStore(System.IntPtr filename, IStream pIStream) + { + this.WrappedObject.UpdateSymbolStore(filename, pIStream.WrappedObject); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymReader_deprecated.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymReader_deprecated.cs new file mode 100644 index 000000000..a61e5c69b --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymReader_deprecated.cs @@ -0,0 +1,100 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorSym +{ + using System; + + + public partial class CorSymReader_deprecated + { + + private Debugger.Interop.CorSym.CorSymReader_deprecated wrappedObject; + + internal Debugger.Interop.CorSym.CorSymReader_deprecated WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public CorSymReader_deprecated(Debugger.Interop.CorSym.CorSymReader_deprecated wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(CorSymReader_deprecated)); + } + + public static CorSymReader_deprecated Wrap(Debugger.Interop.CorSym.CorSymReader_deprecated objectToWrap) + { + if ((objectToWrap != null)) + { + return new CorSymReader_deprecated(objectToWrap); + } else + { + return null; + } + } + + ~CorSymReader_deprecated() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(CorSymReader_deprecated)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(CorSymReader_deprecated o1, CorSymReader_deprecated o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(CorSymReader_deprecated o1, CorSymReader_deprecated o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + CorSymReader_deprecated casted = o as CorSymReader_deprecated; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymReader_deprecatedClass.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymReader_deprecatedClass.cs new file mode 100644 index 000000000..e77e5f39e --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymReader_deprecatedClass.cs @@ -0,0 +1,210 @@ +// +// +// +// +// $Revision: 3135 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorSym +{ + using System; + + + public partial class CorSymReader_deprecatedClass + { + + private Debugger.Interop.CorSym.CorSymReader_deprecatedClass wrappedObject; + + internal Debugger.Interop.CorSym.CorSymReader_deprecatedClass WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public CorSymReader_deprecatedClass(Debugger.Interop.CorSym.CorSymReader_deprecatedClass wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(CorSymReader_deprecatedClass)); + } + + public static CorSymReader_deprecatedClass Wrap(Debugger.Interop.CorSym.CorSymReader_deprecatedClass objectToWrap) + { + if ((objectToWrap != null)) + { + return new CorSymReader_deprecatedClass(objectToWrap); + } else + { + return null; + } + } + + ~CorSymReader_deprecatedClass() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(CorSymReader_deprecatedClass)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(CorSymReader_deprecatedClass o1, CorSymReader_deprecatedClass o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(CorSymReader_deprecatedClass o1, CorSymReader_deprecatedClass o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + CorSymReader_deprecatedClass casted = o as CorSymReader_deprecatedClass; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public ISymUnmanagedDocument GetDocument(System.IntPtr url, System.Guid language, System.Guid languageVendor, System.Guid documentType) + { + return ISymUnmanagedDocument.Wrap(this.WrappedObject.GetDocument(url, language, languageVendor, documentType)); + } + + public void GetDocuments(uint cDocs, out uint pcDocs, ISymUnmanagedDocument[] pDocs) + { + Debugger.Interop.CorSym.ISymUnmanagedDocument[] array_pDocs = new Debugger.Interop.CorSym.ISymUnmanagedDocument[pDocs.Length]; + for (int i = 0; (i < pDocs.Length); i = (i + 1)) + { + if ((pDocs[i] != null)) + { + array_pDocs[i] = pDocs[i].WrappedObject; + } + } + this.WrappedObject.GetDocuments(cDocs, out pcDocs, array_pDocs); + for (int i = 0; (i < pDocs.Length); i = (i + 1)) + { + if ((array_pDocs[i] != null)) + { + pDocs[i] = ISymUnmanagedDocument.Wrap(array_pDocs[i]); + } else + { + pDocs[i] = null; + } + } + } + + public int GetDocumentVersion(ISymUnmanagedDocument pDoc, out int version) + { + int pbCurrent; + this.WrappedObject.GetDocumentVersion(pDoc.WrappedObject, out version, out pbCurrent); + return pbCurrent; + } + + public void GetGlobalVariables(uint cVars, out uint pcVars, System.IntPtr pVars) + { + this.WrappedObject.GetGlobalVariables(cVars, out pcVars, pVars); + } + + public ISymUnmanagedMethod GetMethod(uint token) + { + return ISymUnmanagedMethod.Wrap(this.WrappedObject.GetMethod(token)); + } + + public ISymUnmanagedMethod GetMethodByVersion(uint token, int version) + { + return ISymUnmanagedMethod.Wrap(this.WrappedObject.GetMethodByVersion(token, version)); + } + + public ISymUnmanagedMethod GetMethodFromDocumentPosition(ISymUnmanagedDocument document, uint line, uint column) + { + return ISymUnmanagedMethod.Wrap(this.WrappedObject.GetMethodFromDocumentPosition(document.WrappedObject, line, column)); + } + + public void GetMethodsFromDocumentPosition(ISymUnmanagedDocument document, uint line, uint column, uint cMethod, out uint pcMethod, System.IntPtr pRetVal) + { + this.WrappedObject.GetMethodsFromDocumentPosition(document.WrappedObject, line, column, cMethod, out pcMethod, pRetVal); + } + + public int GetMethodVersion(ISymUnmanagedMethod pMethod) + { + int version; + this.WrappedObject.GetMethodVersion(pMethod.WrappedObject, out version); + return version; + } + + public void GetNamespaces(uint cNameSpaces, out uint pcNameSpaces, System.IntPtr namespaces) + { + this.WrappedObject.GetNamespaces(cNameSpaces, out pcNameSpaces, namespaces); + } + + public void GetSymAttribute(uint parent, System.IntPtr name, uint cBuffer, out uint pcBuffer, System.IntPtr buffer) + { + this.WrappedObject.GetSymAttribute(parent, name, cBuffer, out pcBuffer, buffer); + } + + public void GetSymbolStoreFileName(uint cchName, out uint pcchName, System.IntPtr szName) + { + this.WrappedObject.GetSymbolStoreFileName(cchName, out pcchName, szName); + } + + public uint UserEntryPoint + { + get + { + return this.WrappedObject.GetUserEntryPoint(); + } + } + + public void GetVariables(uint parent, uint cVars, out uint pcVars, System.IntPtr pVars) + { + this.WrappedObject.GetVariables(parent, cVars, out pcVars, pVars); + } + + public void Initialize(object importer, System.IntPtr filename, System.IntPtr searchPath, IStream pIStream) + { + this.WrappedObject.Initialize(importer, filename, searchPath, pIStream.WrappedObject); + } + + public void ReplaceSymbolStore(System.IntPtr filename, IStream pIStream) + { + this.WrappedObject.ReplaceSymbolStore(filename, pIStream.WrappedObject); + } + + public void UpdateSymbolStore(System.IntPtr filename, IStream pIStream) + { + this.WrappedObject.UpdateSymbolStore(filename, pIStream.WrappedObject); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymSearchPolicyAttributes.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymSearchPolicyAttributes.cs new file mode 100644 index 000000000..ac72ec3b0 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymSearchPolicyAttributes.cs @@ -0,0 +1,30 @@ +// +// +// +// +// $Revision: 2077 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorSym +{ + using System; + + + public enum CorSymSearchPolicyAttributes : int + { + + AllowRegistryAccess = 1, + + AllowSymbolServerAccess = 2, + + AllowOriginalPathAccess = 4, + + AllowReferencePathAccess = 8, + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymVarFlag.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymVarFlag.cs new file mode 100644 index 000000000..73c42f01f --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymVarFlag.cs @@ -0,0 +1,24 @@ +// +// +// +// +// $Revision: 2077 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorSym +{ + using System; + + + public enum CorSymVarFlag : int + { + + VAR_IS_COMP_GEN = 1, + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymWriter_SxS.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymWriter_SxS.cs new file mode 100644 index 000000000..bd60a9d71 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymWriter_SxS.cs @@ -0,0 +1,100 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorSym +{ + using System; + + + public partial class CorSymWriter_SxS + { + + private Debugger.Interop.CorSym.CorSymWriter_SxS wrappedObject; + + internal Debugger.Interop.CorSym.CorSymWriter_SxS WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public CorSymWriter_SxS(Debugger.Interop.CorSym.CorSymWriter_SxS wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(CorSymWriter_SxS)); + } + + public static CorSymWriter_SxS Wrap(Debugger.Interop.CorSym.CorSymWriter_SxS objectToWrap) + { + if ((objectToWrap != null)) + { + return new CorSymWriter_SxS(objectToWrap); + } else + { + return null; + } + } + + ~CorSymWriter_SxS() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(CorSymWriter_SxS)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(CorSymWriter_SxS o1, CorSymWriter_SxS o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(CorSymWriter_SxS o1, CorSymWriter_SxS o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + CorSymWriter_SxS casted = o as CorSymWriter_SxS; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymWriter_SxSClass.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymWriter_SxSClass.cs new file mode 100644 index 000000000..f75684a70 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymWriter_SxSClass.cs @@ -0,0 +1,220 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorSym +{ + using System; + + + public partial class CorSymWriter_SxSClass + { + + private Debugger.Interop.CorSym.CorSymWriter_SxSClass wrappedObject; + + internal Debugger.Interop.CorSym.CorSymWriter_SxSClass WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public CorSymWriter_SxSClass(Debugger.Interop.CorSym.CorSymWriter_SxSClass wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(CorSymWriter_SxSClass)); + } + + public static CorSymWriter_SxSClass Wrap(Debugger.Interop.CorSym.CorSymWriter_SxSClass objectToWrap) + { + if ((objectToWrap != null)) + { + return new CorSymWriter_SxSClass(objectToWrap); + } else + { + return null; + } + } + + ~CorSymWriter_SxSClass() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(CorSymWriter_SxSClass)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(CorSymWriter_SxSClass o1, CorSymWriter_SxSClass o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(CorSymWriter_SxSClass o1, CorSymWriter_SxSClass o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + CorSymWriter_SxSClass casted = o as CorSymWriter_SxSClass; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void Abort() + { + this.WrappedObject.Abort(); + } + + public void Close() + { + this.WrappedObject.Close(); + } + + public void CloseMethod() + { + this.WrappedObject.CloseMethod(); + } + + public void CloseNamespace() + { + this.WrappedObject.CloseNamespace(); + } + + public void CloseScope(uint endOffset) + { + this.WrappedObject.CloseScope(endOffset); + } + + public void DefineConstant(System.IntPtr name, object value, uint cSig, ref byte signature) + { + this.WrappedObject.DefineConstant(name, value, cSig, ref signature); + } + + public ISymUnmanagedDocumentWriter DefineDocument(System.IntPtr url, ref System.Guid language, ref System.Guid languageVendor, ref System.Guid documentType) + { + return ISymUnmanagedDocumentWriter.Wrap(this.WrappedObject.DefineDocument(url, ref language, ref languageVendor, ref documentType)); + } + + public void DefineField(uint parent, System.IntPtr name, uint attributes, uint cSig, ref byte signature, uint addrKind, uint addr1, uint addr2, uint addr3) + { + this.WrappedObject.DefineField(parent, name, attributes, cSig, ref signature, addrKind, addr1, addr2, addr3); + } + + public void DefineGlobalVariable(System.IntPtr name, uint attributes, uint cSig, ref byte signature, uint addrKind, uint addr1, uint addr2, uint addr3) + { + this.WrappedObject.DefineGlobalVariable(name, attributes, cSig, ref signature, addrKind, addr1, addr2, addr3); + } + + public void DefineLocalVariable(System.IntPtr name, uint attributes, uint cSig, ref byte signature, uint addrKind, uint addr1, uint addr2, uint addr3, uint startOffset, uint endOffset) + { + this.WrappedObject.DefineLocalVariable(name, attributes, cSig, ref signature, addrKind, addr1, addr2, addr3, startOffset, endOffset); + } + + public void DefineParameter(System.IntPtr name, uint attributes, uint sequence, uint addrKind, uint addr1, uint addr2, uint addr3) + { + this.WrappedObject.DefineParameter(name, attributes, sequence, addrKind, addr1, addr2, addr3); + } + + public void DefineSequencePoints(ISymUnmanagedDocumentWriter document, uint spCount, ref uint offsets, ref uint lines, ref uint columns, ref uint endLines, ref uint endColumns) + { + this.WrappedObject.DefineSequencePoints(document.WrappedObject, spCount, ref offsets, ref lines, ref columns, ref endLines, ref endColumns); + } + + public void GetDebugInfo(ref uint pIDD, uint cData, out uint pcData, System.IntPtr data) + { + this.WrappedObject.GetDebugInfo(ref pIDD, cData, out pcData, data); + } + + public void Initialize(object emitter, System.IntPtr filename, IStream pIStream, int fFullBuild) + { + this.WrappedObject.Initialize(emitter, filename, pIStream.WrappedObject, fFullBuild); + } + + public void Initialize2(object emitter, System.IntPtr tempfilename, IStream pIStream, int fFullBuild, System.IntPtr finalfilename) + { + this.WrappedObject.Initialize2(emitter, tempfilename, pIStream.WrappedObject, fFullBuild, finalfilename); + } + + public void OpenMethod(uint method) + { + this.WrappedObject.OpenMethod(method); + } + + public void OpenNamespace(System.IntPtr name) + { + this.WrappedObject.OpenNamespace(name); + } + + public uint OpenScope(uint startOffset) + { + return this.WrappedObject.OpenScope(startOffset); + } + + public void RemapToken(uint oldToken, uint newToken) + { + this.WrappedObject.RemapToken(oldToken, newToken); + } + + public void SetMethodSourceRange(ISymUnmanagedDocumentWriter startDoc, uint startLine, uint startColumn, ISymUnmanagedDocumentWriter endDoc, uint endLine, uint endColumn) + { + this.WrappedObject.SetMethodSourceRange(startDoc.WrappedObject, startLine, startColumn, endDoc.WrappedObject, endLine, endColumn); + } + + public void SetScopeRange(uint scopeID, uint startOffset, uint endOffset) + { + this.WrappedObject.SetScopeRange(scopeID, startOffset, endOffset); + } + + public void SetSymAttribute(uint parent, System.IntPtr name, uint cData, ref byte data) + { + this.WrappedObject.SetSymAttribute(parent, name, cData, ref data); + } + + public void SetUserEntryPoint(uint entryMethod) + { + this.WrappedObject.SetUserEntryPoint(entryMethod); + } + + public void UsingNamespace(System.IntPtr fullName) + { + this.WrappedObject.UsingNamespace(fullName); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymWriter_deprecated.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymWriter_deprecated.cs new file mode 100644 index 000000000..021041b88 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymWriter_deprecated.cs @@ -0,0 +1,100 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorSym +{ + using System; + + + public partial class CorSymWriter_deprecated + { + + private Debugger.Interop.CorSym.CorSymWriter_deprecated wrappedObject; + + internal Debugger.Interop.CorSym.CorSymWriter_deprecated WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public CorSymWriter_deprecated(Debugger.Interop.CorSym.CorSymWriter_deprecated wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(CorSymWriter_deprecated)); + } + + public static CorSymWriter_deprecated Wrap(Debugger.Interop.CorSym.CorSymWriter_deprecated objectToWrap) + { + if ((objectToWrap != null)) + { + return new CorSymWriter_deprecated(objectToWrap); + } else + { + return null; + } + } + + ~CorSymWriter_deprecated() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(CorSymWriter_deprecated)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(CorSymWriter_deprecated o1, CorSymWriter_deprecated o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(CorSymWriter_deprecated o1, CorSymWriter_deprecated o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + CorSymWriter_deprecated casted = o as CorSymWriter_deprecated; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymWriter_deprecatedClass.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymWriter_deprecatedClass.cs new file mode 100644 index 000000000..a0dd73753 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/CorSymWriter_deprecatedClass.cs @@ -0,0 +1,220 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorSym +{ + using System; + + + public partial class CorSymWriter_deprecatedClass + { + + private Debugger.Interop.CorSym.CorSymWriter_deprecatedClass wrappedObject; + + internal Debugger.Interop.CorSym.CorSymWriter_deprecatedClass WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public CorSymWriter_deprecatedClass(Debugger.Interop.CorSym.CorSymWriter_deprecatedClass wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(CorSymWriter_deprecatedClass)); + } + + public static CorSymWriter_deprecatedClass Wrap(Debugger.Interop.CorSym.CorSymWriter_deprecatedClass objectToWrap) + { + if ((objectToWrap != null)) + { + return new CorSymWriter_deprecatedClass(objectToWrap); + } else + { + return null; + } + } + + ~CorSymWriter_deprecatedClass() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(CorSymWriter_deprecatedClass)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(CorSymWriter_deprecatedClass o1, CorSymWriter_deprecatedClass o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(CorSymWriter_deprecatedClass o1, CorSymWriter_deprecatedClass o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + CorSymWriter_deprecatedClass casted = o as CorSymWriter_deprecatedClass; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void Abort() + { + this.WrappedObject.Abort(); + } + + public void Close() + { + this.WrappedObject.Close(); + } + + public void CloseMethod() + { + this.WrappedObject.CloseMethod(); + } + + public void CloseNamespace() + { + this.WrappedObject.CloseNamespace(); + } + + public void CloseScope(uint endOffset) + { + this.WrappedObject.CloseScope(endOffset); + } + + public void DefineConstant(System.IntPtr name, object value, uint cSig, ref byte signature) + { + this.WrappedObject.DefineConstant(name, value, cSig, ref signature); + } + + public ISymUnmanagedDocumentWriter DefineDocument(System.IntPtr url, ref System.Guid language, ref System.Guid languageVendor, ref System.Guid documentType) + { + return ISymUnmanagedDocumentWriter.Wrap(this.WrappedObject.DefineDocument(url, ref language, ref languageVendor, ref documentType)); + } + + public void DefineField(uint parent, System.IntPtr name, uint attributes, uint cSig, ref byte signature, uint addrKind, uint addr1, uint addr2, uint addr3) + { + this.WrappedObject.DefineField(parent, name, attributes, cSig, ref signature, addrKind, addr1, addr2, addr3); + } + + public void DefineGlobalVariable(System.IntPtr name, uint attributes, uint cSig, ref byte signature, uint addrKind, uint addr1, uint addr2, uint addr3) + { + this.WrappedObject.DefineGlobalVariable(name, attributes, cSig, ref signature, addrKind, addr1, addr2, addr3); + } + + public void DefineLocalVariable(System.IntPtr name, uint attributes, uint cSig, ref byte signature, uint addrKind, uint addr1, uint addr2, uint addr3, uint startOffset, uint endOffset) + { + this.WrappedObject.DefineLocalVariable(name, attributes, cSig, ref signature, addrKind, addr1, addr2, addr3, startOffset, endOffset); + } + + public void DefineParameter(System.IntPtr name, uint attributes, uint sequence, uint addrKind, uint addr1, uint addr2, uint addr3) + { + this.WrappedObject.DefineParameter(name, attributes, sequence, addrKind, addr1, addr2, addr3); + } + + public void DefineSequencePoints(ISymUnmanagedDocumentWriter document, uint spCount, ref uint offsets, ref uint lines, ref uint columns, ref uint endLines, ref uint endColumns) + { + this.WrappedObject.DefineSequencePoints(document.WrappedObject, spCount, ref offsets, ref lines, ref columns, ref endLines, ref endColumns); + } + + public void GetDebugInfo(ref uint pIDD, uint cData, out uint pcData, System.IntPtr data) + { + this.WrappedObject.GetDebugInfo(ref pIDD, cData, out pcData, data); + } + + public void Initialize(object emitter, System.IntPtr filename, IStream pIStream, int fFullBuild) + { + this.WrappedObject.Initialize(emitter, filename, pIStream.WrappedObject, fFullBuild); + } + + public void Initialize2(object emitter, System.IntPtr tempfilename, IStream pIStream, int fFullBuild, System.IntPtr finalfilename) + { + this.WrappedObject.Initialize2(emitter, tempfilename, pIStream.WrappedObject, fFullBuild, finalfilename); + } + + public void OpenMethod(uint method) + { + this.WrappedObject.OpenMethod(method); + } + + public void OpenNamespace(System.IntPtr name) + { + this.WrappedObject.OpenNamespace(name); + } + + public uint OpenScope(uint startOffset) + { + return this.WrappedObject.OpenScope(startOffset); + } + + public void RemapToken(uint oldToken, uint newToken) + { + this.WrappedObject.RemapToken(oldToken, newToken); + } + + public void SetMethodSourceRange(ISymUnmanagedDocumentWriter startDoc, uint startLine, uint startColumn, ISymUnmanagedDocumentWriter endDoc, uint endLine, uint endColumn) + { + this.WrappedObject.SetMethodSourceRange(startDoc.WrappedObject, startLine, startColumn, endDoc.WrappedObject, endLine, endColumn); + } + + public void SetScopeRange(uint scopeID, uint startOffset, uint endOffset) + { + this.WrappedObject.SetScopeRange(scopeID, startOffset, endOffset); + } + + public void SetSymAttribute(uint parent, System.IntPtr name, uint cData, ref byte data) + { + this.WrappedObject.SetSymAttribute(parent, name, cData, ref data); + } + + public void SetUserEntryPoint(uint entryMethod) + { + this.WrappedObject.SetUserEntryPoint(entryMethod); + } + + public void UsingNamespace(System.IntPtr fullName) + { + this.WrappedObject.UsingNamespace(fullName); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISequentialStream.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISequentialStream.cs new file mode 100644 index 000000000..af2ef7ad0 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISequentialStream.cs @@ -0,0 +1,114 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorSym +{ + using System; + + + public partial class ISequentialStream + { + + private Debugger.Interop.CorSym.ISequentialStream wrappedObject; + + internal Debugger.Interop.CorSym.ISequentialStream WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ISequentialStream(Debugger.Interop.CorSym.ISequentialStream wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ISequentialStream)); + } + + public static ISequentialStream Wrap(Debugger.Interop.CorSym.ISequentialStream objectToWrap) + { + if ((objectToWrap != null)) + { + return new ISequentialStream(objectToWrap); + } else + { + return null; + } + } + + ~ISequentialStream() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ISequentialStream)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ISequentialStream o1, ISequentialStream o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ISequentialStream o1, ISequentialStream o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ISequentialStream casted = o as ISequentialStream; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public uint RemoteRead(out byte pv, uint cb) + { + uint pcbRead; + this.WrappedObject.RemoteRead(out pv, cb, out pcbRead); + return pcbRead; + } + + public uint RemoteWrite(ref byte pv, uint cb) + { + uint pcbWritten; + this.WrappedObject.RemoteWrite(ref pv, cb, out pcbWritten); + return pcbWritten; + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/IStream.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/IStream.cs new file mode 100644 index 000000000..88cfb3808 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/IStream.cs @@ -0,0 +1,167 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorSym +{ + using System; + + + public partial class IStream + { + + private Debugger.Interop.CorSym.IStream wrappedObject; + + internal Debugger.Interop.CorSym.IStream WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public IStream(Debugger.Interop.CorSym.IStream wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(IStream)); + } + + public static IStream Wrap(Debugger.Interop.CorSym.IStream objectToWrap) + { + if ((objectToWrap != null)) + { + return new IStream(objectToWrap); + } else + { + return null; + } + } + + ~IStream() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(IStream)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(IStream o1, IStream o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(IStream o1, IStream o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + IStream casted = o as IStream; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public uint RemoteRead(out byte pv, uint cb) + { + uint pcbRead; + this.WrappedObject.RemoteRead(out pv, cb, out pcbRead); + return pcbRead; + } + + public uint RemoteWrite(ref byte pv, uint cb) + { + uint pcbWritten; + this.WrappedObject.RemoteWrite(ref pv, cb, out pcbWritten); + return pcbWritten; + } + + public Debugger.Interop.CorSym._ULARGE_INTEGER RemoteSeek(Debugger.Interop.CorSym._LARGE_INTEGER dlibMove, uint dwOrigin) + { + Debugger.Interop.CorSym._ULARGE_INTEGER plibNewPosition; + this.WrappedObject.RemoteSeek(dlibMove, dwOrigin, out plibNewPosition); + return plibNewPosition; + } + + public void SetSize(Debugger.Interop.CorSym._ULARGE_INTEGER libNewSize) + { + this.WrappedObject.SetSize(libNewSize); + } + + public Debugger.Interop.CorSym._ULARGE_INTEGER RemoteCopyTo(IStream pstm, Debugger.Interop.CorSym._ULARGE_INTEGER cb, out Debugger.Interop.CorSym._ULARGE_INTEGER pcbRead) + { + Debugger.Interop.CorSym._ULARGE_INTEGER pcbWritten; + this.WrappedObject.RemoteCopyTo(pstm.WrappedObject, cb, out pcbRead, out pcbWritten); + return pcbWritten; + } + + public void Commit(uint grfCommitFlags) + { + this.WrappedObject.Commit(grfCommitFlags); + } + + public void Revert() + { + this.WrappedObject.Revert(); + } + + public void LockRegion(Debugger.Interop.CorSym._ULARGE_INTEGER libOffset, Debugger.Interop.CorSym._ULARGE_INTEGER cb, uint dwLockType) + { + this.WrappedObject.LockRegion(libOffset, cb, dwLockType); + } + + public void UnlockRegion(Debugger.Interop.CorSym._ULARGE_INTEGER libOffset, Debugger.Interop.CorSym._ULARGE_INTEGER cb, uint dwLockType) + { + this.WrappedObject.UnlockRegion(libOffset, cb, dwLockType); + } + + public void Stat(out Debugger.Interop.CorSym.tagSTATSTG pstatstg, uint grfStatFlag) + { + this.WrappedObject.Stat(out pstatstg, grfStatFlag); + } + + public IStream Clone() + { + IStream ppstm; + Debugger.Interop.CorSym.IStream out_ppstm; + this.WrappedObject.Clone(out out_ppstm); + ppstm = IStream.Wrap(out_ppstm); + return ppstm; + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedBinder.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedBinder.cs new file mode 100644 index 000000000..3eea53ab0 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedBinder.cs @@ -0,0 +1,110 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorSym +{ + using System; + + + public partial class ISymUnmanagedBinder + { + + private Debugger.Interop.CorSym.ISymUnmanagedBinder wrappedObject; + + internal Debugger.Interop.CorSym.ISymUnmanagedBinder WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ISymUnmanagedBinder(Debugger.Interop.CorSym.ISymUnmanagedBinder wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ISymUnmanagedBinder)); + } + + public static ISymUnmanagedBinder Wrap(Debugger.Interop.CorSym.ISymUnmanagedBinder objectToWrap) + { + if ((objectToWrap != null)) + { + return new ISymUnmanagedBinder(objectToWrap); + } else + { + return null; + } + } + + ~ISymUnmanagedBinder() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ISymUnmanagedBinder)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ISymUnmanagedBinder o1, ISymUnmanagedBinder o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ISymUnmanagedBinder o1, ISymUnmanagedBinder o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ISymUnmanagedBinder casted = o as ISymUnmanagedBinder; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public ISymUnmanagedReader GetReaderForFile(object importer, System.IntPtr filename, System.IntPtr searchPath) + { + return ISymUnmanagedReader.Wrap(this.WrappedObject.GetReaderForFile(importer, filename, searchPath)); + } + + public ISymUnmanagedReader GetReaderFromStream(object importer, IStream pstream) + { + return ISymUnmanagedReader.Wrap(this.WrappedObject.GetReaderFromStream(importer, pstream.WrappedObject)); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedDispose.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedDispose.cs new file mode 100644 index 000000000..ea2bc5621 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedDispose.cs @@ -0,0 +1,105 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorSym +{ + using System; + + + public partial class ISymUnmanagedDispose + { + + private Debugger.Interop.CorSym.ISymUnmanagedDispose wrappedObject; + + internal Debugger.Interop.CorSym.ISymUnmanagedDispose WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ISymUnmanagedDispose(Debugger.Interop.CorSym.ISymUnmanagedDispose wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ISymUnmanagedDispose)); + } + + public static ISymUnmanagedDispose Wrap(Debugger.Interop.CorSym.ISymUnmanagedDispose objectToWrap) + { + if ((objectToWrap != null)) + { + return new ISymUnmanagedDispose(objectToWrap); + } else + { + return null; + } + } + + ~ISymUnmanagedDispose() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ISymUnmanagedDispose)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ISymUnmanagedDispose o1, ISymUnmanagedDispose o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ISymUnmanagedDispose o1, ISymUnmanagedDispose o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ISymUnmanagedDispose casted = o as ISymUnmanagedDispose; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void Destroy() + { + this.WrappedObject.Destroy(); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedDocument.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedDocument.cs new file mode 100644 index 000000000..001b4e325 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedDocument.cs @@ -0,0 +1,165 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorSym +{ + using System; + + + public partial class ISymUnmanagedDocument + { + + private Debugger.Interop.CorSym.ISymUnmanagedDocument wrappedObject; + + internal Debugger.Interop.CorSym.ISymUnmanagedDocument WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ISymUnmanagedDocument(Debugger.Interop.CorSym.ISymUnmanagedDocument wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ISymUnmanagedDocument)); + } + + public static ISymUnmanagedDocument Wrap(Debugger.Interop.CorSym.ISymUnmanagedDocument objectToWrap) + { + if ((objectToWrap != null)) + { + return new ISymUnmanagedDocument(objectToWrap); + } else + { + return null; + } + } + + ~ISymUnmanagedDocument() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ISymUnmanagedDocument)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ISymUnmanagedDocument o1, ISymUnmanagedDocument o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ISymUnmanagedDocument o1, ISymUnmanagedDocument o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ISymUnmanagedDocument casted = o as ISymUnmanagedDocument; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void GetURL(uint cchUrl, out uint pcchUrl, System.IntPtr szUrl) + { + this.WrappedObject.GetURL(cchUrl, out pcchUrl, szUrl); + } + + public System.Guid DocumentType + { + get + { + return this.WrappedObject.GetDocumentType(); + } + } + + public System.Guid Language + { + get + { + return this.WrappedObject.GetLanguage(); + } + } + + public System.Guid LanguageVendor + { + get + { + return this.WrappedObject.GetLanguageVendor(); + } + } + + public System.Guid CheckSumAlgorithmId + { + get + { + return this.WrappedObject.GetCheckSumAlgorithmId(); + } + } + + public void GetCheckSum(uint cData, out uint pcData, System.IntPtr data) + { + this.WrappedObject.GetCheckSum(cData, out pcData, data); + } + + public uint FindClosestLine(uint line) + { + return this.WrappedObject.FindClosestLine(line); + } + + public int HasEmbeddedSource() + { + return this.WrappedObject.HasEmbeddedSource(); + } + + public uint SourceLength + { + get + { + return this.WrappedObject.GetSourceLength(); + } + } + + public void GetSourceRange(uint startLine, uint startColumn, uint endLine, uint endColumn, uint cSourceBytes, out uint pcSourceBytes, System.IntPtr source) + { + this.WrappedObject.GetSourceRange(startLine, startColumn, endLine, endColumn, cSourceBytes, out pcSourceBytes, source); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedDocumentWriter.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedDocumentWriter.cs new file mode 100644 index 000000000..a1cb87778 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedDocumentWriter.cs @@ -0,0 +1,110 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorSym +{ + using System; + + + public partial class ISymUnmanagedDocumentWriter + { + + private Debugger.Interop.CorSym.ISymUnmanagedDocumentWriter wrappedObject; + + internal Debugger.Interop.CorSym.ISymUnmanagedDocumentWriter WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ISymUnmanagedDocumentWriter(Debugger.Interop.CorSym.ISymUnmanagedDocumentWriter wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ISymUnmanagedDocumentWriter)); + } + + public static ISymUnmanagedDocumentWriter Wrap(Debugger.Interop.CorSym.ISymUnmanagedDocumentWriter objectToWrap) + { + if ((objectToWrap != null)) + { + return new ISymUnmanagedDocumentWriter(objectToWrap); + } else + { + return null; + } + } + + ~ISymUnmanagedDocumentWriter() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ISymUnmanagedDocumentWriter)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ISymUnmanagedDocumentWriter o1, ISymUnmanagedDocumentWriter o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ISymUnmanagedDocumentWriter o1, ISymUnmanagedDocumentWriter o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ISymUnmanagedDocumentWriter casted = o as ISymUnmanagedDocumentWriter; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void SetSource(uint sourceSize, ref byte source) + { + this.WrappedObject.SetSource(sourceSize, ref source); + } + + public void SetCheckSum(System.Guid algorithmId, uint checkSumSize, ref byte checkSum) + { + this.WrappedObject.SetCheckSum(algorithmId, checkSumSize, ref checkSum); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedMethod.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedMethod.cs new file mode 100644 index 000000000..1bf25f706 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedMethod.cs @@ -0,0 +1,204 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorSym +{ + using System; + + + public partial class ISymUnmanagedMethod + { + + private Debugger.Interop.CorSym.ISymUnmanagedMethod wrappedObject; + + internal Debugger.Interop.CorSym.ISymUnmanagedMethod WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ISymUnmanagedMethod(Debugger.Interop.CorSym.ISymUnmanagedMethod wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ISymUnmanagedMethod)); + } + + public static ISymUnmanagedMethod Wrap(Debugger.Interop.CorSym.ISymUnmanagedMethod objectToWrap) + { + if ((objectToWrap != null)) + { + return new ISymUnmanagedMethod(objectToWrap); + } else + { + return null; + } + } + + ~ISymUnmanagedMethod() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ISymUnmanagedMethod)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ISymUnmanagedMethod o1, ISymUnmanagedMethod o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ISymUnmanagedMethod o1, ISymUnmanagedMethod o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ISymUnmanagedMethod casted = o as ISymUnmanagedMethod; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public uint Token + { + get + { + return this.WrappedObject.GetToken(); + } + } + + public uint SequencePointCount + { + get + { + return this.WrappedObject.GetSequencePointCount(); + } + } + + public ISymUnmanagedScope RootScope + { + get + { + return ISymUnmanagedScope.Wrap(this.WrappedObject.GetRootScope()); + } + } + + public ISymUnmanagedScope GetScopeFromOffset(uint offset) + { + return ISymUnmanagedScope.Wrap(this.WrappedObject.GetScopeFromOffset(offset)); + } + + public uint GetOffset(ISymUnmanagedDocument document, uint line, uint column) + { + return this.WrappedObject.GetOffset(document.WrappedObject, line, column); + } + + public void GetRanges(ISymUnmanagedDocument document, uint line, uint column, uint cRanges, out uint pcRanges, System.IntPtr ranges) + { + this.WrappedObject.GetRanges(document.WrappedObject, line, column, cRanges, out pcRanges, ranges); + } + + public void GetParameters(uint cParams, out uint pcParams, System.IntPtr @params) + { + this.WrappedObject.GetParameters(cParams, out pcParams, @params); + } + + public ISymUnmanagedNamespace Namespace + { + get + { + ISymUnmanagedNamespace pRetVal; + Debugger.Interop.CorSym.ISymUnmanagedNamespace out_pRetVal; + this.WrappedObject.GetNamespace(out out_pRetVal); + pRetVal = ISymUnmanagedNamespace.Wrap(out_pRetVal); + return pRetVal; + } + } + + public int GetSourceStartEnd(ISymUnmanagedDocument[] docs, uint[] lines, uint[] columns) + { + int pRetVal; + Debugger.Interop.CorSym.ISymUnmanagedDocument[] array_docs = new Debugger.Interop.CorSym.ISymUnmanagedDocument[docs.Length]; + for (int i = 0; (i < docs.Length); i = (i + 1)) + { + if ((docs[i] != null)) + { + array_docs[i] = docs[i].WrappedObject; + } + } + this.WrappedObject.GetSourceStartEnd(array_docs, lines, columns, out pRetVal); + for (int i = 0; (i < docs.Length); i = (i + 1)) + { + if ((array_docs[i] != null)) + { + docs[i] = ISymUnmanagedDocument.Wrap(array_docs[i]); + } else + { + docs[i] = null; + } + } + return pRetVal; + } + + public void GetSequencePoints(uint cPoints, out uint pcPoints, uint[] offsets, ISymUnmanagedDocument[] documents, uint[] lines, uint[] columns, uint[] endLines, uint[] endColumns) + { + Debugger.Interop.CorSym.ISymUnmanagedDocument[] array_documents = new Debugger.Interop.CorSym.ISymUnmanagedDocument[documents.Length]; + for (int i = 0; (i < documents.Length); i = (i + 1)) + { + if ((documents[i] != null)) + { + array_documents[i] = documents[i].WrappedObject; + } + } + this.WrappedObject.GetSequencePoints(cPoints, out pcPoints, offsets, array_documents, lines, columns, endLines, endColumns); + for (int i = 0; (i < documents.Length); i = (i + 1)) + { + if ((array_documents[i] != null)) + { + documents[i] = ISymUnmanagedDocument.Wrap(array_documents[i]); + } else + { + documents[i] = null; + } + } + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedNamespace.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedNamespace.cs new file mode 100644 index 000000000..66d4890b8 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedNamespace.cs @@ -0,0 +1,115 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorSym +{ + using System; + + + public partial class ISymUnmanagedNamespace + { + + private Debugger.Interop.CorSym.ISymUnmanagedNamespace wrappedObject; + + internal Debugger.Interop.CorSym.ISymUnmanagedNamespace WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ISymUnmanagedNamespace(Debugger.Interop.CorSym.ISymUnmanagedNamespace wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ISymUnmanagedNamespace)); + } + + public static ISymUnmanagedNamespace Wrap(Debugger.Interop.CorSym.ISymUnmanagedNamespace objectToWrap) + { + if ((objectToWrap != null)) + { + return new ISymUnmanagedNamespace(objectToWrap); + } else + { + return null; + } + } + + ~ISymUnmanagedNamespace() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ISymUnmanagedNamespace)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ISymUnmanagedNamespace o1, ISymUnmanagedNamespace o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ISymUnmanagedNamespace o1, ISymUnmanagedNamespace o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ISymUnmanagedNamespace casted = o as ISymUnmanagedNamespace; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void GetName(uint cchName, out uint pcchName, System.IntPtr szName) + { + this.WrappedObject.GetName(cchName, out pcchName, szName); + } + + public void GetNamespaces(uint cNameSpaces, out uint pcNameSpaces, System.IntPtr namespaces) + { + this.WrappedObject.GetNamespaces(cNameSpaces, out pcNameSpaces, namespaces); + } + + public void GetVariables(uint cVars, out uint pcVars, System.IntPtr pVars) + { + this.WrappedObject.GetVariables(cVars, out pcVars, pVars); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedReader.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedReader.cs new file mode 100644 index 000000000..d90206fa4 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedReader.cs @@ -0,0 +1,210 @@ +// +// +// +// +// $Revision: 3135 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorSym +{ + using System; + + + public partial class ISymUnmanagedReader + { + + private Debugger.Interop.CorSym.ISymUnmanagedReader wrappedObject; + + internal Debugger.Interop.CorSym.ISymUnmanagedReader WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ISymUnmanagedReader(Debugger.Interop.CorSym.ISymUnmanagedReader wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ISymUnmanagedReader)); + } + + public static ISymUnmanagedReader Wrap(Debugger.Interop.CorSym.ISymUnmanagedReader objectToWrap) + { + if ((objectToWrap != null)) + { + return new ISymUnmanagedReader(objectToWrap); + } else + { + return null; + } + } + + ~ISymUnmanagedReader() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ISymUnmanagedReader)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ISymUnmanagedReader o1, ISymUnmanagedReader o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ISymUnmanagedReader o1, ISymUnmanagedReader o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ISymUnmanagedReader casted = o as ISymUnmanagedReader; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public ISymUnmanagedDocument GetDocument(System.IntPtr url, System.Guid language, System.Guid languageVendor, System.Guid documentType) + { + return ISymUnmanagedDocument.Wrap(this.WrappedObject.GetDocument(url, language, languageVendor, documentType)); + } + + public void GetDocuments(uint cDocs, out uint pcDocs, ISymUnmanagedDocument[] pDocs) + { + Debugger.Interop.CorSym.ISymUnmanagedDocument[] array_pDocs = new Debugger.Interop.CorSym.ISymUnmanagedDocument[pDocs.Length]; + for (int i = 0; (i < pDocs.Length); i = (i + 1)) + { + if ((pDocs[i] != null)) + { + array_pDocs[i] = pDocs[i].WrappedObject; + } + } + this.WrappedObject.GetDocuments(cDocs, out pcDocs, array_pDocs); + for (int i = 0; (i < pDocs.Length); i = (i + 1)) + { + if ((array_pDocs[i] != null)) + { + pDocs[i] = ISymUnmanagedDocument.Wrap(array_pDocs[i]); + } else + { + pDocs[i] = null; + } + } + } + + public uint UserEntryPoint + { + get + { + return this.WrappedObject.GetUserEntryPoint(); + } + } + + public ISymUnmanagedMethod GetMethod(uint token) + { + return ISymUnmanagedMethod.Wrap(this.WrappedObject.GetMethod(token)); + } + + public ISymUnmanagedMethod GetMethodByVersion(uint token, int version) + { + return ISymUnmanagedMethod.Wrap(this.WrappedObject.GetMethodByVersion(token, version)); + } + + public void GetVariables(uint parent, uint cVars, out uint pcVars, System.IntPtr pVars) + { + this.WrappedObject.GetVariables(parent, cVars, out pcVars, pVars); + } + + public void GetGlobalVariables(uint cVars, out uint pcVars, System.IntPtr pVars) + { + this.WrappedObject.GetGlobalVariables(cVars, out pcVars, pVars); + } + + public ISymUnmanagedMethod GetMethodFromDocumentPosition(ISymUnmanagedDocument document, uint line, uint column) + { + return ISymUnmanagedMethod.Wrap(this.WrappedObject.GetMethodFromDocumentPosition(document.WrappedObject, line, column)); + } + + public void GetSymAttribute(uint parent, System.IntPtr name, uint cBuffer, out uint pcBuffer, System.IntPtr buffer) + { + this.WrappedObject.GetSymAttribute(parent, name, cBuffer, out pcBuffer, buffer); + } + + public void GetNamespaces(uint cNameSpaces, out uint pcNameSpaces, System.IntPtr namespaces) + { + this.WrappedObject.GetNamespaces(cNameSpaces, out pcNameSpaces, namespaces); + } + + public void Initialize(object importer, System.IntPtr filename, System.IntPtr searchPath, IStream pIStream) + { + this.WrappedObject.Initialize(importer, filename, searchPath, pIStream.WrappedObject); + } + + public void UpdateSymbolStore(System.IntPtr filename, IStream pIStream) + { + this.WrappedObject.UpdateSymbolStore(filename, pIStream.WrappedObject); + } + + public void ReplaceSymbolStore(System.IntPtr filename, IStream pIStream) + { + this.WrappedObject.ReplaceSymbolStore(filename, pIStream.WrappedObject); + } + + public void GetSymbolStoreFileName(uint cchName, out uint pcchName, System.IntPtr szName) + { + this.WrappedObject.GetSymbolStoreFileName(cchName, out pcchName, szName); + } + + public void GetMethodsFromDocumentPosition(ISymUnmanagedDocument document, uint line, uint column, uint cMethod, out uint pcMethod, System.IntPtr pRetVal) + { + this.WrappedObject.GetMethodsFromDocumentPosition(document.WrappedObject, line, column, cMethod, out pcMethod, pRetVal); + } + + public int GetDocumentVersion(ISymUnmanagedDocument pDoc, out int version) + { + int pbCurrent; + this.WrappedObject.GetDocumentVersion(pDoc.WrappedObject, out version, out pbCurrent); + return pbCurrent; + } + + public int GetMethodVersion(ISymUnmanagedMethod pMethod) + { + int version; + this.WrappedObject.GetMethodVersion(pMethod.WrappedObject, out version); + return version; + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedReaderSymbolSearchInfo.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedReaderSymbolSearchInfo.cs new file mode 100644 index 000000000..249eac594 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedReaderSymbolSearchInfo.cs @@ -0,0 +1,119 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorSym +{ + using System; + + + public partial class ISymUnmanagedReaderSymbolSearchInfo + { + + private Debugger.Interop.CorSym.ISymUnmanagedReaderSymbolSearchInfo wrappedObject; + + internal Debugger.Interop.CorSym.ISymUnmanagedReaderSymbolSearchInfo WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ISymUnmanagedReaderSymbolSearchInfo(Debugger.Interop.CorSym.ISymUnmanagedReaderSymbolSearchInfo wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ISymUnmanagedReaderSymbolSearchInfo)); + } + + public static ISymUnmanagedReaderSymbolSearchInfo Wrap(Debugger.Interop.CorSym.ISymUnmanagedReaderSymbolSearchInfo objectToWrap) + { + if ((objectToWrap != null)) + { + return new ISymUnmanagedReaderSymbolSearchInfo(objectToWrap); + } else + { + return null; + } + } + + ~ISymUnmanagedReaderSymbolSearchInfo() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ISymUnmanagedReaderSymbolSearchInfo)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ISymUnmanagedReaderSymbolSearchInfo o1, ISymUnmanagedReaderSymbolSearchInfo o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ISymUnmanagedReaderSymbolSearchInfo o1, ISymUnmanagedReaderSymbolSearchInfo o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ISymUnmanagedReaderSymbolSearchInfo casted = o as ISymUnmanagedReaderSymbolSearchInfo; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public uint SymbolSearchInfoCount + { + get + { + uint pcSearchInfo; + this.WrappedObject.GetSymbolSearchInfoCount(out pcSearchInfo); + return pcSearchInfo; + } + } + + public ISymUnmanagedSymbolSearchInfo GetSymbolSearchInfo(uint cSearchInfo, out uint pcSearchInfo) + { + ISymUnmanagedSymbolSearchInfo rgpSearchInfo; + Debugger.Interop.CorSym.ISymUnmanagedSymbolSearchInfo out_rgpSearchInfo; + this.WrappedObject.GetSymbolSearchInfo(cSearchInfo, out pcSearchInfo, out out_rgpSearchInfo); + rgpSearchInfo = ISymUnmanagedSymbolSearchInfo.Wrap(out_rgpSearchInfo); + return rgpSearchInfo; + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedScope.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedScope.cs new file mode 100644 index 000000000..94853f30e --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedScope.cs @@ -0,0 +1,209 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorSym +{ + using System; + + + public partial class ISymUnmanagedScope + { + + private Debugger.Interop.CorSym.ISymUnmanagedScope wrappedObject; + + internal Debugger.Interop.CorSym.ISymUnmanagedScope WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ISymUnmanagedScope(Debugger.Interop.CorSym.ISymUnmanagedScope wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ISymUnmanagedScope)); + } + + public static ISymUnmanagedScope Wrap(Debugger.Interop.CorSym.ISymUnmanagedScope objectToWrap) + { + if ((objectToWrap != null)) + { + return new ISymUnmanagedScope(objectToWrap); + } else + { + return null; + } + } + + ~ISymUnmanagedScope() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ISymUnmanagedScope)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ISymUnmanagedScope o1, ISymUnmanagedScope o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ISymUnmanagedScope o1, ISymUnmanagedScope o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ISymUnmanagedScope casted = o as ISymUnmanagedScope; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public ISymUnmanagedMethod Method + { + get + { + return ISymUnmanagedMethod.Wrap(this.WrappedObject.GetMethod()); + } + } + + public ISymUnmanagedScope Parent + { + get + { + return ISymUnmanagedScope.Wrap(this.WrappedObject.GetParent()); + } + } + + public void GetChildren(uint cChildren, out uint pcChildren, ISymUnmanagedScope[] children) + { + Debugger.Interop.CorSym.ISymUnmanagedScope[] array_children = new Debugger.Interop.CorSym.ISymUnmanagedScope[children.Length]; + for (int i = 0; (i < children.Length); i = (i + 1)) + { + if ((children[i] != null)) + { + array_children[i] = children[i].WrappedObject; + } + } + this.WrappedObject.GetChildren(cChildren, out pcChildren, array_children); + for (int i = 0; (i < children.Length); i = (i + 1)) + { + if ((array_children[i] != null)) + { + children[i] = ISymUnmanagedScope.Wrap(array_children[i]); + } else + { + children[i] = null; + } + } + } + + public uint StartOffset + { + get + { + return this.WrappedObject.GetStartOffset(); + } + } + + public uint EndOffset + { + get + { + return this.WrappedObject.GetEndOffset(); + } + } + + public uint LocalCount + { + get + { + return this.WrappedObject.GetLocalCount(); + } + } + + public void GetLocals(uint cLocals, out uint pcLocals, ISymUnmanagedVariable[] locals) + { + Debugger.Interop.CorSym.ISymUnmanagedVariable[] array_locals = new Debugger.Interop.CorSym.ISymUnmanagedVariable[locals.Length]; + for (int i = 0; (i < locals.Length); i = (i + 1)) + { + if ((locals[i] != null)) + { + array_locals[i] = locals[i].WrappedObject; + } + } + this.WrappedObject.GetLocals(cLocals, out pcLocals, array_locals); + for (int i = 0; (i < locals.Length); i = (i + 1)) + { + if ((array_locals[i] != null)) + { + locals[i] = ISymUnmanagedVariable.Wrap(array_locals[i]); + } else + { + locals[i] = null; + } + } + } + + public void GetNamespaces(uint cNameSpaces, out uint pcNameSpaces, ISymUnmanagedNamespace[] namespaces) + { + Debugger.Interop.CorSym.ISymUnmanagedNamespace[] array_namespaces = new Debugger.Interop.CorSym.ISymUnmanagedNamespace[namespaces.Length]; + for (int i = 0; (i < namespaces.Length); i = (i + 1)) + { + if ((namespaces[i] != null)) + { + array_namespaces[i] = namespaces[i].WrappedObject; + } + } + this.WrappedObject.GetNamespaces(cNameSpaces, out pcNameSpaces, array_namespaces); + for (int i = 0; (i < namespaces.Length); i = (i + 1)) + { + if ((array_namespaces[i] != null)) + { + namespaces[i] = ISymUnmanagedNamespace.Wrap(array_namespaces[i]); + } else + { + namespaces[i] = null; + } + } + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedSymbolSearchInfo.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedSymbolSearchInfo.cs new file mode 100644 index 000000000..497be6e19 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedSymbolSearchInfo.cs @@ -0,0 +1,125 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorSym +{ + using System; + + + public partial class ISymUnmanagedSymbolSearchInfo + { + + private Debugger.Interop.CorSym.ISymUnmanagedSymbolSearchInfo wrappedObject; + + internal Debugger.Interop.CorSym.ISymUnmanagedSymbolSearchInfo WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ISymUnmanagedSymbolSearchInfo(Debugger.Interop.CorSym.ISymUnmanagedSymbolSearchInfo wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ISymUnmanagedSymbolSearchInfo)); + } + + public static ISymUnmanagedSymbolSearchInfo Wrap(Debugger.Interop.CorSym.ISymUnmanagedSymbolSearchInfo objectToWrap) + { + if ((objectToWrap != null)) + { + return new ISymUnmanagedSymbolSearchInfo(objectToWrap); + } else + { + return null; + } + } + + ~ISymUnmanagedSymbolSearchInfo() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ISymUnmanagedSymbolSearchInfo)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ISymUnmanagedSymbolSearchInfo o1, ISymUnmanagedSymbolSearchInfo o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ISymUnmanagedSymbolSearchInfo o1, ISymUnmanagedSymbolSearchInfo o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ISymUnmanagedSymbolSearchInfo casted = o as ISymUnmanagedSymbolSearchInfo; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public uint SearchPathLength + { + get + { + uint pcchPath; + this.WrappedObject.GetSearchPathLength(out pcchPath); + return pcchPath; + } + } + + public void GetSearchPath(uint cchPath, out uint pcchPath, System.IntPtr szPath) + { + this.WrappedObject.GetSearchPath(cchPath, out pcchPath, szPath); + } + + public int HRESULT + { + get + { + int phr; + this.WrappedObject.GetHRESULT(out phr); + return phr; + } + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedVariable.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedVariable.cs new file mode 100644 index 000000000..668698f90 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedVariable.cs @@ -0,0 +1,166 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorSym +{ + using System; + + + public partial class ISymUnmanagedVariable + { + + private Debugger.Interop.CorSym.ISymUnmanagedVariable wrappedObject; + + internal Debugger.Interop.CorSym.ISymUnmanagedVariable WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ISymUnmanagedVariable(Debugger.Interop.CorSym.ISymUnmanagedVariable wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ISymUnmanagedVariable)); + } + + public static ISymUnmanagedVariable Wrap(Debugger.Interop.CorSym.ISymUnmanagedVariable objectToWrap) + { + if ((objectToWrap != null)) + { + return new ISymUnmanagedVariable(objectToWrap); + } else + { + return null; + } + } + + ~ISymUnmanagedVariable() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ISymUnmanagedVariable)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ISymUnmanagedVariable o1, ISymUnmanagedVariable o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ISymUnmanagedVariable o1, ISymUnmanagedVariable o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ISymUnmanagedVariable casted = o as ISymUnmanagedVariable; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public void GetName(uint cchName, out uint pcchName, System.IntPtr szName) + { + this.WrappedObject.GetName(cchName, out pcchName, szName); + } + + public uint Attributes + { + get + { + return this.WrappedObject.GetAttributes(); + } + } + + public void GetSignature(uint cSig, out uint pcSig, System.IntPtr sig) + { + this.WrappedObject.GetSignature(cSig, out pcSig, sig); + } + + public uint AddressKind + { + get + { + return this.WrappedObject.GetAddressKind(); + } + } + + public uint AddressField1 + { + get + { + return this.WrappedObject.GetAddressField1(); + } + } + + public uint AddressField2 + { + get + { + return this.WrappedObject.GetAddressField2(); + } + } + + public uint AddressField3 + { + get + { + return this.WrappedObject.GetAddressField3(); + } + } + + public uint StartOffset + { + get + { + return this.WrappedObject.GetStartOffset(); + } + } + + public uint EndOffset + { + get + { + return this.WrappedObject.GetEndOffset(); + } + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedWriter.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedWriter.cs new file mode 100644 index 000000000..d657965a2 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedWriter.cs @@ -0,0 +1,220 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorSym +{ + using System; + + + public partial class ISymUnmanagedWriter + { + + private Debugger.Interop.CorSym.ISymUnmanagedWriter wrappedObject; + + internal Debugger.Interop.CorSym.ISymUnmanagedWriter WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ISymUnmanagedWriter(Debugger.Interop.CorSym.ISymUnmanagedWriter wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ISymUnmanagedWriter)); + } + + public static ISymUnmanagedWriter Wrap(Debugger.Interop.CorSym.ISymUnmanagedWriter objectToWrap) + { + if ((objectToWrap != null)) + { + return new ISymUnmanagedWriter(objectToWrap); + } else + { + return null; + } + } + + ~ISymUnmanagedWriter() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ISymUnmanagedWriter)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ISymUnmanagedWriter o1, ISymUnmanagedWriter o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ISymUnmanagedWriter o1, ISymUnmanagedWriter o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ISymUnmanagedWriter casted = o as ISymUnmanagedWriter; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public ISymUnmanagedDocumentWriter DefineDocument(System.IntPtr url, ref System.Guid language, ref System.Guid languageVendor, ref System.Guid documentType) + { + return ISymUnmanagedDocumentWriter.Wrap(this.WrappedObject.DefineDocument(url, ref language, ref languageVendor, ref documentType)); + } + + public void SetUserEntryPoint(uint entryMethod) + { + this.WrappedObject.SetUserEntryPoint(entryMethod); + } + + public void OpenMethod(uint method) + { + this.WrappedObject.OpenMethod(method); + } + + public void CloseMethod() + { + this.WrappedObject.CloseMethod(); + } + + public uint OpenScope(uint startOffset) + { + return this.WrappedObject.OpenScope(startOffset); + } + + public void CloseScope(uint endOffset) + { + this.WrappedObject.CloseScope(endOffset); + } + + public void SetScopeRange(uint scopeID, uint startOffset, uint endOffset) + { + this.WrappedObject.SetScopeRange(scopeID, startOffset, endOffset); + } + + public void DefineLocalVariable(System.IntPtr name, uint attributes, uint cSig, ref byte signature, uint addrKind, uint addr1, uint addr2, uint addr3, uint startOffset, uint endOffset) + { + this.WrappedObject.DefineLocalVariable(name, attributes, cSig, ref signature, addrKind, addr1, addr2, addr3, startOffset, endOffset); + } + + public void DefineParameter(System.IntPtr name, uint attributes, uint sequence, uint addrKind, uint addr1, uint addr2, uint addr3) + { + this.WrappedObject.DefineParameter(name, attributes, sequence, addrKind, addr1, addr2, addr3); + } + + public void DefineField(uint parent, System.IntPtr name, uint attributes, uint cSig, ref byte signature, uint addrKind, uint addr1, uint addr2, uint addr3) + { + this.WrappedObject.DefineField(parent, name, attributes, cSig, ref signature, addrKind, addr1, addr2, addr3); + } + + public void DefineGlobalVariable(System.IntPtr name, uint attributes, uint cSig, ref byte signature, uint addrKind, uint addr1, uint addr2, uint addr3) + { + this.WrappedObject.DefineGlobalVariable(name, attributes, cSig, ref signature, addrKind, addr1, addr2, addr3); + } + + public void Close() + { + this.WrappedObject.Close(); + } + + public void SetSymAttribute(uint parent, System.IntPtr name, uint cData, ref byte data) + { + this.WrappedObject.SetSymAttribute(parent, name, cData, ref data); + } + + public void OpenNamespace(System.IntPtr name) + { + this.WrappedObject.OpenNamespace(name); + } + + public void CloseNamespace() + { + this.WrappedObject.CloseNamespace(); + } + + public void UsingNamespace(System.IntPtr fullName) + { + this.WrappedObject.UsingNamespace(fullName); + } + + public void SetMethodSourceRange(ISymUnmanagedDocumentWriter startDoc, uint startLine, uint startColumn, ISymUnmanagedDocumentWriter endDoc, uint endLine, uint endColumn) + { + this.WrappedObject.SetMethodSourceRange(startDoc.WrappedObject, startLine, startColumn, endDoc.WrappedObject, endLine, endColumn); + } + + public void Initialize(object emitter, System.IntPtr filename, IStream pIStream, int fFullBuild) + { + this.WrappedObject.Initialize(emitter, filename, pIStream.WrappedObject, fFullBuild); + } + + public void GetDebugInfo(ref uint pIDD, uint cData, out uint pcData, System.IntPtr data) + { + this.WrappedObject.GetDebugInfo(ref pIDD, cData, out pcData, data); + } + + public void DefineSequencePoints(ISymUnmanagedDocumentWriter document, uint spCount, ref uint offsets, ref uint lines, ref uint columns, ref uint endLines, ref uint endColumns) + { + this.WrappedObject.DefineSequencePoints(document.WrappedObject, spCount, ref offsets, ref lines, ref columns, ref endLines, ref endColumns); + } + + public void RemapToken(uint oldToken, uint newToken) + { + this.WrappedObject.RemapToken(oldToken, newToken); + } + + public void Initialize2(object emitter, System.IntPtr tempfilename, IStream pIStream, int fFullBuild, System.IntPtr finalfilename) + { + this.WrappedObject.Initialize2(emitter, tempfilename, pIStream.WrappedObject, fFullBuild, finalfilename); + } + + public void DefineConstant(System.IntPtr name, object value, uint cSig, ref byte signature) + { + this.WrappedObject.DefineConstant(name, value, cSig, ref signature); + } + + public void Abort() + { + this.WrappedObject.Abort(); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedWriter2.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedWriter2.cs new file mode 100644 index 000000000..b24e406ba --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/Autogenerated/ISymUnmanagedWriter2.cs @@ -0,0 +1,235 @@ +// +// +// +// +// $Revision: 2201 $ +// + +// This file is automatically generated - any changes will be lost + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorSym +{ + using System; + + + public partial class ISymUnmanagedWriter2 + { + + private Debugger.Interop.CorSym.ISymUnmanagedWriter2 wrappedObject; + + internal Debugger.Interop.CorSym.ISymUnmanagedWriter2 WrappedObject + { + get + { + return this.wrappedObject; + } + } + + public ISymUnmanagedWriter2(Debugger.Interop.CorSym.ISymUnmanagedWriter2 wrappedObject) + { + this.wrappedObject = wrappedObject; + ResourceManager.TrackCOMObject(wrappedObject, typeof(ISymUnmanagedWriter2)); + } + + public static ISymUnmanagedWriter2 Wrap(Debugger.Interop.CorSym.ISymUnmanagedWriter2 objectToWrap) + { + if ((objectToWrap != null)) + { + return new ISymUnmanagedWriter2(objectToWrap); + } else + { + return null; + } + } + + ~ISymUnmanagedWriter2() + { + object o = wrappedObject; + wrappedObject = null; + ResourceManager.ReleaseCOMObject(o, typeof(ISymUnmanagedWriter2)); + } + + public bool Is() where T: class + { + System.Reflection.ConstructorInfo ctor = typeof(T).GetConstructors()[0]; + System.Type paramType = ctor.GetParameters()[0].ParameterType; + return paramType.IsInstanceOfType(this.WrappedObject); + } + + public T As() where T: class + { + try { + return CastTo(); + } catch { + return null; + } + } + + public T CastTo() where T: class + { + return (T)Activator.CreateInstance(typeof(T), this.WrappedObject); + } + + public static bool operator ==(ISymUnmanagedWriter2 o1, ISymUnmanagedWriter2 o2) + { + return ((object)o1 == null && (object)o2 == null) || + ((object)o1 != null && (object)o2 != null && o1.WrappedObject == o2.WrappedObject); + } + + public static bool operator !=(ISymUnmanagedWriter2 o1, ISymUnmanagedWriter2 o2) + { + return !(o1 == o2); + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + public override bool Equals(object o) + { + ISymUnmanagedWriter2 casted = o as ISymUnmanagedWriter2; + return (casted != null) && (casted.WrappedObject == wrappedObject); + } + + + public ISymUnmanagedDocumentWriter DefineDocument(System.IntPtr url, ref System.Guid language, ref System.Guid languageVendor, ref System.Guid documentType) + { + return ISymUnmanagedDocumentWriter.Wrap(this.WrappedObject.DefineDocument(url, ref language, ref languageVendor, ref documentType)); + } + + public void SetUserEntryPoint(uint entryMethod) + { + this.WrappedObject.SetUserEntryPoint(entryMethod); + } + + public void OpenMethod(uint method) + { + this.WrappedObject.OpenMethod(method); + } + + public void CloseMethod() + { + this.WrappedObject.CloseMethod(); + } + + public uint OpenScope(uint startOffset) + { + return this.WrappedObject.OpenScope(startOffset); + } + + public void CloseScope(uint endOffset) + { + this.WrappedObject.CloseScope(endOffset); + } + + public void SetScopeRange(uint scopeID, uint startOffset, uint endOffset) + { + this.WrappedObject.SetScopeRange(scopeID, startOffset, endOffset); + } + + public void DefineLocalVariable(System.IntPtr name, uint attributes, uint cSig, ref byte signature, uint addrKind, uint addr1, uint addr2, uint addr3, uint startOffset, uint endOffset) + { + this.WrappedObject.DefineLocalVariable(name, attributes, cSig, ref signature, addrKind, addr1, addr2, addr3, startOffset, endOffset); + } + + public void DefineParameter(System.IntPtr name, uint attributes, uint sequence, uint addrKind, uint addr1, uint addr2, uint addr3) + { + this.WrappedObject.DefineParameter(name, attributes, sequence, addrKind, addr1, addr2, addr3); + } + + public void DefineField(uint parent, System.IntPtr name, uint attributes, uint cSig, ref byte signature, uint addrKind, uint addr1, uint addr2, uint addr3) + { + this.WrappedObject.DefineField(parent, name, attributes, cSig, ref signature, addrKind, addr1, addr2, addr3); + } + + public void DefineGlobalVariable(System.IntPtr name, uint attributes, uint cSig, ref byte signature, uint addrKind, uint addr1, uint addr2, uint addr3) + { + this.WrappedObject.DefineGlobalVariable(name, attributes, cSig, ref signature, addrKind, addr1, addr2, addr3); + } + + public void Close() + { + this.WrappedObject.Close(); + } + + public void SetSymAttribute(uint parent, System.IntPtr name, uint cData, ref byte data) + { + this.WrappedObject.SetSymAttribute(parent, name, cData, ref data); + } + + public void OpenNamespace(System.IntPtr name) + { + this.WrappedObject.OpenNamespace(name); + } + + public void CloseNamespace() + { + this.WrappedObject.CloseNamespace(); + } + + public void UsingNamespace(System.IntPtr fullName) + { + this.WrappedObject.UsingNamespace(fullName); + } + + public void SetMethodSourceRange(ISymUnmanagedDocumentWriter startDoc, uint startLine, uint startColumn, ISymUnmanagedDocumentWriter endDoc, uint endLine, uint endColumn) + { + this.WrappedObject.SetMethodSourceRange(startDoc.WrappedObject, startLine, startColumn, endDoc.WrappedObject, endLine, endColumn); + } + + public void Initialize(object emitter, System.IntPtr filename, IStream pIStream, int fFullBuild) + { + this.WrappedObject.Initialize(emitter, filename, pIStream.WrappedObject, fFullBuild); + } + + public void GetDebugInfo(ref uint pIDD, uint cData, out uint pcData, System.IntPtr data) + { + this.WrappedObject.GetDebugInfo(ref pIDD, cData, out pcData, data); + } + + public void DefineSequencePoints(ISymUnmanagedDocumentWriter document, uint spCount, ref uint offsets, ref uint lines, ref uint columns, ref uint endLines, ref uint endColumns) + { + this.WrappedObject.DefineSequencePoints(document.WrappedObject, spCount, ref offsets, ref lines, ref columns, ref endLines, ref endColumns); + } + + public void RemapToken(uint oldToken, uint newToken) + { + this.WrappedObject.RemapToken(oldToken, newToken); + } + + public void Initialize2(object emitter, System.IntPtr tempfilename, IStream pIStream, int fFullBuild, System.IntPtr finalfilename) + { + this.WrappedObject.Initialize2(emitter, tempfilename, pIStream.WrappedObject, fFullBuild, finalfilename); + } + + public void DefineConstant(System.IntPtr name, object value, uint cSig, ref byte signature) + { + this.WrappedObject.DefineConstant(name, value, cSig, ref signature); + } + + public void Abort() + { + this.WrappedObject.Abort(); + } + + public void DefineLocalVariable2(System.IntPtr name, uint attributes, uint sigToken, uint addrKind, uint addr1, uint addr2, uint addr3, uint startOffset, uint endOffset) + { + this.WrappedObject.DefineLocalVariable2(name, attributes, sigToken, addrKind, addr1, addr2, addr3, startOffset, endOffset); + } + + public void DefineGlobalVariable2(System.IntPtr name, uint attributes, uint sigToken, uint addrKind, uint addr1, uint addr2, uint addr3) + { + this.WrappedObject.DefineGlobalVariable2(name, attributes, sigToken, addrKind, addr1, addr2, addr3); + } + + public void DefineConstant2(System.IntPtr name, object value, uint sigToken) + { + this.WrappedObject.DefineConstant2(name, value, sigToken); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/ISymUnmanagedBinder.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/ISymUnmanagedBinder.cs new file mode 100644 index 000000000..014580779 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/ISymUnmanagedBinder.cs @@ -0,0 +1,29 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorSym +{ + using System; + using System.Runtime.InteropServices; + + public partial class ISymUnmanagedBinder + { + public ISymUnmanagedReader GetReaderForFile(object importer, string filename, string searchPath) + { + IntPtr pfilename = Marshal.StringToCoTaskMemUni(filename); + IntPtr psearchPath = Marshal.StringToCoTaskMemUni(searchPath); + ISymUnmanagedReader res = GetReaderForFile(importer, pfilename, psearchPath); + Marshal.FreeCoTaskMem(pfilename); + Marshal.FreeCoTaskMem(psearchPath); + return res; + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/ISymUnmanagedDocument.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/ISymUnmanagedDocument.cs new file mode 100644 index 000000000..01b89c01d --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/ISymUnmanagedDocument.cs @@ -0,0 +1,38 @@ +// +// +// +// +// $Revision: 3137 $ +// + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorSym +{ + using System; + using System.Runtime.InteropServices; + + public partial class ISymUnmanagedDocument + { + public string URL { + get { + return Util.GetString(GetURL, 256, true); + } + } + + public byte[] CheckSum { + get { + uint checkSumLength = 0; + GetCheckSum(checkSumLength, out checkSumLength, IntPtr.Zero); + IntPtr checkSumPtr = Marshal.AllocHGlobal((int)checkSumLength); + GetCheckSum(checkSumLength, out checkSumLength, checkSumPtr); + byte[] checkSumBytes = new byte[checkSumLength]; + Marshal.Copy(checkSumPtr, checkSumBytes, 0, (int)checkSumLength); + Marshal.FreeHGlobal(checkSumPtr); + return checkSumBytes; + } + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/ISymUnmanagedMethod.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/ISymUnmanagedMethod.cs new file mode 100644 index 000000000..790c0c018 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/ISymUnmanagedMethod.cs @@ -0,0 +1,54 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorSym +{ + using System; + + + public partial class ISymUnmanagedMethod + { + public SequencePoint[] SequencePoints { + get { + uint count = this.SequencePointCount; + + ISymUnmanagedDocument[] documents = new ISymUnmanagedDocument[count]; + uint[] offsets = new uint[count]; + uint[] lines = new uint[count]; + uint[] columns = new uint[count]; + uint[] endLines = new uint[count]; + uint[] endColumns = new uint[count]; + + GetSequencePoints(count, + out count, + offsets, + documents, + lines, + columns, + endLines, + endColumns); + + SequencePoint[] sequencePoints = new SequencePoint[count]; + + for(int i = 0; i < count; i++) { + sequencePoints[i] = new SequencePoint(documents[i], + offsets[i], + lines[i], + columns[i], + endLines[i], + endColumns[i]); + } + + return sequencePoints; + } + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/ISymUnmanagedReader.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/ISymUnmanagedReader.cs new file mode 100644 index 000000000..4fd0dd8c8 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/ISymUnmanagedReader.cs @@ -0,0 +1,27 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorSym +{ + using System; + using System.Runtime.InteropServices; + + public partial class ISymUnmanagedReader + { + public ISymUnmanagedDocument GetDocument(string url, System.Guid language, System.Guid languageVendor, System.Guid documentType) + { + IntPtr p = Marshal.StringToCoTaskMemUni(url); + ISymUnmanagedDocument res = GetDocument(p, language, languageVendor, documentType); + Marshal.FreeCoTaskMem(p); + return res; + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/ISymUnmanagedScope.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/ISymUnmanagedScope.cs new file mode 100644 index 000000000..eac575e3e --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/ISymUnmanagedScope.cs @@ -0,0 +1,49 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorSym +{ + using System; + + + public partial class ISymUnmanagedScope + { + public ISymUnmanagedScope[] Children { + get { + uint count; + GetChildren(0, out count, new ISymUnmanagedScope[0]); + ISymUnmanagedScope[] children = new ISymUnmanagedScope[count]; + GetChildren(count, out count, children); + return children; + } + } + + public ISymUnmanagedVariable[] Locals { + get { + uint count; + GetLocals(0, out count, new ISymUnmanagedVariable[0]); + ISymUnmanagedVariable[] locals = new ISymUnmanagedVariable[count]; + GetLocals(count, out count, locals); + return locals; + } + } + + public ISymUnmanagedNamespace[] Namespaces { + get { + uint count; + GetNamespaces(0, out count, new ISymUnmanagedNamespace[0]); + ISymUnmanagedNamespace[] namespaces = new ISymUnmanagedNamespace[count]; + GetNamespaces(0, out count, namespaces); + return namespaces; + } + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/ISymUnmanagedVariable.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/ISymUnmanagedVariable.cs new file mode 100644 index 000000000..7a2c10dab --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/ISymUnmanagedVariable.cs @@ -0,0 +1,24 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorSym +{ + using System; + + public partial class ISymUnmanagedVariable + { + public string Name { + get { + return Util.GetString(GetName); + } + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/SequencePoint.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/SequencePoint.cs new file mode 100644 index 000000000..d72cfa653 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/CorSym/SequencePoint.cs @@ -0,0 +1,82 @@ +// +// +// +// +// $Revision: 3135 $ +// + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorSym +{ + using System; + using System.Collections; + + + public class SequencePoint: IComparable + { + ISymUnmanagedDocument document; + uint offset; + uint line; + uint column; + uint endLine; + uint endColumn; + + public ISymUnmanagedDocument Document { + get { + return document; + } + } + + public uint Offset { + get { + return offset; + } + } + + public uint Line { + get { + return line; + } + } + + public uint Column { + get { + return column; + } + } + + public uint EndLine { + get { + return endLine; + } + } + + public uint EndColumn { + get { + return endColumn; + } + } + + public SequencePoint(ISymUnmanagedDocument document, uint offset, uint line, uint column, uint endLine, uint endColumn) + { + this.document = document; + this.offset = offset; + this.line = line; + this.column = column; + this.endLine = endLine; + this.endColumn = endColumn; + } + + public int CompareTo(SequencePoint other) + { + if (this.Line == other.Line) { + return this.Column.CompareTo(other.Column); + } else { + return this.Line.CompareTo(other.Line); + } + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/ICorDebugManagedCallbacks.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/ICorDebugManagedCallbacks.cs new file mode 100644 index 000000000..9f5804ff9 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/ICorDebugManagedCallbacks.cs @@ -0,0 +1,20 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + public interface ICorDebugManagedCallbacks: Debugger.Interop.CorDebug.ICorDebugManagedCallback, Debugger.Interop.CorDebug.ICorDebugManagedCallback2 + { + + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/MetaData/MetaDataImport.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/MetaData/MetaDataImport.cs new file mode 100644 index 000000000..de9aa5892 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/MetaData/MetaDataImport.cs @@ -0,0 +1,1202 @@ +// +// +// +// +// $Revision: 3217 $ +// + +// Missing XML comment for publicly visible type or member +#pragma warning disable 1591 + +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; + +using Debugger.Interop.MetaData; +using Debugger.Wrappers.CorDebug; +using Debugger.Wrappers.CorSym; + +namespace Debugger.Wrappers.MetaData +{ + /// Wrapper for the unmanaged metadata API. + /// http://msdn.microsoft.com/en-us/library/ms230172.aspx + public class MetaDataImport: IDisposable + { + IMetaDataImport metaData; + + public MetaDataImport(ICorDebugModule pModule) + { + Guid guid = new Guid("{ 0x7dac8207, 0xd3ae, 0x4c75, { 0x9b, 0x67, 0x92, 0x80, 0x1a, 0x49, 0x7d, 0x44 } }"); + metaData = (IMetaDataImport)pModule.GetMetaDataInterface(ref guid); + ResourceManager.TrackCOMObject(metaData, typeof(IMetaDataImport)); + } + + public ISymUnmanagedReader GetSymReader(string fullname, string searchPath) + { + try { + ISymUnmanagedBinder symBinder = new ISymUnmanagedBinder(new Debugger.Interop.CorSym.CorSymBinder_SxSClass()); + return symBinder.GetReaderForFile(metaData, fullname, searchPath); + } catch { + return null; + } + } + + ~MetaDataImport() + { + Dispose(); + } + + public void Dispose() + { + if (metaData != null) { + ResourceManager.ReleaseCOMObject(metaData, typeof(IMetaDataImport)); + metaData = null; + } + } + + + // CloseEnum, CountEnum and ResetEnum are not wrapped + + + public uint[] EnumCustomAttributes(uint token_Scope, uint token_TypeOfAttributes) + { + return EnumerateTokens(metaData.EnumCustomAttributes, token_Scope, token_TypeOfAttributes); + } + + public IEnumerable EnumCustomAttributeProps(uint token_Scope, uint token_TypeOfAttributes) + { + foreach(uint token in EnumerateTokens(metaData.EnumCustomAttributes, token_Scope, token_TypeOfAttributes)) { + yield return GetCustomAttributeProps(token); + } + } + + public uint[] EnumEvents(uint typeDef) + { + return EnumerateTokens(metaData.EnumEvents, typeDef); + } + + public IEnumerable EnumEventProps(uint typeDef) + { + foreach(uint token in EnumerateTokens(metaData.EnumEvents, typeDef)) { + yield return GetEventProps(token); + } + } + + public uint[] EnumFields(uint typeDef) + { + return EnumerateTokens(metaData.EnumFields, typeDef); + } + + public IEnumerable EnumFieldProps(uint typeDef) + { + foreach(uint token in EnumerateTokens(metaData.EnumFields, typeDef)) { + yield return GetFieldProps(token); + } + } + + public uint[] EnumFieldsWithName(uint typeDef, string name) + { + return EnumerateTokens(metaData.EnumFieldsWithName, typeDef, name); + } + + public IEnumerable EnumFieldPropsWithName(uint typeDef, string name) + { + foreach(uint token in EnumerateTokens(metaData.EnumFieldsWithName, typeDef, name)) { + yield return GetFieldProps(token); + } + } + + public uint[] EnumGenericParams(uint typeDef_methodDef) + { + return EnumerateTokens(metaData.EnumGenericParams, typeDef_methodDef); + } + + /// MethodDef tokens + public uint[] EnumInterfaceImpls(uint typeDef) + { + return EnumerateTokens(metaData.EnumInterfaceImpls, typeDef); + } + + public IEnumerable EnumInterfaceImplProps(uint typeDef) + { + foreach(uint token in EnumerateTokens(metaData.EnumInterfaceImpls, typeDef)) { + yield return GetInterfaceImplProps(token); + } + } + + public uint[] EnumMemberRefs(uint typeDef_typeRef_methodDef_moduleRef) + { + return EnumerateTokens(metaData.EnumMemberRefs, typeDef_typeRef_methodDef_moduleRef); + } + + public IEnumerable EnumMemberRefProps(uint typeDef_typeRef_methodDef_moduleRef) + { + foreach(uint token in EnumerateTokens(metaData.EnumMemberRefs, typeDef_typeRef_methodDef_moduleRef)) { + yield return GetMemberRefProps(token); + } + } + + public uint[] EnumMembers(uint typeDef) + { + return EnumerateTokens(metaData.EnumMembers, typeDef); + } + + public IEnumerable EnumMemberProps(uint typeDef) + { + foreach(uint token in EnumerateTokens(metaData.EnumMembers, typeDef)) { + yield return GetMemberProps(token); + } + } + + public uint[] EnumMembersWithName(uint typeDef, string name) + { + return EnumerateTokens(metaData.EnumMembersWithName, typeDef, name); + } + + public IEnumerable EnumMemberPropsWithName(uint typeDef, string name) + { + foreach(uint token in EnumerateTokens(metaData.EnumMembersWithName, typeDef, name)) { + yield return GetMemberProps(token); + } + } + + /// MethodBody and MethodDeclaration tokens + public IEnumerable EnumMethodImpls(uint typeDef) + { + IntPtr enumerator = IntPtr.Zero; + while(true) { + MethodImpl ret = new MethodImpl(); + uint[] body = new uint[1]; + uint[] decl = new uint[1]; + uint fetched; + metaData.EnumMethodImpls(ref enumerator, typeDef, body, decl, 1, out fetched); + if (fetched == 0) { + metaData.CloseEnum(enumerator); + break; + } + ret.MethodBody = body[0]; + ret.MethodDecl = decl[0]; + yield return ret; + } + } + + public uint[] EnumMethods(uint typeDef) + { + return EnumerateTokens(metaData.EnumMethods, typeDef); + } + + public IEnumerable EnumMethodProps(uint typeDef) + { + foreach(uint token in EnumerateTokens(metaData.EnumMethods, typeDef)) { + yield return GetMethodProps(token); + } + } + + /// Events or properties + public uint[] EnumMethodSemantics(uint methodDef) + { + return EnumerateTokens(metaData.EnumMethodSemantics, methodDef); + } + + public uint[] EnumMethodsWithName(uint typeDef, string name) + { + return EnumerateTokens(metaData.EnumMethodsWithName, typeDef, name); + } + + public IEnumerable EnumMethodPropsWithName(uint typeDef, string name) + { + foreach(uint token in EnumerateTokens(metaData.EnumMethodsWithName, typeDef, name)) { + yield return GetMethodProps(token); + } + } + + public uint[] EnumModuleRefs() + { + return EnumerateTokens(metaData.EnumModuleRefs); + } + + public IEnumerable EnumModuleRefProps() + { + foreach(uint token in EnumerateTokens(metaData.EnumModuleRefs)) { + yield return GetModuleRefProps(token); + } + } + + public uint[] EnumParams(uint methodDef) + { + return EnumerateTokens(metaData.EnumParams, methodDef); + } + + public IEnumerable EnumParamProps(uint methodDef) + { + foreach(uint token in EnumerateTokens(metaData.EnumParams, methodDef)) { + yield return GetParamProps(token); + } + } + + public uint[] EnumPermissionSets(uint token_scope_nullable, uint actions) + { + return EnumerateTokens(metaData.EnumPermissionSets, token_scope_nullable, actions); + } + + public IEnumerable EnumPermissionSetProps(uint token_scope_nullable, uint actions) + { + foreach(uint token in EnumerateTokens(metaData.EnumPermissionSets, token_scope_nullable, actions)) { + yield return GetPermissionSetProps(token); + } + } + + public uint[] EnumProperties(uint typeDef) + { + return EnumerateTokens(metaData.EnumProperties, typeDef); + } + + public IEnumerable EnumPropertyProps(uint typeDef) + { + foreach(uint token in EnumerateTokens(metaData.EnumProperties, typeDef)) { + yield return GetPropertyProps(token); + } + } + + public uint[] EnumSignatures() + { + return EnumerateTokens(metaData.EnumSignatures); + } + + public uint[] EnumTypeDefs() + { + return EnumerateTokens(metaData.EnumTypeDefs); + } + + public IEnumerable EnumTypeDefProps() + { + foreach(uint token in EnumerateTokens(metaData.EnumTypeDefs)) { + yield return GetTypeDefProps(token); + } + } + + public uint[] EnumTypeRefs() + { + return EnumerateTokens(metaData.EnumTypeRefs); + } + + public IEnumerable EnumTypeRefProps() + { + foreach(uint token in EnumerateTokens(metaData.EnumTypeRefs)) { + yield return GetTypeRefProps(token); + } + } + + public uint[] EnumTypeSpecs() + { + return EnumerateTokens(metaData.EnumTypeSpecs); + } + + public IEnumerable EnumTypeSpecBlobs() + { + foreach(uint token in EnumerateTokens(metaData.EnumTypeSpecs)) { + yield return GetTypeSpecFromToken(token); + } + } + + public uint[] EnumUnresolvedMethods() + { + return EnumerateTokens(metaData.EnumUnresolvedMethods); + } + + public uint[] EnumUserStrings() + { + return EnumerateTokens(metaData.EnumUserStrings); + } + + public IEnumerable EnumUserStringProps() + { + foreach(uint token in EnumerateTokens(metaData.EnumUserStrings)) { + yield return GetUserString(token); + } + } + + public uint FindField(uint typeDef_nullable, string name, Blob sigBlob) + { + sigBlob = sigBlob ?? Blob.Empty; + uint fieldDef; + metaData.FindField(typeDef_nullable, name, sigBlob.Adress, sigBlob.Size, out fieldDef); + return fieldDef; + } + + public FieldProps FindFieldProps(uint typeDef_nullable, string name, Blob sigBlob) + { + return GetFieldProps(FindField(typeDef_nullable, name, sigBlob)); + } + + public uint FindMember(uint typeDef_nullable, string name, Blob sigBlob) + { + sigBlob = sigBlob ?? Blob.Empty; + uint memberDef; + metaData.FindMember(typeDef_nullable, name, sigBlob.Adress, sigBlob.Size, out memberDef); + return memberDef; + } + + public MemberProps FindMemberProps(uint typeDef_nullable, string name, Blob sigBlob) + { + return GetMemberProps(FindMember(typeDef_nullable, name, sigBlob)); + } + + public uint FindMemberRef(uint typeRef_nullable, string name, Blob sigBlob) + { + sigBlob = sigBlob ?? Blob.Empty; + uint memberRef; + metaData.FindMemberRef(typeRef_nullable, name, sigBlob.Adress, sigBlob.Size, out memberRef); + return memberRef; + } + + public MemberRefProps FindMemberRefProps(uint typeRef_nullable, string name, Blob sigBlob) + { + return GetMemberRefProps(FindMemberRef(typeRef_nullable, name, sigBlob)); + } + + public uint FindMethod(uint typeDef_nullable, string name, Blob sigBlob) + { + sigBlob = sigBlob ?? Blob.Empty; + uint methodDef; + metaData.FindMethod(typeDef_nullable, name, sigBlob.Adress, sigBlob.Size, out methodDef); + return methodDef; + } + + public MethodProps FindMethodProps(uint typeDef_nullable, string name, Blob sigBlob) + { + return GetMethodProps(FindMethod(typeDef_nullable, name, sigBlob)); + } + + public uint FindTypeDefByName(string name, uint typeDef_typeRef_enclosingClass_nullable) + { + uint typeDef; + metaData.FindTypeDefByName(name, typeDef_typeRef_enclosingClass_nullable, out typeDef); + return typeDef; + } + + public TypeDefProps FindTypeDefPropsByName(string name, uint typeDef_typeRef_enclosingClass_nullable) + { + return GetTypeDefProps(FindTypeDefByName(name, typeDef_typeRef_enclosingClass_nullable)); + } + + public uint FindTypeRef(uint moduleRef_assemblyRef_typeRef_scope, string name) + { + uint typeRef; + metaData.FindTypeRef(moduleRef_assemblyRef_typeRef_scope, name, out typeRef); + return typeRef; + } + + public TypeRefProps FindTypeRefProps(uint moduleRef_assemblyRef_typeRef_scope, string name) + { + return GetTypeRefProps(FindTypeRef(moduleRef_assemblyRef_typeRef_scope, name)); + } + + public ClassLayout GetClassLayout(uint typeDef) + { + ClassLayout ret = new ClassLayout(); + ret.TypeDef = typeDef; + uint unused; + metaData.GetClassLayout( + ret.TypeDef, + out ret.PackSize, + null, 0, out unused, // TODO + out ret.ClassSize + ); + return ret; + } + + public Blob GetCustomAttributeByName(uint token_owner, string name) + { + IntPtr blobPtr; + uint blobSize; + metaData.GetCustomAttributeByName( + token_owner, + name, + out blobPtr, + out blobSize + ); + return new Blob(blobPtr, blobSize); + } + + public CustomAttributeProps GetCustomAttributeProps(uint token) + { + IntPtr blobPtr; + uint blobSize; + CustomAttributeProps ret = new CustomAttributeProps(); + ret.Token = token; + metaData.GetCustomAttributeProps( + ret.Token, + out ret.Owner, + out ret.Type, + out blobPtr, + out blobSize + ); + ret.Data = new Blob(blobPtr, blobSize); + return ret; + } + + public EventProps GetEventProps(uint eventToken) + { + EventProps ret = new EventProps(); + ret.Event = eventToken; + ret.Name = Util.GetString(delegate(uint pStringLenght, out uint stringLenght, System.IntPtr pString) { + uint unused; + metaData.GetEventProps( + ret.Event, + out ret.DeclaringClass, + pString, pStringLenght, out stringLenght, + out ret.Flags, + out ret.EventType, + out ret.AddMethod, + out ret.RemoveMethod, + out ret.FireMethod, + null, 0, out unused // TODO + ); + }); + return ret; + } + + public Blob GetFieldMarshal(uint token) + { + IntPtr blobPtr; + uint blobSize; + metaData.GetFieldMarshal( + token, + out blobPtr, + out blobSize + ); + return new Blob(blobPtr, blobSize); + } + + public FieldProps GetFieldProps(uint fieldDef) + { + FieldProps ret = new FieldProps(); + IntPtr sigPtr = IntPtr.Zero; + uint sigSize = 0; + IntPtr constPtr = IntPtr.Zero; + uint constSize = 0; + ret.Token = fieldDef; + ret.Name = Util.GetString(delegate(uint pStringLenght, out uint stringLenght, System.IntPtr pString) { + metaData.GetFieldProps( + ret.Token, + out ret.DeclaringClass, + pString, pStringLenght, out stringLenght, // The string to get + out ret.Flags, + out sigPtr, + out sigSize, + out ret.CPlusTypeFlag, + out constPtr, // TODO: What is this? + out constSize + ); + }); + ret.SigBlob = new Blob(sigPtr, sigSize); + ret.ConstantValue = new Blob(constPtr, constSize); + return ret; + } + + public InterfaceImplProps GetInterfaceImplProps(uint method) + { + InterfaceImplProps ret = new InterfaceImplProps(); + ret.Method = method; + metaData.GetInterfaceImplProps( + ret.Method, + out ret.Class, + out ret.Interface + ); + return ret; + } + + public MemberProps GetMemberProps(uint token) + { + MemberProps ret = new MemberProps(); + IntPtr sigPtr = IntPtr.Zero; + uint sigSize = 0; + IntPtr constPtr = IntPtr.Zero; + uint constSize = 0; + ret.Token = token; + ret.Name = Util.GetString(delegate(uint pStringLenght, out uint stringLenght, System.IntPtr pString) { + metaData.GetMemberProps( + ret.Token, + out ret.Class, + pString, pStringLenght, out stringLenght, + out ret.Flags, + out sigPtr, + out sigSize, + out ret.RVA, + out ret.ImplFlags, + out ret.CPlusTypeFlag, + out constPtr, + out constSize + ); + }); + ret.SigBlob = new Blob(sigPtr, sigSize); + ret.Constant = new Blob(constPtr, constSize); + return ret; + } + + public MemberRefProps GetMemberRefProps(uint token) + { + MemberRefProps ret = new MemberRefProps(); + IntPtr sigPtr = IntPtr.Zero; + uint sigSize = 0; + ret.Token = token; + ret.Name = Util.GetString(delegate(uint pStringLenght, out uint stringLenght, System.IntPtr pString) { + metaData.GetMemberRefProps( + token, + out ret.DeclaringType, + pString, pStringLenght, out stringLenght, // The string to get + out sigPtr, + out sigSize + ); + }); + ret.SigBlob = new Blob(sigPtr, sigSize); + return ret; + } + + public MethodProps GetMethodProps(uint methodToken) + { + MethodProps ret = new MethodProps(); + IntPtr sigPtr = IntPtr.Zero; + uint sigSize = 0; + ret.Token = methodToken; + ret.Name = Util.GetString(delegate(uint pStringLenght, out uint stringLenght, System.IntPtr pString) { + metaData.GetMethodProps( + ret.Token, + out ret.ClassToken, + pString, pStringLenght, out stringLenght, // The string to get + out ret.Flags, + out sigPtr, + out sigSize, + out ret.CodeRVA, + out ret.ImplFlags + ); + }); + ret.SigBlob = new Blob(sigPtr, sigSize); + return ret; + } + + public uint GetMethodSemantics(uint methodDef, uint event_property) + { + uint semFlags; + metaData.GetMethodSemantics(methodDef, event_property, out semFlags); + return semFlags; + } + + public uint GetModuleFromScope() + { + uint module; + metaData.GetModuleFromScope(out module); + return module; + } + + public ModuleRefProps GetModuleRefProps(uint token) + { + ModuleRefProps ret = new ModuleRefProps(); + ret.Token = token; + ret.Name = Util.GetString(delegate(uint pStringLenght, out uint stringLenght, System.IntPtr pString) { + metaData.GetModuleRefProps( + token, + pString, pStringLenght, out stringLenght + ); + }); + return ret; + } + + // GetNameFromToken is obsolete + + public uint GetNativeCallConvFromSig(Blob sigBlob) + { + uint callConv; + metaData.GetNativeCallConvFromSig(sigBlob.Adress, sigBlob.Size, out callConv); + return callConv; + } + + public NestedClassProps GetNestedClassProps(uint nestedClass) + { + NestedClassProps ret = new NestedClassProps(); + ret.NestedClass = nestedClass; + metaData.GetNestedClassProps( + ret.NestedClass, + out ret.EnclosingClass + ); + return ret; + } + + public uint GetParamForMethodIndex(uint methodToken, uint parameterSequence) + { + uint paramToken = 0; + metaData.GetParamForMethodIndex(methodToken, parameterSequence, ref paramToken); + return paramToken; + } + + public ParamProps GetParamPropsForMethodIndex(uint methodToken, uint parameterSequence) + { + return GetParamProps(GetParamForMethodIndex(methodToken, parameterSequence)); + } + + public ParamProps GetParamProps(uint paramToken) + { + ParamProps ret = new ParamProps(); + IntPtr constPtr = IntPtr.Zero; + uint constSize = 0; + ret.ParamDef = paramToken; + ret.Name = Util.GetString(delegate(uint pStringLenght, out uint stringLenght, System.IntPtr pString) { + metaData.GetParamProps( + ret.ParamDef, + out ret.MethodDef, + out ret.Sequence, + pString, pStringLenght, out stringLenght, // The string to get + out ret.Flags, + out ret.CPlusTypeFlag, + out constPtr, + out constSize + ); + }); + ret.Constant = new Blob(constPtr, constSize); + return ret; + } + + public PermissionSetProps GetPermissionSetProps(uint permToken) + { + PermissionSetProps ret = new PermissionSetProps(); + IntPtr permPtr; + uint permSize; + ret.PermToken = permToken; + metaData.GetPermissionSetProps( + ret.PermToken, + out ret.Action, + out permPtr, + out permSize + ); + ret.SigBlob = new Blob(permPtr, permSize); + return ret; + } + + public PinvokeMap GetPinvokeMap(uint fieldDef_methodDef) + { + PinvokeMap ret = new PinvokeMap(); + ret.Token = fieldDef_methodDef; + ret.ImportName = Util.GetString(delegate(uint pStringLenght, out uint stringLenght, System.IntPtr pString) { + metaData.GetPinvokeMap( + ret.Token, + out ret.Flags, + pString, pStringLenght, out stringLenght, + out ret.ModuleRef + ); + }); + return ret; + } + + public PropertyProps GetPropertyProps(uint prop) + { + PropertyProps ret = new PropertyProps(); + IntPtr sigPtr = IntPtr.Zero; + uint sigSize = 0; + IntPtr defValPtr = IntPtr.Zero; + uint defValSize = 0; + ret.Propery = prop; + ret.Name = Util.GetString(delegate(uint pStringLenght, out uint stringLenght, System.IntPtr pString) { + uint unused; + metaData.GetPropertyProps( + ret.Propery, + out ret.DeclaringClass, + pString, pStringLenght, out stringLenght, + out ret.Flags, + out sigPtr, + out sigSize, + out ret.CPlusTypeFlag, + out defValPtr, + out defValSize, + out ret.SetterMethod, + out ret.GetterMethod, + null, 0, out unused // TODO + ); + }); + ret.SigBlob = new Blob(sigPtr, sigSize); + ret.DefaultValue = new Blob(defValPtr, defValSize); + return ret; + } + + public RVA GetRVA(uint methodDef_fieldDef) + { + RVA ret = new RVA(); + ret.Token = methodDef_fieldDef; + metaData.GetRVA( + ret.Token, + out ret.CodeRVA, + out ret.ImplFlags + ); + return ret; + } + + public ScopeProps GetScopeProps() + { + ScopeProps ret = new ScopeProps(); + ret.Name = Util.GetString(delegate(uint pStringLenght, out uint stringLenght, System.IntPtr pString) { + metaData.GetScopeProps( + pString, pStringLenght, out stringLenght, + out ret.Guid + ); + }); + return ret; + } + + public Blob GetSigFromToken(uint token) + { + IntPtr sigPtr; + uint sigSize; + metaData.GetSigFromToken( + token, + out sigPtr, + out sigSize + ); + return new Blob(sigPtr, sigSize); + } + + public TypeDefProps GetTypeDefProps(uint typeDef) + { + TypeDefProps ret = new TypeDefProps(); + ret.Token = typeDef; + ret.Name = + Util.GetString(delegate(uint pStringLenght, out uint stringLenght, System.IntPtr pString) { + metaData.GetTypeDefProps( + ret.Token, + pString, pStringLenght, out stringLenght, // The string to get + out ret.Flags, + out ret.SuperClassToken + ); + }); + + return ret; + } + + public TypeRefProps GetTypeRefProps(uint typeRef) + { + TypeRefProps ret = new TypeRefProps(); + ret.TypeRef = typeRef; + ret.Name = + Util.GetString(delegate(uint pStringLenght, out uint stringLenght, System.IntPtr pString) { + metaData.GetTypeRefProps( + ret.TypeRef, + out ret.ResolutionScope, + pString, pStringLenght, out stringLenght // The string to get + ); + }); + + return ret; + } + + public Blob GetTypeSpecFromToken(uint typeSpec) + { + IntPtr sigPtr; + uint sigSize; + metaData.GetTypeSpecFromToken( + typeSpec, + out sigPtr, + out sigSize + ); + return new Blob(sigPtr, sigSize); + } + + public string GetUserString(uint stringToken) + { + return Util.GetString(delegate(uint pStringLenght, out uint stringLenght, System.IntPtr pString) { + metaData.GetUserString( + stringToken, + pString, pStringLenght, out stringLenght + ); + }); + } + + public bool IsGlobal(uint token) + { + int isGlobal; + metaData.IsGlobal(token, out isGlobal); + return isGlobal != 0; + } + + public bool IsValidToken(uint token) + { + return metaData.IsValidToken(token) != 0; // TODO: Is it correct value? + } + + public ResolvedTypeRef ResolveTypeRef(uint typeRef, Guid riid) + { + ResolvedTypeRef res = new ResolvedTypeRef(); + metaData.ResolveTypeRef( + typeRef, + ref riid, + ref res.Scope, + ref res.TypeDef + ); + return res; + } + + + // Custom methods + + public int GetParamCount(uint methodToken) + { + int count = 0; + foreach(uint param in EnumParams(methodToken)) { + ParamProps paramProps = GetParamProps(param); + // Zero is special parameter representing the return parameter + if (paramProps.Sequence != 0) { + count++; + } + } + return count; + } + + public int GetGenericParamCount(uint typeDef_methodDef) + { + int count = 0; + foreach(uint genericParam in EnumGenericParams(typeDef_methodDef)) count++; + return count; + } + + #region Util + + const int initialBufferSize = 8; + + delegate void TokenEnumerator0(ref IntPtr phEnum, uint[] token, uint maxCount, out uint fetched); + + uint[] EnumerateTokens(TokenEnumerator0 tokenEnumerator) + { + IntPtr enumerator = IntPtr.Zero; + uint[] buffer = new uint[initialBufferSize]; + uint fetched; + tokenEnumerator(ref enumerator, buffer, (uint)buffer.Length, out fetched); + if (fetched < buffer.Length) { + // The tokens did fit the buffer + Array.Resize(ref buffer, (int)fetched); + } else { + // The tokens did not fit the buffer -> Refetch + uint actualCount; + metaData.CountEnum(enumerator, out actualCount); + if (actualCount > buffer.Length) { + buffer = new uint[actualCount]; + metaData.ResetEnum(enumerator, 0); + tokenEnumerator(ref enumerator, buffer, (uint)buffer.Length, out fetched); + } + } + metaData.CloseEnum(enumerator); + return buffer; + } + + delegate void TokenEnumerator1(ref IntPtr phEnum, T parameter, uint[] token, uint maxCount, out uint fetched); + + uint[] EnumerateTokens(TokenEnumerator1 tokenEnumerator, T parameter) + { + IntPtr enumerator = IntPtr.Zero; + uint[] buffer = new uint[initialBufferSize]; + uint fetched; + tokenEnumerator(ref enumerator, parameter, buffer, (uint)buffer.Length, out fetched); + if (fetched < buffer.Length) { + // The tokens did fit the buffer + Array.Resize(ref buffer, (int)fetched); + } else { + // The tokens did not fit the buffer -> Refetch + uint actualCount; + metaData.CountEnum(enumerator, out actualCount); + if (actualCount > buffer.Length) { + buffer = new uint[actualCount]; + metaData.ResetEnum(enumerator, 0); + tokenEnumerator(ref enumerator, parameter, buffer, (uint)buffer.Length, out fetched); + } + } + metaData.CloseEnum(enumerator); + return buffer; + } + + delegate void TokenEnumerator2(ref IntPtr phEnum, T parameter1, R parameter2, uint[] token, uint maxCount, out uint fetched); + + uint[] EnumerateTokens(TokenEnumerator2 tokenEnumerator, T parameter1, R parameter2) + { + IntPtr enumerator = IntPtr.Zero; + uint[] buffer = new uint[initialBufferSize]; + uint fetched; + tokenEnumerator(ref enumerator, parameter1, parameter2, buffer, (uint)buffer.Length, out fetched); + if (fetched < buffer.Length) { + // The tokens did fit the buffer + Array.Resize(ref buffer, (int)fetched); + } else { + // The tokens did not fit the buffer -> Refetch + uint actualCount; + metaData.CountEnum(enumerator, out actualCount); + if (actualCount > buffer.Length) { + buffer = new uint[actualCount]; + metaData.ResetEnum(enumerator, 0); + tokenEnumerator(ref enumerator, parameter1, parameter2, buffer, (uint)buffer.Length, out fetched); + } + } + metaData.CloseEnum(enumerator); + return buffer; + } + + #endregion + } + + public class Blob + { + public static readonly Blob Empty = new Blob(IntPtr.Zero, 0); + + IntPtr adress; + uint size; + + public IntPtr Adress { + get { return adress; } + } + + public uint Size { + get { return size; } + } + + public Blob(IntPtr adress, uint size) + { + this.adress = adress; + this.size = size; + } + + byte[] GetData() + { + byte[] data = new byte[size]; + Marshal.Copy(adress, data, 0, (int)size); + return data; + } + } + + public class ClassLayout + { + public uint TypeDef; + public uint PackSize; + public COR_FIELD_OFFSET[] FieldOffset; + public uint ClassSize; + } + + public class CustomAttributeProps + { + public uint Token; + public uint Owner; + public uint Type; + public Blob Data; + } + + public class EventProps + { + public uint Event; + public uint DeclaringClass; + public string Name; + public uint Flags; + public uint EventType; + public uint AddMethod; + public uint RemoveMethod; + public uint FireMethod; + public uint[] OtherMethods; + } + + public class FieldProps + { + public uint Token; + public string Name; + public uint DeclaringClass; + public uint Flags; + public Blob SigBlob; + public uint CPlusTypeFlag; + public Blob ConstantValue; + + private ClassFieldAttribute access { + get { return (ClassFieldAttribute)(Flags & (uint)ClassFieldAttribute.fdFieldAccessMask); } + } + + public bool IsPrivate { + get { return access == ClassFieldAttribute.fdPrivate; } + } + + public bool IsInternal { + get { return access == ClassFieldAttribute.fdAssembly; } + } + + public bool IsProtected { + get { return access == ClassFieldAttribute.fdFamily; } + } + + public bool IsPublic { + get { return access == ClassFieldAttribute.fdPublic; } + } + + public bool IsStatic { + get { return (Flags & (uint)ClassFieldAttribute.fdStatic) != 0; } + } + + public bool IsLiteral { + get { return (Flags & (uint)ClassFieldAttribute.fdLiteral) != 0; } + } + } + + public class InterfaceImplProps + { + public uint Method; + public uint Class; + public uint Interface; + } + + public class MemberProps + { + public uint Token; + public uint Class; + public string Name; + public uint Flags; + public Blob SigBlob; + public uint RVA; + public uint ImplFlags; + public uint CPlusTypeFlag; + public Blob Constant; + } + + public class MemberRefProps + { + public uint Token; + public uint DeclaringType; + public string Name; + public Blob SigBlob; + } + + public class MethodImpl + { + public uint MethodBody; + public uint MethodDecl; + } + + public class MethodProps + { + public uint Token; + public string Name; + public uint ClassToken; + public uint Flags; + public Blob SigBlob; + public uint CodeRVA; + public uint ImplFlags; + + private CorMethodAttr access { + get { return (CorMethodAttr)(Flags & (uint)CorMethodAttr.mdMemberAccessMask); } + } + + public bool IsPrivate { + get { return access == CorMethodAttr.mdPrivate; } + } + + public bool IsInternal { + get { return access == CorMethodAttr.mdAssem; } + } + + public bool IsProtected { + get { return access == CorMethodAttr.mdFamily; } + } + + public bool IsPublic { + get { return access == CorMethodAttr.mdPublic; } + } + + public bool IsStatic { + get { return (Flags & (uint)CorMethodAttr.mdStatic) != 0; } + } + + public bool HasSpecialName { + get { return (Flags & (uint)CorMethodAttr.mdSpecialName) != 0; } + } + } + + public class ModuleRefProps + { + public uint Token; + public string Name; + } + + public class NestedClassProps + { + public uint NestedClass; + public uint EnclosingClass; + } + + public class ParamProps + { + public uint ParamDef; + public uint MethodDef; + public uint Sequence; + public string Name; + public uint Flags; + public uint CPlusTypeFlag; + public Blob Constant; + } + + public class PermissionSetProps + { + public uint PermToken; + public uint Action; + public Blob SigBlob; + } + + public class PinvokeMap + { + public uint Token; + public uint Flags; + public string ImportName; + public uint ModuleRef; + } + + public class PropertyProps + { + public uint Propery; + public uint DeclaringClass; + public string Name; + public uint Flags; + public Blob SigBlob; + public uint CPlusTypeFlag; + public Blob DefaultValue; + public uint SetterMethod; + public uint GetterMethod; + public uint[] OtherMethods; + } + + public class ResolvedTypeRef + { + public object Scope; + public uint TypeDef; + } + + public class RVA + { + public uint Token; + public uint CodeRVA; + public uint ImplFlags; + } + + public class ScopeProps + { + public string Name; + public Guid Guid; + } + + public class TypeDefProps + { + public uint Token; + public string Name; + public uint Flags; + public uint SuperClassToken; + + public bool IsInterface { + get { return (Flags & 0x00000020) != 0; } + } + } + + public class TypeRefProps + { + public uint TypeRef; + public uint ResolutionScope; + public string Name; + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/NativeMethods.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/NativeMethods.cs new file mode 100644 index 000000000..ed19aed83 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/NativeMethods.cs @@ -0,0 +1,32 @@ +// +// +// +// +// $Revision: 2185 $ +// + +#pragma warning disable 1591 + +using System; +using System.Runtime.InteropServices; +using System.Text; + +namespace Debugger.Interop +{ + public static class NativeMethods + { + [DllImport("kernel32.dll")] + public static extern bool CloseHandle(IntPtr handle); + + [DllImport("mscoree.dll", CharSet=CharSet.Unicode, PreserveSig=false)] + public static extern Debugger.Interop.CorDebug.ICorDebug CreateDebuggingInterfaceFromVersion(int debuggerVersion, string debuggeeVersion); + + [DllImport("mscoree.dll", CharSet=CharSet.Unicode)] + public static extern int GetCORVersion([Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder szName, Int32 cchBuffer, out Int32 dwLength); + + [DllImport("mscoree.dll", CharSet=CharSet.Unicode)] + public static extern int GetRequestedRuntimeVersion(string exeFilename, [Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder pVersion, Int32 cchBuffer, out Int32 dwLength); + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/ResourceManager.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/ResourceManager.cs new file mode 100644 index 000000000..d2e496f06 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/ResourceManager.cs @@ -0,0 +1,114 @@ +// +// +// +// +// $Revision: 3132 $ +// + +#pragma warning disable 1591 + +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; + +using Debugger.Interop; + +namespace Debugger.Wrappers +{ + class TrackedObjectMetaData + { + public Type ObjectType; + public int RefCount; + + public TrackedObjectMetaData(Type objectType, int refCount) + { + this.ObjectType = objectType; + this.RefCount = refCount; + } + } + + public static class ResourceManager + { + static MTA2STA mta2sta = new MTA2STA(); + static bool trace = false; + static Dictionary trackedCOMObjects = new Dictionary(); + + public static bool TraceMessagesEnabled { + get { + return trace; + } + set { + trace = value; + } + } + + public static void TrackCOMObject(object comObject, Type type) + { + if (comObject == null || !Marshal.IsComObject(comObject)) { + if (trace) Trace("Will not be tracked: {0}", type.Name); + } else { + TrackedObjectMetaData metaData; + if (trackedCOMObjects.TryGetValue(comObject, out metaData)) { + metaData.RefCount += 1; + } else { + metaData = new TrackedObjectMetaData(type,1); + trackedCOMObjects.Add(comObject, metaData); + } + if (trace) Trace("AddRef {0,2}: {1}", metaData.RefCount, type.Name); + } + } + + public static void ReleaseCOMObject(object comObject, Type type) + { + // Ensure that the release is done synchronosly + try { + mta2sta.AsyncCall(delegate { + ReleaseCOMObjectInternal(comObject, type); + }); + } catch (InvalidOperationException) { + // This might happen when the application is shuting down + } + } + + static void ReleaseCOMObjectInternal(object comObject, Type type) + { + TrackedObjectMetaData metaData; + if (comObject != null && trackedCOMObjects.TryGetValue(comObject, out metaData)) { + metaData.RefCount -= 1; + if (metaData.RefCount == 0) { + Marshal.FinalReleaseComObject(comObject); + trackedCOMObjects.Remove(comObject); + } + if (trace) Trace("Release {0,2}: {1}", metaData.RefCount, type.Name); + } else { + if (trace) Trace("Was not tracked: {0}", type.Name); + } + } + + public static void ReleaseAllTrackedCOMObjects() + { + if (trace) Trace("Releasing {0} tracked COM objects... ", trackedCOMObjects.Count); + while(trackedCOMObjects.Count > 0) { + foreach (KeyValuePair pair in trackedCOMObjects) { + Marshal.FinalReleaseComObject(pair.Key); + if (trace) Trace(" * Releasing {0} ({1} references)", pair.Value.ObjectType.Name, pair.Value.RefCount); + trackedCOMObjects.Remove(pair.Key); + break; + } + } + if (trace) Trace(" * Done"); + } + + public static event EventHandler TraceMessage; + + static void Trace(string msg, params object[] pars) + { + if (TraceMessage != null && trace) { + string message = String.Format("COM({0,-3}): {1}", trackedCOMObjects.Count, String.Format(msg, pars)); + TraceMessage(null, new MessageEventArgs(null, message)); + } + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/Util.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/Util.cs new file mode 100644 index 000000000..5b0b2814e --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/Util.cs @@ -0,0 +1,54 @@ +// +// +// +// +// $Revision: 2284 $ +// + +#pragma warning disable 1591 + +using System; +using System.Runtime.InteropServices; + +namespace Debugger.Wrappers +{ + public delegate void UnmanagedStringGetter(uint pStringLenght, out uint stringLenght, System.IntPtr pString); + + public static class Util + { + public static string GetString(UnmanagedStringGetter getter) + { + return GetString(getter, 64, true); + } + + public static string GetString(UnmanagedStringGetter getter, uint defaultLenght, bool trim) + { + string managedString; + IntPtr unmanagedString; + uint exactLenght; + + // First attempt + unmanagedString = Marshal.AllocHGlobal((int)defaultLenght * 2 + 2); // + 2 for terminating zero + getter(defaultLenght, out exactLenght, defaultLenght > 0 ? unmanagedString : IntPtr.Zero); + + if(exactLenght > defaultLenght) { + // Second attempt + Marshal.FreeHGlobal(unmanagedString); + unmanagedString = Marshal.AllocHGlobal((int)exactLenght * 2 + 2); // + 2 for terminating zero + getter(exactLenght, out exactLenght, unmanagedString); + } + + // Return managed string and free unmanaged memory + managedString = Marshal.PtrToStringUni(unmanagedString, (int)exactLenght); + //Console.WriteLine("Marshaled string from COM: \"" + managedString + "\" lenght=" + managedString.Length + " arrayLenght=" + exactLenght); + // The API might or might not include terminating null at the end + if (trim) { + managedString = managedString.TrimEnd('\0'); + } + Marshal.FreeHGlobal(unmanagedString); + return managedString; + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/_SECURITY_ATTRIBUTES.cs b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/_SECURITY_ATTRIBUTES.cs new file mode 100644 index 000000000..158f22692 --- /dev/null +++ b/trunk/ProcessHacker/Misc/SharpDevelop/Wrappers/_SECURITY_ATTRIBUTES.cs @@ -0,0 +1,28 @@ +// +// +// +// +// $Revision: 2077 $ +// + +#pragma warning disable 1591 + +namespace Debugger.Wrappers.CorDebug +{ + using System; + + + public static class _SECURITY_ATTRIBUTES + { + public static Debugger.Interop.CorDebug._SECURITY_ATTRIBUTES Default; + + static unsafe _SECURITY_ATTRIBUTES() { + Default = new Debugger.Interop.CorDebug._SECURITY_ATTRIBUTES(); + Default.bInheritHandle = 0; + Default.lpSecurityDescriptor = IntPtr.Zero; + Default.nLength = (uint)sizeof(Debugger.Interop.CorDebug._SECURITY_ATTRIBUTES); + } + } +} + +#pragma warning restore 1591 diff --git a/trunk/ProcessHacker/ProcessHacker.csproj b/trunk/ProcessHacker/ProcessHacker.csproj index 7c61f9758..632ccb483 100644 --- a/trunk/ProcessHacker/ProcessHacker.csproj +++ b/trunk/ProcessHacker/ProcessHacker.csproj @@ -529,6 +529,290 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -693,6 +977,7 @@ Always + diff --git a/trunk/ProcessHacker/Properties/Settings.Designer.cs b/trunk/ProcessHacker/Properties/Settings.Designer.cs index 2690579a4..c9fc2aceb 100644 --- a/trunk/ProcessHacker/Properties/Settings.Designer.cs +++ b/trunk/ProcessHacker/Properties/Settings.Designer.cs @@ -397,7 +397,7 @@ namespace ProcessHacker.Properties { [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("255, 170, 102")] + [global::System.Configuration.DefaultSettingValueAttribute("255, 170, 0")] public global::System.Drawing.Color ColorElevatedProcesses { get { return ((global::System.Drawing.Color)(this["ColorElevatedProcesses"])); diff --git a/trunk/ProcessHacker/Properties/Settings.settings b/trunk/ProcessHacker/Properties/Settings.settings index 56bd2cc79..3ae7e9d64 100644 --- a/trunk/ProcessHacker/Properties/Settings.settings +++ b/trunk/ProcessHacker/Properties/Settings.settings @@ -96,7 +96,7 @@ 255, 255, 170 - 255, 170, 102 + 255, 170, 0 170, 204, 255 diff --git a/trunk/ProcessHacker/Providers/ProcessSystemProvider.cs b/trunk/ProcessHacker/Providers/ProcessSystemProvider.cs index d9ac0381a..e489c5009 100644 --- a/trunk/ProcessHacker/Providers/ProcessSystemProvider.cs +++ b/trunk/ProcessHacker/Providers/ProcessSystemProvider.cs @@ -252,35 +252,38 @@ namespace ProcessHacker catch { } - // find out if it's a .NET process (we'll just see if it has loaded mscoree.dll) - if (fpResult.IsPacked) + if (pid > 4) { try { - var modDict = new Dictionary(); + var corpubPublishClass = new Debugger.Interop.CorPub.CorpubPublishClass(); + Debugger.Interop.CorPub.ICorPublishProcess process = null; - using (var phandle = new Win32.ProcessHandle(pid, Program.MinProcessQueryRights | - Win32.PROCESS_RIGHTS.PROCESS_VM_READ)) + try { - foreach (var m in phandle.GetModules()) + int managed = 0; + + corpubPublishClass.GetProcess((uint)pid, out process); + process.IsManaged(out managed); + + if (managed > 0) { - if (!modDict.ContainsKey(m.BaseName.ToLower())) - modDict.Add(m.BaseName.ToLower(), m.FileName); + fpResult.IsPacked = false; + fpResult.IsDotNet = true; } } - - if (modDict.ContainsKey("mscoree.dll") && - modDict["mscoree.dll"].ToLower() == (Environment.SystemDirectory + "\\mscoree.dll").ToLower()) + finally { - fpResult.IsDotNet = true; - // .NET processes also look like they're packed - fpResult.IsPacked = false; + if (process != null) + { + Debugger.Wrappers.ResourceManager.ReleaseCOMObject(process, process.GetType()); + } } } catch { } } - + lock (_fpResults) _fpResults.Enqueue(fpResult); } diff --git a/trunk/ProcessHacker/app.config b/trunk/ProcessHacker/app.config index efd8cd108..fc0a33a11 100644 --- a/trunk/ProcessHacker/app.config +++ b/trunk/ProcessHacker/app.config @@ -101,7 +101,7 @@ 255, 255, 170 - 255, 170, 102 + 255, 170, 0 170, 204, 255