问题描述
我正在做wpf项目,其中我同时做了多个活动,所以我为每个活动使用后台工作程序进程。我使用类库。并且还使用代码
Hi,
I am doing wpf project in which i have do multiple activities at same time so i use background worker process for each activity. i use class library. and also uses code
ActivityManager.MouseMove += HookManager_MouseMove;
ActivityManager.MouseClick += HookManager_MouseClick;
ActivityManager.MouseUp += HookManager_MouseUp;
ActivityManager.MouseDown += HookManager_MouseDown;
给我错误代码126:找不到指定的模块。
ActivityManager是一个如下类:
which gives me Error code 126:The specified module could not be found.
ActivityManager is a class as follows:
public static class ActivityManager
{
public static event KeyEventHandler KeyDown;
public static event KeyPressEventHandler KeyPress;
public static event KeyEventHandler KeyUp;
public static event MouseEventHandler MouseClick;
public static event EventHandler<MouseEventExtArgs> MouseClickExt;
public static event MouseEventHandler MouseDoubleClick;
public static event MouseEventHandler MouseDown;
public static event MouseEventHandler MouseMove;
public static event EventHandler<MouseEventExtArgs> MouseMoveExt;
public static event MouseEventHandler MouseUp;
public static event MouseEventHandler MouseWheel;
}
虽然,我已经添加了所有引用和intellisense工作,我仍然得到错误:126即无法找到指定的模块。 />
HookManager_MouseMove是我在runetime指定处理MouseMove事件的事件。
Although, i have added all the references and intellisense working i still get "Error :126" i.e The specified module could not be found.
HookManager_MouseMove is a event which i specify at runetime for handling MouseMove event.
推荐答案
s_KeyboardHookHandle = SetWindowsHookEx(
WH_KEYBOARD_LL,
s_KeyboardDelegate,
IntPtr.Zero,
0);
或试试这个
[]
这篇关于运行wpf项目时出错126的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!