Created
February 27, 2011 13:40
-
-
Save zvukoper/846192 to your computer and use it in GitHub Desktop.
Part of the code to show how I open the pipe
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
procedure TAAR_client.FormShow(Sender: TObject); | |
const | |
OpenMode = PIPE_ACCESS_DUPLEX or FILE_FLAG_OVERLAPPED; | |
PipeMode = PIPE_TYPE_MESSAGE or PIPE_READMODE_MESSAGE or PIPE_WAIT; | |
Instances = PIPE_UNLIMITED_INSTANCES; | |
begin | |
Console.Lines.Add('OK: Starting thread'); | |
AAR := TAARThread.Create(False); | |
AAR.Priority := tpLowest; | |
delphiCom := CreateNamedPipe( | |
PChar('\\.\pipe\delphiCom'), OpenMode, PipeMode, | |
Instances, | |
1024, | |
1024, | |
1000, | |
nil); | |
if delphiCom = INVALID_HANDLE_VALUE then | |
begin | |
Console.Lines.Add('No delphiCom pipe'); | |
end | |
else | |
begin | |
Console.Lines.Add('OK: delphiCom opened') | |
end; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment