Skip to content

Commit eb1737e

Browse files
committed
added impl for getting process id of client & server named pipes
1 parent c29efe3 commit eb1737e

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

Diff for: 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

Diff for: 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

Diff for: 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)