+ aliases to TPipeSemState field names for improved compatibility and overloaded version of DosQueryNPipeSemState using this type

git-svn-id: trunk@9139 -
This commit is contained in:
Tomas Hajny 2007-11-04 22:17:29 +00:00
parent 3c24c6c16d
commit 74fb7ca61d

View File

@ -2912,27 +2912,35 @@ function DosStopSession (Scope, SesID: cardinal): cardinal; cdecl;
****************************************************************************} ****************************************************************************}
type TAvailData=record type
cbPipe, {Number of bytes in pipe.} TAvailData = record
cbMessage:word; {Number of bytes in current message.} cbPipe, {Number of bytes in pipe.}
end; cbMessage: word; {Number of bytes in current message.}
end;
TPipeInfo=record TPipeInfo = record
cbOut:word; {Size of outbound data.} cbOut: word; {Size of outbound data.}
cbIn:word; {Size of inbound data.} cbIn: word; {Size of inbound data.}
MaxInst:byte; {Maximum number of instances.} MaxInst: byte; {Maximum number of instances.}
CurInst:byte; {Current number of instances.} CurInst: byte; {Current number of instances.}
Name:string; {Name of the pipe. You can use @Name[1] if Name: string; {Name of the pipe. You can use @Name[1] if
you need a PChar to the name; the string is you need a PChar to the name; the string is
always followed by a zero.} always followed by a zero.}
end; end;
TPipeSemState=record TPipeSemState = record
Status:byte; case boolean of
Flag:byte; false: (Status: byte;
Key:word; Flag: byte;
Avail:word; Key: word;
end; Avail: word);
true: (fStatus: byte;
fFlag: byte;
usKey: word;
usAvail: word);
end;
PPipeSemState = ^TPipeSemState;
TPipeSemStates = array [0..$FFFF] of TPipeSemState;
{Create an unnamed pipe. {Create an unnamed pipe.
ReadHandle = Receives handle for reading from pipe. ReadHandle = Receives handle for reading from pipe.
@ -3064,6 +3072,8 @@ function DosQueryNPipeInfo (Handle: THandle; InfoLevel: cardinal; var Buffer;
BufSize = Size of SemArray, in bytes.} BufSize = Size of SemArray, in bytes.}
function DosQueryNPipeSemState (SemHandle: THandle; var SemArray; function DosQueryNPipeSemState (SemHandle: THandle; var SemArray;
BufSize: cardinal): cardinal; cdecl; BufSize: cardinal): cardinal; cdecl;
function DosQueryNPipeSemState (SemHandle: THandle; SemArray: PPipeSemState;
BufSize: cardinal): cardinal; cdecl;
{Resets the blocking mode and state of a named pipe. {Resets the blocking mode and state of a named pipe.
Handle = Handle to named pipe. Handle = Handle to named pipe.
@ -5088,7 +5098,11 @@ function DosQueryNPipeInfo (Handle: THandle; InfoLevel: cardinal; var Buffer;
external 'DOSCALLS' index 248; external 'DOSCALLS' index 248;
function DosQueryNPipeSemState (SemHandle: THandle; var SemArray; function DosQueryNPipeSemState (SemHandle: THandle; var SemArray;
BufSize: cardinal): cardinal; cdecl; BufSize: cardinal): cardinal; cdecl;
external 'DOSCALLS' index 249;
function DosQueryNPipeSemState (SemHandle: THandle; SemArray: PPipeSemState;
BufSize: cardinal): cardinal; cdecl;
external 'DOSCALLS' index 249; external 'DOSCALLS' index 249;
function DosSetNPHState (Handle: THandle; State: cardinal):cardinal; cdecl; function DosSetNPHState (Handle: THandle; State: cardinal):cardinal; cdecl;