Using resource in windows Using resource in windows windows windows

Using resource in windows


There's no good way of doing this generically for all "Resources"" -- hence why it's a Unix only command. For CPU speed only you can either use registry keys to set the process id limit:

http://technet.microsoft.com/en-us/library/ff384148%28WS.10%29.aspxAs done here:http://code.activestate.com/recipes/286159/

IMPORTANT: Backup your registry before trying anything with registry

Or you could set the thread priority:

http://msdn.microsoft.com/en-us/library/ms685100%28VS.85%29.aspxAs done here:http://nullege.com/codes/search/win32process.SetThreadPriority

For other resources you'll have to scrap together similar DLL access APIs to achieve the desired effect. You should first ask yourself if you need this behavior. Oftentimes you can limit CPU time by sleeping the thread in operation at convenient times to allow the OS to swap processes and memory controls can be done problematically to check data structure sizes.