Article View: borland.public.cppbuilder.nativeapi
Article #8331Re: Connecting named pipes
From: nicolasr
Date: Sun, 31 Oct 2004 23:40
Date: Sun, 31 Oct 2004 23:40
35 lines
1853 bytes
1853 bytes
>
> If I recall correctly, Win98 does not support named pipes.
> It only supports anonymous pipes.
>
> . Ed
>
Hi Ed,
thanks for the reply. The help says that Win95/98 cannot create
named pipes but can open existing ones via CreateFile().
I figured it out and the problem is that the default security
descriptor is too restrictive.
If anyone interested I found this code on the web that shows how
to create a security descriptor with all access to the pipe:
static SECURITY_DESCRIPTOR sd;
static SECURITY_ATTRIBUTES sa;
static bool sdInited = false;
if (!sdInited)
{
InitializeSecurityDescriptor (&sd, SECURITY_DESCRIPTOR_REVISION);
SetSecurityDescriptorDacl (&sd, TRUE, (PACL) NULL, FALSE);
sa.nLength = sizeof (sa);
sa.lpSecurityDescriptor = &sd;
sa.bInheritHandle = false;
sdInited = true;
}
//pass sa to CreateNamedPipe...
Nick
Technical Details
Message-ID:
<418577e6$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!in.100proofnews.com!in.100proofnews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<418448ff$1@newsgroups.borland.com> <4185189e$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,7f4edb9d9ca3ade X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "nicolasr" <nicolasrNOSPAMATSIGNgmx.net> Newsgroups: borland.public.cppbuilder.nativeapi References: <418448ff$1@newsgroups.borland.com> <4185189e$1@newsgroups.borland.com> Subject: Re: Connecting named pipes Date: Mon, 1 Nov 2004 00:40:22 +0100 Lines: 38 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 80.133.180.113 Message-ID: <418577e6$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1099266022 80.133.180.113 (31 Oct 2004 15:40:22 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!in.100proofnews.com!in.100proofnews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail