• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 615
  • Last Modified:

SetProcessShutdownParameters for another process?

Does anybody know of a way of altering the shutdown level of another process? SetProcessShutdownParameters obviously only works on the caller's own process.

I thought of calling SetProcessShutdownParameters for my own process then launching the second process, but it seems the shutdown level isn't inherited?
0
infofinder
Asked:
infofinder
2 Solutions
 
mxjijoCommented:

It looks like the value is not inherited (always default to 0x280) . Take a loook at
http://book.itzero.com/read/microsoft/0507/Microsoft.Press.Microsoft.Windows.Internals.Fourth.Edition.Dec.2004.internal.eBook-DDU_html/0735619174/ch06lev1sec2.html

I wouldn't recomment to use this for professional development - but you can try
creating a remote thread to your target proc's SetProcessShutdownParameters().

~j
0
 
AlexFMCommented:
You need to inject your code to another process:
http://www.codeproject.com/threads/winspy.asp
0
 
infofinderAuthor Commented:
Yep it looks like that's the only option, but I don't feel that the risks and hassle of such an approach are justified in this case. I've contacted the author of the other software to see if they'd consider adding an extension to get the desired effect.

But thanks mxjijo and AlexFM - at least now I know I'm not missing a simple API that would do the job!
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now