Reputation: 5541
When I compile and execute/debug my code from Visual C++ 2010 Express using Ctrl + F5, it executes fine.
When I try to execute the exe formed after building the project, it produces an access denied error when calling OpenProcess
and TerminateProcess
.
Any ideas why this might be happening?
How can it be fixed?
Upvotes: 1
Views: 1548
Reputation: 11890
One possibility is that it could be caused by UAC. Try launching your application from elevated command prompt, or from explorer by using option "Run as administrator" in context menu.
Upvotes: 2