aboutsummaryrefslogtreecommitdiffstats
path: root/tun/wintun/setupapi/types_windows.go
diff options
context:
space:
mode:
authorSimon Rozman <simon@rozman.si>2019-04-19 10:05:04 +0200
committerSimon Rozman <simon@rozman.si>2019-04-19 10:08:11 +0200
commitf1dc167901aeba499cbed20e7134009702026020 (patch)
treeecb1c15989a12be924c11b292c87370c4b2d99a1 /tun/wintun/setupapi/types_windows.go
parentsetupapi: actually fix padding by rounding up to sizeof(void*) (diff)
downloadwireguard-go-f1dc167901aeba499cbed20e7134009702026020.tar.xz
wireguard-go-f1dc167901aeba499cbed20e7134009702026020.zip
setupapi: Fix struct size mismatches
Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to 'tun/wintun/setupapi/types_windows.go')
-rw-r--r--tun/wintun/setupapi/types_windows.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/tun/wintun/setupapi/types_windows.go b/tun/wintun/setupapi/types_windows.go
index a04237d..863bd7b 100644
--- a/tun/wintun/setupapi/types_windows.go
+++ b/tun/wintun/setupapi/types_windows.go
@@ -60,7 +60,7 @@ type DevInfoData struct {
// DevInfoListDetailData is a structure for detailed information on a device information set (used for SetupDiGetDeviceInfoListDetail which supercedes the functionality of SetupDiGetDeviceInfoListClass).
type DevInfoListDetailData struct {
- size uint32
+ size uint32 // Warning: unsafe.Sizeof(DevInfoListDetailData) > sizeof(SP_DEVINFO_LIST_DETAIL_DATA) when GOARCH == 386 => use sizeofDevInfoListDetailData const.
ClassGUID windows.GUID
RemoteMachineHandle windows.Handle
remoteMachineName [SP_MAX_MACHINENAME_LENGTH]uint16
@@ -371,7 +371,7 @@ func (data *DrvInfoData) IsNewer(driverDate windows.Filetime, driverVersion uint
// DrvInfoDetailData is driver information details structure (provides detailed information about a particular driver information structure)
type DrvInfoDetailData struct {
- size uint32 // On input, this must be exactly the sizeof(DrvInfoDetailData). On output, we set this member to the actual size of structure data.
+ size uint32 // Warning: unsafe.Sizeof(DrvInfoDetailData) > sizeof(SP_DRVINFO_DETAIL_DATA) when GOARCH == 386 => use sizeofDrvInfoDetailData const.
InfDate windows.Filetime
compatIDsOffset uint32
compatIDsLength uint32