Click here to Skip to main content
15,886,565 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi every one i have been using Process.MainModule.FileName to get the filename of all the running processes in a windowsXP32bit application. It was working fine. But the same 32-bit application crashed in 64-bit XP system giving the error as "Only part of a ReadProcessMemory or WriteProcessMemory request was completed"....Any suggestions?

one solution is building it with ANYCPU option...but my .exe is in C++ that loads the C# dll containing process related code. My C# dll is already set to ANYCPU configuration.But for my C++ .exe ANYCPU option will not be available.
Posted
Updated 11-Jul-10 19:49pm
v2
Comments
E.F. Nijboer 12-Jul-10 6:32am    
Shouldn't you be compiling for 64bit? instead of 32bit? So, even if AnyCPU isn't available, could you compile to 64-bit for 64-bit XP?
Rajasekharan Vengalil 12-Jul-10 17:44pm    
Have you tried compiling your .NET DLL so that it targets x86 instead of "Anu CPU"? Since the process that loads your DLL is 32-bit, the DLL should also be 32-bit.
Sergey Alexandrovich Kryukov 10-Dec-10 11:35am    
Interesting question, this one. Could you provide your C# code and give some information of the process (C++ borne, right?) which cause all the trouble? Do you have its C++ code? If so, could we see it.

In other words, what could be so special in this problematic process which makes it unique among all others not causing this problem (in principle, could be some super-puper mega-hack)?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900