From 6c16e45df231c03c9e643746e8255a6e168cf4d5 Mon Sep 17 00:00:00 2001 From: Aveen Ismail Date: Thu, 25 Apr 2024 08:32:19 +0200 Subject: [PATCH] Change D.WORD type --- usb_winusb.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usb_winusb.go b/usb_winusb.go index 6c1dc54..aa527ed 100644 --- a/usb_winusb.go +++ b/usb_winusb.go @@ -35,7 +35,7 @@ var device struct { mtx sync.Mutex } -type C_DWORD C.ulong +type C_DWORD C.DWORD func (e C_DWORD) Error() string { return fmt.Sprintf("Windows Error: 0x%x", uint(e)) @@ -54,7 +54,7 @@ const ( ERROR_BAD_COMMAND C_DWORD = C.ERROR_BAD_COMMAND ) -func winusbError(err C.ulong) error { +func winusbError(err C.DWORD) error { if err != C.ERROR_SUCCESS { return C_DWORD(err) }