-
October 7th, 2009, 02:00 PM
#1
From 32bit to 64bit pc...
I recently moved my project to my new pc and i have a problem when i run my project... i get the error
Unable to find an entry point named 'InterlockedDecrement' in DLL 'kernel32.dll'
what is going on ?
-
October 7th, 2009, 02:14 PM
#2
Re: From 32bit to 64bit pc...
This is either a question about a language other than C# or you're P/Invoking native code for a function which has a managed equivalent. If it's the latter, just use the built in Interlocked class.
www.monotorrent.com For all your .NET bittorrent needs
NOTE: My code snippets are just snippets. They demonstrate an idea which can be adapted by you to solve your problem. They are not 100% complete and fully functional solutions equipped with error handling.
-
October 7th, 2009, 02:17 PM
#3
Re: From 32bit to 64bit pc...
Just to be sure - your project is managed code, right?
If so managed code is platform agnostic meaning it doesn't care what platform the code is run.
The exception to this is if you are using any assemblies that use native code - like assemblies that make PInvoke calls. For this situation, you'll need to build the assembly for x86 or x64 and adjust the pinvoke calls as appropriate.
-
October 7th, 2009, 03:10 PM
#4
Re: From 32bit to 64bit pc...
thanks for your answers, but i finnaly solved this. i changed active solution platform form Any Cpu to x86 and all is good now
-
October 7th, 2009, 06:18 PM
#5
Re: From 32bit to 64bit pc...
The reason why this works is that your project is using some assemblies that contain 32-bit native code (or PInvoke to 32-bit native code). When you set the target platform to x86, you compile it for 32-bit and on a 64-bit machine, your code runs under the 32-bit emulator.
I mention this because if you decide to run the project as a 64-bit app, you'll need to reference 64-bit assemblies (that contain native code).
Hopefully that sheds some light on the issue.
-
October 7th, 2009, 07:17 PM
#6
Re: From 32bit to 64bit pc...
Back to my original point - Why are you P/Invoking native libraries to call a function which already has a managed equivalent? You're making your life so much more difficult for no gain!
www.monotorrent.com For all your .NET bittorrent needs
NOTE: My code snippets are just snippets. They demonstrate an idea which can be adapted by you to solve your problem. They are not 100% complete and fully functional solutions equipped with error handling.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|