Access denied - PublicDomain.Win32.Job

May 29, 2008 at 12:23 PM
I get an error when I try to execute this piece of code:

using (PublicDomain.Win32.Job j = PublicDomain.Win32.Job.CreateJobWithMemoryLimits(minmem,maxmem,process));

'System.ComponentModel.Win32Exception' occurred in PublicDomain.dll / access denied'

I have made a reference to the DLL in my project folder.

Any suggestions?

Coordinator
Jul 10, 2008 at 1:30 PM
Hi patrick, it looks like a security exception. Creating a Win32 JOB with memory limits is a very advanced process and you need basically admin rights to do it, so first I'd check how you're running your program. You an also audit security failures by going to Start -> Administrative Tools -> Local Security Policy -> Local Policies -> Audit Policy -> Audit privilege use to "Failure" and then check the Security event log in your computer when you run...