TAILIEUCHUNG - USB Complete fourth- P30

USB Complete fourth- P30:This book focuses on Windows programming for PCs, but other computers and operating systems also have USB support, including Linux and Apple Computer’s Macintosh. Some real-time kernels also support USB. | Chapter 10 Table 10-3 These functions enable an application to request to receive or stop receiving notifications about device attachment and removal. API Function DLL Purpose RegisterDeviceNotification user32 Request to receive device notifications UnregisterDeviceNotification user32 Request to stop receiving device notifications to receive notifications about a device interface class and classguid is the GUID of the device interface class myGuid in the example . When the WM_DEVICECHANGE messages are no longer of interest the application should call UnregisterDeviceNotification as described later in this chapter. vb Definitions Friend Const DBT_DEVTYP_DEVICEINTERFACE As Int32 5 Friend Const DEVICE_NOTIFY_WINDOW_HANDLE As Int32 0 Friend Const DICCF_PRE ENT As Int32 2 Friend Const DIGCF_DEVICEINTERFACE As Int32 H10 Friend Const WM_DEVICECHANGE As Int32 H219 tructLayout LayoutKind. equential _ Friend Class DEV_BROADCA T_DEVICEINTERFACE Friend dbcc_size As Int32 Friend dbcc_devicetype As Int32 Friend dbcc_reserved As Int32 Friend dbcc_classguid As Guid Friend dbcc_name As Int16 End Class DllImport Char et Char etLastError True _ Shared Function RegisterDeviceNotification _ ByVal hRecipient As IntPtr _ ByVal NotificationFilter As IntPtr _ ByVal Flags As Int32 _ As IntPtr End Function 266 Detecting Devices Use Place this statement in the _Load event for the form that will receive device-change messages frmMy Me Dim devBroadcastDeviceInterface As DEV_BROADCAST_DEVICEINTERFACE _ New DEV_BROADCAST_DEVICEINTERFACE Dim devBroadcastDeviceInterfaceBuffer As IntPtr Dim deviceNotificationHandle As IntPtr Dim size As Int32 frmMy is the form that will receive device-change messages. Friend frmMy As frmMain size devBroadcastDeviceInterface size DBT_DEVTYP_DEVICEINTERFACE 0 myGuid .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.