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上没问题...