能力值:
( LV2,RANK:10 )
|
-
-
2 楼
EasyHook。。。
|
能力值:
( LV2,RANK:10 )
|
-
-
3 楼
楼上的能说得再详细一点吗?没看懂哦
|
能力值:
( LV2,RANK:10 )
|
-
-
4 楼
用C#写有啥优势吗?
|
能力值:
( LV3,RANK:20 )
|
-
-
5 楼
你是用C#写一个Win32平台的调试器,还是用C#写一个DONET平台的调试器?
用C#写有啥优势吗?
语言不是重要的,重要的是思想。
|
能力值:
( LV2,RANK:10 )
|
-
-
6 楼
准备写一个Win32的调试器,因为项目需要,指定用C#
|
能力值:
( LV3,RANK:20 )
|
-
-
7 楼
可以肯定地说C#能够出Win32 的调试器,看看人家新版Delphi的IDE就知道了。
祝你好运,Win32我不会........
|
能力值:
( LV2,RANK:10 )
|
-
-
8 楼
希望楼主的问题得到解答 ,我也在找
// ReSharper disable InconsistentNaming
//继续调试事件
[DllImport("kernel32.dll")]
static extern bool ContinueDebugEvent(uint dwProcessId, uint dwThreadId,uint dwContinueStatus);
//返回继续调试状态值
public const uint DBG_CONTINUE = 0x00010002;
public const uint DBG_EXCEPTION_NOT_HANDLED = 0x80010001;
//设置最后次错误
[DllImport("kernel32.dll")]
static extern void SetLastError(uint dwErrCode);
//调试活动进程
[DllImport("kernel32.dll")]
static extern bool DebugActiveProcess(int dwProcessId);
//等待进程调试事件
[DllImport( "kernel32.dll", EntryPoint = "WaitForDebugEvent" )]
static extern bool WaitForDebugEvent( [In] ref DEBUG_EVENT lpDebugEvent, uint dwMilliseconds );
//等待事件
public const uint INFINITE = 0xFFFFFFFF; // Infinite timeout
//Debug 事件 结构
[StructLayout(LayoutKind.Sequential)]
public struct DEBUG_EVENT
{
public uint dwDebugEventCode;
public uint dwProcessId;
public uint dwThreadId;
public Union u;
}
[StructLayout(LayoutKind.Explicit)]
public struct Union
{
[FieldOffset(0)]
public EXCEPTION_DEBUG_INFO Exception;
[FieldOffset(0)]
public CREATE_THREAD_DEBUG_INFO CreateThread;
//[FieldOffset(0)]
//public CREATE_PROCESS_DEBUG_INFO CreateProcessInfo;
//[FieldOffset(0)]
//public EXIT_THREAD_DEBUG_INFO ExitThread;
//[FieldOffset(0)]
//public EXIT_PROCESS_DEBUG_INFO ExitProcess;
//[FieldOffset(0)]
//public LOAD_DLL_DEBUG_INFO LoadDll;
//[FieldOffset(0)]
//public UNLOAD_DLL_DEBUG_INFO UnloadDll;
//[FieldOffset(0)]
//public OUTPUT_DEBUG_STRING_INFO DebugString;
//[FieldOffset(0)]
//public RIP_INFO RipInfo;
}
//1:EXCEPTION_DEBUG_INFO
[StructLayout(LayoutKind.Sequential)]
public struct EXCEPTION_DEBUG_INFO
{
public EXCEPTION_RECORD ExceptionRecord;
public uint dwFirstChance;
}
[StructLayout(LayoutKind.Sequential)]
public struct EXCEPTION_RECORD
{
public uint ExceptionCode;
public uint ExceptionFlags;
public IntPtr ExceptionRecord;
public IntPtr ExceptionAddress;
public uint NumberParameters;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 15, ArraySubType = UnmanagedType.U4)]
public uint[] ExceptionInformation;
}
//2:CREATE_THREAD_DEBUG_INFO
public delegate uint PTHREAD_START_ROUTINE(IntPtr lpThreadParameter);
[StructLayout(LayoutKind.Sequential)]
public struct CREATE_THREAD_DEBUG_INFO
{
public IntPtr hThread;
public IntPtr lpThreadLocalBase;
public PTHREAD_START_ROUTINE lpStartAddress;
}
//3:CREATE_PROCESS_DEBUG_INFO CreateProcessInfo;
public struct CREATE_PROCESS_DEBUG_INFO
{
public IntPtr hFile;
public IntPtr hProcess;
public IntPtr hThread;
public IntPtr lpBaseOfImage;
public uint dwDebugInfoFileOffset;
public uint nDebugInfoSize;
public IntPtr lpThreadLocalBase;
public PTHREAD_START_ROUTINE lpStartAddress;
public IntPtr lpImageName;
public ushort fUnicode;
}
//4:EXIT_THREAD_DEBUG_INFO ExitThread;
[StructLayout(LayoutKind.Sequential)]
public struct EXIT_THREAD_DEBUG_INFO
{
public uint dwExitCode;
}
//5:public EXIT_PROCESS_DEBUG_INFO ExitProcess;
[StructLayout(LayoutKind.Sequential)]
public struct EXIT_PROCESS_DEBUG_INFO
{
public uint dwExitCode;
}
//6:public LOAD_DLL_DEBUG_INFO LoadDll;
[StructLayout(LayoutKind.Sequential)]
public struct LOAD_DLL_DEBUG_INFO
{
public IntPtr hFile;
public IntPtr lpBaseOfDll;
public uint dwDebugInfoFileOffset;
public uint nDebugInfoSize;
public IntPtr lpImageName;
public ushort fUnicode;
}
//7:public UNLOAD_DLL_DEBUG_INFO UnloadDll;
[StructLayout(LayoutKind.Sequential)]
public struct UNLOAD_DLL_DEBUG_INFO
{
public IntPtr lpBaseOfDll;
}
//8:public OUTPUT_DEBUG_STRING_INFO DebugString;
[StructLayout(LayoutKind.Sequential)]
public struct OUTPUT_DEBUG_STRING_INFO
{
[MarshalAs(UnmanagedType.LPStr)]
public string lpDebugStringData;
public ushort fUnicode;
public ushort nDebugStringLength;
}
//9:public RIP_INFO RipInfo;
[StructLayout(LayoutKind.Sequential)]
public struct RIP_INFO
{
public uint dwError;
public uint dwType;
}
// ReSharper restore InconsistentNaming
|
能力值:
( LV2,RANK:10 )
|
-
-
9 楼
这个可以在C#调 API 来debug win32 的程序不过里面的
debugevent 这个 结构 C#里面我构造不出来
求解答
|
|
|