 |
|
|  |  |
 |
CreateNamedPipe ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
Creates an instance of a named pipe and returns a handle for subsequent pipe operations. |
 |  | | Code examples: |  | |
|
 |  | | Declaration: |  |  |
HANDLE CreateNamedPipe(
LPCTSTR lpName,
DWORD dwOpenMode,
DWORD dwPipeMode,
DWORD nMaxInstances,
DWORD nOutBufferSize,
DWORD nInBufferSize,
DWORD nDefaultTimeOut,
LPSECURITY_ATTRIBUTES lpSecurityAttributes
);
|
 |  |  | | FoxPro declaration: |  |  |
DECLARE INTEGER CreateNamedPipe IN kernel32;
STRING lpName,;
LONG dwOpenMode,;
LONG dwPipeMode,;
LONG nMaxInstances,;
LONG nOutBufferSize,;
LONG nInBufferSize,;
LONG nDefaultTimeOut,;
INTEGER lpSecurityAttributes
|
 |  |  | | Parameters: |  | lpName
[in] The unique pipe name.
dwOpenMode
[in] The pipe access mode, the overlapped mode, the write-through mode, and the security access mode of the pipe handle.
dwPipeMode
[in] The type, read, and wait modes of the pipe handle.
nMaxInstances
[in] The maximum number of instances that can be created for this pipe.
nOutBufferSize
[in] The number of bytes to reserve for the output buffer.
nInBufferSize
[in] The number of bytes to reserve for the input buffer.
nDefaultTimeOut
[in] The default time-out value, in milliseconds.
lpSecurityAttributes
[in] A pointer to a SECURITY_ATTRIBUTES structure that specifies a security descriptor for the new named pipe. |
 |  | | Return value: |  | | If the function succeeds, the return value is a handle to the server end of a named pipe instance. |
 |  | | My comment: |  | LOCAL hPipe, cPipeName, nOpenMode, nPipeMode
cPipeName = "\\.\pipe\tpipe"
nOpenMode = BITOR(PIPE_ACCESS_DUPLEX,;
FILE_FLAG_FIRST_PIPE_INSTANCE)
nPipeMode = BITOR(PIPE_TYPE_BYTE,;
PIPE_READMODE_BYTE, PIPE_WAIT)
hPipe = CreateNamedPipe(m.cPipeName, nOpenMode, nPipeMode,;
1, 0x1000, 0x1000,;
NMPWAIT_USE_DEFAULT_WAIT, 0)
IF hPipe = INVALID_HANDLE_VALUE
? "CreateNamedPipe failed:", GetLastError()
RETURN
ENDIF
= CloseHandle(m.hPipe)
|
 |  | | Word Index links for the CreateNamedPipe : |  | |
|
 |  | | Translate this page: |  | |  |  | | • |  | | Created: | 2007-01-16 18:37:51 | | Modified: | 2007-01-16 18:44:28 | Visited in last 7 days: 25 |
|
 |
 |
 |
 |
Copyright © 2001-2013
News2News, Inc.
Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use.
The information on this page is presented AS IS, meaning that you may use it at your own risk.
Microsoft Visual FoxPro
and Windows are trade marks
of Microsoft Corp.
All other trademarks are the property of their respective owners.
Privacy policy
|
 |
 |
 |
Credits: PHP (4.4.9), an HTML-embedded scripting language,
MySQL (5.1.55-log), the Open Source standard SQL database,
AceHTML Freeware
Version 4, freeware HTML Editor of choice. Hosted by Korax Online Inc. |
 |
 |
|
 |