C# 无法解析符号';Dte&x27;带envdte参考
我试图检测调试器,但得到错误“无法解析符号'Dte'”,即使使用envdte引用也是如此。谷歌什么都不给我。多谢各位C# 无法解析符号';Dte&x27;带envdte参考,c#,envdte,C#,Envdte,我试图检测调试器,但得到错误“无法解析符号'Dte'”,即使使用envdte引用也是如此。谷歌什么都不给我。多谢各位 using EnvDTE; namespace test { static class Program { [STAThread] static void Main() { foreach (EnvDTE.Process p in Dte.Debugger.DebuggedProcesses)
using EnvDTE;
namespace test
{
static class Program
{
[STAThread]
static void Main()
{
foreach (EnvDTE.Process p in Dte.Debugger.DebuggedProcesses) {
if (p.ProcessID == spawnedProcess.Id) {
}
}
}
}
}
C#是一种区分大小写的语言
它的DTE
(大写)不是DTE
。C#上的文档是一种区分大小写的语言
它的DTE
(大写)不是DTE
。文件在
我需要检测是否连接了调试器(如Ollydbg)
要检查进程是否有附加到yo的调试器,请使用:
- CheckRemoteDebuggerPresent适用于任何正在运行的进程,并检测本机调试器
- 调试器。IsAttached仅适用于当前进程,并仅检测托管调试器。例如,OllyDbg将不会被此检测到
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
public class DetectDebugger
{
[DllImport("kernel32.dll", SetLastError = true, ExactSpelling = true)]
static extern bool CheckRemoteDebuggerPresent(IntPtr hProcess, ref bool isDebuggerPresent);
public static void Main()
{
bool isDebuggerPresent = false;
CheckRemoteDebuggerPresent(Process.GetCurrentProcess().Handle, ref isDebuggerPresent);
Console.WriteLine("Debugger Attached: " + isDebuggerPresent);
Console.ReadLine();
}
}
我需要检测是否连接了调试器(如Ollydbg)
要检查进程是否有附加到yo的调试器,请使用:
- CheckRemoteDebuggerPresent适用于任何正在运行的进程,并检测本机调试器
- 调试器。IsAttached仅适用于当前进程,并仅检测托管调试器。例如,OllyDbg将不会被此检测到
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
public class DetectDebugger
{
[DllImport("kernel32.dll", SetLastError = true, ExactSpelling = true)]
static extern bool CheckRemoteDebuggerPresent(IntPtr hProcess, ref bool isDebuggerPresent);
public static void Main()
{
bool isDebuggerPresent = false;
CheckRemoteDebuggerPresent(Process.GetCurrentProcess().Handle, ref isDebuggerPresent);
Console.WriteLine("Debugger Attached: " + isDebuggerPresent);
Console.ReadLine();
}
}
你在哪里写的代码?你在哪里定义了Dte?你还没有定义Dte。您应该定义
DTE-DTE代码>然后将值赋给它,然后使用。我将完整代码复制到这里一个控制台应用程序以使用dte?你想做什么?我需要检测是否附加了调试器(比如Ollydbg)。你在哪里写的这段代码?你在哪里定义了Dte?你还没有定义Dte。您应该定义DTE-DTE代码>然后将值赋给它,然后使用。我将完整代码复制到这里一个控制台应用程序以使用dte?您想做什么?我需要检测是否附加了调试器(如Ollydbg)。