I am going to implement my first windows service. The service connects to a Bluetooth dongle and associates some commands and data with one client. Each process (client, server) must have at least two threads: one blocks Read (), the other curves business logic, and writes () from time to time.
While checking out the alternatives, I decided to go with Named Pipes for IPC, but I had trouble understanding some of the options. In particular:
FILE_FLAG_OVERLAPPED
OVERLAPPED
ReadFile()
WriteFile()
GetOverlappedResult()
EDIT
I want to clarify the question:
FILE_FLAG_OVERLAPPED, , , . . , -, , -, .
FILE_FLAG_OVERLAPPED, OVERLAPPED ReadFile WriteFile lpOverlapped. , (, ), NULL.
- , concurrency. , . ( , : , , , , , - .)
, PIPE_ACCESS_DUPLEX dwOpenMode. (FILE_FLAG_OVERLAPPED) .
-, , . (. WaitForMultipleObjects). . , , . , , , , , .
CreateNamedPipe:
[overlapped], , , , , . , , . , (-) . , , , , . ReadFileEx WriteFileEx . ReadFile, WriteFile, ConnectNamedPipe TransactNamedPipe , .