If you want to stick with native node (and the access issues may be the same in managed code), there is some guidance for Vista here (a long thread but should have everything you need). Also managed code methodology. Not sure if this applies identically to Windows 7 but it might get you started.
In summary:
It seems that there is no way to modify the permissions of a named pipe after it has been created. I tried and it always either simply doesn't work or returns ACCESS_DENIED. So, I had to specify both the DACL and SACL up front when creating the pipe.
The DACL code was pasted above in an earlier thread and the SACL can be created as follows:
- Create a new using InitializeAcl()
- Initialize a new SID specifying 'SECURITY_MANDATORY_LOW_RID'
- Call AddMandatoryAce() to add the SID to the ACL
- Call SetSecurityDescriptorSacl() to add the ACL to the security descriptor
Steve Townsend
2010-10-30 15:49:03