Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, I have a windows service written in C# which interacts with COM dll. The application is running fine from code. I am able to debug application. But when I put the files in system32 folder and start the service from there, it gives error -

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

I am not able to figure out, why the application is not running from system32 directory and running fine from code.

Note: I am using Windows 7 32bit system. The application is using .net Framework 2.0
I have registered required dlls. (The application runs fine on windows xp.)


Can anyone throw some light, what I should do? Am I missing something?
Posted
Comments
Member 7692646 1-Dec-11 9:42am    
Hi, Thanks for the reply. I have tried this but still it gives same error. BTW, I am using Windows 7 32 bit system.

1 solution

You can't put files in the system32 folder (in Vista/Win7). That's a security violation. Try putting them into their own folder inside "program files (x86)".
 
Share this answer
 

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