thordk
asked on
Named Pipes in Windows Service ?!
Can anybody show me how to do a named pipe server / client in a windows service ? i have a pipeserver in an app running on XPSP2 and Win2K / 2003 that works fine as an application, but as soon as i encapsulate it in a service the client dont seem to be able to write to it anymore ??
Really hope someone can help, its urgent. Thanks
Really hope someone can help, its urgent. Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Yes, you should try that for both ends of the pipe.
ASKER
Okay just to get it right; ill use the exact same SD in both end right ? i will try to make a test and return back to you, thanks alot.
ASKER
That appeared to have solved my problem ! thanks alot.
ASKER
Thanks for answering - i havent used the SD at all in my applications, but then i read somewhere that it was important if they were running as a service (can you confirm that ?). What i tried to put into as a service was:
SECURITY_ATTRIBUTES sa;
SECURITY_DESCRIPTOR sd;
InitializeSecurityDescript
SetSecurityDescriptorDacl(
SetSecurityDescriptorGroup
SetSecurityDescriptorSacl(
sa.nLength = sizeof(SECURITY_ATTRIBUTES
sa.lpSecurityDescriptor = &sd;
sa.bInheritHandle = TRUE;
PipeHandle = CreateNamedPipe(PipeUNCnam
- But do i have to something both on serverside and clientside ? some of the clients will run as services too.