Skip to content

Commit d2cea70

Browse files
MOHANKUMAR-ITgopherbot
authored andcommitted
windows: add functions to get named pipe process IDs
Fixes golang/go#70086 Change-Id: I0cd188f075490b1ea630b26b74aa201796d60d3a GitHub-Last-Rev: 498fe73 GitHub-Pull-Request: #235 Reviewed-on: https://go-review.googlesource.com/c/sys/+/626215 Reviewed-by: David Chase <[email protected]> Reviewed-by: Carlos Amedee <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> Reviewed-by: Quim Muntal <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent a13946c commit d2cea70

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

windows/syscall_windows.go

+2
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ func NewCallbackCDecl(fn interface{}) uintptr {
168168
//sys CreateNamedPipe(name *uint16, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *SecurityAttributes) (handle Handle, err error) [failretval==InvalidHandle] = CreateNamedPipeW
169169
//sys ConnectNamedPipe(pipe Handle, overlapped *Overlapped) (err error)
170170
//sys DisconnectNamedPipe(pipe Handle) (err error)
171+
//sys GetNamedPipeClientProcessId(pipe Handle, clientProcessID *uint32) (err error)
172+
//sys GetNamedPipeServerProcessId(pipe Handle, serverProcessID *uint32) (err error)
171173
//sys GetNamedPipeInfo(pipe Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error)
172174
//sys GetNamedPipeHandleState(pipe Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) = GetNamedPipeHandleStateW
173175
//sys SetNamedPipeHandleState(pipe Handle, state *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32) (err error) = SetNamedPipeHandleState

windows/types_windows.go

+1
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ const (
176176
WAIT_FAILED = 0xFFFFFFFF
177177

178178
// Access rights for process.
179+
PROCESS_ALL_ACCESS = 0xFFFF
179180
PROCESS_CREATE_PROCESS = 0x0080
180181
PROCESS_CREATE_THREAD = 0x0002
181182
PROCESS_DUP_HANDLE = 0x0040

windows/zsyscall_windows.go

+18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)