I have had afew people test my application and all of the 32-bit users are telling me it is not working. I am very new to this kind of error so开发者_运维百科 I came here for help. I asked them to copy the Problem Signature of the application Crash and here it is:
Problem signature: Problem Event Name:
CLR20r3 Problem Signature 02: 1.0.0.0
Problem Signature 03: 4d9235a5 Problem
Signature 05: 1.0.0.0 Problem
Signature 06: 4d9235a5 Problem
Signature 07: 33 Problem Signature 08:
22 Problem Signature 09:
System.InvalidOperationException OS
Version: 6.1.7600.2.0.0.256.1 Locale
ID: 4122 Additional Information 1:
0a9e Additional Information 2:
0a9e372d3b4ad19135b953a78882e789
Additional Information 3: 0a9e
Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
I think I post this answer at least once a week. Here we go again: don't guess at this. Write an event handler for the AppDomain.CurrentDomain.UnhandledException event. Log or display the value of e.ExceptionObject.ToString(). You'll have no trouble figuring out why and where your code bombs from that information.
Your declaration for GetAsyncKeyState() is wrong, it returns a Short, not a Keys. But that doesn't explain the exception. You can force your code to run in 32-bit mode as well. Project + Properties, Compile tab, scroll down, Advanced Compile Options. Change Target CPU to "x86".
- In Visual Studio, go to your Project Properties.
- Click Compile section.
- Click Advanced Compile Options button at the bottom.
- Make sure the Target CPU dropdown has 'Any CPU' selected.
- Build/Rebuild project/solution.
精彩评论