mirror of
https://github.com/yv1ing/ShotRDP.git
synced 2025-09-16 15:10:57 +08:00
基本适应win7,win10,win server 08,win server 12,win server 16的截图
This commit is contained in:
4080
grdp/win/advapi32.go
Normal file
4080
grdp/win/advapi32.go
Normal file
File diff suppressed because it is too large
Load Diff
1138
grdp/win/comctl32.go
Normal file
1138
grdp/win/comctl32.go
Normal file
File diff suppressed because it is too large
Load Diff
135
grdp/win/comdlg32.go
Normal file
135
grdp/win/comdlg32.go
Normal file
@@ -0,0 +1,135 @@
|
||||
// This file was automatically generated by https://github.com/kbinani/win/blob/generator/internal/cmd/gen/gen.go
|
||||
// go run internal/cmd/gen/gen.go
|
||||
|
||||
// +build windows
|
||||
|
||||
package win
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var (
|
||||
// Library
|
||||
libcomdlg32 uintptr
|
||||
|
||||
// Functions
|
||||
chooseColor uintptr
|
||||
chooseFont uintptr
|
||||
commDlgExtendedError uintptr
|
||||
findText uintptr
|
||||
getFileTitle uintptr
|
||||
getOpenFileName uintptr
|
||||
getSaveFileName uintptr
|
||||
pageSetupDlg uintptr
|
||||
printDlgEx uintptr
|
||||
printDlg uintptr
|
||||
replaceText uintptr
|
||||
)
|
||||
|
||||
func init() {
|
||||
// Library
|
||||
libcomdlg32 = doLoadLibrary("comdlg32.dll")
|
||||
|
||||
// Functions
|
||||
chooseColor = doGetProcAddress(libcomdlg32, "ChooseColorW")
|
||||
chooseFont = doGetProcAddress(libcomdlg32, "ChooseFontW")
|
||||
commDlgExtendedError = doGetProcAddress(libcomdlg32, "CommDlgExtendedError")
|
||||
findText = doGetProcAddress(libcomdlg32, "FindTextW")
|
||||
getFileTitle = doGetProcAddress(libcomdlg32, "GetFileTitleW")
|
||||
getOpenFileName = doGetProcAddress(libcomdlg32, "GetOpenFileNameW")
|
||||
getSaveFileName = doGetProcAddress(libcomdlg32, "GetSaveFileNameW")
|
||||
pageSetupDlg = doGetProcAddress(libcomdlg32, "PageSetupDlgW")
|
||||
printDlgEx = doGetProcAddress(libcomdlg32, "PrintDlgExW")
|
||||
printDlg = doGetProcAddress(libcomdlg32, "PrintDlgW")
|
||||
replaceText = doGetProcAddress(libcomdlg32, "ReplaceTextW")
|
||||
}
|
||||
|
||||
func ChooseColor(unnamed0 *CHOOSECOLOR) bool {
|
||||
ret1 := syscall3(chooseColor, 1,
|
||||
uintptr(unsafe.Pointer(unnamed0)),
|
||||
0,
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func ChooseFont(unnamed0 LPCHOOSEFONT) bool {
|
||||
ret1 := syscall3(chooseFont, 1,
|
||||
uintptr(unsafe.Pointer(unnamed0)),
|
||||
0,
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func CommDlgExtendedError() DWORD {
|
||||
ret1 := syscall3(commDlgExtendedError, 0,
|
||||
0,
|
||||
0,
|
||||
0)
|
||||
return DWORD(ret1)
|
||||
}
|
||||
|
||||
func FindText(unnamed0 LPFINDREPLACE) HWND {
|
||||
ret1 := syscall3(findText, 1,
|
||||
uintptr(unsafe.Pointer(unnamed0)),
|
||||
0,
|
||||
0)
|
||||
return HWND(ret1)
|
||||
}
|
||||
|
||||
func GetFileTitle(unnamed0 string, unnamed1 LPWSTR, unnamed2 WORD) int16 {
|
||||
unnamed0Str := unicode16FromString(unnamed0)
|
||||
ret1 := syscall3(getFileTitle, 3,
|
||||
uintptr(unsafe.Pointer(&unnamed0Str[0])),
|
||||
uintptr(unsafe.Pointer(unnamed1)),
|
||||
uintptr(unnamed2))
|
||||
return int16(ret1)
|
||||
}
|
||||
|
||||
func GetOpenFileName(unnamed0 LPOPENFILENAME) bool {
|
||||
ret1 := syscall3(getOpenFileName, 1,
|
||||
uintptr(unsafe.Pointer(unnamed0)),
|
||||
0,
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func GetSaveFileName(unnamed0 LPOPENFILENAME) bool {
|
||||
ret1 := syscall3(getSaveFileName, 1,
|
||||
uintptr(unsafe.Pointer(unnamed0)),
|
||||
0,
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func PageSetupDlg(unnamed0 LPPAGESETUPDLG) bool {
|
||||
ret1 := syscall3(pageSetupDlg, 1,
|
||||
uintptr(unsafe.Pointer(unnamed0)),
|
||||
0,
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func PrintDlgEx(unnamed0 LPPRINTDLGEX) HRESULT {
|
||||
ret1 := syscall3(printDlgEx, 1,
|
||||
uintptr(unsafe.Pointer(unnamed0)),
|
||||
0,
|
||||
0)
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func PrintDlg(unnamed0 LPPRINTDLG) bool {
|
||||
ret1 := syscall3(printDlg, 1,
|
||||
uintptr(unsafe.Pointer(unnamed0)),
|
||||
0,
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func ReplaceText(unnamed0 LPFINDREPLACE) HWND {
|
||||
ret1 := syscall3(replaceText, 1,
|
||||
uintptr(unsafe.Pointer(unnamed0)),
|
||||
0,
|
||||
0)
|
||||
return HWND(ret1)
|
||||
}
|
||||
1437
grdp/win/const.go
Normal file
1437
grdp/win/const.go
Normal file
File diff suppressed because it is too large
Load Diff
1867
grdp/win/crypt32.go
Normal file
1867
grdp/win/crypt32.go
Normal file
File diff suppressed because it is too large
Load Diff
4498
grdp/win/gdi32.go
Normal file
4498
grdp/win/gdi32.go
Normal file
File diff suppressed because it is too large
Load Diff
53
grdp/win/gdiplus.go
Normal file
53
grdp/win/gdiplus.go
Normal file
@@ -0,0 +1,53 @@
|
||||
// This file was automatically generated by https://github.com/kbinani/win/blob/generator/internal/cmd/gen/gen.go
|
||||
// go run internal/cmd/gen/gen.go
|
||||
|
||||
// +build windows
|
||||
|
||||
package win
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var (
|
||||
// Library
|
||||
libgdiplus uintptr
|
||||
|
||||
// Functions
|
||||
gdiplusNotificationHook uintptr
|
||||
gdiplusNotificationUnhook uintptr
|
||||
gdiplusStartup uintptr
|
||||
)
|
||||
|
||||
func init() {
|
||||
// Library
|
||||
libgdiplus = doLoadLibrary("gdiplus.dll")
|
||||
|
||||
// Functions
|
||||
gdiplusNotificationHook = doGetProcAddress(libgdiplus, "GdiplusNotificationHook")
|
||||
gdiplusNotificationUnhook = doGetProcAddress(libgdiplus, "GdiplusNotificationUnhook")
|
||||
gdiplusStartup = doGetProcAddress(libgdiplus, "GdiplusStartup")
|
||||
}
|
||||
|
||||
func GdiplusNotificationHook(token *ULONG_PTR) GpStatus {
|
||||
ret1 := syscall3(gdiplusNotificationHook, 1,
|
||||
uintptr(unsafe.Pointer(token)),
|
||||
0,
|
||||
0)
|
||||
return GpStatus(ret1)
|
||||
}
|
||||
|
||||
func GdiplusNotificationUnhook(token *uint32) {
|
||||
syscall3(gdiplusNotificationUnhook, 1,
|
||||
uintptr(unsafe.Pointer(token)),
|
||||
0,
|
||||
0)
|
||||
}
|
||||
|
||||
func GdiplusStartup(token *ULONG_PTR, input /*const*/ *GdiplusStartupInput, output *GdiplusStartupOutput) Status {
|
||||
ret1 := syscall3(gdiplusStartup, 3,
|
||||
uintptr(unsafe.Pointer(token)),
|
||||
uintptr(unsafe.Pointer(input)),
|
||||
uintptr(unsafe.Pointer(output)))
|
||||
return Status(ret1)
|
||||
}
|
||||
715
grdp/win/imm32.go
Normal file
715
grdp/win/imm32.go
Normal file
@@ -0,0 +1,715 @@
|
||||
// This file was automatically generated by https://github.com/kbinani/win/blob/generator/internal/cmd/gen/gen.go
|
||||
// go run internal/cmd/gen/gen.go
|
||||
|
||||
// +build windows
|
||||
|
||||
package win
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var (
|
||||
// Library
|
||||
libimm32 uintptr
|
||||
|
||||
// Functions
|
||||
immAssociateContext uintptr
|
||||
immAssociateContextEx uintptr
|
||||
immConfigureIME uintptr
|
||||
immCreateContext uintptr
|
||||
immDestroyContext uintptr
|
||||
immDisableIME uintptr
|
||||
immDisableTextFrameService uintptr
|
||||
immEnumInputContext uintptr
|
||||
immEnumRegisterWord uintptr
|
||||
immEscape uintptr
|
||||
immGetCandidateListCount uintptr
|
||||
immGetCandidateList uintptr
|
||||
immGetCandidateWindow uintptr
|
||||
immGetCompositionFont uintptr
|
||||
immGetCompositionString uintptr
|
||||
immGetCompositionWindow uintptr
|
||||
immGetContext uintptr
|
||||
immGetConversionList uintptr
|
||||
immGetConversionStatus uintptr
|
||||
immGetDefaultIMEWnd uintptr
|
||||
immGetDescription uintptr
|
||||
immGetGuideLine uintptr
|
||||
immGetIMEFileName uintptr
|
||||
immGetImeMenuItems uintptr
|
||||
immGetOpenStatus uintptr
|
||||
immGetProperty uintptr
|
||||
immGetRegisterWordStyle uintptr
|
||||
immGetStatusWindowPos uintptr
|
||||
immGetVirtualKey uintptr
|
||||
immInstallIME uintptr
|
||||
immIsIME uintptr
|
||||
immIsUIMessage uintptr
|
||||
immNotifyIME uintptr
|
||||
immRegisterWord uintptr
|
||||
immReleaseContext uintptr
|
||||
immSetCandidateWindow uintptr
|
||||
immSetCompositionFont uintptr
|
||||
immSetCompositionString uintptr
|
||||
immSetCompositionWindow uintptr
|
||||
immSetConversionStatus uintptr
|
||||
immSetOpenStatus uintptr
|
||||
immSetStatusWindowPos uintptr
|
||||
immSimulateHotKey uintptr
|
||||
immUnregisterWord uintptr
|
||||
immCreateIMCC uintptr
|
||||
immCreateSoftKeyboard uintptr
|
||||
immDestroyIMCC uintptr
|
||||
immDestroySoftKeyboard uintptr
|
||||
immGenerateMessage uintptr
|
||||
immGetHotKey uintptr
|
||||
immGetIMCCLockCount uintptr
|
||||
immGetIMCCSize uintptr
|
||||
immGetIMCLockCount uintptr
|
||||
immLockIMC uintptr
|
||||
immLockIMCC uintptr
|
||||
immProcessKey uintptr
|
||||
immReSizeIMCC uintptr
|
||||
immRequestMessage uintptr
|
||||
immShowSoftKeyboard uintptr
|
||||
immTranslateMessage uintptr
|
||||
immUnlockIMC uintptr
|
||||
immUnlockIMCC uintptr
|
||||
)
|
||||
|
||||
func init() {
|
||||
// Library
|
||||
libimm32 = doLoadLibrary("imm32.dll")
|
||||
|
||||
// Functions
|
||||
immAssociateContext = doGetProcAddress(libimm32, "ImmAssociateContext")
|
||||
immAssociateContextEx = doGetProcAddress(libimm32, "ImmAssociateContextEx")
|
||||
immConfigureIME = doGetProcAddress(libimm32, "ImmConfigureIMEW")
|
||||
immCreateContext = doGetProcAddress(libimm32, "ImmCreateContext")
|
||||
immDestroyContext = doGetProcAddress(libimm32, "ImmDestroyContext")
|
||||
immDisableIME = doGetProcAddress(libimm32, "ImmDisableIME")
|
||||
immDisableTextFrameService = doGetProcAddress(libimm32, "ImmDisableTextFrameService")
|
||||
immEnumInputContext = doGetProcAddress(libimm32, "ImmEnumInputContext")
|
||||
immEnumRegisterWord = doGetProcAddress(libimm32, "ImmEnumRegisterWordW")
|
||||
immEscape = doGetProcAddress(libimm32, "ImmEscapeW")
|
||||
immGetCandidateListCount = doGetProcAddress(libimm32, "ImmGetCandidateListCountW")
|
||||
immGetCandidateList = doGetProcAddress(libimm32, "ImmGetCandidateListW")
|
||||
immGetCandidateWindow = doGetProcAddress(libimm32, "ImmGetCandidateWindow")
|
||||
immGetCompositionFont = doGetProcAddress(libimm32, "ImmGetCompositionFontW")
|
||||
immGetCompositionString = doGetProcAddress(libimm32, "ImmGetCompositionStringW")
|
||||
immGetCompositionWindow = doGetProcAddress(libimm32, "ImmGetCompositionWindow")
|
||||
immGetContext = doGetProcAddress(libimm32, "ImmGetContext")
|
||||
immGetConversionList = doGetProcAddress(libimm32, "ImmGetConversionListW")
|
||||
immGetConversionStatus = doGetProcAddress(libimm32, "ImmGetConversionStatus")
|
||||
immGetDefaultIMEWnd = doGetProcAddress(libimm32, "ImmGetDefaultIMEWnd")
|
||||
immGetDescription = doGetProcAddress(libimm32, "ImmGetDescriptionW")
|
||||
immGetGuideLine = doGetProcAddress(libimm32, "ImmGetGuideLineW")
|
||||
immGetIMEFileName = doGetProcAddress(libimm32, "ImmGetIMEFileNameW")
|
||||
immGetImeMenuItems = doGetProcAddress(libimm32, "ImmGetImeMenuItemsW")
|
||||
immGetOpenStatus = doGetProcAddress(libimm32, "ImmGetOpenStatus")
|
||||
immGetProperty = doGetProcAddress(libimm32, "ImmGetProperty")
|
||||
immGetRegisterWordStyle = doGetProcAddress(libimm32, "ImmGetRegisterWordStyleW")
|
||||
immGetStatusWindowPos = doGetProcAddress(libimm32, "ImmGetStatusWindowPos")
|
||||
immGetVirtualKey = doGetProcAddress(libimm32, "ImmGetVirtualKey")
|
||||
immInstallIME = doGetProcAddress(libimm32, "ImmInstallIMEW")
|
||||
immIsIME = doGetProcAddress(libimm32, "ImmIsIME")
|
||||
immIsUIMessage = doGetProcAddress(libimm32, "ImmIsUIMessageW")
|
||||
immNotifyIME = doGetProcAddress(libimm32, "ImmNotifyIME")
|
||||
immRegisterWord = doGetProcAddress(libimm32, "ImmRegisterWordW")
|
||||
immReleaseContext = doGetProcAddress(libimm32, "ImmReleaseContext")
|
||||
immSetCandidateWindow = doGetProcAddress(libimm32, "ImmSetCandidateWindow")
|
||||
immSetCompositionFont = doGetProcAddress(libimm32, "ImmSetCompositionFontW")
|
||||
immSetCompositionString = doGetProcAddress(libimm32, "ImmSetCompositionStringW")
|
||||
immSetCompositionWindow = doGetProcAddress(libimm32, "ImmSetCompositionWindow")
|
||||
immSetConversionStatus = doGetProcAddress(libimm32, "ImmSetConversionStatus")
|
||||
immSetOpenStatus = doGetProcAddress(libimm32, "ImmSetOpenStatus")
|
||||
immSetStatusWindowPos = doGetProcAddress(libimm32, "ImmSetStatusWindowPos")
|
||||
immSimulateHotKey = doGetProcAddress(libimm32, "ImmSimulateHotKey")
|
||||
immUnregisterWord = doGetProcAddress(libimm32, "ImmUnregisterWordW")
|
||||
immCreateIMCC = doGetProcAddress(libimm32, "ImmCreateIMCC")
|
||||
immCreateSoftKeyboard = doGetProcAddress(libimm32, "ImmCreateSoftKeyboard")
|
||||
immDestroyIMCC = doGetProcAddress(libimm32, "ImmDestroyIMCC")
|
||||
immDestroySoftKeyboard = doGetProcAddress(libimm32, "ImmDestroySoftKeyboard")
|
||||
immGenerateMessage = doGetProcAddress(libimm32, "ImmGenerateMessage")
|
||||
immGetHotKey = doGetProcAddress(libimm32, "ImmGetHotKey")
|
||||
immGetIMCCLockCount = doGetProcAddress(libimm32, "ImmGetIMCCLockCount")
|
||||
immGetIMCCSize = doGetProcAddress(libimm32, "ImmGetIMCCSize")
|
||||
immGetIMCLockCount = doGetProcAddress(libimm32, "ImmGetIMCLockCount")
|
||||
immLockIMC = doGetProcAddress(libimm32, "ImmLockIMC")
|
||||
immLockIMCC = doGetProcAddress(libimm32, "ImmLockIMCC")
|
||||
immProcessKey = doGetProcAddress(libimm32, "ImmProcessKey")
|
||||
immReSizeIMCC = doGetProcAddress(libimm32, "ImmReSizeIMCC")
|
||||
immRequestMessage = doGetProcAddress(libimm32, "ImmRequestMessageW")
|
||||
immShowSoftKeyboard = doGetProcAddress(libimm32, "ImmShowSoftKeyboard")
|
||||
immTranslateMessage = doGetProcAddress(libimm32, "ImmTranslateMessage")
|
||||
immUnlockIMC = doGetProcAddress(libimm32, "ImmUnlockIMC")
|
||||
immUnlockIMCC = doGetProcAddress(libimm32, "ImmUnlockIMCC")
|
||||
}
|
||||
|
||||
func ImmAssociateContext(unnamed0 HWND, unnamed1 HIMC) HIMC {
|
||||
ret1 := syscall3(immAssociateContext, 2,
|
||||
uintptr(unnamed0),
|
||||
uintptr(unnamed1),
|
||||
0)
|
||||
return HIMC(ret1)
|
||||
}
|
||||
|
||||
func ImmAssociateContextEx(unnamed0 HWND, unnamed1 HIMC, unnamed2 DWORD) bool {
|
||||
ret1 := syscall3(immAssociateContextEx, 3,
|
||||
uintptr(unnamed0),
|
||||
uintptr(unnamed1),
|
||||
uintptr(unnamed2))
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func ImmConfigureIME(unnamed0 HKL, unnamed1 HWND, unnamed2 DWORD, unnamed3 LPVOID) bool {
|
||||
ret1 := syscall6(immConfigureIME, 4,
|
||||
uintptr(unnamed0),
|
||||
uintptr(unnamed1),
|
||||
uintptr(unnamed2),
|
||||
uintptr(unsafe.Pointer(unnamed3)),
|
||||
0,
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func ImmCreateContext() HIMC {
|
||||
ret1 := syscall3(immCreateContext, 0,
|
||||
0,
|
||||
0,
|
||||
0)
|
||||
return HIMC(ret1)
|
||||
}
|
||||
|
||||
func ImmDestroyContext(unnamed0 HIMC) bool {
|
||||
ret1 := syscall3(immDestroyContext, 1,
|
||||
uintptr(unnamed0),
|
||||
0,
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func ImmDisableIME(unnamed0 DWORD) bool {
|
||||
ret1 := syscall3(immDisableIME, 1,
|
||||
uintptr(unnamed0),
|
||||
0,
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func ImmDisableTextFrameService(idThread DWORD) bool {
|
||||
ret1 := syscall3(immDisableTextFrameService, 1,
|
||||
uintptr(idThread),
|
||||
0,
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func ImmEnumInputContext(idThread DWORD, lpfn IMCENUMPROC, lParam LPARAM) bool {
|
||||
lpfnCallback := syscall.NewCallback(func(unnamed0RawArg HIMC, unnamed1RawArg LPARAM) uintptr {
|
||||
ret := lpfn(unnamed0RawArg, unnamed1RawArg)
|
||||
return uintptr(ret)
|
||||
})
|
||||
ret1 := syscall3(immEnumInputContext, 3,
|
||||
uintptr(idThread),
|
||||
lpfnCallback,
|
||||
uintptr(lParam))
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func ImmEnumRegisterWord(unnamed0 HKL, unnamed1 REGISTERWORDENUMPROC, lpszReading string, unnamed3 DWORD, lpszRegister string, unnamed5 LPVOID) UINT {
|
||||
lpszReadingStr := unicode16FromString(lpszReading)
|
||||
lpszRegisterStr := unicode16FromString(lpszRegister)
|
||||
unnamed1Callback := syscall.NewCallback(func(lpszReadingRawArg /*const*/ *uint16, unnamed1RawArg DWORD, lpszStringRawArg /*const*/ *uint16, unnamed3RawArg LPVOID) uintptr {
|
||||
lpszReading := stringFromUnicode16(lpszReadingRawArg)
|
||||
lpszString := stringFromUnicode16(lpszStringRawArg)
|
||||
ret := unnamed1(lpszReading, unnamed1RawArg, lpszString, unnamed3RawArg)
|
||||
return uintptr(ret)
|
||||
})
|
||||
ret1 := syscall6(immEnumRegisterWord, 6,
|
||||
uintptr(unnamed0),
|
||||
unnamed1Callback,
|
||||
uintptr(unsafe.Pointer(&lpszReadingStr[0])),
|
||||
uintptr(unnamed3),
|
||||
uintptr(unsafe.Pointer(&lpszRegisterStr[0])),
|
||||
uintptr(unsafe.Pointer(unnamed5)))
|
||||
return UINT(ret1)
|
||||
}
|
||||
|
||||
func ImmEscape(unnamed0 HKL, unnamed1 HIMC, unnamed2 UINT, unnamed3 LPVOID) LRESULT {
|
||||
ret1 := syscall6(immEscape, 4,
|
||||
uintptr(unnamed0),
|
||||
uintptr(unnamed1),
|
||||
uintptr(unnamed2),
|
||||
uintptr(unsafe.Pointer(unnamed3)),
|
||||
0,
|
||||
0)
|
||||
return LRESULT(ret1)
|
||||
}
|
||||
|
||||
func ImmGetCandidateListCount(unnamed0 HIMC, lpdwListCount *uint32) DWORD {
|
||||
ret1 := syscall3(immGetCandidateListCount, 2,
|
||||
uintptr(unnamed0),
|
||||
uintptr(unsafe.Pointer(lpdwListCount)),
|
||||
0)
|
||||
return DWORD(ret1)
|
||||
}
|
||||
|
||||
func ImmGetCandidateList(unnamed0 HIMC, deIndex DWORD, unnamed2 *CANDIDATELIST, dwBufLen DWORD) DWORD {
|
||||
ret1 := syscall6(immGetCandidateList, 4,
|
||||
uintptr(unnamed0),
|
||||
uintptr(deIndex),
|
||||
uintptr(unsafe.Pointer(unnamed2)),
|
||||
uintptr(dwBufLen),
|
||||
0,
|
||||
0)
|
||||
return DWORD(ret1)
|
||||
}
|
||||
|
||||
func ImmGetCandidateWindow(unnamed0 HIMC, unnamed1 DWORD, unnamed2 *CANDIDATEFORM) bool {
|
||||
ret1 := syscall3(immGetCandidateWindow, 3,
|
||||
uintptr(unnamed0),
|
||||
uintptr(unnamed1),
|
||||
uintptr(unsafe.Pointer(unnamed2)))
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func ImmGetCompositionFont(unnamed0 HIMC, unnamed1 LPLOGFONT) bool {
|
||||
ret1 := syscall3(immGetCompositionFont, 2,
|
||||
uintptr(unnamed0),
|
||||
uintptr(unsafe.Pointer(unnamed1)),
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func ImmGetCompositionString(unnamed0 HIMC, unnamed1 DWORD, unnamed2 LPVOID, unnamed3 DWORD) LONG {
|
||||
ret1 := syscall6(immGetCompositionString, 4,
|
||||
uintptr(unnamed0),
|
||||
uintptr(unnamed1),
|
||||
uintptr(unsafe.Pointer(unnamed2)),
|
||||
uintptr(unnamed3),
|
||||
0,
|
||||
0)
|
||||
return LONG(ret1)
|
||||
}
|
||||
|
||||
func ImmGetCompositionWindow(unnamed0 HIMC, unnamed1 *COMPOSITIONFORM) bool {
|
||||
ret1 := syscall3(immGetCompositionWindow, 2,
|
||||
uintptr(unnamed0),
|
||||
uintptr(unsafe.Pointer(unnamed1)),
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func ImmGetContext(unnamed0 HWND) HIMC {
|
||||
ret1 := syscall3(immGetContext, 1,
|
||||
uintptr(unnamed0),
|
||||
0,
|
||||
0)
|
||||
return HIMC(ret1)
|
||||
}
|
||||
|
||||
func ImmGetConversionList(unnamed0 HKL, unnamed1 HIMC, unnamed2 string, unnamed3 *CANDIDATELIST, dwBufLen DWORD, uFlag UINT) DWORD {
|
||||
unnamed2Str := unicode16FromString(unnamed2)
|
||||
ret1 := syscall6(immGetConversionList, 6,
|
||||
uintptr(unnamed0),
|
||||
uintptr(unnamed1),
|
||||
uintptr(unsafe.Pointer(&unnamed2Str[0])),
|
||||
uintptr(unsafe.Pointer(unnamed3)),
|
||||
uintptr(dwBufLen),
|
||||
uintptr(uFlag))
|
||||
return DWORD(ret1)
|
||||
}
|
||||
|
||||
func ImmGetConversionStatus(unnamed0 HIMC, unnamed1 *uint32, unnamed2 *uint32) bool {
|
||||
ret1 := syscall3(immGetConversionStatus, 3,
|
||||
uintptr(unnamed0),
|
||||
uintptr(unsafe.Pointer(unnamed1)),
|
||||
uintptr(unsafe.Pointer(unnamed2)))
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func ImmGetDefaultIMEWnd(unnamed0 HWND) HWND {
|
||||
ret1 := syscall3(immGetDefaultIMEWnd, 1,
|
||||
uintptr(unnamed0),
|
||||
0,
|
||||
0)
|
||||
return HWND(ret1)
|
||||
}
|
||||
|
||||
func ImmGetDescription(unnamed0 HKL, unnamed1 LPWSTR, uBufLen UINT) UINT {
|
||||
ret1 := syscall3(immGetDescription, 3,
|
||||
uintptr(unnamed0),
|
||||
uintptr(unsafe.Pointer(unnamed1)),
|
||||
uintptr(uBufLen))
|
||||
return UINT(ret1)
|
||||
}
|
||||
|
||||
func ImmGetGuideLine(unnamed0 HIMC, dwIndex DWORD, unnamed2 LPWSTR, dwBufLen DWORD) DWORD {
|
||||
ret1 := syscall6(immGetGuideLine, 4,
|
||||
uintptr(unnamed0),
|
||||
uintptr(dwIndex),
|
||||
uintptr(unsafe.Pointer(unnamed2)),
|
||||
uintptr(dwBufLen),
|
||||
0,
|
||||
0)
|
||||
return DWORD(ret1)
|
||||
}
|
||||
|
||||
func ImmGetIMEFileName(unnamed0 HKL, unnamed1 LPWSTR, uBufLen UINT) UINT {
|
||||
ret1 := syscall3(immGetIMEFileName, 3,
|
||||
uintptr(unnamed0),
|
||||
uintptr(unsafe.Pointer(unnamed1)),
|
||||
uintptr(uBufLen))
|
||||
return UINT(ret1)
|
||||
}
|
||||
|
||||
func ImmGetImeMenuItems(unnamed0 HIMC, unnamed1 DWORD, unnamed2 DWORD, unnamed3 LPIMEMENUITEMINFO, unnamed4 LPIMEMENUITEMINFO, unnamed5 DWORD) DWORD {
|
||||
ret1 := syscall6(immGetImeMenuItems, 6,
|
||||
uintptr(unnamed0),
|
||||
uintptr(unnamed1),
|
||||
uintptr(unnamed2),
|
||||
uintptr(unsafe.Pointer(unnamed3)),
|
||||
uintptr(unsafe.Pointer(unnamed4)),
|
||||
uintptr(unnamed5))
|
||||
return DWORD(ret1)
|
||||
}
|
||||
|
||||
func ImmGetOpenStatus(unnamed0 HIMC) bool {
|
||||
ret1 := syscall3(immGetOpenStatus, 1,
|
||||
uintptr(unnamed0),
|
||||
0,
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func ImmGetProperty(unnamed0 HKL, unnamed1 DWORD) DWORD {
|
||||
ret1 := syscall3(immGetProperty, 2,
|
||||
uintptr(unnamed0),
|
||||
uintptr(unnamed1),
|
||||
0)
|
||||
return DWORD(ret1)
|
||||
}
|
||||
|
||||
func ImmGetRegisterWordStyle(unnamed0 HKL, nItem UINT, unnamed2 LPSTYLEBUF) UINT {
|
||||
ret1 := syscall3(immGetRegisterWordStyle, 3,
|
||||
uintptr(unnamed0),
|
||||
uintptr(nItem),
|
||||
uintptr(unsafe.Pointer(unnamed2)))
|
||||
return UINT(ret1)
|
||||
}
|
||||
|
||||
func ImmGetStatusWindowPos(unnamed0 HIMC, unnamed1 *POINT) bool {
|
||||
ret1 := syscall3(immGetStatusWindowPos, 2,
|
||||
uintptr(unnamed0),
|
||||
uintptr(unsafe.Pointer(unnamed1)),
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func ImmGetVirtualKey(unnamed0 HWND) UINT {
|
||||
ret1 := syscall3(immGetVirtualKey, 1,
|
||||
uintptr(unnamed0),
|
||||
0,
|
||||
0)
|
||||
return UINT(ret1)
|
||||
}
|
||||
|
||||
func ImmInstallIME(lpszIMEFileName string, lpszLayoutText string) HKL {
|
||||
lpszIMEFileNameStr := unicode16FromString(lpszIMEFileName)
|
||||
lpszLayoutTextStr := unicode16FromString(lpszLayoutText)
|
||||
ret1 := syscall3(immInstallIME, 2,
|
||||
uintptr(unsafe.Pointer(&lpszIMEFileNameStr[0])),
|
||||
uintptr(unsafe.Pointer(&lpszLayoutTextStr[0])),
|
||||
0)
|
||||
return HKL(ret1)
|
||||
}
|
||||
|
||||
func ImmIsIME(unnamed0 HKL) bool {
|
||||
ret1 := syscall3(immIsIME, 1,
|
||||
uintptr(unnamed0),
|
||||
0,
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func ImmIsUIMessage(unnamed0 HWND, unnamed1 UINT, unnamed2 WPARAM, unnamed3 LPARAM) bool {
|
||||
ret1 := syscall6(immIsUIMessage, 4,
|
||||
uintptr(unnamed0),
|
||||
uintptr(unnamed1),
|
||||
uintptr(unnamed2),
|
||||
uintptr(unnamed3),
|
||||
0,
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func ImmNotifyIME(unnamed0 HIMC, dwAction DWORD, dwIndex DWORD, dwValue DWORD) bool {
|
||||
ret1 := syscall6(immNotifyIME, 4,
|
||||
uintptr(unnamed0),
|
||||
uintptr(dwAction),
|
||||
uintptr(dwIndex),
|
||||
uintptr(dwValue),
|
||||
0,
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func ImmRegisterWord(unnamed0 HKL, lpszReading string, unnamed2 DWORD, lpszRegister string) bool {
|
||||
lpszReadingStr := unicode16FromString(lpszReading)
|
||||
lpszRegisterStr := unicode16FromString(lpszRegister)
|
||||
ret1 := syscall6(immRegisterWord, 4,
|
||||
uintptr(unnamed0),
|
||||
uintptr(unsafe.Pointer(&lpszReadingStr[0])),
|
||||
uintptr(unnamed2),
|
||||
uintptr(unsafe.Pointer(&lpszRegisterStr[0])),
|
||||
0,
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func ImmReleaseContext(unnamed0 HWND, unnamed1 HIMC) bool {
|
||||
ret1 := syscall3(immReleaseContext, 2,
|
||||
uintptr(unnamed0),
|
||||
uintptr(unnamed1),
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func ImmSetCandidateWindow(unnamed0 HIMC, unnamed1 *CANDIDATEFORM) bool {
|
||||
ret1 := syscall3(immSetCandidateWindow, 2,
|
||||
uintptr(unnamed0),
|
||||
uintptr(unsafe.Pointer(unnamed1)),
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func ImmSetCompositionFont(unnamed0 HIMC, unnamed1 LPLOGFONT) bool {
|
||||
ret1 := syscall3(immSetCompositionFont, 2,
|
||||
uintptr(unnamed0),
|
||||
uintptr(unsafe.Pointer(unnamed1)),
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func ImmSetCompositionString(unnamed0 HIMC, dwIndex DWORD, lpComp LPVOID, unnamed3 DWORD, lpRead LPVOID, unnamed5 DWORD) bool {
|
||||
ret1 := syscall6(immSetCompositionString, 6,
|
||||
uintptr(unnamed0),
|
||||
uintptr(dwIndex),
|
||||
uintptr(unsafe.Pointer(lpComp)),
|
||||
uintptr(unnamed3),
|
||||
uintptr(unsafe.Pointer(lpRead)),
|
||||
uintptr(unnamed5))
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func ImmSetCompositionWindow(unnamed0 HIMC, unnamed1 *COMPOSITIONFORM) bool {
|
||||
ret1 := syscall3(immSetCompositionWindow, 2,
|
||||
uintptr(unnamed0),
|
||||
uintptr(unsafe.Pointer(unnamed1)),
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func ImmSetConversionStatus(unnamed0 HIMC, unnamed1 DWORD, unnamed2 DWORD) bool {
|
||||
ret1 := syscall3(immSetConversionStatus, 3,
|
||||
uintptr(unnamed0),
|
||||
uintptr(unnamed1),
|
||||
uintptr(unnamed2))
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func ImmSetOpenStatus(unnamed0 HIMC, unnamed1 bool) bool {
|
||||
ret1 := syscall3(immSetOpenStatus, 2,
|
||||
uintptr(unnamed0),
|
||||
getUintptrFromBool(unnamed1),
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func ImmSetStatusWindowPos(unnamed0 HIMC, unnamed1 *POINT) bool {
|
||||
ret1 := syscall3(immSetStatusWindowPos, 2,
|
||||
uintptr(unnamed0),
|
||||
uintptr(unsafe.Pointer(unnamed1)),
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func ImmSimulateHotKey(unnamed0 HWND, unnamed1 DWORD) bool {
|
||||
ret1 := syscall3(immSimulateHotKey, 2,
|
||||
uintptr(unnamed0),
|
||||
uintptr(unnamed1),
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func ImmUnregisterWord(unnamed0 HKL, lpszReading string, unnamed2 DWORD, lpszUnregister string) bool {
|
||||
lpszReadingStr := unicode16FromString(lpszReading)
|
||||
lpszUnregisterStr := unicode16FromString(lpszUnregister)
|
||||
ret1 := syscall6(immUnregisterWord, 4,
|
||||
uintptr(unnamed0),
|
||||
uintptr(unsafe.Pointer(&lpszReadingStr[0])),
|
||||
uintptr(unnamed2),
|
||||
uintptr(unsafe.Pointer(&lpszUnregisterStr[0])),
|
||||
0,
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func ImmCreateIMCC(size DWORD) HIMCC {
|
||||
ret1 := syscall3(immCreateIMCC, 1,
|
||||
uintptr(size),
|
||||
0,
|
||||
0)
|
||||
return HIMCC(ret1)
|
||||
}
|
||||
|
||||
func ImmCreateSoftKeyboard(uType UINT, hOwner UINT, x int32, y int32) HWND {
|
||||
ret1 := syscall6(immCreateSoftKeyboard, 4,
|
||||
uintptr(uType),
|
||||
uintptr(hOwner),
|
||||
uintptr(x),
|
||||
uintptr(y),
|
||||
0,
|
||||
0)
|
||||
return HWND(ret1)
|
||||
}
|
||||
|
||||
func ImmDestroyIMCC(block HIMCC) HIMCC {
|
||||
ret1 := syscall3(immDestroyIMCC, 1,
|
||||
uintptr(block),
|
||||
0,
|
||||
0)
|
||||
return HIMCC(ret1)
|
||||
}
|
||||
|
||||
func ImmDestroySoftKeyboard(hSoftWnd HWND) bool {
|
||||
ret1 := syscall3(immDestroySoftKeyboard, 1,
|
||||
uintptr(hSoftWnd),
|
||||
0,
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func ImmGenerateMessage(hIMC HIMC) bool {
|
||||
ret1 := syscall3(immGenerateMessage, 1,
|
||||
uintptr(hIMC),
|
||||
0,
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func ImmGetHotKey(hotkey DWORD, modifiers *UINT, key *UINT, hkl HKL) bool {
|
||||
ret1 := syscall6(immGetHotKey, 4,
|
||||
uintptr(hotkey),
|
||||
uintptr(unsafe.Pointer(modifiers)),
|
||||
uintptr(unsafe.Pointer(key)),
|
||||
uintptr(hkl),
|
||||
0,
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func ImmGetIMCCLockCount(imcc HIMCC) DWORD {
|
||||
ret1 := syscall3(immGetIMCCLockCount, 1,
|
||||
uintptr(imcc),
|
||||
0,
|
||||
0)
|
||||
return DWORD(ret1)
|
||||
}
|
||||
|
||||
func ImmGetIMCCSize(imcc HIMCC) DWORD {
|
||||
ret1 := syscall3(immGetIMCCSize, 1,
|
||||
uintptr(imcc),
|
||||
0,
|
||||
0)
|
||||
return DWORD(ret1)
|
||||
}
|
||||
|
||||
func ImmGetIMCLockCount(hIMC HIMC) DWORD {
|
||||
ret1 := syscall3(immGetIMCLockCount, 1,
|
||||
uintptr(hIMC),
|
||||
0,
|
||||
0)
|
||||
return DWORD(ret1)
|
||||
}
|
||||
|
||||
func ImmLockIMC(hIMC HIMC) *INPUTCONTEXT {
|
||||
ret1 := syscall3(immLockIMC, 1,
|
||||
uintptr(hIMC),
|
||||
0,
|
||||
0)
|
||||
return (*INPUTCONTEXT)(unsafe.Pointer(ret1))
|
||||
}
|
||||
|
||||
func ImmLockIMCC(imcc HIMCC) LPVOID {
|
||||
ret1 := syscall3(immLockIMCC, 1,
|
||||
uintptr(imcc),
|
||||
0,
|
||||
0)
|
||||
return (LPVOID)(unsafe.Pointer(ret1))
|
||||
}
|
||||
|
||||
func ImmProcessKey(hwnd HWND, hKL HKL, vKey UINT, lKeyData LPARAM, unknown DWORD) bool {
|
||||
ret1 := syscall6(immProcessKey, 5,
|
||||
uintptr(hwnd),
|
||||
uintptr(hKL),
|
||||
uintptr(vKey),
|
||||
uintptr(lKeyData),
|
||||
uintptr(unknown),
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func ImmReSizeIMCC(imcc HIMCC, size DWORD) HIMCC {
|
||||
ret1 := syscall3(immReSizeIMCC, 2,
|
||||
uintptr(imcc),
|
||||
uintptr(size),
|
||||
0)
|
||||
return HIMCC(ret1)
|
||||
}
|
||||
|
||||
func ImmRequestMessage(hIMC HIMC, wParam WPARAM, lParam LPARAM) LRESULT {
|
||||
ret1 := syscall3(immRequestMessage, 3,
|
||||
uintptr(hIMC),
|
||||
uintptr(wParam),
|
||||
uintptr(lParam))
|
||||
return LRESULT(ret1)
|
||||
}
|
||||
|
||||
func ImmShowSoftKeyboard(hSoftWnd HWND, nCmdShow int32) bool {
|
||||
ret1 := syscall3(immShowSoftKeyboard, 2,
|
||||
uintptr(hSoftWnd),
|
||||
uintptr(nCmdShow),
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func ImmTranslateMessage(hwnd HWND, msg UINT, wParam WPARAM, lKeyData LPARAM) bool {
|
||||
ret1 := syscall6(immTranslateMessage, 4,
|
||||
uintptr(hwnd),
|
||||
uintptr(msg),
|
||||
uintptr(wParam),
|
||||
uintptr(lKeyData),
|
||||
0,
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func ImmUnlockIMC(hIMC HIMC) bool {
|
||||
ret1 := syscall3(immUnlockIMC, 1,
|
||||
uintptr(hIMC),
|
||||
0,
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func ImmUnlockIMCC(imcc HIMCC) bool {
|
||||
ret1 := syscall3(immUnlockIMCC, 1,
|
||||
uintptr(imcc),
|
||||
0,
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
1250
grdp/win/iphlpapi.go
Normal file
1250
grdp/win/iphlpapi.go
Normal file
File diff suppressed because it is too large
Load Diff
8315
grdp/win/kernel32.go
Normal file
8315
grdp/win/kernel32.go
Normal file
File diff suppressed because it is too large
Load Diff
1893
grdp/win/ole32.go
Normal file
1893
grdp/win/ole32.go
Normal file
File diff suppressed because it is too large
Load Diff
3964
grdp/win/oleaut32.go
Normal file
3964
grdp/win/oleaut32.go
Normal file
File diff suppressed because it is too large
Load Diff
3503
grdp/win/opengl32.go
Normal file
3503
grdp/win/opengl32.go
Normal file
File diff suppressed because it is too large
Load Diff
328
grdp/win/pdh.go
Normal file
328
grdp/win/pdh.go
Normal file
@@ -0,0 +1,328 @@
|
||||
// This file was automatically generated by https://github.com/kbinani/win/blob/generator/internal/cmd/gen/gen.go
|
||||
// go run internal/cmd/gen/gen.go
|
||||
|
||||
// +build windows
|
||||
|
||||
package win
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var (
|
||||
// Library
|
||||
libpdh uintptr
|
||||
|
||||
// Functions
|
||||
pdhAddCounter uintptr
|
||||
pdhAddEnglishCounter uintptr
|
||||
pdhBindInputDataSource uintptr
|
||||
pdhCalculateCounterFromRawValue uintptr
|
||||
pdhCloseQuery uintptr
|
||||
pdhCollectQueryData uintptr
|
||||
pdhCollectQueryDataEx uintptr
|
||||
pdhCollectQueryDataWithTime uintptr
|
||||
pdhEnumObjectItems uintptr
|
||||
pdhExpandCounterPath uintptr
|
||||
pdhExpandWildCardPath uintptr
|
||||
pdhGetCounterInfo uintptr
|
||||
pdhGetCounterTimeBase uintptr
|
||||
pdhGetDllVersion uintptr
|
||||
pdhGetFormattedCounterValue uintptr
|
||||
pdhGetLogFileType uintptr
|
||||
pdhGetRawCounterValue uintptr
|
||||
pdhLookupPerfIndexByName uintptr
|
||||
pdhLookupPerfNameByIndex uintptr
|
||||
pdhMakeCounterPath uintptr
|
||||
pdhOpenQuery uintptr
|
||||
pdhRemoveCounter uintptr
|
||||
pdhSetCounterScaleFactor uintptr
|
||||
pdhSetDefaultRealTimeDataSource uintptr
|
||||
pdhValidatePathEx uintptr
|
||||
pdhValidatePath uintptr
|
||||
)
|
||||
|
||||
func init() {
|
||||
// Library
|
||||
libpdh = doLoadLibrary("pdh.dll")
|
||||
|
||||
// Functions
|
||||
pdhAddCounter = doGetProcAddress(libpdh, "PdhAddCounterW")
|
||||
pdhAddEnglishCounter = doGetProcAddress(libpdh, "PdhAddEnglishCounterW")
|
||||
pdhBindInputDataSource = doGetProcAddress(libpdh, "PdhBindInputDataSourceW")
|
||||
pdhCalculateCounterFromRawValue = doGetProcAddress(libpdh, "PdhCalculateCounterFromRawValue")
|
||||
pdhCloseQuery = doGetProcAddress(libpdh, "PdhCloseQuery")
|
||||
pdhCollectQueryData = doGetProcAddress(libpdh, "PdhCollectQueryData")
|
||||
pdhCollectQueryDataEx = doGetProcAddress(libpdh, "PdhCollectQueryDataEx")
|
||||
pdhCollectQueryDataWithTime = doGetProcAddress(libpdh, "PdhCollectQueryDataWithTime")
|
||||
pdhEnumObjectItems = doGetProcAddress(libpdh, "PdhEnumObjectItemsW")
|
||||
pdhExpandCounterPath = doGetProcAddress(libpdh, "PdhExpandCounterPathW")
|
||||
pdhExpandWildCardPath = doGetProcAddress(libpdh, "PdhExpandWildCardPathW")
|
||||
pdhGetCounterInfo = doGetProcAddress(libpdh, "PdhGetCounterInfoW")
|
||||
pdhGetCounterTimeBase = doGetProcAddress(libpdh, "PdhGetCounterTimeBase")
|
||||
pdhGetDllVersion = doGetProcAddress(libpdh, "PdhGetDllVersion")
|
||||
pdhGetFormattedCounterValue = doGetProcAddress(libpdh, "PdhGetFormattedCounterValue")
|
||||
pdhGetLogFileType = doGetProcAddress(libpdh, "PdhGetLogFileTypeW")
|
||||
pdhGetRawCounterValue = doGetProcAddress(libpdh, "PdhGetRawCounterValue")
|
||||
pdhLookupPerfIndexByName = doGetProcAddress(libpdh, "PdhLookupPerfIndexByNameW")
|
||||
pdhLookupPerfNameByIndex = doGetProcAddress(libpdh, "PdhLookupPerfNameByIndexW")
|
||||
pdhMakeCounterPath = doGetProcAddress(libpdh, "PdhMakeCounterPathW")
|
||||
pdhOpenQuery = doGetProcAddress(libpdh, "PdhOpenQueryW")
|
||||
pdhRemoveCounter = doGetProcAddress(libpdh, "PdhRemoveCounter")
|
||||
pdhSetCounterScaleFactor = doGetProcAddress(libpdh, "PdhSetCounterScaleFactor")
|
||||
pdhSetDefaultRealTimeDataSource = doGetProcAddress(libpdh, "PdhSetDefaultRealTimeDataSource")
|
||||
pdhValidatePathEx = doGetProcAddress(libpdh, "PdhValidatePathExW")
|
||||
pdhValidatePath = doGetProcAddress(libpdh, "PdhValidatePathW")
|
||||
}
|
||||
|
||||
func PdhAddCounter(hquery PDH_HQUERY, path string, userdata *uint32, hcounter *PDH_HCOUNTER) PDH_STATUS {
|
||||
pathStr := unicode16FromString(path)
|
||||
ret1 := syscall6(pdhAddCounter, 4,
|
||||
uintptr(hquery),
|
||||
uintptr(unsafe.Pointer(&pathStr[0])),
|
||||
uintptr(unsafe.Pointer(userdata)),
|
||||
uintptr(unsafe.Pointer(hcounter)),
|
||||
0,
|
||||
0)
|
||||
return PDH_STATUS(ret1)
|
||||
}
|
||||
|
||||
func PdhAddEnglishCounter(query PDH_HQUERY, path string, userdata *uint32, counter *PDH_HCOUNTER) PDH_STATUS {
|
||||
pathStr := unicode16FromString(path)
|
||||
ret1 := syscall6(pdhAddEnglishCounter, 4,
|
||||
uintptr(query),
|
||||
uintptr(unsafe.Pointer(&pathStr[0])),
|
||||
uintptr(unsafe.Pointer(userdata)),
|
||||
uintptr(unsafe.Pointer(counter)),
|
||||
0,
|
||||
0)
|
||||
return PDH_STATUS(ret1)
|
||||
}
|
||||
|
||||
func PdhBindInputDataSource(source *PDH_HLOG, filenamelist /*const*/ *WCHAR) PDH_STATUS {
|
||||
ret1 := syscall3(pdhBindInputDataSource, 2,
|
||||
uintptr(unsafe.Pointer(source)),
|
||||
uintptr(unsafe.Pointer(filenamelist)),
|
||||
0)
|
||||
return PDH_STATUS(ret1)
|
||||
}
|
||||
|
||||
func PdhCalculateCounterFromRawValue(handle PDH_HCOUNTER, format DWORD, raw1 *PDH_RAW_COUNTER, raw2 *PDH_RAW_COUNTER, value *PDH_FMT_COUNTERVALUE) PDH_STATUS {
|
||||
ret1 := syscall6(pdhCalculateCounterFromRawValue, 5,
|
||||
uintptr(handle),
|
||||
uintptr(format),
|
||||
uintptr(unsafe.Pointer(raw1)),
|
||||
uintptr(unsafe.Pointer(raw2)),
|
||||
uintptr(unsafe.Pointer(value)),
|
||||
0)
|
||||
return PDH_STATUS(ret1)
|
||||
}
|
||||
|
||||
func PdhCloseQuery(handle PDH_HQUERY) PDH_STATUS {
|
||||
ret1 := syscall3(pdhCloseQuery, 1,
|
||||
uintptr(handle),
|
||||
0,
|
||||
0)
|
||||
return PDH_STATUS(ret1)
|
||||
}
|
||||
|
||||
func PdhCollectQueryData(handle PDH_HQUERY) PDH_STATUS {
|
||||
ret1 := syscall3(pdhCollectQueryData, 1,
|
||||
uintptr(handle),
|
||||
0,
|
||||
0)
|
||||
return PDH_STATUS(ret1)
|
||||
}
|
||||
|
||||
func PdhCollectQueryDataEx(handle PDH_HQUERY, interval DWORD, event HANDLE) PDH_STATUS {
|
||||
ret1 := syscall3(pdhCollectQueryDataEx, 3,
|
||||
uintptr(handle),
|
||||
uintptr(interval),
|
||||
uintptr(event))
|
||||
return PDH_STATUS(ret1)
|
||||
}
|
||||
|
||||
func PdhCollectQueryDataWithTime(handle PDH_HQUERY, timestamp *LONGLONG) PDH_STATUS {
|
||||
ret1 := syscall3(pdhCollectQueryDataWithTime, 2,
|
||||
uintptr(handle),
|
||||
uintptr(unsafe.Pointer(timestamp)),
|
||||
0)
|
||||
return PDH_STATUS(ret1)
|
||||
}
|
||||
|
||||
func PdhEnumObjectItems(szDataSource string, szMachineName string, szObjectName string, mszCounterList LPWSTR, pcchCounterListLength *uint32, mszInstanceList LPWSTR, pcchInstanceListLength *uint32, dwDetailLevel DWORD, dwFlags DWORD) PDH_STATUS {
|
||||
szDataSourceStr := unicode16FromString(szDataSource)
|
||||
szMachineNameStr := unicode16FromString(szMachineName)
|
||||
szObjectNameStr := unicode16FromString(szObjectName)
|
||||
ret1 := syscall9(pdhEnumObjectItems, 9,
|
||||
uintptr(unsafe.Pointer(&szDataSourceStr[0])),
|
||||
uintptr(unsafe.Pointer(&szMachineNameStr[0])),
|
||||
uintptr(unsafe.Pointer(&szObjectNameStr[0])),
|
||||
uintptr(unsafe.Pointer(mszCounterList)),
|
||||
uintptr(unsafe.Pointer(pcchCounterListLength)),
|
||||
uintptr(unsafe.Pointer(mszInstanceList)),
|
||||
uintptr(unsafe.Pointer(pcchInstanceListLength)),
|
||||
uintptr(dwDetailLevel),
|
||||
uintptr(dwFlags))
|
||||
return PDH_STATUS(ret1)
|
||||
}
|
||||
|
||||
func PdhExpandCounterPath(szWildCardPath string, mszExpandedPathList LPWSTR, pcchPathListLength *uint32) PDH_STATUS {
|
||||
szWildCardPathStr := unicode16FromString(szWildCardPath)
|
||||
ret1 := syscall3(pdhExpandCounterPath, 3,
|
||||
uintptr(unsafe.Pointer(&szWildCardPathStr[0])),
|
||||
uintptr(unsafe.Pointer(mszExpandedPathList)),
|
||||
uintptr(unsafe.Pointer(pcchPathListLength)))
|
||||
return PDH_STATUS(ret1)
|
||||
}
|
||||
|
||||
func PdhExpandWildCardPath(szDataSource string, szWildCardPath string, mszExpandedPathList LPWSTR, pcchPathListLength *uint32, dwFlags DWORD) PDH_STATUS {
|
||||
szDataSourceStr := unicode16FromString(szDataSource)
|
||||
szWildCardPathStr := unicode16FromString(szWildCardPath)
|
||||
ret1 := syscall6(pdhExpandWildCardPath, 5,
|
||||
uintptr(unsafe.Pointer(&szDataSourceStr[0])),
|
||||
uintptr(unsafe.Pointer(&szWildCardPathStr[0])),
|
||||
uintptr(unsafe.Pointer(mszExpandedPathList)),
|
||||
uintptr(unsafe.Pointer(pcchPathListLength)),
|
||||
uintptr(dwFlags),
|
||||
0)
|
||||
return PDH_STATUS(ret1)
|
||||
}
|
||||
|
||||
func PdhGetCounterInfo(handle PDH_HCOUNTER, text BOOLEAN, size *uint32, info *PDH_COUNTER_INFO) PDH_STATUS {
|
||||
ret1 := syscall6(pdhGetCounterInfo, 4,
|
||||
uintptr(handle),
|
||||
uintptr(text),
|
||||
uintptr(unsafe.Pointer(size)),
|
||||
uintptr(unsafe.Pointer(info)),
|
||||
0,
|
||||
0)
|
||||
return PDH_STATUS(ret1)
|
||||
}
|
||||
|
||||
func PdhGetCounterTimeBase(handle PDH_HCOUNTER, base *LONGLONG) PDH_STATUS {
|
||||
ret1 := syscall3(pdhGetCounterTimeBase, 2,
|
||||
uintptr(handle),
|
||||
uintptr(unsafe.Pointer(base)),
|
||||
0)
|
||||
return PDH_STATUS(ret1)
|
||||
}
|
||||
|
||||
func PdhGetDllVersion(version *uint32) PDH_STATUS {
|
||||
ret1 := syscall3(pdhGetDllVersion, 1,
|
||||
uintptr(unsafe.Pointer(version)),
|
||||
0,
|
||||
0)
|
||||
return PDH_STATUS(ret1)
|
||||
}
|
||||
|
||||
func PdhGetFormattedCounterValue(handle PDH_HCOUNTER, format DWORD, aType *uint32, value *PDH_FMT_COUNTERVALUE) PDH_STATUS {
|
||||
ret1 := syscall6(pdhGetFormattedCounterValue, 4,
|
||||
uintptr(handle),
|
||||
uintptr(format),
|
||||
uintptr(unsafe.Pointer(aType)),
|
||||
uintptr(unsafe.Pointer(value)),
|
||||
0,
|
||||
0)
|
||||
return PDH_STATUS(ret1)
|
||||
}
|
||||
|
||||
func PdhGetLogFileType(log /*const*/ *WCHAR, aType *uint32) PDH_STATUS {
|
||||
ret1 := syscall3(pdhGetLogFileType, 2,
|
||||
uintptr(unsafe.Pointer(log)),
|
||||
uintptr(unsafe.Pointer(aType)),
|
||||
0)
|
||||
return PDH_STATUS(ret1)
|
||||
}
|
||||
|
||||
func PdhGetRawCounterValue(handle PDH_HCOUNTER, aType *uint32, value *PDH_RAW_COUNTER) PDH_STATUS {
|
||||
ret1 := syscall3(pdhGetRawCounterValue, 3,
|
||||
uintptr(handle),
|
||||
uintptr(unsafe.Pointer(aType)),
|
||||
uintptr(unsafe.Pointer(value)))
|
||||
return PDH_STATUS(ret1)
|
||||
}
|
||||
|
||||
func PdhLookupPerfIndexByName(machine string, name string, index *uint32) PDH_STATUS {
|
||||
machineStr := unicode16FromString(machine)
|
||||
nameStr := unicode16FromString(name)
|
||||
ret1 := syscall3(pdhLookupPerfIndexByName, 3,
|
||||
uintptr(unsafe.Pointer(&machineStr[0])),
|
||||
uintptr(unsafe.Pointer(&nameStr[0])),
|
||||
uintptr(unsafe.Pointer(index)))
|
||||
return PDH_STATUS(ret1)
|
||||
}
|
||||
|
||||
func PdhLookupPerfNameByIndex(machine string, index DWORD, buffer LPWSTR, size *uint32) PDH_STATUS {
|
||||
machineStr := unicode16FromString(machine)
|
||||
ret1 := syscall6(pdhLookupPerfNameByIndex, 4,
|
||||
uintptr(unsafe.Pointer(&machineStr[0])),
|
||||
uintptr(index),
|
||||
uintptr(unsafe.Pointer(buffer)),
|
||||
uintptr(unsafe.Pointer(size)),
|
||||
0,
|
||||
0)
|
||||
return PDH_STATUS(ret1)
|
||||
}
|
||||
|
||||
func PdhMakeCounterPath(e *PDH_COUNTER_PATH_ELEMENTS, buffer LPWSTR, buflen *uint32, flags DWORD) PDH_STATUS {
|
||||
ret1 := syscall6(pdhMakeCounterPath, 4,
|
||||
uintptr(unsafe.Pointer(e)),
|
||||
uintptr(unsafe.Pointer(buffer)),
|
||||
uintptr(unsafe.Pointer(buflen)),
|
||||
uintptr(flags),
|
||||
0,
|
||||
0)
|
||||
return PDH_STATUS(ret1)
|
||||
}
|
||||
|
||||
func PdhOpenQuery(source LPCWSTR, userdata *uint32, handle *PDH_HQUERY) PDH_STATUS {
|
||||
//sourceStr := unicode16FromString(source)
|
||||
ret1 := syscall3(pdhOpenQuery, 3,
|
||||
uintptr(unsafe.Pointer(source)),
|
||||
uintptr(unsafe.Pointer(userdata)),
|
||||
uintptr(unsafe.Pointer(handle)))
|
||||
return PDH_STATUS(ret1)
|
||||
}
|
||||
|
||||
func PdhRemoveCounter(handle PDH_HCOUNTER) PDH_STATUS {
|
||||
ret1 := syscall3(pdhRemoveCounter, 1,
|
||||
uintptr(handle),
|
||||
0,
|
||||
0)
|
||||
return PDH_STATUS(ret1)
|
||||
}
|
||||
|
||||
func PdhSetCounterScaleFactor(handle PDH_HCOUNTER, factor LONG) PDH_STATUS {
|
||||
ret1 := syscall3(pdhSetCounterScaleFactor, 2,
|
||||
uintptr(handle),
|
||||
uintptr(factor),
|
||||
0)
|
||||
return PDH_STATUS(ret1)
|
||||
}
|
||||
|
||||
func PdhSetDefaultRealTimeDataSource(source DWORD) PDH_STATUS {
|
||||
ret1 := syscall3(pdhSetDefaultRealTimeDataSource, 1,
|
||||
uintptr(source),
|
||||
0,
|
||||
0)
|
||||
return PDH_STATUS(ret1)
|
||||
}
|
||||
|
||||
func PdhValidatePathEx(source PDH_HLOG, path string) PDH_STATUS {
|
||||
pathStr := unicode16FromString(path)
|
||||
ret1 := syscall3(pdhValidatePathEx, 2,
|
||||
uintptr(source),
|
||||
uintptr(unsafe.Pointer(&pathStr[0])),
|
||||
0)
|
||||
return PDH_STATUS(ret1)
|
||||
}
|
||||
|
||||
func PdhValidatePath(path string) PDH_STATUS {
|
||||
pathStr := unicode16FromString(path)
|
||||
ret1 := syscall3(pdhValidatePath, 1,
|
||||
uintptr(unsafe.Pointer(&pathStr[0])),
|
||||
0,
|
||||
0)
|
||||
return PDH_STATUS(ret1)
|
||||
}
|
||||
248
grdp/win/psapi.go
Normal file
248
grdp/win/psapi.go
Normal file
@@ -0,0 +1,248 @@
|
||||
// This file was automatically generated by https://github.com/kbinani/win/blob/generator/internal/cmd/gen/gen.go
|
||||
// go run internal/cmd/gen/gen.go
|
||||
|
||||
// +build windows
|
||||
|
||||
package win
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var (
|
||||
// Library
|
||||
libpsapi uintptr
|
||||
|
||||
// Functions
|
||||
emptyWorkingSet uintptr
|
||||
enumDeviceDrivers uintptr
|
||||
enumPageFiles uintptr
|
||||
enumProcessModules uintptr
|
||||
enumProcessModulesEx uintptr
|
||||
enumProcesses uintptr
|
||||
getDeviceDriverBaseName uintptr
|
||||
getDeviceDriverFileName uintptr
|
||||
getMappedFileName uintptr
|
||||
getModuleBaseName uintptr
|
||||
getModuleFileNameEx uintptr
|
||||
getModuleInformation uintptr
|
||||
getPerformanceInfo uintptr
|
||||
getProcessImageFileName uintptr
|
||||
getProcessMemoryInfo uintptr
|
||||
getWsChanges uintptr
|
||||
getWsChangesEx uintptr
|
||||
initializeProcessForWsWatch uintptr
|
||||
queryWorkingSet uintptr
|
||||
queryWorkingSetEx uintptr
|
||||
)
|
||||
|
||||
func init() {
|
||||
// Library
|
||||
libpsapi = doLoadLibrary("psapi.dll")
|
||||
|
||||
// Functions
|
||||
emptyWorkingSet = doGetProcAddress(libpsapi, "EmptyWorkingSet")
|
||||
enumDeviceDrivers = doGetProcAddress(libpsapi, "EnumDeviceDrivers")
|
||||
enumPageFiles = doGetProcAddress(libpsapi, "EnumPageFilesW")
|
||||
enumProcessModules = doGetProcAddress(libpsapi, "EnumProcessModules")
|
||||
enumProcessModulesEx = doGetProcAddress(libpsapi, "EnumProcessModulesEx")
|
||||
enumProcesses = doGetProcAddress(libpsapi, "EnumProcesses")
|
||||
getDeviceDriverBaseName = doGetProcAddress(libpsapi, "GetDeviceDriverBaseNameW")
|
||||
getDeviceDriverFileName = doGetProcAddress(libpsapi, "GetDeviceDriverFileNameW")
|
||||
getMappedFileName = doGetProcAddress(libpsapi, "GetMappedFileNameW")
|
||||
getModuleBaseName = doGetProcAddress(libpsapi, "GetModuleBaseNameW")
|
||||
getModuleFileNameEx = doGetProcAddress(libpsapi, "GetModuleFileNameExW")
|
||||
getModuleInformation = doGetProcAddress(libpsapi, "GetModuleInformation")
|
||||
getPerformanceInfo = doGetProcAddress(libpsapi, "GetPerformanceInfo")
|
||||
getProcessImageFileName = doGetProcAddress(libpsapi, "GetProcessImageFileNameW")
|
||||
getProcessMemoryInfo = doGetProcAddress(libpsapi, "GetProcessMemoryInfo")
|
||||
getWsChanges = doGetProcAddress(libpsapi, "GetWsChanges")
|
||||
getWsChangesEx = doGetProcAddress(libpsapi, "GetWsChangesEx")
|
||||
initializeProcessForWsWatch = doGetProcAddress(libpsapi, "InitializeProcessForWsWatch")
|
||||
queryWorkingSet = doGetProcAddress(libpsapi, "QueryWorkingSet")
|
||||
queryWorkingSetEx = doGetProcAddress(libpsapi, "QueryWorkingSetEx")
|
||||
}
|
||||
|
||||
func EmptyWorkingSet(hProcess HANDLE) bool {
|
||||
ret1 := syscall3(emptyWorkingSet, 1,
|
||||
uintptr(hProcess),
|
||||
0,
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func EnumDeviceDrivers(lpImageBase *LPVOID, cb DWORD, lpcbNeeded *uint32) bool {
|
||||
ret1 := syscall3(enumDeviceDrivers, 3,
|
||||
uintptr(unsafe.Pointer(lpImageBase)),
|
||||
uintptr(cb),
|
||||
uintptr(unsafe.Pointer(lpcbNeeded)))
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func EnumPageFiles(pCallBackRoutine PENUM_PAGE_FILE_CALLBACK, pContext LPVOID) bool {
|
||||
pCallBackRoutineCallback := syscall.NewCallback(func(pContextRawArg LPVOID, pPageFileInfoRawArg PENUM_PAGE_FILE_INFORMATION, lpFilenameRawArg /*const*/ *uint16) uintptr {
|
||||
lpFilename := stringFromUnicode16(lpFilenameRawArg)
|
||||
ret := pCallBackRoutine(pContextRawArg, pPageFileInfoRawArg, lpFilename)
|
||||
return uintptr(ret)
|
||||
})
|
||||
ret1 := syscall3(enumPageFiles, 2,
|
||||
pCallBackRoutineCallback,
|
||||
uintptr(unsafe.Pointer(pContext)),
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func EnumProcessModules(hProcess HANDLE, lphModule *HMODULE, cb DWORD, lpcbNeeded *uint32) bool {
|
||||
ret1 := syscall6(enumProcessModules, 4,
|
||||
uintptr(hProcess),
|
||||
uintptr(unsafe.Pointer(lphModule)),
|
||||
uintptr(cb),
|
||||
uintptr(unsafe.Pointer(lpcbNeeded)),
|
||||
0,
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func EnumProcessModulesEx(hProcess HANDLE, lphModule *HMODULE, cb DWORD, lpcbNeeded *uint32, dwFilterFlag DWORD) bool {
|
||||
ret1 := syscall6(enumProcessModulesEx, 5,
|
||||
uintptr(hProcess),
|
||||
uintptr(unsafe.Pointer(lphModule)),
|
||||
uintptr(cb),
|
||||
uintptr(unsafe.Pointer(lpcbNeeded)),
|
||||
uintptr(dwFilterFlag),
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func EnumProcesses(lpidProcess *uint32, cb DWORD, cbNeeded *uint32) bool {
|
||||
ret1 := syscall3(enumProcesses, 3,
|
||||
uintptr(unsafe.Pointer(lpidProcess)),
|
||||
uintptr(cb),
|
||||
uintptr(unsafe.Pointer(cbNeeded)))
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func GetDeviceDriverBaseName(imageBase LPVOID, lpBaseName LPWSTR, nSize DWORD) DWORD {
|
||||
ret1 := syscall3(getDeviceDriverBaseName, 3,
|
||||
uintptr(unsafe.Pointer(imageBase)),
|
||||
uintptr(unsafe.Pointer(lpBaseName)),
|
||||
uintptr(nSize))
|
||||
return DWORD(ret1)
|
||||
}
|
||||
|
||||
func GetDeviceDriverFileName(imageBase LPVOID, lpFilename LPWSTR, nSize DWORD) DWORD {
|
||||
ret1 := syscall3(getDeviceDriverFileName, 3,
|
||||
uintptr(unsafe.Pointer(imageBase)),
|
||||
uintptr(unsafe.Pointer(lpFilename)),
|
||||
uintptr(nSize))
|
||||
return DWORD(ret1)
|
||||
}
|
||||
|
||||
func GetMappedFileName(hProcess HANDLE, lpv LPVOID, lpFilename LPWSTR, nSize DWORD) DWORD {
|
||||
ret1 := syscall6(getMappedFileName, 4,
|
||||
uintptr(hProcess),
|
||||
uintptr(unsafe.Pointer(lpv)),
|
||||
uintptr(unsafe.Pointer(lpFilename)),
|
||||
uintptr(nSize),
|
||||
0,
|
||||
0)
|
||||
return DWORD(ret1)
|
||||
}
|
||||
|
||||
func GetModuleBaseName(hProcess HANDLE, hModule HMODULE, lpBaseName LPWSTR, nSize DWORD) DWORD {
|
||||
ret1 := syscall6(getModuleBaseName, 4,
|
||||
uintptr(hProcess),
|
||||
uintptr(hModule),
|
||||
uintptr(unsafe.Pointer(lpBaseName)),
|
||||
uintptr(nSize),
|
||||
0,
|
||||
0)
|
||||
return DWORD(ret1)
|
||||
}
|
||||
|
||||
func GetModuleFileNameEx(hProcess HANDLE, hModule HMODULE, lpFilename LPWSTR, nSize DWORD) DWORD {
|
||||
ret1 := syscall6(getModuleFileNameEx, 4,
|
||||
uintptr(hProcess),
|
||||
uintptr(hModule),
|
||||
uintptr(unsafe.Pointer(lpFilename)),
|
||||
uintptr(nSize),
|
||||
0,
|
||||
0)
|
||||
return DWORD(ret1)
|
||||
}
|
||||
|
||||
func GetModuleInformation(hProcess HANDLE, hModule HMODULE, lpmodinfo *MODULEINFO, cb DWORD) bool {
|
||||
ret1 := syscall6(getModuleInformation, 4,
|
||||
uintptr(hProcess),
|
||||
uintptr(hModule),
|
||||
uintptr(unsafe.Pointer(lpmodinfo)),
|
||||
uintptr(cb),
|
||||
0,
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func GetPerformanceInfo(pPerformanceInformation PPERFORMACE_INFORMATION, cb DWORD) bool {
|
||||
ret1 := syscall3(getPerformanceInfo, 2,
|
||||
uintptr(unsafe.Pointer(pPerformanceInformation)),
|
||||
uintptr(cb),
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func GetProcessImageFileName(hProcess HANDLE, lpImageFileName LPWSTR, nSize DWORD) DWORD {
|
||||
ret1 := syscall3(getProcessImageFileName, 3,
|
||||
uintptr(hProcess),
|
||||
uintptr(unsafe.Pointer(lpImageFileName)),
|
||||
uintptr(nSize))
|
||||
return DWORD(ret1)
|
||||
}
|
||||
|
||||
func GetProcessMemoryInfo(process HANDLE, ppsmemCounters PPROCESS_MEMORY_COUNTERS, cb DWORD) bool {
|
||||
ret1 := syscall3(getProcessMemoryInfo, 3,
|
||||
uintptr(process),
|
||||
uintptr(unsafe.Pointer(ppsmemCounters)),
|
||||
uintptr(cb))
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func GetWsChanges(hProcess HANDLE, lpWatchInfo PPSAPI_WS_WATCH_INFORMATION, cb DWORD) bool {
|
||||
ret1 := syscall3(getWsChanges, 3,
|
||||
uintptr(hProcess),
|
||||
uintptr(unsafe.Pointer(lpWatchInfo)),
|
||||
uintptr(cb))
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func GetWsChangesEx(hProcess HANDLE, lpWatchInfoEx PPSAPI_WS_WATCH_INFORMATION_EX, cb DWORD) bool {
|
||||
ret1 := syscall3(getWsChangesEx, 3,
|
||||
uintptr(hProcess),
|
||||
uintptr(unsafe.Pointer(lpWatchInfoEx)),
|
||||
uintptr(cb))
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func InitializeProcessForWsWatch(hProcess HANDLE) bool {
|
||||
ret1 := syscall3(initializeProcessForWsWatch, 1,
|
||||
uintptr(hProcess),
|
||||
0,
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func QueryWorkingSet(hProcess HANDLE, pv uintptr, cb DWORD) bool {
|
||||
ret1 := syscall3(queryWorkingSet, 3,
|
||||
uintptr(hProcess),
|
||||
pv,
|
||||
uintptr(cb))
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func QueryWorkingSetEx(hProcess HANDLE, pv uintptr, cb DWORD) bool {
|
||||
ret1 := syscall3(queryWorkingSetEx, 3,
|
||||
uintptr(hProcess),
|
||||
pv,
|
||||
uintptr(cb))
|
||||
return ret1 != 0
|
||||
}
|
||||
1382
grdp/win/rpcrt4.go
Normal file
1382
grdp/win/rpcrt4.go
Normal file
File diff suppressed because it is too large
Load Diff
1908
grdp/win/shell32.go
Normal file
1908
grdp/win/shell32.go
Normal file
File diff suppressed because it is too large
Load Diff
2366
grdp/win/shlwapi.go
Normal file
2366
grdp/win/shlwapi.go
Normal file
File diff suppressed because it is too large
Load Diff
6225
grdp/win/types.go
Normal file
6225
grdp/win/types.go
Normal file
File diff suppressed because it is too large
Load Diff
340
grdp/win/types_386.go
Normal file
340
grdp/win/types_386.go
Normal file
@@ -0,0 +1,340 @@
|
||||
// This file was automatically generated by https://github.com/kbinani/win/blob/generator/internal/cmd/gen/gen.go
|
||||
|
||||
package win
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type INPUTCONTEXT struct {
|
||||
storage [320]byte
|
||||
}
|
||||
|
||||
func (this *INPUTCONTEXT) HWnd() *HWND { // 4
|
||||
return (*HWND)(unsafe.Pointer(&this.storage[0]))
|
||||
}
|
||||
func (this *INPUTCONTEXT) FOpen() *BOOL { // 4
|
||||
return (*BOOL)(unsafe.Pointer(&this.storage[4]))
|
||||
}
|
||||
func (this *INPUTCONTEXT) PtStatusWndPos() *POINT { // 8
|
||||
return (*POINT)(unsafe.Pointer(&this.storage[8]))
|
||||
}
|
||||
func (this *INPUTCONTEXT) PtSoftKbdPos() *POINT { // 8
|
||||
return (*POINT)(unsafe.Pointer(&this.storage[16]))
|
||||
}
|
||||
func (this *INPUTCONTEXT) FdwConversion() *DWORD { // 4
|
||||
return (*DWORD)(unsafe.Pointer(&this.storage[24]))
|
||||
}
|
||||
func (this *INPUTCONTEXT) FdwSentence() *DWORD { // 4
|
||||
return (*DWORD)(unsafe.Pointer(&this.storage[28]))
|
||||
}
|
||||
func (this *INPUTCONTEXT) LfFont() *LOGFONT { // 92
|
||||
return (*LOGFONT)(unsafe.Pointer(&this.storage[32]))
|
||||
}
|
||||
func (this *INPUTCONTEXT) CfCompForm() *COMPOSITIONFORM { // 28
|
||||
return (*COMPOSITIONFORM)(unsafe.Pointer(&this.storage[124]))
|
||||
}
|
||||
func (this *INPUTCONTEXT) CfCandForm() *[4]CANDIDATEFORM { // 128
|
||||
return (*[4]CANDIDATEFORM)(unsafe.Pointer(&this.storage[152]))
|
||||
}
|
||||
func (this *INPUTCONTEXT) HCompStr() *HIMCC { // 4
|
||||
return (*HIMCC)(unsafe.Pointer(&this.storage[280]))
|
||||
}
|
||||
func (this *INPUTCONTEXT) HCandInfo() *HIMCC { // 4
|
||||
return (*HIMCC)(unsafe.Pointer(&this.storage[284]))
|
||||
}
|
||||
func (this *INPUTCONTEXT) HGuideLine() *HIMCC { // 4
|
||||
return (*HIMCC)(unsafe.Pointer(&this.storage[288]))
|
||||
}
|
||||
func (this *INPUTCONTEXT) HPrivate() *HIMCC { // 4
|
||||
return (*HIMCC)(unsafe.Pointer(&this.storage[292]))
|
||||
}
|
||||
func (this *INPUTCONTEXT) DwNumMsgBuf() *DWORD { // 4
|
||||
return (*DWORD)(unsafe.Pointer(&this.storage[296]))
|
||||
}
|
||||
func (this *INPUTCONTEXT) HMsgBuf() *HIMCC { // 4
|
||||
return (*HIMCC)(unsafe.Pointer(&this.storage[300]))
|
||||
}
|
||||
func (this *INPUTCONTEXT) FdwInit() *DWORD { // 4
|
||||
return (*DWORD)(unsafe.Pointer(&this.storage[304]))
|
||||
}
|
||||
func (this *INPUTCONTEXT) DwReserve() *[3]DWORD { // 12
|
||||
return (*[3]DWORD)(unsafe.Pointer(&this.storage[308]))
|
||||
}
|
||||
|
||||
type IP_ADAPTER_ADDRESSES_LH struct {
|
||||
union1 ULONGLONG
|
||||
Next *IP_ADAPTER_ADDRESSES_LH
|
||||
AdapterName PCHAR
|
||||
FirstUnicastAddress PIP_ADAPTER_UNICAST_ADDRESS_LH
|
||||
FirstAnycastAddress PIP_ADAPTER_ANYCAST_ADDRESS_XP
|
||||
FirstMulticastAddress PIP_ADAPTER_MULTICAST_ADDRESS_XP
|
||||
FirstDnsServerAddress PIP_ADAPTER_DNS_SERVER_ADDRESS_XP
|
||||
DnsSuffix PWCHAR
|
||||
Description PWCHAR
|
||||
FriendlyName PWCHAR
|
||||
PhysicalAddress [MAX_ADAPTER_ADDRESS_LENGTH]BYTE
|
||||
PhysicalAddressLength ULONG
|
||||
union2 ULONG
|
||||
Mtu ULONG
|
||||
IfType IFTYPE
|
||||
OperStatus IF_OPER_STATUS
|
||||
Ipv6IfIndex IF_INDEX
|
||||
ZoneIndices [16]ULONG
|
||||
FirstPrefix PIP_ADAPTER_PREFIX_XP
|
||||
TransmitLinkSpeed ULONG64
|
||||
ReceiveLinkSpeed ULONG64
|
||||
FirstWinsServerAddress PIP_ADAPTER_WINS_SERVER_ADDRESS_LH
|
||||
FirstGatewayAddress PIP_ADAPTER_GATEWAY_ADDRESS_LH
|
||||
Ipv4Metric ULONG
|
||||
Ipv6Metric ULONG
|
||||
Luid IF_LUID
|
||||
Dhcpv4Server SOCKET_ADDRESS
|
||||
CompartmentId NET_IF_COMPARTMENT_ID
|
||||
NetworkGuid NET_IF_NETWORK_GUID
|
||||
ConnectionType NET_IF_CONNECTION_TYPE
|
||||
TunnelType TUNNEL_TYPE
|
||||
Dhcpv6Server SOCKET_ADDRESS
|
||||
Dhcpv6ClientDuid [MAX_DHCPV6_DUID_LENGTH]BYTE
|
||||
Dhcpv6ClientDuidLength ULONG
|
||||
Dhcpv6Iaid ULONG
|
||||
FirstDnsSuffix PIP_ADAPTER_DNS_SUFFIX
|
||||
padding1 [4]byte
|
||||
}
|
||||
type IP_ADAPTER_ANYCAST_ADDRESS_XP struct {
|
||||
union1 ULONGLONG
|
||||
Next *IP_ADAPTER_ANYCAST_ADDRESS_XP
|
||||
Address SOCKET_ADDRESS
|
||||
padding1 [4]byte
|
||||
}
|
||||
type IP_ADAPTER_DNS_SERVER_ADDRESS_XP struct {
|
||||
union1 ULONGLONG
|
||||
Next *IP_ADAPTER_DNS_SERVER_ADDRESS_XP
|
||||
Address SOCKET_ADDRESS
|
||||
padding1 [4]byte
|
||||
}
|
||||
type IP_ADAPTER_GATEWAY_ADDRESS_LH struct {
|
||||
union1 ULONGLONG
|
||||
Next *IP_ADAPTER_GATEWAY_ADDRESS_LH
|
||||
Address SOCKET_ADDRESS
|
||||
padding1 [4]byte
|
||||
}
|
||||
type IP_ADAPTER_MULTICAST_ADDRESS_XP struct {
|
||||
union1 ULONGLONG
|
||||
Next *IP_ADAPTER_MULTICAST_ADDRESS_XP
|
||||
Address SOCKET_ADDRESS
|
||||
padding1 [4]byte
|
||||
}
|
||||
type IP_ADAPTER_WINS_SERVER_ADDRESS_LH struct {
|
||||
union1 ULONGLONG
|
||||
Next *IP_ADAPTER_WINS_SERVER_ADDRESS_LH
|
||||
Address SOCKET_ADDRESS
|
||||
padding1 [4]byte
|
||||
}
|
||||
type MIDIHDR struct {
|
||||
storage [64]byte
|
||||
}
|
||||
|
||||
func (this *MIDIHDR) LpData() *LPSTR { // 4
|
||||
return (*LPSTR)(unsafe.Pointer(&this.storage[0]))
|
||||
}
|
||||
func (this *MIDIHDR) DwBufferLength() *DWORD { // 4
|
||||
return (*DWORD)(unsafe.Pointer(&this.storage[4]))
|
||||
}
|
||||
func (this *MIDIHDR) DwBytesRecorded() *DWORD { // 4
|
||||
return (*DWORD)(unsafe.Pointer(&this.storage[8]))
|
||||
}
|
||||
func (this *MIDIHDR) DwUser() *DWORD_PTR { // 4
|
||||
return (*DWORD_PTR)(unsafe.Pointer(&this.storage[12]))
|
||||
}
|
||||
func (this *MIDIHDR) DwFlags() *DWORD { // 4
|
||||
return (*DWORD)(unsafe.Pointer(&this.storage[16]))
|
||||
}
|
||||
func (this *MIDIHDR) LpNext() **MIDIHDR { // 4
|
||||
return (**MIDIHDR)(unsafe.Pointer(&this.storage[20]))
|
||||
}
|
||||
func (this *MIDIHDR) Reserved() *DWORD_PTR { // 4
|
||||
return (*DWORD_PTR)(unsafe.Pointer(&this.storage[24]))
|
||||
}
|
||||
func (this *MIDIHDR) DwOffset() *DWORD { // 4
|
||||
return (*DWORD)(unsafe.Pointer(&this.storage[28]))
|
||||
}
|
||||
func (this *MIDIHDR) DwReserved() *[8]DWORD_PTR { // 32
|
||||
return (*[8]DWORD_PTR)(unsafe.Pointer(&this.storage[32]))
|
||||
}
|
||||
|
||||
type MIXERLINECONTROLS struct {
|
||||
CbStruct DWORD
|
||||
DwLineID DWORD
|
||||
union1 DWORD
|
||||
CControls DWORD
|
||||
Cbmxctrl DWORD
|
||||
storage1 [4]byte
|
||||
}
|
||||
type PRINTDLG struct {
|
||||
storage [66]byte
|
||||
}
|
||||
|
||||
func (this *PRINTDLG) LStructSize() *DWORD { // 4
|
||||
return (*DWORD)(unsafe.Pointer(&this.storage[0]))
|
||||
}
|
||||
func (this *PRINTDLG) HwndOwner() *HWND { // 4
|
||||
return (*HWND)(unsafe.Pointer(&this.storage[4]))
|
||||
}
|
||||
func (this *PRINTDLG) HDevMode() *HGLOBAL { // 4
|
||||
return (*HGLOBAL)(unsafe.Pointer(&this.storage[8]))
|
||||
}
|
||||
func (this *PRINTDLG) HDevNames() *HGLOBAL { // 4
|
||||
return (*HGLOBAL)(unsafe.Pointer(&this.storage[12]))
|
||||
}
|
||||
func (this *PRINTDLG) HDC() *HDC { // 4
|
||||
return (*HDC)(unsafe.Pointer(&this.storage[16]))
|
||||
}
|
||||
func (this *PRINTDLG) Flags() *DWORD { // 4
|
||||
return (*DWORD)(unsafe.Pointer(&this.storage[20]))
|
||||
}
|
||||
func (this *PRINTDLG) NFromPage() *WORD { // 2
|
||||
return (*WORD)(unsafe.Pointer(&this.storage[24]))
|
||||
}
|
||||
func (this *PRINTDLG) NToPage() *WORD { // 2
|
||||
return (*WORD)(unsafe.Pointer(&this.storage[26]))
|
||||
}
|
||||
func (this *PRINTDLG) NMinPage() *WORD { // 2
|
||||
return (*WORD)(unsafe.Pointer(&this.storage[28]))
|
||||
}
|
||||
func (this *PRINTDLG) NMaxPage() *WORD { // 2
|
||||
return (*WORD)(unsafe.Pointer(&this.storage[30]))
|
||||
}
|
||||
func (this *PRINTDLG) NCopies() *WORD { // 2
|
||||
return (*WORD)(unsafe.Pointer(&this.storage[32]))
|
||||
}
|
||||
func (this *PRINTDLG) HInstance() *HINSTANCE { // 4
|
||||
return (*HINSTANCE)(unsafe.Pointer(&this.storage[34]))
|
||||
}
|
||||
func (this *PRINTDLG) LCustData() *LPARAM { // 4
|
||||
return (*LPARAM)(unsafe.Pointer(&this.storage[38]))
|
||||
}
|
||||
func (this *PRINTDLG) LpfnPrintHook() *uintptr { // 4
|
||||
return (*uintptr)(unsafe.Pointer(&this.storage[42]))
|
||||
}
|
||||
func (this *PRINTDLG) LpfnSetupHook() *uintptr { // 4
|
||||
return (*uintptr)(unsafe.Pointer(&this.storage[46]))
|
||||
}
|
||||
func (this *PRINTDLG) LpPrintTemplateName() *LPCWSTR { // 4
|
||||
return (*LPCWSTR)(unsafe.Pointer(&this.storage[50]))
|
||||
}
|
||||
func (this *PRINTDLG) LpSetupTemplateName() *LPCWSTR { // 4
|
||||
return (*LPCWSTR)(unsafe.Pointer(&this.storage[54]))
|
||||
}
|
||||
func (this *PRINTDLG) HPrintTemplate() *HGLOBAL { // 4
|
||||
return (*HGLOBAL)(unsafe.Pointer(&this.storage[58]))
|
||||
}
|
||||
func (this *PRINTDLG) HSetupTemplate() *HGLOBAL { // 4
|
||||
return (*HGLOBAL)(unsafe.Pointer(&this.storage[62]))
|
||||
}
|
||||
|
||||
type SIZE_T uint32
|
||||
type STRRET struct {
|
||||
UType UINT
|
||||
cStr [260]byte
|
||||
}
|
||||
type TASKDIALOGCONFIG struct {
|
||||
storage [96]byte
|
||||
}
|
||||
|
||||
func (this *TASKDIALOGCONFIG) CbSize() *UINT {
|
||||
return (*UINT)(unsafe.Pointer(&this.storage[0]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) HwndParent() *HWND {
|
||||
return (*HWND)(unsafe.Pointer(&this.storage[4]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) HInstance() *HINSTANCE {
|
||||
return (*HINSTANCE)(unsafe.Pointer(&this.storage[8]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) DwFlags() *TASKDIALOG_FLAGS {
|
||||
return (*TASKDIALOG_FLAGS)(unsafe.Pointer(&this.storage[12]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) DwCommonButtons() *TASKDIALOG_COMMON_BUTTON_FLAGS {
|
||||
return (*TASKDIALOG_COMMON_BUTTON_FLAGS)(unsafe.Pointer(&this.storage[16]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) PszWindowTitle() *PCWSTR {
|
||||
return (*PCWSTR)(unsafe.Pointer(&this.storage[20]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) HMainIcon() *HICON {
|
||||
return (*HICON)(unsafe.Pointer(&this.storage[24]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) PszMainIcon() *PCWSTR {
|
||||
return (*PCWSTR)(unsafe.Pointer(&this.storage[24]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) PszMainInstruction() *PCWSTR {
|
||||
return (*PCWSTR)(unsafe.Pointer(&this.storage[28]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) PszContent() *PCWSTR {
|
||||
return (*PCWSTR)(unsafe.Pointer(&this.storage[32]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) CButtons() *UINT {
|
||||
return (*UINT)(unsafe.Pointer(&this.storage[36]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) PButtons() **TASKDIALOG_BUTTON {
|
||||
return (**TASKDIALOG_BUTTON)(unsafe.Pointer(&this.storage[40]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) NDefaultButton() *int32 {
|
||||
return (*int32)(unsafe.Pointer(&this.storage[44]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) CRadioButtons() *UINT {
|
||||
return (*UINT)(unsafe.Pointer(&this.storage[48]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) PRadioButtons() **TASKDIALOG_BUTTON {
|
||||
return (**TASKDIALOG_BUTTON)(unsafe.Pointer(&this.storage[52]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) NDefaultRadioButton() *int32 {
|
||||
return (*int32)(unsafe.Pointer(&this.storage[56]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) PszVerificationText() *PCWSTR {
|
||||
return (*PCWSTR)(unsafe.Pointer(&this.storage[60]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) PszExpandedInformation() *PCWSTR {
|
||||
return (*PCWSTR)(unsafe.Pointer(&this.storage[64]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) PszExpandedControlText() *PCWSTR {
|
||||
return (*PCWSTR)(unsafe.Pointer(&this.storage[68]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) PszCollapsedControlText() *PCWSTR {
|
||||
return (*PCWSTR)(unsafe.Pointer(&this.storage[72]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) HFooterIcon() *HICON {
|
||||
return (*HICON)(unsafe.Pointer(&this.storage[76]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) PszFooterIcon() *PCWSTR {
|
||||
return (*PCWSTR)(unsafe.Pointer(&this.storage[76]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) PszFooter() *PCWSTR {
|
||||
return (*PCWSTR)(unsafe.Pointer(&this.storage[80]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) PfCallback() *uintptr {
|
||||
return (*uintptr)(unsafe.Pointer(&this.storage[84]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) LpCallbackData() *LONG_PTR {
|
||||
return (*LONG_PTR)(unsafe.Pointer(&this.storage[88]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) CxWidth() *UINT {
|
||||
return (*UINT)(unsafe.Pointer(&this.storage[92]))
|
||||
}
|
||||
|
||||
type VARIANT struct {
|
||||
union1 [16]byte
|
||||
}
|
||||
|
||||
func (this *VARIANT) PRecInfo() *IRecordInfo {
|
||||
return (*IRecordInfo)(unsafe.Pointer(&this.union1[12]))
|
||||
}
|
||||
|
||||
type WSADATA struct {
|
||||
WVersion uint16
|
||||
WHighVersion uint16
|
||||
SzDescription [WSADESCRIPTION_LEN + 1]byte
|
||||
SzSystemStatus [WSASYS_STATUS_LEN + 1]byte
|
||||
IMaxSockets uint16
|
||||
IMaxUdpDg uint16
|
||||
LpVendorInfo *byte
|
||||
}
|
||||
337
grdp/win/types_amd64.go
Normal file
337
grdp/win/types_amd64.go
Normal file
@@ -0,0 +1,337 @@
|
||||
// This file was automatically generated by https://github.com/kbinani/win/blob/generator/internal/cmd/gen/gen.go
|
||||
|
||||
package win
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type INPUTCONTEXT struct {
|
||||
storage [352]byte
|
||||
}
|
||||
|
||||
func (this *INPUTCONTEXT) HWnd() *HWND { // 8
|
||||
return (*HWND)(unsafe.Pointer(&this.storage[0]))
|
||||
}
|
||||
func (this *INPUTCONTEXT) FOpen() *BOOL { // 4
|
||||
return (*BOOL)(unsafe.Pointer(&this.storage[8]))
|
||||
}
|
||||
func (this *INPUTCONTEXT) PtStatusWndPos() *POINT { // 8
|
||||
return (*POINT)(unsafe.Pointer(&this.storage[12]))
|
||||
}
|
||||
func (this *INPUTCONTEXT) PtSoftKbdPos() *POINT { // 8
|
||||
return (*POINT)(unsafe.Pointer(&this.storage[20]))
|
||||
}
|
||||
func (this *INPUTCONTEXT) FdwConversion() *DWORD { // 4
|
||||
return (*DWORD)(unsafe.Pointer(&this.storage[28]))
|
||||
}
|
||||
func (this *INPUTCONTEXT) FdwSentence() *DWORD { // 4
|
||||
return (*DWORD)(unsafe.Pointer(&this.storage[32]))
|
||||
}
|
||||
func (this *INPUTCONTEXT) LfFont() *LOGFONT { // 92
|
||||
return (*LOGFONT)(unsafe.Pointer(&this.storage[36]))
|
||||
}
|
||||
func (this *INPUTCONTEXT) CfCompForm() *COMPOSITIONFORM { // 28
|
||||
return (*COMPOSITIONFORM)(unsafe.Pointer(&this.storage[128]))
|
||||
}
|
||||
func (this *INPUTCONTEXT) CfCandForm() *[4]CANDIDATEFORM { // 128
|
||||
return (*[4]CANDIDATEFORM)(unsafe.Pointer(&this.storage[156]))
|
||||
}
|
||||
func (this *INPUTCONTEXT) HCompStr() *HIMCC { // 8
|
||||
return (*HIMCC)(unsafe.Pointer(&this.storage[288]))
|
||||
}
|
||||
func (this *INPUTCONTEXT) HCandInfo() *HIMCC { // 8
|
||||
return (*HIMCC)(unsafe.Pointer(&this.storage[296]))
|
||||
}
|
||||
func (this *INPUTCONTEXT) HGuideLine() *HIMCC { // 8
|
||||
return (*HIMCC)(unsafe.Pointer(&this.storage[304]))
|
||||
}
|
||||
func (this *INPUTCONTEXT) HPrivate() *HIMCC { // 8
|
||||
return (*HIMCC)(unsafe.Pointer(&this.storage[312]))
|
||||
}
|
||||
func (this *INPUTCONTEXT) DwNumMsgBuf() *DWORD { // 4
|
||||
return (*DWORD)(unsafe.Pointer(&this.storage[320]))
|
||||
}
|
||||
func (this *INPUTCONTEXT) HMsgBuf() *HIMCC { // 8
|
||||
return (*HIMCC)(unsafe.Pointer(&this.storage[328]))
|
||||
}
|
||||
func (this *INPUTCONTEXT) FdwInit() *DWORD { // 4
|
||||
return (*DWORD)(unsafe.Pointer(&this.storage[336]))
|
||||
}
|
||||
func (this *INPUTCONTEXT) DwReserve() *[3]DWORD { // 12
|
||||
return (*[3]DWORD)(unsafe.Pointer(&this.storage[340]))
|
||||
}
|
||||
|
||||
type IP_ADAPTER_ADDRESSES_LH struct {
|
||||
union1 ULONGLONG
|
||||
Next *IP_ADAPTER_ADDRESSES_LH
|
||||
AdapterName PCHAR
|
||||
FirstUnicastAddress PIP_ADAPTER_UNICAST_ADDRESS_LH
|
||||
FirstAnycastAddress PIP_ADAPTER_ANYCAST_ADDRESS_XP
|
||||
FirstMulticastAddress PIP_ADAPTER_MULTICAST_ADDRESS_XP
|
||||
FirstDnsServerAddress PIP_ADAPTER_DNS_SERVER_ADDRESS_XP
|
||||
DnsSuffix PWCHAR
|
||||
Description PWCHAR
|
||||
FriendlyName PWCHAR
|
||||
PhysicalAddress [MAX_ADAPTER_ADDRESS_LENGTH]BYTE
|
||||
PhysicalAddressLength ULONG
|
||||
union2 ULONG
|
||||
Mtu ULONG
|
||||
IfType IFTYPE
|
||||
OperStatus IF_OPER_STATUS
|
||||
Ipv6IfIndex IF_INDEX
|
||||
ZoneIndices [16]ULONG
|
||||
FirstPrefix PIP_ADAPTER_PREFIX_XP
|
||||
TransmitLinkSpeed ULONG64
|
||||
ReceiveLinkSpeed ULONG64
|
||||
FirstWinsServerAddress PIP_ADAPTER_WINS_SERVER_ADDRESS_LH
|
||||
FirstGatewayAddress PIP_ADAPTER_GATEWAY_ADDRESS_LH
|
||||
Ipv4Metric ULONG
|
||||
Ipv6Metric ULONG
|
||||
Luid IF_LUID
|
||||
Dhcpv4Server SOCKET_ADDRESS
|
||||
CompartmentId NET_IF_COMPARTMENT_ID
|
||||
NetworkGuid NET_IF_NETWORK_GUID
|
||||
ConnectionType NET_IF_CONNECTION_TYPE
|
||||
TunnelType TUNNEL_TYPE
|
||||
Dhcpv6Server SOCKET_ADDRESS
|
||||
Dhcpv6ClientDuid [MAX_DHCPV6_DUID_LENGTH]BYTE
|
||||
Dhcpv6ClientDuidLength ULONG
|
||||
Dhcpv6Iaid ULONG
|
||||
FirstDnsSuffix PIP_ADAPTER_DNS_SUFFIX
|
||||
}
|
||||
type IP_ADAPTER_ANYCAST_ADDRESS_XP struct {
|
||||
union1 ULONGLONG
|
||||
Next *IP_ADAPTER_ANYCAST_ADDRESS_XP
|
||||
Address SOCKET_ADDRESS
|
||||
}
|
||||
type IP_ADAPTER_DNS_SERVER_ADDRESS_XP struct {
|
||||
union1 ULONGLONG
|
||||
Next *IP_ADAPTER_DNS_SERVER_ADDRESS_XP
|
||||
Address SOCKET_ADDRESS
|
||||
}
|
||||
type IP_ADAPTER_GATEWAY_ADDRESS_LH struct {
|
||||
union1 ULONGLONG
|
||||
Next *IP_ADAPTER_GATEWAY_ADDRESS_LH
|
||||
Address SOCKET_ADDRESS
|
||||
}
|
||||
type IP_ADAPTER_MULTICAST_ADDRESS_XP struct {
|
||||
union1 ULONGLONG
|
||||
Next *IP_ADAPTER_MULTICAST_ADDRESS_XP
|
||||
Address SOCKET_ADDRESS
|
||||
}
|
||||
type IP_ADAPTER_WINS_SERVER_ADDRESS_LH struct {
|
||||
union1 ULONGLONG
|
||||
Next *IP_ADAPTER_WINS_SERVER_ADDRESS_LH
|
||||
Address SOCKET_ADDRESS
|
||||
}
|
||||
type MIDIHDR struct {
|
||||
storage [112]byte
|
||||
}
|
||||
|
||||
func (this *MIDIHDR) LpData() *LPSTR {
|
||||
return (*LPSTR)(unsafe.Pointer(&this.storage[0]))
|
||||
}
|
||||
func (this *MIDIHDR) DwBufferLength() *DWORD {
|
||||
return (*DWORD)(unsafe.Pointer(&this.storage[8]))
|
||||
}
|
||||
func (this *MIDIHDR) DwBytesRecorded() *DWORD {
|
||||
return (*DWORD)(unsafe.Pointer(&this.storage[12]))
|
||||
}
|
||||
func (this *MIDIHDR) DwUser() *DWORD_PTR {
|
||||
return (*DWORD_PTR)(unsafe.Pointer(&this.storage[16]))
|
||||
}
|
||||
func (this *MIDIHDR) DwFlags() *DWORD {
|
||||
return (*DWORD)(unsafe.Pointer(&this.storage[24]))
|
||||
}
|
||||
func (this *MIDIHDR) LpNext() **MIDIHDR {
|
||||
return (**MIDIHDR)(unsafe.Pointer(&this.storage[28]))
|
||||
}
|
||||
func (this *MIDIHDR) Reserved() *DWORD_PTR {
|
||||
return (*DWORD_PTR)(unsafe.Pointer(&this.storage[36]))
|
||||
}
|
||||
func (this *MIDIHDR) DwOffset() *DWORD {
|
||||
return (*DWORD)(unsafe.Pointer(&this.storage[44]))
|
||||
}
|
||||
func (this *MIDIHDR) DwReserved() *[8]DWORD_PTR {
|
||||
return (*[8]DWORD_PTR)(unsafe.Pointer(&this.storage[48]))
|
||||
}
|
||||
|
||||
type MIXERLINECONTROLS struct {
|
||||
CbStruct DWORD
|
||||
DwLineID DWORD
|
||||
union1 DWORD
|
||||
CControls DWORD
|
||||
Cbmxctrl DWORD
|
||||
storage1 [4]byte
|
||||
storage2 [4]byte
|
||||
}
|
||||
type PRINTDLG struct {
|
||||
storage [120]byte
|
||||
}
|
||||
|
||||
func (this *PRINTDLG) LStructSize() *DWORD { // 4
|
||||
return (*DWORD)(unsafe.Pointer(&this.storage[0]))
|
||||
}
|
||||
func (this *PRINTDLG) HwndOwner() *HWND { // 8
|
||||
return (*HWND)(unsafe.Pointer(&this.storage[8]))
|
||||
}
|
||||
func (this *PRINTDLG) HDevMode() *HGLOBAL { // 8
|
||||
return (*HGLOBAL)(unsafe.Pointer(&this.storage[16]))
|
||||
}
|
||||
func (this *PRINTDLG) HDevNames() *HGLOBAL { // 8
|
||||
return (*HGLOBAL)(unsafe.Pointer(&this.storage[24]))
|
||||
}
|
||||
func (this *PRINTDLG) HDC() *HDC { // 8
|
||||
return (*HDC)(unsafe.Pointer(&this.storage[32]))
|
||||
}
|
||||
func (this *PRINTDLG) Flags() *DWORD { // 4
|
||||
return (*DWORD)(unsafe.Pointer(&this.storage[40]))
|
||||
}
|
||||
func (this *PRINTDLG) NFromPage() *WORD { // 2
|
||||
return (*WORD)(unsafe.Pointer(&this.storage[44]))
|
||||
}
|
||||
func (this *PRINTDLG) NToPage() *WORD { // 2
|
||||
return (*WORD)(unsafe.Pointer(&this.storage[46]))
|
||||
}
|
||||
func (this *PRINTDLG) NMinPage() *WORD { // 2
|
||||
return (*WORD)(unsafe.Pointer(&this.storage[48]))
|
||||
}
|
||||
func (this *PRINTDLG) NMaxPage() *WORD { // 2
|
||||
return (*WORD)(unsafe.Pointer(&this.storage[50]))
|
||||
}
|
||||
func (this *PRINTDLG) NCopies() *WORD { // 2
|
||||
return (*WORD)(unsafe.Pointer(&this.storage[52]))
|
||||
}
|
||||
func (this *PRINTDLG) HInstance() *HINSTANCE { // 8
|
||||
return (*HINSTANCE)(unsafe.Pointer(&this.storage[56]))
|
||||
}
|
||||
func (this *PRINTDLG) LCustData() *LPARAM { // 8
|
||||
return (*LPARAM)(unsafe.Pointer(&this.storage[64]))
|
||||
}
|
||||
func (this *PRINTDLG) LpfnPrintHook() *uintptr { // 8
|
||||
return (*uintptr)(unsafe.Pointer(&this.storage[72]))
|
||||
}
|
||||
func (this *PRINTDLG) LpfnSetupHook() *uintptr { // 8
|
||||
return (*uintptr)(unsafe.Pointer(&this.storage[80]))
|
||||
}
|
||||
func (this *PRINTDLG) LpPrintTemplateName() *LPCWSTR { // 8
|
||||
return (*LPCWSTR)(unsafe.Pointer(&this.storage[88]))
|
||||
}
|
||||
func (this *PRINTDLG) LpSetupTemplateName() *LPCWSTR { // 8
|
||||
return (*LPCWSTR)(unsafe.Pointer(&this.storage[96]))
|
||||
}
|
||||
func (this *PRINTDLG) HPrintTemplate() *HGLOBAL { // 8
|
||||
return (*HGLOBAL)(unsafe.Pointer(&this.storage[104]))
|
||||
}
|
||||
func (this *PRINTDLG) HSetupTemplate() *HGLOBAL { // 8
|
||||
return (*HGLOBAL)(unsafe.Pointer(&this.storage[112]))
|
||||
}
|
||||
|
||||
type SIZE_T uint64
|
||||
type STRRET struct {
|
||||
UType UINT
|
||||
padding1 [4]byte
|
||||
cStr [260]byte
|
||||
padding2 [4]byte
|
||||
}
|
||||
type TASKDIALOGCONFIG struct {
|
||||
storage [160]byte
|
||||
}
|
||||
|
||||
func (this *TASKDIALOGCONFIG) CbSize() *UINT {
|
||||
return (*UINT)(unsafe.Pointer(&this.storage[0]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) HwndParent() *HWND {
|
||||
return (*HWND)(unsafe.Pointer(&this.storage[4]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) HInstance() *HINSTANCE {
|
||||
return (*HINSTANCE)(unsafe.Pointer(&this.storage[12]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) DwFlags() *TASKDIALOG_FLAGS {
|
||||
return (*TASKDIALOG_FLAGS)(unsafe.Pointer(&this.storage[20]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) DwCommonButtons() *TASKDIALOG_COMMON_BUTTON_FLAGS {
|
||||
return (*TASKDIALOG_COMMON_BUTTON_FLAGS)(unsafe.Pointer(&this.storage[24]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) PszWindowTitle() *PCWSTR {
|
||||
return (*PCWSTR)(unsafe.Pointer(&this.storage[28]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) HMainIcon() *HICON {
|
||||
return (*HICON)(unsafe.Pointer(&this.storage[36]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) PszMainIcon() *PCWSTR {
|
||||
return (*PCWSTR)(unsafe.Pointer(&this.storage[36]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) PszMainInstruction() *PCWSTR {
|
||||
return (*PCWSTR)(unsafe.Pointer(&this.storage[44]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) PszContent() *PCWSTR {
|
||||
return (*PCWSTR)(unsafe.Pointer(&this.storage[52]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) CButtons() *UINT {
|
||||
return (*UINT)(unsafe.Pointer(&this.storage[60]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) PButtons() **TASKDIALOG_BUTTON {
|
||||
return (**TASKDIALOG_BUTTON)(unsafe.Pointer(&this.storage[64]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) NDefaultButton() *int32 {
|
||||
return (*int32)(unsafe.Pointer(&this.storage[72]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) CRadioButtons() *UINT {
|
||||
return (*UINT)(unsafe.Pointer(&this.storage[76]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) PRadioButtons() **TASKDIALOG_BUTTON {
|
||||
return (**TASKDIALOG_BUTTON)(unsafe.Pointer(&this.storage[80]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) NDefaultRadioButton() *int32 {
|
||||
return (*int32)(unsafe.Pointer(&this.storage[88]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) PszVerificationText() *PCWSTR {
|
||||
return (*PCWSTR)(unsafe.Pointer(&this.storage[92]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) PszExpandedInformation() *PCWSTR {
|
||||
return (*PCWSTR)(unsafe.Pointer(&this.storage[100]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) PszExpandedControlText() *PCWSTR {
|
||||
return (*PCWSTR)(unsafe.Pointer(&this.storage[108]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) PszCollapsedControlText() *PCWSTR {
|
||||
return (*PCWSTR)(unsafe.Pointer(&this.storage[116]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) HFooterIcon() *HICON {
|
||||
return (*HICON)(unsafe.Pointer(&this.storage[124]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) PszFooterIcon() *PCWSTR {
|
||||
return (*PCWSTR)(unsafe.Pointer(&this.storage[124]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) PszFooter() *PCWSTR {
|
||||
return (*PCWSTR)(unsafe.Pointer(&this.storage[132]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) PfCallback() *uintptr {
|
||||
return (*uintptr)(unsafe.Pointer(&this.storage[140]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) LpCallbackData() *LONG_PTR {
|
||||
return (*LONG_PTR)(unsafe.Pointer(&this.storage[148]))
|
||||
}
|
||||
func (this *TASKDIALOGCONFIG) CxWidth() *UINT {
|
||||
return (*UINT)(unsafe.Pointer(&this.storage[156]))
|
||||
}
|
||||
|
||||
type VARIANT struct {
|
||||
union1 [24]byte
|
||||
}
|
||||
|
||||
func (this *VARIANT) PRecInfo() *IRecordInfo {
|
||||
return (*IRecordInfo)(unsafe.Pointer(&this.union1[16]))
|
||||
}
|
||||
|
||||
type WSADATA struct {
|
||||
WVersion uint16
|
||||
WHighVersion uint16
|
||||
IMaxSockets uint16
|
||||
IMaxUdpDg uint16
|
||||
LpVendorInfo *byte
|
||||
SzDescription [WSADESCRIPTION_LEN + 1]byte
|
||||
SzSystemStatus [WSASYS_STATUS_LEN + 1]byte
|
||||
}
|
||||
6144
grdp/win/user32.go
Normal file
6144
grdp/win/user32.go
Normal file
File diff suppressed because it is too large
Load Diff
841
grdp/win/uxtheme.go
Normal file
841
grdp/win/uxtheme.go
Normal file
@@ -0,0 +1,841 @@
|
||||
// This file was automatically generated by https://github.com/kbinani/win/blob/generator/internal/cmd/gen/gen.go
|
||||
// go run internal/cmd/gen/gen.go
|
||||
|
||||
// +build windows
|
||||
|
||||
package win
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var (
|
||||
// Library
|
||||
libuxtheme uintptr
|
||||
|
||||
// Functions
|
||||
beginPanningFeedback uintptr
|
||||
endPanningFeedback uintptr
|
||||
updatePanningFeedback uintptr
|
||||
beginBufferedAnimation uintptr
|
||||
beginBufferedPaint uintptr
|
||||
bufferedPaintClear uintptr
|
||||
bufferedPaintInit uintptr
|
||||
bufferedPaintRenderAnimation uintptr
|
||||
bufferedPaintSetAlpha uintptr
|
||||
bufferedPaintStopAllAnimations uintptr
|
||||
bufferedPaintUnInit uintptr
|
||||
closeThemeData uintptr
|
||||
drawThemeBackground uintptr
|
||||
drawThemeBackgroundEx uintptr
|
||||
drawThemeEdge uintptr
|
||||
drawThemeIcon uintptr
|
||||
drawThemeParentBackground uintptr
|
||||
drawThemeText uintptr
|
||||
drawThemeTextEx uintptr
|
||||
enableThemeDialogTexture uintptr
|
||||
enableTheming uintptr
|
||||
endBufferedAnimation uintptr
|
||||
endBufferedPaint uintptr
|
||||
getBufferedPaintBits uintptr
|
||||
getBufferedPaintDC uintptr
|
||||
getBufferedPaintTargetDC uintptr
|
||||
getBufferedPaintTargetRect uintptr
|
||||
getCurrentThemeName uintptr
|
||||
getThemeAppProperties uintptr
|
||||
getThemeBackgroundContentRect uintptr
|
||||
getThemeBackgroundExtent uintptr
|
||||
getThemeBackgroundRegion uintptr
|
||||
getThemeBool uintptr
|
||||
getThemeColor uintptr
|
||||
getThemeDocumentationProperty uintptr
|
||||
getThemeEnumValue uintptr
|
||||
getThemeFilename uintptr
|
||||
getThemeFont uintptr
|
||||
getThemeInt uintptr
|
||||
getThemeIntList uintptr
|
||||
getThemeMargins uintptr
|
||||
getThemeMetric uintptr
|
||||
getThemePartSize uintptr
|
||||
getThemePosition uintptr
|
||||
getThemePropertyOrigin uintptr
|
||||
getThemeRect uintptr
|
||||
getThemeString uintptr
|
||||
getThemeSysBool uintptr
|
||||
getThemeSysColor uintptr
|
||||
getThemeSysColorBrush uintptr
|
||||
getThemeSysFont uintptr
|
||||
getThemeSysInt uintptr
|
||||
getThemeSysSize uintptr
|
||||
getThemeSysString uintptr
|
||||
getThemeTextExtent uintptr
|
||||
getThemeTextMetrics uintptr
|
||||
getThemeTransitionDuration uintptr
|
||||
getWindowTheme uintptr
|
||||
hitTestThemeBackground uintptr
|
||||
isAppThemed uintptr
|
||||
isThemeActive uintptr
|
||||
isThemeBackgroundPartiallyTransparent uintptr
|
||||
isThemeDialogTextureEnabled uintptr
|
||||
isThemePartDefined uintptr
|
||||
openThemeData uintptr
|
||||
openThemeDataEx uintptr
|
||||
setThemeAppProperties uintptr
|
||||
setWindowTheme uintptr
|
||||
)
|
||||
|
||||
func init() {
|
||||
// Library
|
||||
libuxtheme = doLoadLibrary("uxtheme.dll")
|
||||
|
||||
// Functions
|
||||
beginPanningFeedback = doGetProcAddress(libuxtheme, "BeginPanningFeedback")
|
||||
endPanningFeedback = doGetProcAddress(libuxtheme, "EndPanningFeedback")
|
||||
updatePanningFeedback = doGetProcAddress(libuxtheme, "UpdatePanningFeedback")
|
||||
beginBufferedAnimation = doGetProcAddress(libuxtheme, "BeginBufferedAnimation")
|
||||
beginBufferedPaint = doGetProcAddress(libuxtheme, "BeginBufferedPaint")
|
||||
bufferedPaintClear = doGetProcAddress(libuxtheme, "BufferedPaintClear")
|
||||
bufferedPaintInit = doGetProcAddress(libuxtheme, "BufferedPaintInit")
|
||||
bufferedPaintRenderAnimation = doGetProcAddress(libuxtheme, "BufferedPaintRenderAnimation")
|
||||
bufferedPaintSetAlpha = doGetProcAddress(libuxtheme, "BufferedPaintSetAlpha")
|
||||
bufferedPaintStopAllAnimations = doGetProcAddress(libuxtheme, "BufferedPaintStopAllAnimations")
|
||||
bufferedPaintUnInit = doGetProcAddress(libuxtheme, "BufferedPaintUnInit")
|
||||
closeThemeData = doGetProcAddress(libuxtheme, "CloseThemeData")
|
||||
drawThemeBackground = doGetProcAddress(libuxtheme, "DrawThemeBackground")
|
||||
drawThemeBackgroundEx = doGetProcAddress(libuxtheme, "DrawThemeBackgroundEx")
|
||||
drawThemeEdge = doGetProcAddress(libuxtheme, "DrawThemeEdge")
|
||||
drawThemeIcon = doGetProcAddress(libuxtheme, "DrawThemeIcon")
|
||||
drawThemeParentBackground = doGetProcAddress(libuxtheme, "DrawThemeParentBackground")
|
||||
drawThemeText = doGetProcAddress(libuxtheme, "DrawThemeText")
|
||||
drawThemeTextEx = doGetProcAddress(libuxtheme, "DrawThemeTextEx")
|
||||
enableThemeDialogTexture = doGetProcAddress(libuxtheme, "EnableThemeDialogTexture")
|
||||
enableTheming = doGetProcAddress(libuxtheme, "EnableTheming")
|
||||
endBufferedAnimation = doGetProcAddress(libuxtheme, "EndBufferedAnimation")
|
||||
endBufferedPaint = doGetProcAddress(libuxtheme, "EndBufferedPaint")
|
||||
getBufferedPaintBits = doGetProcAddress(libuxtheme, "GetBufferedPaintBits")
|
||||
getBufferedPaintDC = doGetProcAddress(libuxtheme, "GetBufferedPaintDC")
|
||||
getBufferedPaintTargetDC = doGetProcAddress(libuxtheme, "GetBufferedPaintTargetDC")
|
||||
getBufferedPaintTargetRect = doGetProcAddress(libuxtheme, "GetBufferedPaintTargetRect")
|
||||
getCurrentThemeName = doGetProcAddress(libuxtheme, "GetCurrentThemeName")
|
||||
getThemeAppProperties = doGetProcAddress(libuxtheme, "GetThemeAppProperties")
|
||||
getThemeBackgroundContentRect = doGetProcAddress(libuxtheme, "GetThemeBackgroundContentRect")
|
||||
getThemeBackgroundExtent = doGetProcAddress(libuxtheme, "GetThemeBackgroundExtent")
|
||||
getThemeBackgroundRegion = doGetProcAddress(libuxtheme, "GetThemeBackgroundRegion")
|
||||
getThemeBool = doGetProcAddress(libuxtheme, "GetThemeBool")
|
||||
getThemeColor = doGetProcAddress(libuxtheme, "GetThemeColor")
|
||||
getThemeDocumentationProperty = doGetProcAddress(libuxtheme, "GetThemeDocumentationProperty")
|
||||
getThemeEnumValue = doGetProcAddress(libuxtheme, "GetThemeEnumValue")
|
||||
getThemeFilename = doGetProcAddress(libuxtheme, "GetThemeFilename")
|
||||
getThemeFont = doGetProcAddress(libuxtheme, "GetThemeFont")
|
||||
getThemeInt = doGetProcAddress(libuxtheme, "GetThemeInt")
|
||||
getThemeIntList = doGetProcAddress(libuxtheme, "GetThemeIntList")
|
||||
getThemeMargins = doGetProcAddress(libuxtheme, "GetThemeMargins")
|
||||
getThemeMetric = doGetProcAddress(libuxtheme, "GetThemeMetric")
|
||||
getThemePartSize = doGetProcAddress(libuxtheme, "GetThemePartSize")
|
||||
getThemePosition = doGetProcAddress(libuxtheme, "GetThemePosition")
|
||||
getThemePropertyOrigin = doGetProcAddress(libuxtheme, "GetThemePropertyOrigin")
|
||||
getThemeRect = doGetProcAddress(libuxtheme, "GetThemeRect")
|
||||
getThemeString = doGetProcAddress(libuxtheme, "GetThemeString")
|
||||
getThemeSysBool = doGetProcAddress(libuxtheme, "GetThemeSysBool")
|
||||
getThemeSysColor = doGetProcAddress(libuxtheme, "GetThemeSysColor")
|
||||
getThemeSysColorBrush = doGetProcAddress(libuxtheme, "GetThemeSysColorBrush")
|
||||
getThemeSysFont = doGetProcAddress(libuxtheme, "GetThemeSysFont")
|
||||
getThemeSysInt = doGetProcAddress(libuxtheme, "GetThemeSysInt")
|
||||
getThemeSysSize = doGetProcAddress(libuxtheme, "GetThemeSysSize")
|
||||
getThemeSysString = doGetProcAddress(libuxtheme, "GetThemeSysString")
|
||||
getThemeTextExtent = doGetProcAddress(libuxtheme, "GetThemeTextExtent")
|
||||
getThemeTextMetrics = doGetProcAddress(libuxtheme, "GetThemeTextMetrics")
|
||||
getThemeTransitionDuration = doGetProcAddress(libuxtheme, "GetThemeTransitionDuration")
|
||||
getWindowTheme = doGetProcAddress(libuxtheme, "GetWindowTheme")
|
||||
hitTestThemeBackground = doGetProcAddress(libuxtheme, "HitTestThemeBackground")
|
||||
isAppThemed = doGetProcAddress(libuxtheme, "IsAppThemed")
|
||||
isThemeActive = doGetProcAddress(libuxtheme, "IsThemeActive")
|
||||
isThemeBackgroundPartiallyTransparent = doGetProcAddress(libuxtheme, "IsThemeBackgroundPartiallyTransparent")
|
||||
isThemeDialogTextureEnabled = doGetProcAddress(libuxtheme, "IsThemeDialogTextureEnabled")
|
||||
isThemePartDefined = doGetProcAddress(libuxtheme, "IsThemePartDefined")
|
||||
openThemeData = doGetProcAddress(libuxtheme, "OpenThemeData")
|
||||
openThemeDataEx = doGetProcAddress(libuxtheme, "OpenThemeDataEx")
|
||||
setThemeAppProperties = doGetProcAddress(libuxtheme, "SetThemeAppProperties")
|
||||
setWindowTheme = doGetProcAddress(libuxtheme, "SetWindowTheme")
|
||||
}
|
||||
|
||||
func BeginPanningFeedback(hwnd HWND) bool {
|
||||
ret1 := syscall3(beginPanningFeedback, 1,
|
||||
uintptr(hwnd),
|
||||
0,
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func EndPanningFeedback(hwnd HWND, fAnimateBack bool) bool {
|
||||
ret1 := syscall3(endPanningFeedback, 2,
|
||||
uintptr(hwnd),
|
||||
getUintptrFromBool(fAnimateBack),
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func UpdatePanningFeedback(hwnd HWND, lTotalOverpanOffsetX LONG, lTotalOverpanOffsetY LONG, fInInertia bool) bool {
|
||||
ret1 := syscall6(updatePanningFeedback, 4,
|
||||
uintptr(hwnd),
|
||||
uintptr(lTotalOverpanOffsetX),
|
||||
uintptr(lTotalOverpanOffsetY),
|
||||
getUintptrFromBool(fInInertia),
|
||||
0,
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func BeginBufferedAnimation(hwnd HWND, hdcTarget HDC, rcTarget /*const*/ *RECT, dwFormat BP_BUFFERFORMAT, pPaintParams *BP_PAINTPARAMS, pAnimationParams *BP_ANIMATIONPARAMS, phdcFrom *HDC, phdcTo *HDC) HANIMATIONBUFFER {
|
||||
ret1 := syscall9(beginBufferedAnimation, 8,
|
||||
uintptr(hwnd),
|
||||
uintptr(hdcTarget),
|
||||
uintptr(unsafe.Pointer(rcTarget)),
|
||||
uintptr(dwFormat),
|
||||
uintptr(unsafe.Pointer(pPaintParams)),
|
||||
uintptr(unsafe.Pointer(pAnimationParams)),
|
||||
uintptr(unsafe.Pointer(phdcFrom)),
|
||||
uintptr(unsafe.Pointer(phdcTo)),
|
||||
0)
|
||||
return HANIMATIONBUFFER(ret1)
|
||||
}
|
||||
|
||||
func BeginBufferedPaint(hdcTarget HDC, prcTarget /*const*/ *RECT, dwFormat BP_BUFFERFORMAT, pPaintParams *BP_PAINTPARAMS, phdc *HDC) HPAINTBUFFER {
|
||||
ret1 := syscall6(beginBufferedPaint, 5,
|
||||
uintptr(hdcTarget),
|
||||
uintptr(unsafe.Pointer(prcTarget)),
|
||||
uintptr(dwFormat),
|
||||
uintptr(unsafe.Pointer(pPaintParams)),
|
||||
uintptr(unsafe.Pointer(phdc)),
|
||||
0)
|
||||
return HPAINTBUFFER(ret1)
|
||||
}
|
||||
|
||||
func BufferedPaintClear(hBufferedPaint HPAINTBUFFER, prc /*const*/ *RECT) HRESULT {
|
||||
ret1 := syscall3(bufferedPaintClear, 2,
|
||||
uintptr(hBufferedPaint),
|
||||
uintptr(unsafe.Pointer(prc)),
|
||||
0)
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func BufferedPaintInit() HRESULT {
|
||||
ret1 := syscall3(bufferedPaintInit, 0,
|
||||
0,
|
||||
0,
|
||||
0)
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func BufferedPaintRenderAnimation(hwnd HWND, hdcTarget HDC) bool {
|
||||
ret1 := syscall3(bufferedPaintRenderAnimation, 2,
|
||||
uintptr(hwnd),
|
||||
uintptr(hdcTarget),
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func BufferedPaintSetAlpha(hBufferedPaint HPAINTBUFFER, prc /*const*/ *RECT, alpha BYTE) HRESULT {
|
||||
ret1 := syscall3(bufferedPaintSetAlpha, 3,
|
||||
uintptr(hBufferedPaint),
|
||||
uintptr(unsafe.Pointer(prc)),
|
||||
uintptr(alpha))
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func BufferedPaintStopAllAnimations(hwnd HWND) HRESULT {
|
||||
ret1 := syscall3(bufferedPaintStopAllAnimations, 1,
|
||||
uintptr(hwnd),
|
||||
0,
|
||||
0)
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func BufferedPaintUnInit() HRESULT {
|
||||
ret1 := syscall3(bufferedPaintUnInit, 0,
|
||||
0,
|
||||
0,
|
||||
0)
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func CloseThemeData(hTheme HTHEME) HRESULT {
|
||||
ret1 := syscall3(closeThemeData, 1,
|
||||
uintptr(hTheme),
|
||||
0,
|
||||
0)
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func DrawThemeBackground(hTheme HTHEME, hdc HDC, iPartId int32, iStateId int32, pRect /*const*/ *RECT, pClipRect /*const*/ *RECT) HRESULT {
|
||||
ret1 := syscall6(drawThemeBackground, 6,
|
||||
uintptr(hTheme),
|
||||
uintptr(hdc),
|
||||
uintptr(iPartId),
|
||||
uintptr(iStateId),
|
||||
uintptr(unsafe.Pointer(pRect)),
|
||||
uintptr(unsafe.Pointer(pClipRect)))
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func DrawThemeBackgroundEx(hTheme HTHEME, hdc HDC, iPartId int32, iStateId int32, pRect /*const*/ *RECT, pOptions /*const*/ *DTBGOPTS) HRESULT {
|
||||
ret1 := syscall6(drawThemeBackgroundEx, 6,
|
||||
uintptr(hTheme),
|
||||
uintptr(hdc),
|
||||
uintptr(iPartId),
|
||||
uintptr(iStateId),
|
||||
uintptr(unsafe.Pointer(pRect)),
|
||||
uintptr(unsafe.Pointer(pOptions)))
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func DrawThemeEdge(hTheme HTHEME, hdc HDC, iPartId int32, iStateId int32, pDestRect /*const*/ *RECT, uEdge UINT, uFlags UINT, pContentRect *RECT) HRESULT {
|
||||
ret1 := syscall9(drawThemeEdge, 8,
|
||||
uintptr(hTheme),
|
||||
uintptr(hdc),
|
||||
uintptr(iPartId),
|
||||
uintptr(iStateId),
|
||||
uintptr(unsafe.Pointer(pDestRect)),
|
||||
uintptr(uEdge),
|
||||
uintptr(uFlags),
|
||||
uintptr(unsafe.Pointer(pContentRect)),
|
||||
0)
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func DrawThemeIcon(hTheme HTHEME, hdc HDC, iPartId int32, iStateId int32, pRect /*const*/ *RECT, himl HIMAGELIST, iImageIndex int32) HRESULT {
|
||||
ret1 := syscall9(drawThemeIcon, 7,
|
||||
uintptr(hTheme),
|
||||
uintptr(hdc),
|
||||
uintptr(iPartId),
|
||||
uintptr(iStateId),
|
||||
uintptr(unsafe.Pointer(pRect)),
|
||||
uintptr(himl),
|
||||
uintptr(iImageIndex),
|
||||
0,
|
||||
0)
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func DrawThemeParentBackground(hwnd HWND, hdc HDC, prc *RECT) HRESULT {
|
||||
ret1 := syscall3(drawThemeParentBackground, 3,
|
||||
uintptr(hwnd),
|
||||
uintptr(hdc),
|
||||
uintptr(unsafe.Pointer(prc)))
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func DrawThemeText(hTheme HTHEME, hdc HDC, iPartId int32, iStateId int32, pszText string, iCharCount int32, flags DWORD, flags2 DWORD, pRect /*const*/ *RECT) HRESULT {
|
||||
pszTextStr := unicode16FromString(pszText)
|
||||
ret1 := syscall9(drawThemeText, 9,
|
||||
uintptr(hTheme),
|
||||
uintptr(hdc),
|
||||
uintptr(iPartId),
|
||||
uintptr(iStateId),
|
||||
uintptr(unsafe.Pointer(&pszTextStr[0])),
|
||||
uintptr(iCharCount),
|
||||
uintptr(flags),
|
||||
uintptr(flags2),
|
||||
uintptr(unsafe.Pointer(pRect)))
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func DrawThemeTextEx(hTheme HTHEME, hdc HDC, iPartId int32, iStateId int32, pszText string, iCharCount int32, flags DWORD, rect *RECT, options /*const*/ *DTTOPTS) HRESULT {
|
||||
pszTextStr := unicode16FromString(pszText)
|
||||
ret1 := syscall9(drawThemeTextEx, 9,
|
||||
uintptr(hTheme),
|
||||
uintptr(hdc),
|
||||
uintptr(iPartId),
|
||||
uintptr(iStateId),
|
||||
uintptr(unsafe.Pointer(&pszTextStr[0])),
|
||||
uintptr(iCharCount),
|
||||
uintptr(flags),
|
||||
uintptr(unsafe.Pointer(rect)),
|
||||
uintptr(unsafe.Pointer(options)))
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func EnableThemeDialogTexture(hwnd HWND, dwFlags DWORD) HRESULT {
|
||||
ret1 := syscall3(enableThemeDialogTexture, 2,
|
||||
uintptr(hwnd),
|
||||
uintptr(dwFlags),
|
||||
0)
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func EnableTheming(fEnable bool) HRESULT {
|
||||
ret1 := syscall3(enableTheming, 1,
|
||||
getUintptrFromBool(fEnable),
|
||||
0,
|
||||
0)
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func EndBufferedAnimation(hbpAnimation HANIMATIONBUFFER, fUpdateTarget bool) HRESULT {
|
||||
ret1 := syscall3(endBufferedAnimation, 2,
|
||||
uintptr(hbpAnimation),
|
||||
getUintptrFromBool(fUpdateTarget),
|
||||
0)
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func EndBufferedPaint(hPaintBuffer HPAINTBUFFER, fUpdateTarget bool) HRESULT {
|
||||
ret1 := syscall3(endBufferedPaint, 2,
|
||||
uintptr(hPaintBuffer),
|
||||
getUintptrFromBool(fUpdateTarget),
|
||||
0)
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func GetBufferedPaintBits(hBufferedPaint HPAINTBUFFER, ppbBuffer **RGBQUAD, pcxRow *int) HRESULT {
|
||||
ret1 := syscall3(getBufferedPaintBits, 3,
|
||||
uintptr(hBufferedPaint),
|
||||
uintptr(unsafe.Pointer(ppbBuffer)),
|
||||
uintptr(unsafe.Pointer(pcxRow)))
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func GetBufferedPaintDC(hBufferedPaint HPAINTBUFFER) HDC {
|
||||
ret1 := syscall3(getBufferedPaintDC, 1,
|
||||
uintptr(hBufferedPaint),
|
||||
0,
|
||||
0)
|
||||
return HDC(ret1)
|
||||
}
|
||||
|
||||
func GetBufferedPaintTargetDC(hBufferedPaint HPAINTBUFFER) HDC {
|
||||
ret1 := syscall3(getBufferedPaintTargetDC, 1,
|
||||
uintptr(hBufferedPaint),
|
||||
0,
|
||||
0)
|
||||
return HDC(ret1)
|
||||
}
|
||||
|
||||
func GetBufferedPaintTargetRect(hBufferedPaint HPAINTBUFFER, prc *RECT) HRESULT {
|
||||
ret1 := syscall3(getBufferedPaintTargetRect, 2,
|
||||
uintptr(hBufferedPaint),
|
||||
uintptr(unsafe.Pointer(prc)),
|
||||
0)
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func GetCurrentThemeName(pszThemeFileName LPWSTR, dwMaxNameChars int32, pszColorBuff LPWSTR, cchMaxColorChars int32, pszSizeBuff LPWSTR, cchMaxSizeChars int32) HRESULT {
|
||||
ret1 := syscall6(getCurrentThemeName, 6,
|
||||
uintptr(unsafe.Pointer(pszThemeFileName)),
|
||||
uintptr(dwMaxNameChars),
|
||||
uintptr(unsafe.Pointer(pszColorBuff)),
|
||||
uintptr(cchMaxColorChars),
|
||||
uintptr(unsafe.Pointer(pszSizeBuff)),
|
||||
uintptr(cchMaxSizeChars))
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func GetThemeAppProperties() DWORD {
|
||||
ret1 := syscall3(getThemeAppProperties, 0,
|
||||
0,
|
||||
0,
|
||||
0)
|
||||
return DWORD(ret1)
|
||||
}
|
||||
|
||||
func GetThemeBackgroundContentRect(hTheme HTHEME, hdc HDC, iPartId int32, iStateId int32, pBoundingRect /*const*/ *RECT, pContentRect *RECT) HRESULT {
|
||||
ret1 := syscall6(getThemeBackgroundContentRect, 6,
|
||||
uintptr(hTheme),
|
||||
uintptr(hdc),
|
||||
uintptr(iPartId),
|
||||
uintptr(iStateId),
|
||||
uintptr(unsafe.Pointer(pBoundingRect)),
|
||||
uintptr(unsafe.Pointer(pContentRect)))
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func GetThemeBackgroundExtent(hTheme HTHEME, hdc HDC, iPartId int32, iStateId int32, pContentRect /*const*/ *RECT, pExtentRect *RECT) HRESULT {
|
||||
ret1 := syscall6(getThemeBackgroundExtent, 6,
|
||||
uintptr(hTheme),
|
||||
uintptr(hdc),
|
||||
uintptr(iPartId),
|
||||
uintptr(iStateId),
|
||||
uintptr(unsafe.Pointer(pContentRect)),
|
||||
uintptr(unsafe.Pointer(pExtentRect)))
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func GetThemeBackgroundRegion(hTheme HTHEME, hdc HDC, iPartId int32, iStateId int32, pRect /*const*/ *RECT, pRegion *HRGN) HRESULT {
|
||||
ret1 := syscall6(getThemeBackgroundRegion, 6,
|
||||
uintptr(hTheme),
|
||||
uintptr(hdc),
|
||||
uintptr(iPartId),
|
||||
uintptr(iStateId),
|
||||
uintptr(unsafe.Pointer(pRect)),
|
||||
uintptr(unsafe.Pointer(pRegion)))
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func GetThemeBool(hTheme HTHEME, iPartId int32, iStateId int32, iPropId int32, pfVal *BOOL) HRESULT {
|
||||
ret1 := syscall6(getThemeBool, 5,
|
||||
uintptr(hTheme),
|
||||
uintptr(iPartId),
|
||||
uintptr(iStateId),
|
||||
uintptr(iPropId),
|
||||
uintptr(unsafe.Pointer(pfVal)),
|
||||
0)
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func GetThemeColor(hTheme HTHEME, iPartId int32, iStateId int32, iPropId int32, pColor *COLORREF) HRESULT {
|
||||
ret1 := syscall6(getThemeColor, 5,
|
||||
uintptr(hTheme),
|
||||
uintptr(iPartId),
|
||||
uintptr(iStateId),
|
||||
uintptr(iPropId),
|
||||
uintptr(unsafe.Pointer(pColor)),
|
||||
0)
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func GetThemeDocumentationProperty(pszThemeName string, pszPropertyName string, pszValueBuff LPWSTR, cchMaxValChars int32) HRESULT {
|
||||
pszThemeNameStr := unicode16FromString(pszThemeName)
|
||||
pszPropertyNameStr := unicode16FromString(pszPropertyName)
|
||||
ret1 := syscall6(getThemeDocumentationProperty, 4,
|
||||
uintptr(unsafe.Pointer(&pszThemeNameStr[0])),
|
||||
uintptr(unsafe.Pointer(&pszPropertyNameStr[0])),
|
||||
uintptr(unsafe.Pointer(pszValueBuff)),
|
||||
uintptr(cchMaxValChars),
|
||||
0,
|
||||
0)
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func GetThemeEnumValue(hTheme HTHEME, iPartId int32, iStateId int32, iPropId int32, piVal *int) HRESULT {
|
||||
ret1 := syscall6(getThemeEnumValue, 5,
|
||||
uintptr(hTheme),
|
||||
uintptr(iPartId),
|
||||
uintptr(iStateId),
|
||||
uintptr(iPropId),
|
||||
uintptr(unsafe.Pointer(piVal)),
|
||||
0)
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func GetThemeFilename(hTheme HTHEME, iPartId int32, iStateId int32, iPropId int32, pszThemeFilename LPWSTR, cchMaxBuffChars int32) HRESULT {
|
||||
ret1 := syscall6(getThemeFilename, 6,
|
||||
uintptr(hTheme),
|
||||
uintptr(iPartId),
|
||||
uintptr(iStateId),
|
||||
uintptr(iPropId),
|
||||
uintptr(unsafe.Pointer(pszThemeFilename)),
|
||||
uintptr(cchMaxBuffChars))
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func GetThemeFont(hTheme HTHEME, hdc HDC, iPartId int32, iStateId int32, iPropId int32, pFont *LOGFONT) HRESULT {
|
||||
ret1 := syscall6(getThemeFont, 6,
|
||||
uintptr(hTheme),
|
||||
uintptr(hdc),
|
||||
uintptr(iPartId),
|
||||
uintptr(iStateId),
|
||||
uintptr(iPropId),
|
||||
uintptr(unsafe.Pointer(pFont)))
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func GetThemeInt(hTheme HTHEME, iPartId int32, iStateId int32, iPropId int32, piVal *int) HRESULT {
|
||||
ret1 := syscall6(getThemeInt, 5,
|
||||
uintptr(hTheme),
|
||||
uintptr(iPartId),
|
||||
uintptr(iStateId),
|
||||
uintptr(iPropId),
|
||||
uintptr(unsafe.Pointer(piVal)),
|
||||
0)
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func GetThemeIntList(hTheme HTHEME, iPartId int32, iStateId int32, iPropId int32, pIntList *INTLIST) HRESULT {
|
||||
ret1 := syscall6(getThemeIntList, 5,
|
||||
uintptr(hTheme),
|
||||
uintptr(iPartId),
|
||||
uintptr(iStateId),
|
||||
uintptr(iPropId),
|
||||
uintptr(unsafe.Pointer(pIntList)),
|
||||
0)
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func GetThemeMargins(hTheme HTHEME, hdc HDC, iPartId int32, iStateId int32, iPropId int32, prc *RECT, pMargins *MARGINS) HRESULT {
|
||||
ret1 := syscall9(getThemeMargins, 7,
|
||||
uintptr(hTheme),
|
||||
uintptr(hdc),
|
||||
uintptr(iPartId),
|
||||
uintptr(iStateId),
|
||||
uintptr(iPropId),
|
||||
uintptr(unsafe.Pointer(prc)),
|
||||
uintptr(unsafe.Pointer(pMargins)),
|
||||
0,
|
||||
0)
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func GetThemeMetric(hTheme HTHEME, hdc HDC, iPartId int32, iStateId int32, iPropId int32, piVal *int) HRESULT {
|
||||
ret1 := syscall6(getThemeMetric, 6,
|
||||
uintptr(hTheme),
|
||||
uintptr(hdc),
|
||||
uintptr(iPartId),
|
||||
uintptr(iStateId),
|
||||
uintptr(iPropId),
|
||||
uintptr(unsafe.Pointer(piVal)))
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func GetThemePartSize(hTheme HTHEME, hdc HDC, iPartId int32, iStateId int32, prc *RECT, eSize THEMESIZE, psz *SIZE) HRESULT {
|
||||
ret1 := syscall9(getThemePartSize, 7,
|
||||
uintptr(hTheme),
|
||||
uintptr(hdc),
|
||||
uintptr(iPartId),
|
||||
uintptr(iStateId),
|
||||
uintptr(unsafe.Pointer(prc)),
|
||||
uintptr(eSize),
|
||||
uintptr(unsafe.Pointer(psz)),
|
||||
0,
|
||||
0)
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func GetThemePosition(hTheme HTHEME, iPartId int32, iStateId int32, iPropId int32, pPoint *POINT) HRESULT {
|
||||
ret1 := syscall6(getThemePosition, 5,
|
||||
uintptr(hTheme),
|
||||
uintptr(iPartId),
|
||||
uintptr(iStateId),
|
||||
uintptr(iPropId),
|
||||
uintptr(unsafe.Pointer(pPoint)),
|
||||
0)
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func GetThemePropertyOrigin(hTheme HTHEME, iPartId int32, iStateId int32, iPropId int32, pOrigin *PROPERTYORIGIN) HRESULT {
|
||||
ret1 := syscall6(getThemePropertyOrigin, 5,
|
||||
uintptr(hTheme),
|
||||
uintptr(iPartId),
|
||||
uintptr(iStateId),
|
||||
uintptr(iPropId),
|
||||
uintptr(unsafe.Pointer(pOrigin)),
|
||||
0)
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func GetThemeRect(hTheme HTHEME, iPartId int32, iStateId int32, iPropId int32, pRect *RECT) HRESULT {
|
||||
ret1 := syscall6(getThemeRect, 5,
|
||||
uintptr(hTheme),
|
||||
uintptr(iPartId),
|
||||
uintptr(iStateId),
|
||||
uintptr(iPropId),
|
||||
uintptr(unsafe.Pointer(pRect)),
|
||||
0)
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func GetThemeString(hTheme HTHEME, iPartId int32, iStateId int32, iPropId int32, pszBuff LPWSTR, cchMaxBuffChars int32) HRESULT {
|
||||
ret1 := syscall6(getThemeString, 6,
|
||||
uintptr(hTheme),
|
||||
uintptr(iPartId),
|
||||
uintptr(iStateId),
|
||||
uintptr(iPropId),
|
||||
uintptr(unsafe.Pointer(pszBuff)),
|
||||
uintptr(cchMaxBuffChars))
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func GetThemeSysBool(hTheme HTHEME, iBoolID int32) bool {
|
||||
ret1 := syscall3(getThemeSysBool, 2,
|
||||
uintptr(hTheme),
|
||||
uintptr(iBoolID),
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func GetThemeSysColor(hTheme HTHEME, iColorID int32) COLORREF {
|
||||
ret1 := syscall3(getThemeSysColor, 2,
|
||||
uintptr(hTheme),
|
||||
uintptr(iColorID),
|
||||
0)
|
||||
return COLORREF(ret1)
|
||||
}
|
||||
|
||||
func GetThemeSysColorBrush(hTheme HTHEME, iColorID int32) HBRUSH {
|
||||
ret1 := syscall3(getThemeSysColorBrush, 2,
|
||||
uintptr(hTheme),
|
||||
uintptr(iColorID),
|
||||
0)
|
||||
return HBRUSH(ret1)
|
||||
}
|
||||
|
||||
func GetThemeSysFont(hTheme HTHEME, iFontID int32, plf *LOGFONT) HRESULT {
|
||||
ret1 := syscall3(getThemeSysFont, 3,
|
||||
uintptr(hTheme),
|
||||
uintptr(iFontID),
|
||||
uintptr(unsafe.Pointer(plf)))
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func GetThemeSysInt(hTheme HTHEME, iIntID int32, piValue *int) HRESULT {
|
||||
ret1 := syscall3(getThemeSysInt, 3,
|
||||
uintptr(hTheme),
|
||||
uintptr(iIntID),
|
||||
uintptr(unsafe.Pointer(piValue)))
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func GetThemeSysSize(hTheme HTHEME, iSizeID int32) int32 {
|
||||
ret1 := syscall3(getThemeSysSize, 2,
|
||||
uintptr(hTheme),
|
||||
uintptr(iSizeID),
|
||||
0)
|
||||
return int32(ret1)
|
||||
}
|
||||
|
||||
func GetThemeSysString(hTheme HTHEME, iStringID int32, pszStringBuff LPWSTR, cchMaxStringChars int32) HRESULT {
|
||||
ret1 := syscall6(getThemeSysString, 4,
|
||||
uintptr(hTheme),
|
||||
uintptr(iStringID),
|
||||
uintptr(unsafe.Pointer(pszStringBuff)),
|
||||
uintptr(cchMaxStringChars),
|
||||
0,
|
||||
0)
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func GetThemeTextExtent(hTheme HTHEME, hdc HDC, iPartId int32, iStateId int32, pszText string, iCharCount int32, dwTextFlags DWORD, pBoundingRect /*const*/ *RECT, pExtentRect *RECT) HRESULT {
|
||||
pszTextStr := unicode16FromString(pszText)
|
||||
ret1 := syscall9(getThemeTextExtent, 9,
|
||||
uintptr(hTheme),
|
||||
uintptr(hdc),
|
||||
uintptr(iPartId),
|
||||
uintptr(iStateId),
|
||||
uintptr(unsafe.Pointer(&pszTextStr[0])),
|
||||
uintptr(iCharCount),
|
||||
uintptr(dwTextFlags),
|
||||
uintptr(unsafe.Pointer(pBoundingRect)),
|
||||
uintptr(unsafe.Pointer(pExtentRect)))
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func GetThemeTextMetrics(hTheme HTHEME, hdc HDC, iPartId int32, iStateId int32, ptm *TEXTMETRIC) HRESULT {
|
||||
ret1 := syscall6(getThemeTextMetrics, 5,
|
||||
uintptr(hTheme),
|
||||
uintptr(hdc),
|
||||
uintptr(iPartId),
|
||||
uintptr(iStateId),
|
||||
uintptr(unsafe.Pointer(ptm)),
|
||||
0)
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func GetThemeTransitionDuration(hTheme HTHEME, iPartId int32, iStateIdFrom int32, iStateIdTo int32, iPropId int32, pdwDuration *uint32) HRESULT {
|
||||
ret1 := syscall6(getThemeTransitionDuration, 6,
|
||||
uintptr(hTheme),
|
||||
uintptr(iPartId),
|
||||
uintptr(iStateIdFrom),
|
||||
uintptr(iStateIdTo),
|
||||
uintptr(iPropId),
|
||||
uintptr(unsafe.Pointer(pdwDuration)))
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func GetWindowTheme(hwnd HWND) HTHEME {
|
||||
ret1 := syscall3(getWindowTheme, 1,
|
||||
uintptr(hwnd),
|
||||
0,
|
||||
0)
|
||||
return HTHEME(ret1)
|
||||
}
|
||||
|
||||
func HitTestThemeBackground(hTheme HTHEME, hdc HDC, iPartId int32, iStateId int32, dwOptions DWORD, pRect /*const*/ *RECT, hrgn HRGN, ptTest POINT, pwHitTestCode *WORD) HRESULT {
|
||||
ret1 := syscall12(hitTestThemeBackground, 10,
|
||||
uintptr(hTheme),
|
||||
uintptr(hdc),
|
||||
uintptr(iPartId),
|
||||
uintptr(iStateId),
|
||||
uintptr(dwOptions),
|
||||
uintptr(unsafe.Pointer(pRect)),
|
||||
uintptr(hrgn),
|
||||
uintptr(ptTest.X),
|
||||
uintptr(ptTest.Y),
|
||||
uintptr(unsafe.Pointer(pwHitTestCode)),
|
||||
0,
|
||||
0)
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
|
||||
func IsAppThemed() bool {
|
||||
ret1 := syscall3(isAppThemed, 0,
|
||||
0,
|
||||
0,
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func IsThemeActive() bool {
|
||||
ret1 := syscall3(isThemeActive, 0,
|
||||
0,
|
||||
0,
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func IsThemeBackgroundPartiallyTransparent(hTheme HTHEME, iPartId int32, iStateId int32) bool {
|
||||
ret1 := syscall3(isThemeBackgroundPartiallyTransparent, 3,
|
||||
uintptr(hTheme),
|
||||
uintptr(iPartId),
|
||||
uintptr(iStateId))
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func IsThemeDialogTextureEnabled(hwnd HWND) bool {
|
||||
ret1 := syscall3(isThemeDialogTextureEnabled, 1,
|
||||
uintptr(hwnd),
|
||||
0,
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func IsThemePartDefined(hTheme HTHEME, iPartId int32, iStateId int32) bool {
|
||||
ret1 := syscall3(isThemePartDefined, 3,
|
||||
uintptr(hTheme),
|
||||
uintptr(iPartId),
|
||||
uintptr(iStateId))
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func OpenThemeData(hwnd HWND, classlist string) HTHEME {
|
||||
classlistStr := unicode16FromString(classlist)
|
||||
ret1 := syscall3(openThemeData, 2,
|
||||
uintptr(hwnd),
|
||||
uintptr(unsafe.Pointer(&classlistStr[0])),
|
||||
0)
|
||||
return HTHEME(ret1)
|
||||
}
|
||||
|
||||
func OpenThemeDataEx(hwnd HWND, pszClassList string, flags DWORD) HTHEME {
|
||||
pszClassListStr := unicode16FromString(pszClassList)
|
||||
ret1 := syscall3(openThemeDataEx, 3,
|
||||
uintptr(hwnd),
|
||||
uintptr(unsafe.Pointer(&pszClassListStr[0])),
|
||||
uintptr(flags))
|
||||
return HTHEME(ret1)
|
||||
}
|
||||
|
||||
func SetThemeAppProperties(dwFlags DWORD) {
|
||||
syscall3(setThemeAppProperties, 1,
|
||||
uintptr(dwFlags),
|
||||
0,
|
||||
0)
|
||||
}
|
||||
|
||||
func SetWindowTheme(hwnd HWND, pszSubAppName string, pszSubIdList string) HRESULT {
|
||||
pszSubAppNameStr := unicode16FromString(pszSubAppName)
|
||||
pszSubIdListStr := unicode16FromString(pszSubIdList)
|
||||
ret1 := syscall3(setWindowTheme, 3,
|
||||
uintptr(hwnd),
|
||||
uintptr(unsafe.Pointer(&pszSubAppNameStr[0])),
|
||||
uintptr(unsafe.Pointer(&pszSubIdListStr[0])))
|
||||
return HRESULT(ret1)
|
||||
}
|
||||
95
grdp/win/version.go
Normal file
95
grdp/win/version.go
Normal file
@@ -0,0 +1,95 @@
|
||||
// This file was automatically generated by https://github.com/kbinani/win/blob/generator/internal/cmd/gen/gen.go
|
||||
// go run internal/cmd/gen/gen.go
|
||||
|
||||
// +build windows
|
||||
|
||||
package win
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var (
|
||||
// Library
|
||||
libversion uintptr
|
||||
|
||||
// Functions
|
||||
getFileVersionInfoSize uintptr
|
||||
getFileVersionInfo uintptr
|
||||
verFindFile uintptr
|
||||
verInstallFile uintptr
|
||||
verQueryValue uintptr
|
||||
)
|
||||
|
||||
func init() {
|
||||
// Library
|
||||
libversion = doLoadLibrary("version.dll")
|
||||
|
||||
// Functions
|
||||
getFileVersionInfoSize = doGetProcAddress(libversion, "GetFileVersionInfoSizeW")
|
||||
getFileVersionInfo = doGetProcAddress(libversion, "GetFileVersionInfoW")
|
||||
verFindFile = doGetProcAddress(libversion, "VerFindFileW")
|
||||
verInstallFile = doGetProcAddress(libversion, "VerInstallFileW")
|
||||
verQueryValue = doGetProcAddress(libversion, "VerQueryValueW")
|
||||
}
|
||||
|
||||
func GetFileVersionInfoSize(lptstrFilename string, lpdwHandle *uint32) DWORD {
|
||||
lptstrFilenameStr := unicode16FromString(lptstrFilename)
|
||||
ret1 := syscall3(getFileVersionInfoSize, 2,
|
||||
uintptr(unsafe.Pointer(&lptstrFilenameStr[0])),
|
||||
uintptr(unsafe.Pointer(lpdwHandle)),
|
||||
0)
|
||||
return DWORD(ret1)
|
||||
}
|
||||
|
||||
func GetFileVersionInfo(lptstrFilename string, dwHandle DWORD, dwLen DWORD, lpData LPVOID) bool {
|
||||
lptstrFilenameStr := unicode16FromString(lptstrFilename)
|
||||
ret1 := syscall6(getFileVersionInfo, 4,
|
||||
uintptr(unsafe.Pointer(&lptstrFilenameStr[0])),
|
||||
uintptr(dwHandle),
|
||||
uintptr(dwLen),
|
||||
uintptr(unsafe.Pointer(lpData)),
|
||||
0,
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func VerFindFile(uFlags DWORD, szFileName LPWSTR, szWinDir LPWSTR, szAppDir LPWSTR, szCurDir LPWSTR, lpuCurDirLen *uint32, szDestDir LPWSTR, lpuDestDirLen *uint32) DWORD {
|
||||
ret1 := syscall9(verFindFile, 8,
|
||||
uintptr(uFlags),
|
||||
uintptr(unsafe.Pointer(szFileName)),
|
||||
uintptr(unsafe.Pointer(szWinDir)),
|
||||
uintptr(unsafe.Pointer(szAppDir)),
|
||||
uintptr(unsafe.Pointer(szCurDir)),
|
||||
uintptr(unsafe.Pointer(lpuCurDirLen)),
|
||||
uintptr(unsafe.Pointer(szDestDir)),
|
||||
uintptr(unsafe.Pointer(lpuDestDirLen)),
|
||||
0)
|
||||
return DWORD(ret1)
|
||||
}
|
||||
|
||||
func VerInstallFile(uFlags DWORD, szSrcFileName LPWSTR, szDestFileName LPWSTR, szSrcDir LPWSTR, szDestDir LPWSTR, szCurDir LPWSTR, szTmpFile LPWSTR, lpuTmpFileLen *uint32) DWORD {
|
||||
ret1 := syscall9(verInstallFile, 8,
|
||||
uintptr(uFlags),
|
||||
uintptr(unsafe.Pointer(szSrcFileName)),
|
||||
uintptr(unsafe.Pointer(szDestFileName)),
|
||||
uintptr(unsafe.Pointer(szSrcDir)),
|
||||
uintptr(unsafe.Pointer(szDestDir)),
|
||||
uintptr(unsafe.Pointer(szCurDir)),
|
||||
uintptr(unsafe.Pointer(szTmpFile)),
|
||||
uintptr(unsafe.Pointer(lpuTmpFileLen)),
|
||||
0)
|
||||
return DWORD(ret1)
|
||||
}
|
||||
|
||||
func VerQueryValue(pBlock /*const*/ LPVOID, lpSubBlock string, lplpBuffer LPVOID, puLen *uint32) bool {
|
||||
lpSubBlockStr := unicode16FromString(lpSubBlock)
|
||||
ret1 := syscall6(verQueryValue, 4,
|
||||
uintptr(unsafe.Pointer(pBlock)),
|
||||
uintptr(unsafe.Pointer(&lpSubBlockStr[0])),
|
||||
uintptr(unsafe.Pointer(lplpBuffer)),
|
||||
uintptr(unsafe.Pointer(puLen)),
|
||||
0,
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
32
grdp/win/win.go
Normal file
32
grdp/win/win.go
Normal file
@@ -0,0 +1,32 @@
|
||||
package win
|
||||
|
||||
import (
|
||||
"unicode/utf16"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
func unicode16FromString(s string) []uint16 {
|
||||
r := make([]rune, 0)
|
||||
for _, c := range s {
|
||||
r = append(r, c)
|
||||
}
|
||||
b := utf16.Encode(r)
|
||||
return append(b, uint16(0))
|
||||
}
|
||||
|
||||
func stringFromUnicode16(s *uint16) string {
|
||||
if s == nil {
|
||||
return ""
|
||||
}
|
||||
buffer := []uint16{}
|
||||
ptr := uintptr(unsafe.Pointer(s))
|
||||
for true {
|
||||
ch := *(*uint16)(unsafe.Pointer(ptr))
|
||||
if ch == 0 {
|
||||
break
|
||||
}
|
||||
buffer = append(buffer, ch)
|
||||
ptr += unsafe.Sizeof(ch)
|
||||
}
|
||||
return string(utf16.Decode(buffer))
|
||||
}
|
||||
13
grdp/win/win_386.go
Normal file
13
grdp/win/win_386.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package win
|
||||
|
||||
const ptrsize = 4
|
||||
const is64 = false
|
||||
|
||||
const pad4for64_0for32 = 0
|
||||
const pad0for64_4for32 = 4
|
||||
const pad4for64_3for32 = 3
|
||||
const pad11for64_7for32 = 7
|
||||
const pad3for64_2for32 = 2
|
||||
const pad3for64_1for32 = 1
|
||||
const pad6for64_3for32 = 3
|
||||
const pad6for64_0for32 = 0
|
||||
13
grdp/win/win_amd64.go
Normal file
13
grdp/win/win_amd64.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package win
|
||||
|
||||
const ptrsize = 8
|
||||
const is64 = true
|
||||
|
||||
const pad4for64_0for32 = 4
|
||||
const pad0for64_4for32 = 0
|
||||
const pad4for64_3for32 = 4
|
||||
const pad11for64_7for32 = 11
|
||||
const pad3for64_2for32 = 3
|
||||
const pad3for64_1for32 = 3
|
||||
const pad6for64_3for32 = 6
|
||||
const pad6for64_0for32 = 6
|
||||
12
grdp/win/win_nonwindows.go
Normal file
12
grdp/win/win_nonwindows.go
Normal file
@@ -0,0 +1,12 @@
|
||||
// +build !windows
|
||||
|
||||
package win
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func syscall3(trap, nargs, a1, a2, a3 uintptr) uintptr {
|
||||
ret, _, _ := syscall.Syscall(trap, a1, a2, a3)
|
||||
return ret
|
||||
}
|
||||
91
grdp/win/win_windows.go
Normal file
91
grdp/win/win_windows.go
Normal file
@@ -0,0 +1,91 @@
|
||||
package win
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func doLoadLibrary(name string) uintptr {
|
||||
lib, _ := syscall.LoadLibrary(name)
|
||||
return uintptr(lib)
|
||||
}
|
||||
|
||||
func doGetProcAddress(lib uintptr, name string) uintptr {
|
||||
addr, _ := syscall.GetProcAddress(syscall.Handle(lib), name)
|
||||
return uintptr(addr)
|
||||
}
|
||||
|
||||
func syscall3(trap, nargs, a1, a2, a3 uintptr) uintptr {
|
||||
ret, _, _ := syscall.Syscall(trap, nargs, a1, a2, a3)
|
||||
return ret
|
||||
}
|
||||
|
||||
func syscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) uintptr {
|
||||
ret, _, _ := syscall.Syscall6(trap, nargs, a1, a2, a3, a4, a5, a6)
|
||||
return ret
|
||||
}
|
||||
|
||||
func syscall9(trap, nargs, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) uintptr {
|
||||
ret, _, _ := syscall.Syscall9(trap, nargs, a1, a2, a3, a4, a5, a6, a7, a8, a9)
|
||||
return ret
|
||||
}
|
||||
|
||||
func syscall12(trap, nargs, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12 uintptr) uintptr {
|
||||
ret, _, _ := syscall.Syscall12(trap, nargs, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12)
|
||||
return ret
|
||||
}
|
||||
|
||||
func syscall15(trap, nargs, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 uintptr) uintptr {
|
||||
ret, _, _ := syscall.Syscall15(trap, nargs, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15)
|
||||
return ret
|
||||
}
|
||||
|
||||
func syscallN(trap uintptr, args []uintptr) uintptr {
|
||||
n := len(args)
|
||||
num := int(math.Max(1.0, math.Ceil(float64(n)/3.0))) * 3
|
||||
for i := n; i < num; i++ {
|
||||
args = append(args, 0)
|
||||
}
|
||||
if num == 3 {
|
||||
ret, _, _ := syscall.Syscall(trap, uintptr(n),
|
||||
args[0], args[1], args[2])
|
||||
return ret
|
||||
} else if num == 6 {
|
||||
ret, _, _ := syscall.Syscall6(trap, uintptr(n),
|
||||
args[0], args[1], args[2],
|
||||
args[3], args[4], args[5])
|
||||
return ret
|
||||
} else if num == 9 {
|
||||
ret, _, _ := syscall.Syscall9(trap, uintptr(n),
|
||||
args[0], args[1], args[2],
|
||||
args[3], args[4], args[5],
|
||||
args[6], args[7], args[8])
|
||||
return ret
|
||||
} else if num == 12 {
|
||||
ret, _, _ := syscall.Syscall12(trap, uintptr(n),
|
||||
args[0], args[1], args[2],
|
||||
args[3], args[4], args[5],
|
||||
args[6], args[7], args[8],
|
||||
args[9], args[10], args[11])
|
||||
return ret
|
||||
} else if num == 15 {
|
||||
ret, _, _ := syscall.Syscall15(trap, uintptr(n),
|
||||
args[0], args[1], args[2],
|
||||
args[3], args[4], args[5],
|
||||
args[6], args[7], args[8],
|
||||
args[9], args[10], args[11],
|
||||
args[12], args[13], args[14])
|
||||
return ret
|
||||
} else {
|
||||
panic(fmt.Errorf("Too many syscall arguments: %d", n))
|
||||
}
|
||||
}
|
||||
|
||||
func getUintptrFromBool(b bool) uintptr {
|
||||
if b {
|
||||
return 1
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
1644
grdp/win/winmm.go
Normal file
1644
grdp/win/winmm.go
Normal file
File diff suppressed because it is too large
Load Diff
904
grdp/win/ws2_32.go
Normal file
904
grdp/win/ws2_32.go
Normal file
@@ -0,0 +1,904 @@
|
||||
// This file was automatically generated by https://github.com/kbinani/win/blob/generator/internal/cmd/gen/gen.go
|
||||
// go run internal/cmd/gen/gen.go
|
||||
|
||||
// +build windows
|
||||
|
||||
package win
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var (
|
||||
// Library
|
||||
libws2_32 uintptr
|
||||
|
||||
// Functions
|
||||
freeAddrInfoExW uintptr
|
||||
freeAddrInfoW uintptr
|
||||
getAddrInfoEx uintptr
|
||||
getAddrInfoW uintptr
|
||||
getNameInfoW uintptr
|
||||
inetNtopW uintptr
|
||||
inetPtonW uintptr
|
||||
wPUCompleteOverlappedRequest uintptr
|
||||
wSAAccept uintptr
|
||||
wSAAddressToString uintptr
|
||||
wSAAsyncGetHostByAddr uintptr
|
||||
wSAAsyncGetHostByName uintptr
|
||||
wSAAsyncGetProtoByName uintptr
|
||||
wSAAsyncGetProtoByNumber uintptr
|
||||
wSAAsyncGetServByName uintptr
|
||||
wSAAsyncGetServByPort uintptr
|
||||
wSAAsyncSelect uintptr
|
||||
wSACancelAsyncRequest uintptr
|
||||
wSACancelBlockingCall uintptr
|
||||
wSACleanup uintptr
|
||||
wSACloseEvent uintptr
|
||||
wSAConnect uintptr
|
||||
wSACreateEvent uintptr
|
||||
wSADuplicateSocket uintptr
|
||||
wSAEnumNameSpaceProviders uintptr
|
||||
wSAEnumNetworkEvents uintptr
|
||||
wSAEnumProtocols uintptr
|
||||
wSAEventSelect uintptr
|
||||
wSAGetLastError uintptr
|
||||
wSAGetOverlappedResult uintptr
|
||||
wSAGetQOSByName uintptr
|
||||
wSAGetServiceClassInfo uintptr
|
||||
wSAGetServiceClassNameByClassId uintptr
|
||||
wSAHtonl uintptr
|
||||
wSAHtons uintptr
|
||||
wSAInstallServiceClass uintptr
|
||||
wSAIoctl uintptr
|
||||
wSAIsBlocking uintptr
|
||||
wSAJoinLeaf uintptr
|
||||
wSALookupServiceBegin uintptr
|
||||
wSALookupServiceEnd uintptr
|
||||
wSALookupServiceNext uintptr
|
||||
wSANSPIoctl uintptr
|
||||
wSANtohl uintptr
|
||||
wSANtohs uintptr
|
||||
wSAPoll uintptr
|
||||
wSAProviderConfigChange uintptr
|
||||
wSARecv uintptr
|
||||
wSARecvDisconnect uintptr
|
||||
wSARecvFrom uintptr
|
||||
wSARemoveServiceClass uintptr
|
||||
wSASend uintptr
|
||||
wSASendDisconnect uintptr
|
||||
wSASendMsg uintptr
|
||||
wSASendTo uintptr
|
||||
wSASetBlockingHook uintptr
|
||||
wSASetLastError uintptr
|
||||
wSASetService uintptr
|
||||
wSASocket uintptr
|
||||
wSAStartup uintptr
|
||||
wSAStringToAddress uintptr
|
||||
wSAUnhookBlockingHook uintptr
|
||||
wSApSetPostRoutine uintptr
|
||||
wSCDeinstallProvider uintptr
|
||||
wSCEnableNSProvider uintptr
|
||||
wSCEnumProtocols uintptr
|
||||
wSCGetProviderPath uintptr
|
||||
wSCInstallNameSpace uintptr
|
||||
wSCInstallProvider uintptr
|
||||
wSCUnInstallNameSpace uintptr
|
||||
wSCWriteProviderOrder uintptr
|
||||
gethostname uintptr
|
||||
)
|
||||
|
||||
func init() {
|
||||
// Library
|
||||
libws2_32 = doLoadLibrary("ws2_32.dll")
|
||||
|
||||
// Functions
|
||||
freeAddrInfoExW = doGetProcAddress(libws2_32, "FreeAddrInfoExW")
|
||||
freeAddrInfoW = doGetProcAddress(libws2_32, "FreeAddrInfoW")
|
||||
getAddrInfoEx = doGetProcAddress(libws2_32, "GetAddrInfoExW")
|
||||
getAddrInfoW = doGetProcAddress(libws2_32, "GetAddrInfoW")
|
||||
getNameInfoW = doGetProcAddress(libws2_32, "GetNameInfoW")
|
||||
inetNtopW = doGetProcAddress(libws2_32, "InetNtopW")
|
||||
inetPtonW = doGetProcAddress(libws2_32, "InetPtonW")
|
||||
wPUCompleteOverlappedRequest = doGetProcAddress(libws2_32, "WPUCompleteOverlappedRequest")
|
||||
wSAAccept = doGetProcAddress(libws2_32, "WSAAccept")
|
||||
wSAAddressToString = doGetProcAddress(libws2_32, "WSAAddressToStringW")
|
||||
wSAAsyncGetHostByAddr = doGetProcAddress(libws2_32, "WSAAsyncGetHostByAddr")
|
||||
wSAAsyncGetHostByName = doGetProcAddress(libws2_32, "WSAAsyncGetHostByName")
|
||||
wSAAsyncGetProtoByName = doGetProcAddress(libws2_32, "WSAAsyncGetProtoByName")
|
||||
wSAAsyncGetProtoByNumber = doGetProcAddress(libws2_32, "WSAAsyncGetProtoByNumber")
|
||||
wSAAsyncGetServByName = doGetProcAddress(libws2_32, "WSAAsyncGetServByName")
|
||||
wSAAsyncGetServByPort = doGetProcAddress(libws2_32, "WSAAsyncGetServByPort")
|
||||
wSAAsyncSelect = doGetProcAddress(libws2_32, "WSAAsyncSelect")
|
||||
wSACancelAsyncRequest = doGetProcAddress(libws2_32, "WSACancelAsyncRequest")
|
||||
wSACancelBlockingCall = doGetProcAddress(libws2_32, "WSACancelBlockingCall")
|
||||
wSACleanup = doGetProcAddress(libws2_32, "WSACleanup")
|
||||
wSACloseEvent = doGetProcAddress(libws2_32, "WSACloseEvent")
|
||||
wSAConnect = doGetProcAddress(libws2_32, "WSAConnect")
|
||||
wSACreateEvent = doGetProcAddress(libws2_32, "WSACreateEvent")
|
||||
wSADuplicateSocket = doGetProcAddress(libws2_32, "WSADuplicateSocketW")
|
||||
wSAEnumNameSpaceProviders = doGetProcAddress(libws2_32, "WSAEnumNameSpaceProvidersW")
|
||||
wSAEnumNetworkEvents = doGetProcAddress(libws2_32, "WSAEnumNetworkEvents")
|
||||
wSAEnumProtocols = doGetProcAddress(libws2_32, "WSAEnumProtocolsW")
|
||||
wSAEventSelect = doGetProcAddress(libws2_32, "WSAEventSelect")
|
||||
wSAGetLastError = doGetProcAddress(libws2_32, "WSAGetLastError")
|
||||
wSAGetOverlappedResult = doGetProcAddress(libws2_32, "WSAGetOverlappedResult")
|
||||
wSAGetQOSByName = doGetProcAddress(libws2_32, "WSAGetQOSByName")
|
||||
wSAGetServiceClassInfo = doGetProcAddress(libws2_32, "WSAGetServiceClassInfoW")
|
||||
wSAGetServiceClassNameByClassId = doGetProcAddress(libws2_32, "WSAGetServiceClassNameByClassIdW")
|
||||
wSAHtonl = doGetProcAddress(libws2_32, "WSAHtonl")
|
||||
wSAHtons = doGetProcAddress(libws2_32, "WSAHtons")
|
||||
wSAInstallServiceClass = doGetProcAddress(libws2_32, "WSAInstallServiceClassW")
|
||||
wSAIoctl = doGetProcAddress(libws2_32, "WSAIoctl")
|
||||
wSAIsBlocking = doGetProcAddress(libws2_32, "WSAIsBlocking")
|
||||
wSAJoinLeaf = doGetProcAddress(libws2_32, "WSAJoinLeaf")
|
||||
wSALookupServiceBegin = doGetProcAddress(libws2_32, "WSALookupServiceBeginW")
|
||||
wSALookupServiceEnd = doGetProcAddress(libws2_32, "WSALookupServiceEnd")
|
||||
wSALookupServiceNext = doGetProcAddress(libws2_32, "WSALookupServiceNextW")
|
||||
wSANSPIoctl = doGetProcAddress(libws2_32, "WSANSPIoctl")
|
||||
wSANtohl = doGetProcAddress(libws2_32, "WSANtohl")
|
||||
wSANtohs = doGetProcAddress(libws2_32, "WSANtohs")
|
||||
wSAPoll = doGetProcAddress(libws2_32, "WSAPoll")
|
||||
wSAProviderConfigChange = doGetProcAddress(libws2_32, "WSAProviderConfigChange")
|
||||
wSARecv = doGetProcAddress(libws2_32, "WSARecv")
|
||||
wSARecvDisconnect = doGetProcAddress(libws2_32, "WSARecvDisconnect")
|
||||
wSARecvFrom = doGetProcAddress(libws2_32, "WSARecvFrom")
|
||||
wSARemoveServiceClass = doGetProcAddress(libws2_32, "WSARemoveServiceClass")
|
||||
wSASend = doGetProcAddress(libws2_32, "WSASend")
|
||||
wSASendDisconnect = doGetProcAddress(libws2_32, "WSASendDisconnect")
|
||||
wSASendMsg = doGetProcAddress(libws2_32, "WSASendMsg")
|
||||
wSASendTo = doGetProcAddress(libws2_32, "WSASendTo")
|
||||
wSASetBlockingHook = doGetProcAddress(libws2_32, "WSASetBlockingHook")
|
||||
wSASetLastError = doGetProcAddress(libws2_32, "WSASetLastError")
|
||||
wSASetService = doGetProcAddress(libws2_32, "WSASetServiceW")
|
||||
wSASocket = doGetProcAddress(libws2_32, "WSASocketW")
|
||||
wSAStartup = doGetProcAddress(libws2_32, "WSAStartup")
|
||||
wSAStringToAddress = doGetProcAddress(libws2_32, "WSAStringToAddressW")
|
||||
wSAUnhookBlockingHook = doGetProcAddress(libws2_32, "WSAUnhookBlockingHook")
|
||||
wSApSetPostRoutine = doGetProcAddress(libws2_32, "WSApSetPostRoutine")
|
||||
wSCDeinstallProvider = doGetProcAddress(libws2_32, "WSCDeinstallProvider")
|
||||
wSCEnableNSProvider = doGetProcAddress(libws2_32, "WSCEnableNSProvider")
|
||||
wSCEnumProtocols = doGetProcAddress(libws2_32, "WSCEnumProtocols")
|
||||
wSCGetProviderPath = doGetProcAddress(libws2_32, "WSCGetProviderPath")
|
||||
wSCInstallNameSpace = doGetProcAddress(libws2_32, "WSCInstallNameSpace")
|
||||
wSCInstallProvider = doGetProcAddress(libws2_32, "WSCInstallProvider")
|
||||
wSCUnInstallNameSpace = doGetProcAddress(libws2_32, "WSCUnInstallNameSpace")
|
||||
wSCWriteProviderOrder = doGetProcAddress(libws2_32, "WSCWriteProviderOrder")
|
||||
gethostname = doGetProcAddress(libws2_32, "gethostname")
|
||||
}
|
||||
|
||||
func FreeAddrInfoExW(ai *ADDRINFOEX) {
|
||||
syscall3(freeAddrInfoExW, 1,
|
||||
uintptr(unsafe.Pointer(ai)),
|
||||
0,
|
||||
0)
|
||||
}
|
||||
|
||||
func FreeAddrInfoW(ai PADDRINFO) {
|
||||
syscall3(freeAddrInfoW, 1,
|
||||
uintptr(unsafe.Pointer(ai)),
|
||||
0,
|
||||
0)
|
||||
}
|
||||
|
||||
func GetAddrInfoEx(name /*const*/ *WCHAR, servname /*const*/ *WCHAR, namespace DWORD, namespace_id *GUID, hints /*const*/ *ADDRINFOEX, result **ADDRINFOEX, timeout *Timeval, overlapped *OVERLAPPED, completion_routine LPLOOKUPSERVICE_COMPLETION_ROUTINE, handle *HANDLE) int32 {
|
||||
completion_routineCallback := syscall.NewCallback(completion_routine)
|
||||
ret1 := syscall12(getAddrInfoEx, 10,
|
||||
uintptr(unsafe.Pointer(name)),
|
||||
uintptr(unsafe.Pointer(servname)),
|
||||
uintptr(namespace),
|
||||
uintptr(unsafe.Pointer(namespace_id)),
|
||||
uintptr(unsafe.Pointer(hints)),
|
||||
uintptr(unsafe.Pointer(result)),
|
||||
uintptr(unsafe.Pointer(timeout)),
|
||||
uintptr(unsafe.Pointer(overlapped)),
|
||||
completion_routineCallback,
|
||||
uintptr(unsafe.Pointer(handle)),
|
||||
0,
|
||||
0)
|
||||
return int32(ret1)
|
||||
}
|
||||
|
||||
func GetAddrInfoW(nodename string, servname string, hints /*const*/ *ADDRINFO, res *PADDRINFO) int32 {
|
||||
nodenameStr := unicode16FromString(nodename)
|
||||
servnameStr := unicode16FromString(servname)
|
||||
ret1 := syscall6(getAddrInfoW, 4,
|
||||
uintptr(unsafe.Pointer(&nodenameStr[0])),
|
||||
uintptr(unsafe.Pointer(&servnameStr[0])),
|
||||
uintptr(unsafe.Pointer(hints)),
|
||||
uintptr(unsafe.Pointer(res)),
|
||||
0,
|
||||
0)
|
||||
return int32(ret1)
|
||||
}
|
||||
|
||||
func GetNameInfoW(sa /*const*/ *SOCKADDR, salen Socklen_t, host PWCHAR, hostlen DWORD, serv PWCHAR, servlen DWORD, flags INT) int32 {
|
||||
ret1 := syscall9(getNameInfoW, 7,
|
||||
uintptr(unsafe.Pointer(sa)),
|
||||
uintptr(salen),
|
||||
uintptr(unsafe.Pointer(host)),
|
||||
uintptr(hostlen),
|
||||
uintptr(unsafe.Pointer(serv)),
|
||||
uintptr(servlen),
|
||||
uintptr(flags),
|
||||
0,
|
||||
0)
|
||||
return int32(ret1)
|
||||
}
|
||||
|
||||
func InetNtopW(family INT, addr uintptr, buffer PWSTR, aLen SIZE_T) string {
|
||||
ret1 := syscall6(inetNtopW, 4,
|
||||
uintptr(family),
|
||||
addr,
|
||||
uintptr(unsafe.Pointer(buffer)),
|
||||
uintptr(aLen),
|
||||
0,
|
||||
0)
|
||||
return stringFromUnicode16((*uint16)(unsafe.Pointer(ret1)))
|
||||
}
|
||||
|
||||
func InetPtonW(family INT, addr string, buffer uintptr) INT {
|
||||
addrStr := unicode16FromString(addr)
|
||||
ret1 := syscall3(inetPtonW, 3,
|
||||
uintptr(family),
|
||||
uintptr(unsafe.Pointer(&addrStr[0])),
|
||||
buffer)
|
||||
return INT(ret1)
|
||||
}
|
||||
|
||||
func WPUCompleteOverlappedRequest(s SOCKET, overlapped LPWSAOVERLAPPED, error DWORD, transferred DWORD, errcode *int32) WSAEVENT {
|
||||
ret1 := syscall6(wPUCompleteOverlappedRequest, 5,
|
||||
uintptr(s),
|
||||
uintptr(unsafe.Pointer(overlapped)),
|
||||
uintptr(error),
|
||||
uintptr(transferred),
|
||||
uintptr(unsafe.Pointer(errcode)),
|
||||
0)
|
||||
return WSAEVENT(ret1)
|
||||
}
|
||||
|
||||
func WSAAccept(s SOCKET, addr *Sockaddr, addrlen *int32, lpfnCondition LPCONDITIONPROC, dwCallbackData *uint32) SOCKET {
|
||||
lpfnConditionCallback := syscall.NewCallback(func(lpCallerIdRawArg LPWSABUF, lpCallerDataRawArg LPWSABUF, lpSQOSRawArg LPQOS, lpGQOSRawArg LPQOS, lpCalleeIdRawArg LPWSABUF, lpCalleeDataRawArg LPWSABUF, gRawArg *GROUP, dwCallbackDataRawArg DWORD_PTR) uintptr {
|
||||
ret := lpfnCondition(lpCallerIdRawArg, lpCallerDataRawArg, lpSQOSRawArg, lpGQOSRawArg, lpCalleeIdRawArg, lpCalleeDataRawArg, gRawArg, dwCallbackDataRawArg)
|
||||
return uintptr(ret)
|
||||
})
|
||||
ret1 := syscall6(wSAAccept, 5,
|
||||
uintptr(s),
|
||||
uintptr(unsafe.Pointer(addr)),
|
||||
uintptr(unsafe.Pointer(addrlen)),
|
||||
lpfnConditionCallback,
|
||||
uintptr(unsafe.Pointer(dwCallbackData)),
|
||||
0)
|
||||
return SOCKET(ret1)
|
||||
}
|
||||
|
||||
func WSAAddressToString(sockaddr *SOCKADDR, aLen DWORD, info LPWSAPROTOCOL_INFO, string LPWSTR, lenstr *uint32) INT {
|
||||
ret1 := syscall6(wSAAddressToString, 5,
|
||||
uintptr(unsafe.Pointer(sockaddr)),
|
||||
uintptr(aLen),
|
||||
uintptr(unsafe.Pointer(info)),
|
||||
uintptr(unsafe.Pointer(string)),
|
||||
uintptr(unsafe.Pointer(lenstr)),
|
||||
0)
|
||||
return INT(ret1)
|
||||
}
|
||||
|
||||
func WSAAsyncGetHostByAddr(hWnd HWND, uMsg UINT, addr /*const*/ LPCSTR, aLen INT, aType INT, sbuf LPSTR, buflen INT) HANDLE {
|
||||
ret1 := syscall9(wSAAsyncGetHostByAddr, 7,
|
||||
uintptr(hWnd),
|
||||
uintptr(uMsg),
|
||||
uintptr(unsafe.Pointer(addr)),
|
||||
uintptr(aLen),
|
||||
uintptr(aType),
|
||||
uintptr(unsafe.Pointer(sbuf)),
|
||||
uintptr(buflen),
|
||||
0,
|
||||
0)
|
||||
return HANDLE(ret1)
|
||||
}
|
||||
|
||||
func WSAAsyncGetHostByName(hWnd HWND, uMsg UINT, name /*const*/ LPCSTR, sbuf LPSTR, buflen INT) HANDLE {
|
||||
ret1 := syscall6(wSAAsyncGetHostByName, 5,
|
||||
uintptr(hWnd),
|
||||
uintptr(uMsg),
|
||||
uintptr(unsafe.Pointer(name)),
|
||||
uintptr(unsafe.Pointer(sbuf)),
|
||||
uintptr(buflen),
|
||||
0)
|
||||
return HANDLE(ret1)
|
||||
}
|
||||
|
||||
func WSAAsyncGetProtoByName(hWnd HWND, uMsg UINT, name /*const*/ LPCSTR, sbuf LPSTR, buflen INT) HANDLE {
|
||||
ret1 := syscall6(wSAAsyncGetProtoByName, 5,
|
||||
uintptr(hWnd),
|
||||
uintptr(uMsg),
|
||||
uintptr(unsafe.Pointer(name)),
|
||||
uintptr(unsafe.Pointer(sbuf)),
|
||||
uintptr(buflen),
|
||||
0)
|
||||
return HANDLE(ret1)
|
||||
}
|
||||
|
||||
func WSAAsyncGetProtoByNumber(hWnd HWND, uMsg UINT, number INT, sbuf LPSTR, buflen INT) HANDLE {
|
||||
ret1 := syscall6(wSAAsyncGetProtoByNumber, 5,
|
||||
uintptr(hWnd),
|
||||
uintptr(uMsg),
|
||||
uintptr(number),
|
||||
uintptr(unsafe.Pointer(sbuf)),
|
||||
uintptr(buflen),
|
||||
0)
|
||||
return HANDLE(ret1)
|
||||
}
|
||||
|
||||
func WSAAsyncGetServByName(hWnd HWND, uMsg UINT, name /*const*/ LPCSTR, proto /*const*/ LPCSTR, sbuf LPSTR, buflen INT) HANDLE {
|
||||
ret1 := syscall6(wSAAsyncGetServByName, 6,
|
||||
uintptr(hWnd),
|
||||
uintptr(uMsg),
|
||||
uintptr(unsafe.Pointer(name)),
|
||||
uintptr(unsafe.Pointer(proto)),
|
||||
uintptr(unsafe.Pointer(sbuf)),
|
||||
uintptr(buflen))
|
||||
return HANDLE(ret1)
|
||||
}
|
||||
|
||||
func WSAAsyncGetServByPort(hWnd HWND, uMsg UINT, port INT, proto /*const*/ LPCSTR, sbuf LPSTR, buflen INT) HANDLE {
|
||||
ret1 := syscall6(wSAAsyncGetServByPort, 6,
|
||||
uintptr(hWnd),
|
||||
uintptr(uMsg),
|
||||
uintptr(port),
|
||||
uintptr(unsafe.Pointer(proto)),
|
||||
uintptr(unsafe.Pointer(sbuf)),
|
||||
uintptr(buflen))
|
||||
return HANDLE(ret1)
|
||||
}
|
||||
|
||||
func WSAAsyncSelect(s SOCKET, hWnd HWND, uMsg UINT, lEvent LONG) INT {
|
||||
ret1 := syscall6(wSAAsyncSelect, 4,
|
||||
uintptr(s),
|
||||
uintptr(hWnd),
|
||||
uintptr(uMsg),
|
||||
uintptr(lEvent),
|
||||
0,
|
||||
0)
|
||||
return INT(ret1)
|
||||
}
|
||||
|
||||
func WSACancelAsyncRequest(hAsyncTaskHandle HANDLE) INT {
|
||||
ret1 := syscall3(wSACancelAsyncRequest, 1,
|
||||
uintptr(hAsyncTaskHandle),
|
||||
0,
|
||||
0)
|
||||
return INT(ret1)
|
||||
}
|
||||
|
||||
func WSACancelBlockingCall() INT {
|
||||
ret1 := syscall3(wSACancelBlockingCall, 0,
|
||||
0,
|
||||
0,
|
||||
0)
|
||||
return INT(ret1)
|
||||
}
|
||||
|
||||
func WSACleanup() INT {
|
||||
ret1 := syscall3(wSACleanup, 0,
|
||||
0,
|
||||
0,
|
||||
0)
|
||||
return INT(ret1)
|
||||
}
|
||||
|
||||
func WSACloseEvent(event WSAEVENT) bool {
|
||||
ret1 := syscall3(wSACloseEvent, 1,
|
||||
uintptr(event),
|
||||
0,
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func WSAConnect(s SOCKET, name /*const*/ *Sockaddr, namelen int32, lpCallerData LPWSABUF, lpCalleeData LPWSABUF, lpSQOS *QOS, lpGQOS *QOS) int32 {
|
||||
ret1 := syscall9(wSAConnect, 7,
|
||||
uintptr(s),
|
||||
uintptr(unsafe.Pointer(name)),
|
||||
uintptr(namelen),
|
||||
uintptr(unsafe.Pointer(lpCallerData)),
|
||||
uintptr(unsafe.Pointer(lpCalleeData)),
|
||||
uintptr(unsafe.Pointer(lpSQOS)),
|
||||
uintptr(unsafe.Pointer(lpGQOS)),
|
||||
0,
|
||||
0)
|
||||
return int32(ret1)
|
||||
}
|
||||
|
||||
func WSACreateEvent() WSAEVENT {
|
||||
ret1 := syscall3(wSACreateEvent, 0,
|
||||
0,
|
||||
0,
|
||||
0)
|
||||
return WSAEVENT(ret1)
|
||||
}
|
||||
|
||||
func WSADuplicateSocket(s SOCKET, dwProcessId DWORD, lpProtocolInfo LPWSAPROTOCOL_INFO) int32 {
|
||||
ret1 := syscall3(wSADuplicateSocket, 3,
|
||||
uintptr(s),
|
||||
uintptr(dwProcessId),
|
||||
uintptr(unsafe.Pointer(lpProtocolInfo)))
|
||||
return int32(ret1)
|
||||
}
|
||||
|
||||
func WSAEnumNameSpaceProviders(aLen *uint32, buffer LPWSANAMESPACE_INFO) INT {
|
||||
ret1 := syscall3(wSAEnumNameSpaceProviders, 2,
|
||||
uintptr(unsafe.Pointer(aLen)),
|
||||
uintptr(unsafe.Pointer(buffer)),
|
||||
0)
|
||||
return INT(ret1)
|
||||
}
|
||||
|
||||
func WSAEnumNetworkEvents(s SOCKET, hEvent WSAEVENT, lpEvent *WSANETWORKEVENTS) int32 {
|
||||
ret1 := syscall3(wSAEnumNetworkEvents, 3,
|
||||
uintptr(s),
|
||||
uintptr(hEvent),
|
||||
uintptr(unsafe.Pointer(lpEvent)))
|
||||
return int32(ret1)
|
||||
}
|
||||
|
||||
func WSAEnumProtocols(protocols *int32, buffer LPWSAPROTOCOL_INFO, aLen *uint32) INT {
|
||||
ret1 := syscall3(wSAEnumProtocols, 3,
|
||||
uintptr(unsafe.Pointer(protocols)),
|
||||
uintptr(unsafe.Pointer(buffer)),
|
||||
uintptr(unsafe.Pointer(aLen)))
|
||||
return INT(ret1)
|
||||
}
|
||||
|
||||
func WSAEventSelect(s SOCKET, hEvent WSAEVENT, lEvent LONG) int32 {
|
||||
ret1 := syscall3(wSAEventSelect, 3,
|
||||
uintptr(s),
|
||||
uintptr(hEvent),
|
||||
uintptr(lEvent))
|
||||
return int32(ret1)
|
||||
}
|
||||
|
||||
func WSAGetLastError() INT {
|
||||
ret1 := syscall3(wSAGetLastError, 0,
|
||||
0,
|
||||
0,
|
||||
0)
|
||||
return INT(ret1)
|
||||
}
|
||||
|
||||
func WSAGetOverlappedResult(s SOCKET, lpOverlapped LPWSAOVERLAPPED, lpcbTransfer *uint32, fWait bool, lpdwFlags *uint32) bool {
|
||||
ret1 := syscall6(wSAGetOverlappedResult, 5,
|
||||
uintptr(s),
|
||||
uintptr(unsafe.Pointer(lpOverlapped)),
|
||||
uintptr(unsafe.Pointer(lpcbTransfer)),
|
||||
getUintptrFromBool(fWait),
|
||||
uintptr(unsafe.Pointer(lpdwFlags)),
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func WSAGetQOSByName(s SOCKET, lpQOSName LPWSABUF, lpQOS *QOS) bool {
|
||||
ret1 := syscall3(wSAGetQOSByName, 3,
|
||||
uintptr(s),
|
||||
uintptr(unsafe.Pointer(lpQOSName)),
|
||||
uintptr(unsafe.Pointer(lpQOS)))
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func WSAGetServiceClassInfo(provider *GUID, service *GUID, aLen *uint32, info LPWSASERVICECLASSINFO) INT {
|
||||
ret1 := syscall6(wSAGetServiceClassInfo, 4,
|
||||
uintptr(unsafe.Pointer(provider)),
|
||||
uintptr(unsafe.Pointer(service)),
|
||||
uintptr(unsafe.Pointer(aLen)),
|
||||
uintptr(unsafe.Pointer(info)),
|
||||
0,
|
||||
0)
|
||||
return INT(ret1)
|
||||
}
|
||||
|
||||
func WSAGetServiceClassNameByClassId(class *GUID, service LPWSTR, aLen *uint32) INT {
|
||||
ret1 := syscall3(wSAGetServiceClassNameByClassId, 3,
|
||||
uintptr(unsafe.Pointer(class)),
|
||||
uintptr(unsafe.Pointer(service)),
|
||||
uintptr(unsafe.Pointer(aLen)))
|
||||
return INT(ret1)
|
||||
}
|
||||
|
||||
func WSAHtonl(s SOCKET, hostlong ULONG, lpnetlong *ULONG) int32 {
|
||||
ret1 := syscall3(wSAHtonl, 3,
|
||||
uintptr(s),
|
||||
uintptr(hostlong),
|
||||
uintptr(unsafe.Pointer(lpnetlong)))
|
||||
return int32(ret1)
|
||||
}
|
||||
|
||||
func WSAHtons(s SOCKET, hostshort uint16, lpnetshort *uint16) int32 {
|
||||
ret1 := syscall3(wSAHtons, 3,
|
||||
uintptr(s),
|
||||
uintptr(hostshort),
|
||||
uintptr(unsafe.Pointer(lpnetshort)))
|
||||
return int32(ret1)
|
||||
}
|
||||
|
||||
func WSAInstallServiceClass(info LPWSASERVICECLASSINFO) int32 {
|
||||
ret1 := syscall3(wSAInstallServiceClass, 1,
|
||||
uintptr(unsafe.Pointer(info)),
|
||||
0,
|
||||
0)
|
||||
return int32(ret1)
|
||||
}
|
||||
|
||||
func WSAIoctl(s SOCKET, code DWORD, in_buff LPVOID, in_size DWORD, out_buff LPVOID, out_size DWORD, ret_size *uint32, overlapped LPWSAOVERLAPPED, completion LPWSAOVERLAPPED_COMPLETION_ROUTINE) INT {
|
||||
completionCallback := syscall.NewCallback(completion)
|
||||
ret1 := syscall9(wSAIoctl, 9,
|
||||
uintptr(s),
|
||||
uintptr(code),
|
||||
uintptr(unsafe.Pointer(in_buff)),
|
||||
uintptr(in_size),
|
||||
uintptr(unsafe.Pointer(out_buff)),
|
||||
uintptr(out_size),
|
||||
uintptr(unsafe.Pointer(ret_size)),
|
||||
uintptr(unsafe.Pointer(overlapped)),
|
||||
completionCallback)
|
||||
return INT(ret1)
|
||||
}
|
||||
|
||||
func WSAIsBlocking() bool {
|
||||
ret1 := syscall3(wSAIsBlocking, 0,
|
||||
0,
|
||||
0,
|
||||
0)
|
||||
return ret1 != 0
|
||||
}
|
||||
|
||||
func WSAJoinLeaf(s SOCKET, addr /*const*/ *Sockaddr, addrlen int32, lpCallerData LPWSABUF, lpCalleeData LPWSABUF, lpSQOS *QOS, lpGQOS *QOS, dwFlags DWORD) SOCKET {
|
||||
ret1 := syscall9(wSAJoinLeaf, 8,
|
||||
uintptr(s),
|
||||
uintptr(unsafe.Pointer(addr)),
|
||||
uintptr(addrlen),
|
||||
uintptr(unsafe.Pointer(lpCallerData)),
|
||||
uintptr(unsafe.Pointer(lpCalleeData)),
|
||||
uintptr(unsafe.Pointer(lpSQOS)),
|
||||
uintptr(unsafe.Pointer(lpGQOS)),
|
||||
uintptr(dwFlags),
|
||||
0)
|
||||
return SOCKET(ret1)
|
||||
}
|
||||
|
||||
func WSALookupServiceBegin(lpqsRestrictions LPWSAQUERYSET, dwControlFlags DWORD, lphLookup *HANDLE) INT {
|
||||
ret1 := syscall3(wSALookupServiceBegin, 3,
|
||||
uintptr(unsafe.Pointer(lpqsRestrictions)),
|
||||
uintptr(dwControlFlags),
|
||||
uintptr(unsafe.Pointer(lphLookup)))
|
||||
return INT(ret1)
|
||||
}
|
||||
|
||||
func WSALookupServiceEnd(lookup HANDLE) INT {
|
||||
ret1 := syscall3(wSALookupServiceEnd, 1,
|
||||
uintptr(lookup),
|
||||
0,
|
||||
0)
|
||||
return INT(ret1)
|
||||
}
|
||||
|
||||
func WSALookupServiceNext(lookup HANDLE, flags DWORD, aLen *uint32, results LPWSAQUERYSET) INT {
|
||||
ret1 := syscall6(wSALookupServiceNext, 4,
|
||||
uintptr(lookup),
|
||||
uintptr(flags),
|
||||
uintptr(unsafe.Pointer(aLen)),
|
||||
uintptr(unsafe.Pointer(results)),
|
||||
0,
|
||||
0)
|
||||
return INT(ret1)
|
||||
}
|
||||
|
||||
func WSANSPIoctl(hLookup HANDLE, dwControlCode DWORD, lpvInBuffer LPVOID, cbInBuffer DWORD, lpvOutBuffer LPVOID, cbOutBuffer DWORD, lpcbBytesReturned *uint32, lpCompletion *WSACOMPLETION) INT {
|
||||
ret1 := syscall9(wSANSPIoctl, 8,
|
||||
uintptr(hLookup),
|
||||
uintptr(dwControlCode),
|
||||
uintptr(unsafe.Pointer(lpvInBuffer)),
|
||||
uintptr(cbInBuffer),
|
||||
uintptr(unsafe.Pointer(lpvOutBuffer)),
|
||||
uintptr(cbOutBuffer),
|
||||
uintptr(unsafe.Pointer(lpcbBytesReturned)),
|
||||
uintptr(unsafe.Pointer(lpCompletion)),
|
||||
0)
|
||||
return INT(ret1)
|
||||
}
|
||||
|
||||
func WSANtohl(s SOCKET, netlong ULONG, lphostlong *ULONG) INT {
|
||||
ret1 := syscall3(wSANtohl, 3,
|
||||
uintptr(s),
|
||||
uintptr(netlong),
|
||||
uintptr(unsafe.Pointer(lphostlong)))
|
||||
return INT(ret1)
|
||||
}
|
||||
|
||||
func WSANtohs(s SOCKET, netshort uint16, lphostshort *uint16) INT {
|
||||
ret1 := syscall3(wSANtohs, 3,
|
||||
uintptr(s),
|
||||
uintptr(netshort),
|
||||
uintptr(unsafe.Pointer(lphostshort)))
|
||||
return INT(ret1)
|
||||
}
|
||||
|
||||
func WSAPoll(wfds *WSAPOLLFD, count ULONG, timeout int32) int32 {
|
||||
ret1 := syscall3(wSAPoll, 3,
|
||||
uintptr(unsafe.Pointer(wfds)),
|
||||
uintptr(count),
|
||||
uintptr(timeout))
|
||||
return int32(ret1)
|
||||
}
|
||||
|
||||
func WSAProviderConfigChange(handle *HANDLE, overlapped LPWSAOVERLAPPED, completion LPWSAOVERLAPPED_COMPLETION_ROUTINE) INT {
|
||||
completionCallback := syscall.NewCallback(completion)
|
||||
ret1 := syscall3(wSAProviderConfigChange, 3,
|
||||
uintptr(unsafe.Pointer(handle)),
|
||||
uintptr(unsafe.Pointer(overlapped)),
|
||||
completionCallback)
|
||||
return INT(ret1)
|
||||
}
|
||||
|
||||
func WSARecv(s SOCKET, lpBuffers LPWSABUF, dwBufferCount DWORD, numberOfBytesReceived *uint32, lpFlags *uint32, lpOverlapped LPWSAOVERLAPPED, lpCompletionRoutine LPWSAOVERLAPPED_COMPLETION_ROUTINE) int32 {
|
||||
lpCompletionRoutineCallback := syscall.NewCallback(lpCompletionRoutine)
|
||||
ret1 := syscall9(wSARecv, 7,
|
||||
uintptr(s),
|
||||
uintptr(unsafe.Pointer(lpBuffers)),
|
||||
uintptr(dwBufferCount),
|
||||
uintptr(unsafe.Pointer(numberOfBytesReceived)),
|
||||
uintptr(unsafe.Pointer(lpFlags)),
|
||||
uintptr(unsafe.Pointer(lpOverlapped)),
|
||||
lpCompletionRoutineCallback,
|
||||
0,
|
||||
0)
|
||||
return int32(ret1)
|
||||
}
|
||||
|
||||
func WSARecvDisconnect(s SOCKET, disconnectdata LPWSABUF) INT {
|
||||
ret1 := syscall3(wSARecvDisconnect, 2,
|
||||
uintptr(s),
|
||||
uintptr(unsafe.Pointer(disconnectdata)),
|
||||
0)
|
||||
return INT(ret1)
|
||||
}
|
||||
|
||||
func WSARecvFrom(s SOCKET, lpBuffers LPWSABUF, dwBufferCount DWORD, lpNumberOfBytesRecvd *uint32, lpFlags *uint32, lpFrom *Sockaddr, lpFromlen *int32, lpOverlapped LPWSAOVERLAPPED, lpCompletionRoutine LPWSAOVERLAPPED_COMPLETION_ROUTINE) INT {
|
||||
lpCompletionRoutineCallback := syscall.NewCallback(lpCompletionRoutine)
|
||||
ret1 := syscall9(wSARecvFrom, 9,
|
||||
uintptr(s),
|
||||
uintptr(unsafe.Pointer(lpBuffers)),
|
||||
uintptr(dwBufferCount),
|
||||
uintptr(unsafe.Pointer(lpNumberOfBytesRecvd)),
|
||||
uintptr(unsafe.Pointer(lpFlags)),
|
||||
uintptr(unsafe.Pointer(lpFrom)),
|
||||
uintptr(unsafe.Pointer(lpFromlen)),
|
||||
uintptr(unsafe.Pointer(lpOverlapped)),
|
||||
lpCompletionRoutineCallback)
|
||||
return INT(ret1)
|
||||
}
|
||||
|
||||
func WSARemoveServiceClass(info *GUID) int32 {
|
||||
ret1 := syscall3(wSARemoveServiceClass, 1,
|
||||
uintptr(unsafe.Pointer(info)),
|
||||
0,
|
||||
0)
|
||||
return int32(ret1)
|
||||
}
|
||||
|
||||
func WSASend(s SOCKET, lpBuffers LPWSABUF, dwBufferCount DWORD, lpNumberOfBytesSent *uint32, dwFlags DWORD, lpOverlapped LPWSAOVERLAPPED, lpCompletionRoutine LPWSAOVERLAPPED_COMPLETION_ROUTINE) INT {
|
||||
lpCompletionRoutineCallback := syscall.NewCallback(lpCompletionRoutine)
|
||||
ret1 := syscall9(wSASend, 7,
|
||||
uintptr(s),
|
||||
uintptr(unsafe.Pointer(lpBuffers)),
|
||||
uintptr(dwBufferCount),
|
||||
uintptr(unsafe.Pointer(lpNumberOfBytesSent)),
|
||||
uintptr(dwFlags),
|
||||
uintptr(unsafe.Pointer(lpOverlapped)),
|
||||
lpCompletionRoutineCallback,
|
||||
0,
|
||||
0)
|
||||
return INT(ret1)
|
||||
}
|
||||
|
||||
func WSASendDisconnect(s SOCKET, lpBuffers LPWSABUF) INT {
|
||||
ret1 := syscall3(wSASendDisconnect, 2,
|
||||
uintptr(s),
|
||||
uintptr(unsafe.Pointer(lpBuffers)),
|
||||
0)
|
||||
return INT(ret1)
|
||||
}
|
||||
|
||||
func WSASendMsg(s SOCKET, msg *WSAMSG, dwFlags DWORD, lpNumberOfBytesSent *uint32, lpOverlapped LPWSAOVERLAPPED, lpCompletionRoutine LPWSAOVERLAPPED_COMPLETION_ROUTINE) int32 {
|
||||
lpCompletionRoutineCallback := syscall.NewCallback(lpCompletionRoutine)
|
||||
ret1 := syscall6(wSASendMsg, 6,
|
||||
uintptr(s),
|
||||
uintptr(unsafe.Pointer(msg)),
|
||||
uintptr(dwFlags),
|
||||
uintptr(unsafe.Pointer(lpNumberOfBytesSent)),
|
||||
uintptr(unsafe.Pointer(lpOverlapped)),
|
||||
lpCompletionRoutineCallback)
|
||||
return int32(ret1)
|
||||
}
|
||||
|
||||
func WSASendTo(s SOCKET, lpBuffers LPWSABUF, dwBufferCount DWORD, lpNumberOfBytesSent *uint32, dwFlags DWORD, to /*const*/ *Sockaddr, tolen int32, lpOverlapped LPWSAOVERLAPPED, lpCompletionRoutine LPWSAOVERLAPPED_COMPLETION_ROUTINE) INT {
|
||||
lpCompletionRoutineCallback := syscall.NewCallback(lpCompletionRoutine)
|
||||
ret1 := syscall9(wSASendTo, 9,
|
||||
uintptr(s),
|
||||
uintptr(unsafe.Pointer(lpBuffers)),
|
||||
uintptr(dwBufferCount),
|
||||
uintptr(unsafe.Pointer(lpNumberOfBytesSent)),
|
||||
uintptr(dwFlags),
|
||||
uintptr(unsafe.Pointer(to)),
|
||||
uintptr(tolen),
|
||||
uintptr(unsafe.Pointer(lpOverlapped)),
|
||||
lpCompletionRoutineCallback)
|
||||
return INT(ret1)
|
||||
}
|
||||
|
||||
func WSASetBlockingHook(lpBlockFunc FARPROC) FARPROC {
|
||||
lpBlockFuncCallback := syscall.NewCallback(func() uintptr {
|
||||
ret := lpBlockFunc()
|
||||
return uintptr(unsafe.Pointer(ret))
|
||||
})
|
||||
ret1 := syscall3(wSASetBlockingHook, 1,
|
||||
lpBlockFuncCallback,
|
||||
0,
|
||||
0)
|
||||
return func() INT_PTR {
|
||||
ret2 := syscall3(ret1, 0,
|
||||
0,
|
||||
0,
|
||||
0)
|
||||
return (INT_PTR)(unsafe.Pointer(ret2))
|
||||
}
|
||||
}
|
||||
|
||||
func WSASetLastError(iError INT) {
|
||||
syscall3(wSASetLastError, 1,
|
||||
uintptr(iError),
|
||||
0,
|
||||
0)
|
||||
}
|
||||
|
||||
func WSASetService(query LPWSAQUERYSET, operation WSAESETSERVICEOP, flags DWORD) INT {
|
||||
ret1 := syscall3(wSASetService, 3,
|
||||
uintptr(unsafe.Pointer(query)),
|
||||
uintptr(operation),
|
||||
uintptr(flags))
|
||||
return INT(ret1)
|
||||
}
|
||||
|
||||
func WSASocket(af int32, aType int32, protocol int32, lpProtocolInfo LPWSAPROTOCOL_INFO, g GROUP, dwFlags DWORD) SOCKET {
|
||||
ret1 := syscall6(wSASocket, 6,
|
||||
uintptr(af),
|
||||
uintptr(aType),
|
||||
uintptr(protocol),
|
||||
uintptr(unsafe.Pointer(lpProtocolInfo)),
|
||||
uintptr(g),
|
||||
uintptr(dwFlags))
|
||||
return SOCKET(ret1)
|
||||
}
|
||||
|
||||
func WSAStartup(wVersionRequested WORD, lpWSAData *WSADATA) int32 {
|
||||
ret1 := syscall3(wSAStartup, 2,
|
||||
uintptr(wVersionRequested),
|
||||
uintptr(unsafe.Pointer(lpWSAData)),
|
||||
0)
|
||||
return int32(ret1)
|
||||
}
|
||||
|
||||
func WSAStringToAddress(addressString LPWSTR, addressFamily INT, lpProtocolInfo LPWSAPROTOCOL_INFO, lpAddress *SOCKADDR, lpAddressLength *int32) INT {
|
||||
ret1 := syscall6(wSAStringToAddress, 5,
|
||||
uintptr(unsafe.Pointer(addressString)),
|
||||
uintptr(addressFamily),
|
||||
uintptr(unsafe.Pointer(lpProtocolInfo)),
|
||||
uintptr(unsafe.Pointer(lpAddress)),
|
||||
uintptr(unsafe.Pointer(lpAddressLength)),
|
||||
0)
|
||||
return INT(ret1)
|
||||
}
|
||||
|
||||
func WSAUnhookBlockingHook() INT {
|
||||
ret1 := syscall3(wSAUnhookBlockingHook, 0,
|
||||
0,
|
||||
0,
|
||||
0)
|
||||
return INT(ret1)
|
||||
}
|
||||
|
||||
func WSApSetPostRoutine(lpPostRoutine LPWPUPOSTMESSAGE) INT {
|
||||
lpPostRoutineCallback := syscall.NewCallback(func(unnamed0RawArg HWND, unnamed1RawArg UINT, unnamed2RawArg WPARAM, unnamed3RawArg LPARAM) uintptr {
|
||||
ret := lpPostRoutine(unnamed0RawArg, unnamed1RawArg, unnamed2RawArg, unnamed3RawArg)
|
||||
return uintptr(ret)
|
||||
})
|
||||
ret1 := syscall3(wSApSetPostRoutine, 1,
|
||||
lpPostRoutineCallback,
|
||||
0,
|
||||
0)
|
||||
return INT(ret1)
|
||||
}
|
||||
|
||||
func WSCDeinstallProvider(lpProviderId *GUID, lpErrno *int32) INT {
|
||||
ret1 := syscall3(wSCDeinstallProvider, 2,
|
||||
uintptr(unsafe.Pointer(lpProviderId)),
|
||||
uintptr(unsafe.Pointer(lpErrno)),
|
||||
0)
|
||||
return INT(ret1)
|
||||
}
|
||||
|
||||
func WSCEnableNSProvider(provider *GUID, enable bool) INT {
|
||||
ret1 := syscall3(wSCEnableNSProvider, 2,
|
||||
uintptr(unsafe.Pointer(provider)),
|
||||
getUintptrFromBool(enable),
|
||||
0)
|
||||
return INT(ret1)
|
||||
}
|
||||
|
||||
func WSCEnumProtocols(protocols *int32, buffer LPWSAPROTOCOL_INFO, aLen *uint32, err *int32) INT {
|
||||
ret1 := syscall6(wSCEnumProtocols, 4,
|
||||
uintptr(unsafe.Pointer(protocols)),
|
||||
uintptr(unsafe.Pointer(buffer)),
|
||||
uintptr(unsafe.Pointer(aLen)),
|
||||
uintptr(unsafe.Pointer(err)),
|
||||
0,
|
||||
0)
|
||||
return INT(ret1)
|
||||
}
|
||||
|
||||
func WSCGetProviderPath(provider *GUID, path LPWSTR, aLen *int32, errcode *int32) INT {
|
||||
ret1 := syscall6(wSCGetProviderPath, 4,
|
||||
uintptr(unsafe.Pointer(provider)),
|
||||
uintptr(unsafe.Pointer(path)),
|
||||
uintptr(unsafe.Pointer(aLen)),
|
||||
uintptr(unsafe.Pointer(errcode)),
|
||||
0,
|
||||
0)
|
||||
return INT(ret1)
|
||||
}
|
||||
|
||||
func WSCInstallNameSpace(identifier LPWSTR, path LPWSTR, namespace DWORD, version DWORD, provider *GUID) INT {
|
||||
ret1 := syscall6(wSCInstallNameSpace, 5,
|
||||
uintptr(unsafe.Pointer(identifier)),
|
||||
uintptr(unsafe.Pointer(path)),
|
||||
uintptr(namespace),
|
||||
uintptr(version),
|
||||
uintptr(unsafe.Pointer(provider)),
|
||||
0)
|
||||
return INT(ret1)
|
||||
}
|
||||
|
||||
func WSCInstallProvider(lpProviderId /*const*/ *GUID, lpszProviderDllPath string, lpProtocolInfoList /*const*/ LPWSAPROTOCOL_INFO, dwNumberOfEntries DWORD, lpErrno *int32) INT {
|
||||
lpszProviderDllPathStr := unicode16FromString(lpszProviderDllPath)
|
||||
ret1 := syscall6(wSCInstallProvider, 5,
|
||||
uintptr(unsafe.Pointer(lpProviderId)),
|
||||
uintptr(unsafe.Pointer(&lpszProviderDllPathStr[0])),
|
||||
uintptr(unsafe.Pointer(lpProtocolInfoList)),
|
||||
uintptr(dwNumberOfEntries),
|
||||
uintptr(unsafe.Pointer(lpErrno)),
|
||||
0)
|
||||
return INT(ret1)
|
||||
}
|
||||
|
||||
func WSCUnInstallNameSpace(lpProviderId *GUID) INT {
|
||||
ret1 := syscall3(wSCUnInstallNameSpace, 1,
|
||||
uintptr(unsafe.Pointer(lpProviderId)),
|
||||
0,
|
||||
0)
|
||||
return INT(ret1)
|
||||
}
|
||||
|
||||
func WSCWriteProviderOrder(entry *uint32, number DWORD) INT {
|
||||
ret1 := syscall3(wSCWriteProviderOrder, 2,
|
||||
uintptr(unsafe.Pointer(entry)),
|
||||
uintptr(number),
|
||||
0)
|
||||
return INT(ret1)
|
||||
}
|
||||
|
||||
func Gethostname(name *CHAR, namelen INT) int32 {
|
||||
ret1 := syscall3(gethostname, 2,
|
||||
uintptr(unsafe.Pointer(name)),
|
||||
uintptr(namelen),
|
||||
0)
|
||||
return int32(ret1)
|
||||
}
|
||||
Reference in New Issue
Block a user