|  | Posted by Jim Carlock on 11/02/06 13:34 
"Peter van Schie" :vanschie.peter at gmail.com: asked:: I'm trying to create a named pipe to communicate with another
 : application from a PHP application. The thing is that I cannot use any
 : of the posix functions on Windows, including posix_mkfifo.
 : Is there any other way to create a named pipe and if so.... how?
 : Thanks in advance.
 
 I haven't messed with this but perhaps it's of some help. The VB
 declarations to the API are as follows:
 
 Public Declare Function CreatePipe Lib "kernel32.dll" ( _
 ByRef phReadPipe As Long, _
 ByRef phWritePipe As Long, _
 ByRef lpPipeAttributes As SECURITY_ATTRIBUTES, _
 ByVal nSize As Long) As Long
 
 Public Type SECURITY_ATTRIBUTES
 nLength As Long
 lpSecurityDescriptor As Long
 bInheritHandle As Long
 End Type
 
 The same thing for MASM:
 
 CreatePipe PROTO :DWORD,:DWORD,:SECURITY_ATTRIBUTES,:DWORD
 SECURITY_ATTRIBUTES STRUCT
 nLength  DWORD ?
 lpSecurityDescriptor  DWORD ?
 bInheritHandle  DWORD ?
 SECURITY_ATTRIBUTES ENDS
 
 And for C#:
 
 [DllImport("kernel32.dll")]
 public static extern int CreatePipe (
 int phReadPipe,
 int phWritePipe,
 ref SECURITY_ATTRIBUTES lpPipeAttributes,
 int nSize);
 [StructLayout(LayoutKind.Sequential)]
 public struct SECURITY_ATTRIBUTES{
 internal int nLength;
 internal int lpSecurityDescriptor;
 internal int bInheritHandle;
 }
 
 Perhaps someone here can provide an example of how to set up
 such API calls inside of PHP and provide an example in this case?
 
 Jim Carlock
 Post replies to this newsgroup.
 --
 Ask The North Carolina Swimming Pool Design Expert
 for pricing and details in getting a Sporting Swimming Pool built
 in North Carolina.
 http://www.aquaticcreationsnc.com/swimming/pool/builder/nc/ask.php
 [Back to original message] |