[英]Why am I facing “The type or namespace name 'UnitTestClassBase' could not be found (are you missing a using directive or an assembly reference?)”?
[英]Why am I receiving “Type or namespace name 'LowLevelKeyboardProc' could not be found”?
我using
以下內容:
using System;
using System.Diagnostics;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using System.IO;
我在這里收到錯誤: private static LowLevelKeyboardProc _proc = HookCallback;
這里: [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] private static extern IntPtr SetWindowsHookEx(int idHook, LowLevelKeyboardProc lpfn, IntPtr hMod, uint dwThreadId);
我正在使用VS2012 w / C#並遵循本教程: http ://null-byte.wonderhowto.com/how-to/create-simple-hidden-console-keylogger-c-sharp-0132757/
您需要定義委托。 您引用的文章使用:
private delegate IntPtr LowLevelKeyboardProc(
int nCode, IntPtr wParam, IntPtr lParam);
這包含在所引用文章的 “步驟3”中。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.