Re: Vista IPC using named pipes - ERROR_ACCESS_DENIED
- From: "William DePalo [MVP VC++]" <willd.no.spam@xxxxxxxx>
- Date: Mon, 9 Apr 2007 13:41:01 -0400
"John Bigbooty" <BOGUSevileye0702BOGUS@xxxxxxxxxxxxxxxxxx> wrote in message
news:461a6f7a.7281421@xxxxxxxxxxxxxxxxxxxxx
The problem is when I attempt to open the pipe in the UI application,
I get ERROR_ACCESS_DENIED.
By default, when you create a pipe it is accessible only by other
applications running under the same user account. My guess is that your
service runs as local system while the application with the user interface
runs as the logged on user.
If you are willing to open up access to your pipe to all clients, you can do
something like this:
// I didn't compile this, beware or typos, etc
BYTE sd[SECURITY_DESCRIPTOR_MIN_LENGTH];
SECURITY_ATTRIBUTES sa;
sa.nLength = sizeof(sa);
sa.bInheritHandle = TRUE;
sa.lpSecurityDescriptor = &sd;
InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION);
SetSecurityDescriptorDacl(&sd, TRUE, (PACL) 0, FALSE);
CreateNamedPipe(..., &sa);
Alternatively, you can restrict access to the accounts you favor.
Regards,
Will
.
- Follow-Ups:
- Re: Vista IPC using named pipes - ERROR_ACCESS_DENIED
- From: John Bigbooty
- Re: Vista IPC using named pipes - ERROR_ACCESS_DENIED
- References:
- Vista IPC using named pipes - ERROR_ACCESS_DENIED
- From: John Bigbooty
- Vista IPC using named pipes - ERROR_ACCESS_DENIED
- Prev by Date: Vista IPC using named pipes - ERROR_ACCESS_DENIED
- Next by Date: Re: Vista IPC using named pipes - ERROR_ACCESS_DENIED
- Previous by thread: Vista IPC using named pipes - ERROR_ACCESS_DENIED
- Next by thread: Re: Vista IPC using named pipes - ERROR_ACCESS_DENIED
- Index(es):
Relevant Pages
|