diff options
author | Kali Kaneko (leap communications) <kali@leap.se> | 2019-08-16 12:55:10 +0200 |
---|---|---|
committer | Kali Kaneko (leap communications) <kali@leap.se> | 2019-08-16 15:50:28 +0200 |
commit | ec4974e7660776e8ab2883b109bfa3f96b4f5317 (patch) | |
tree | 6c6ae93cab7e3a0ff6ebb7ec07e3ef8757e5272f /packages/w32/create_process_typedef.go | |
parent | f4ab1b0463e902f23224c37f1e217241084681df (diff) |
[pkg] need to vendorize allendang w32 lib
we use go mod edit -replace
Diffstat (limited to 'packages/w32/create_process_typedef.go')
-rw-r--r-- | packages/w32/create_process_typedef.go | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/packages/w32/create_process_typedef.go b/packages/w32/create_process_typedef.go new file mode 100644 index 0000000..df05972 --- /dev/null +++ b/packages/w32/create_process_typedef.go @@ -0,0 +1,68 @@ +package w32 + +// typedef struct _PROCESS_INFORMATION { +// HANDLE hProcess; +// HANDLE hThread; +// DWORD dwProcessId; +// DWORD dwThreadId; +// } PROCESS_INFORMATION, *PPROCESS_INFORMATION, *LPPROCESS_INFORMATION; + +type PROCESS_INFORMATION struct { + Process HANDLE + Thread HANDLE + ProcessId uint32 + ThreadId uint32 +} + +// typedef struct _STARTUPINFOW { +// DWORD cb; +// LPWSTR lpReserved; +// LPWSTR lpDesktop; +// LPWSTR lpTitle; +// DWORD dwX; +// DWORD dwY; +// DWORD dwXSize; +// DWORD dwYSize; +// DWORD dwXCountChars; +// DWORD dwYCountChars; +// DWORD dwFillAttribute; +// DWORD dwFlags; +// WORD wShowWindow; +// WORD cbReserved2; +// LPBYTE lpReserved2; +// HANDLE hStdInput; +// HANDLE hStdOutput; +// HANDLE hStdError; +// } STARTUPINFOW, *LPSTARTUPINFOW; + +type STARTUPINFOW struct { + cb uint32 + _ *uint16 + Desktop *uint16 + Title *uint16 + X uint32 + Y uint32 + XSize uint32 + YSize uint32 + XCountChars uint32 + YCountChars uint32 + FillAttribute uint32 + Flags uint32 + ShowWindow uint16 + _ uint16 + _ *uint8 + StdInput HANDLE + StdOutput HANDLE + StdError HANDLE +} + +// combase!_SECURITY_ATTRIBUTES +// +0x000 nLength : Uint4B +// +0x008 lpSecurityDescriptor : Ptr64 Void +// +0x010 bInheritHandle : Int4B + +type SECURITY_ATTRIBUTES struct { + Length uint32 + SecurityDescriptor uintptr + InheritHandle BOOL +} |