user1232138
user1232138

Reputation: 5541

Access denied when trying to execute OpenProcess and TerminateProcess

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

Answers (1)

seva titov
seva titov

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

Related Questions