News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

SetSecurityInfo Help

Started by Titan, June 19, 2005, 06:31:00 AM

Previous topic - Next topic

Titan

There seems to be very little help on this API on Google. :(

I would like to use this API as a protection to prevent other applications from retrieving my process' handle.  Supposedly you can use it to block applications from accessing my program's memory, and consequently the FindWindow() API fails in result of not being able to read from the memory.  I have seen it used before, but I can not get it to work myself.

So here's what I do.. I use CreateProcess() to create my program.. I would then like to SetSecurityInfo() on it.  I have tried many variations but I can not get it to work. :dazzled:

Can anyone point me in a direction to help me use this API correctly?  Thanks.

Titan

Well it's been 2 days and no one answered.:D  I got a PM from someone else who is interested in getting this to work as well.  I looked at a DLL of a program that uses this method.. and these are the parameters I found.
Quote
SetSecurityInfo(0xFFFFFFFF, 6, DACL_SECURITY_INFORMATION | PROTECTED_DACL_SECURITY_INFORMATION, 0, 0, 0x0012FB4C, 0);
Maybe I could inject a DLL into my application just for the purpose of setting the security info?  Any ideas?  It would sure be nice of someone could get this to work.  I'm not the only one on this forum who could use this! :)