VS2005 换了win7系统 项目运行异常
未处理 System.BadImageFormatException
Message="试图加载格式不正确的程序。 (异常来自 HRESULT:0x8007000B)"
Source="Kennedy.ManagedHooks"
StackTrace:
在 Kennedy.ManagedHooks.SystemHook.SetUserHookCallback(HookProcessedHandler hookCallback, HookTypes hookType)
在 Kennedy.ManagedHooks.SystemHook..ctor(HookTypes type) 位置 E:\C#毕业项目\浪潮卡拉ok点歌系统\SystemHooks\ManagedHooks\SystemHook.cs:行号 44
在 Kennedy.ManagedHooks.KeyboardHook..ctor() 位置 E:\C#毕业项目\浪潮卡拉ok点歌系统\SystemHooks\ManagedHooks\KeyboardHook.cs:行号 39
在 浪潮卡拉ok点歌系统.MainForm..ctor() 位置 D:\C#毕业项目\浪潮卡拉ok点歌系统\浪潮卡拉ok点歌系统\MainForm.cs:行号 121
在 浪潮卡拉ok点歌系统.LoginForm.picDengLu_Click(Object sender, EventArgs e) 位置 D:\C#毕业项目\浪潮卡拉ok点歌系统\浪潮卡拉ok点歌系统\LoginForm.cs:行号 151
在 System.Windows.Forms.Control.OnClick(EventArgs e)
在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
在 System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
在 System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
在 浪潮卡拉ok点歌系统.Program.Main() 位置 D:\C#毕业项目\浪潮卡拉ok点歌系统\浪潮卡拉ok点歌系统\Program.cs:行号 18
在 System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
在 Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
在 System.Threading.ThreadHelper.ThreadStart()
---------------------------------------------------------
/// <include file='ManagedHooks.xml' path='Docs/SystemHook/ctor/*'/>
public SystemHook(HookTypes type)
{
_type = type;
_processHandler = new HookProcessedHandler(InternalHookCallback);
SetCallBackResults result = SetUserHookCallback(_processHandler, _type);//异常
if (result != SetCallBackResults.Success)
{
this.Dispose();
GenerateCallBackException(type, result);
}
}
未处理BadimageFormatException
试图加载格式不正确的程序.(异常来自HRESULT:0x8007000B)
弄了个全局截取按键的 在xp上没问题...
Message="试图加载格式不正确的程序。 (异常来自 HRESULT:0x8007000B)"
Source="Kennedy.ManagedHooks"
StackTrace:
在 Kennedy.ManagedHooks.SystemHook.SetUserHookCallback(HookProcessedHandler hookCallback, HookTypes hookType)
在 Kennedy.ManagedHooks.SystemHook..ctor(HookTypes type) 位置 E:\C#毕业项目\浪潮卡拉ok点歌系统\SystemHooks\ManagedHooks\SystemHook.cs:行号 44
在 Kennedy.ManagedHooks.KeyboardHook..ctor() 位置 E:\C#毕业项目\浪潮卡拉ok点歌系统\SystemHooks\ManagedHooks\KeyboardHook.cs:行号 39
在 浪潮卡拉ok点歌系统.MainForm..ctor() 位置 D:\C#毕业项目\浪潮卡拉ok点歌系统\浪潮卡拉ok点歌系统\MainForm.cs:行号 121
在 浪潮卡拉ok点歌系统.LoginForm.picDengLu_Click(Object sender, EventArgs e) 位置 D:\C#毕业项目\浪潮卡拉ok点歌系统\浪潮卡拉ok点歌系统\LoginForm.cs:行号 151
在 System.Windows.Forms.Control.OnClick(EventArgs e)
在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
在 System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
在 System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
在 浪潮卡拉ok点歌系统.Program.Main() 位置 D:\C#毕业项目\浪潮卡拉ok点歌系统\浪潮卡拉ok点歌系统\Program.cs:行号 18
在 System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
在 Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
在 System.Threading.ThreadHelper.ThreadStart()
---------------------------------------------------------
/// <include file='ManagedHooks.xml' path='Docs/SystemHook/ctor/*'/>
public SystemHook(HookTypes type)
{
_type = type;
_processHandler = new HookProcessedHandler(InternalHookCallback);
SetCallBackResults result = SetUserHookCallback(_processHandler, _type);//异常
if (result != SetCallBackResults.Success)
{
this.Dispose();
GenerateCallBackException(type, result);
}
}
未处理BadimageFormatException
试图加载格式不正确的程序.(异常来自HRESULT:0x8007000B)
弄了个全局截取按键的 在xp上没问题...
...全文
相关推荐
C++获取CPU序列号,硬盘序列号(无需管理权限),网卡MAC地址,在vs2005环境下编译通过,win10,win7测试通过。
C++获取计算机的CPU序列号,硬盘序列号(无需管理权限),网卡MAC地址,在vs2005环境下编译通过,已在win10,win7系统测试通过。
Win7系统下VS2005/2008不识别WinCE5 SDK
在探讨“Win7系统下VS2005/2008不识别WinCE5 SDK”的问题时,我们首先需要理解几个关键概念:Windows 7操作系统、Visual Studio 2005/2008(简称VS)、Windows
osg安装包—支持vs2005 win7 xp
【osg安装包—支持vs2005 win7 xp】是一个专为Visual Studio 2005和Windows 7及XP操作系统设计的OpenSceneGraph(osg)安装包。
CUDA 4.0+VS2005+win7详细配置
### CUDA 4.0 + VS2005 + Win7 开发平台配置详解#### 一、软件准备为了在Windows 7操作系统上搭建CUDA 4.0与Visual Studio 2005相结合的开发环境
Win7_X64+VS2005+WinCE开发环境搭建
"该资源提供了一种在Win7 64位系统上搭建VS2005和WinCE5.0开发环境的详细教程,包括所需软件、安装步骤、工程建立与调试方法以及解决可能出现的问题。"在Windows 7 64位操


