Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set HIDD_ATTRIBUTES size with ULONG value according to definition #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hid_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,4 +410,4 @@ func reportCallback(context unsafe.Pointer, result C.IOReturn, sender unsafe.Poi
case dev.readCh <- data:
default:
}
}
}
2 changes: 1 addition & 1 deletion hid_darwin_go110.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ var nilCfStringRef C.CFStringRef= 0
var nilCfTypeRef C.CFTypeRef = 0
var nilCfSetRef C.CFSetRef = 0
var nilIOHIDDeviceRef C.IOHIDDeviceRef = 0
var nilCfDictionaryRef C.CFDictionaryRef = 0
var nilCfDictionaryRef C.CFDictionaryRef = 0
2 changes: 1 addition & 1 deletion hid_darwin_go19.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ var nilCfStringRef C.CFStringRef= nil
var nilCfTypeRef C.CFTypeRef = nil
var nilCfSetRef C.CFSetRef = nil
var nilIOHIDDeviceRef C.IOHIDDeviceRef = nil
var nilCfDictionaryRef C.CFDictionaryRef = nil
var nilCfDictionaryRef C.CFDictionaryRef = nil
2 changes: 1 addition & 1 deletion hid_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ func ByPath(devicePath string) (*DeviceInfo, error) {
}

var attrs C.HIDD_ATTRIBUTES
attrs.Size = C.DWORD(unsafe.Sizeof(attrs))
attrs.Size = C.ULONG(unsafe.Sizeof(attrs))
C.HidD_GetAttributes(dev.h(), &attrs)

devInfo.VendorID = uint16(attrs.VendorID)
Expand Down