TAILIEUCHUNG - USB Complete fourth- P29

USB Complete fourth- P29: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 In some cases such as when looking for a HID-class device with a specific Vendor ID and Product ID the application may need to request more information before deciding whether a retrieved device interface is the desired one. vb Definitions Public Structure SP_DEVICE_INTERFACE_DATA Dim cbSize As Int32 Dim InterfaceClassGuid As Guid Dim Flags As Int32 Dim Reserved As IntPtr End Structure DllImport SetLastError True _ Shared Function SetupDiEnumDeviceInterfaces _ ByVal DeviceInfoSet As IntPtr _ ByVal DeviceInfoData As IntPtr _ ByRef InterfaceClassGuid As _ ByVal MemberIndex As Int32 _ ByRef DeviceInterfaceData As SP_DEVICE_INTERFACE_DATA _ As Boolean End Function Use Dim memberIndex As Int32 0 Dim MyDeviceInterfaceData As SP_DEVICE_INTERFACE_DATA Dim success As Boolean MyDeviceInterfaceData success SetupDiEnumDeviceInterfaces _ deviceInfoSet _ _ myGuid _ memberIndex _ MyDeviceInterfaceData 256 Detecting Devices vc Definitions internal struct SP_DEVICE_INTERFACE_DATA internal Int32 cbSize internal Guid InterfaceClassGuid internal Int32 Flags internal IntPtr Reserved DllImport SetLastError true internal static extern Boolean SetupDiEnumDeviceInterfaces IntPtr DeviceInfoSet IntPtr DeviceInfoData ref InterfaceClassGuid Int32 MemberIndex ref SP_DEVICE_INTERFACE_DATA DeviceInterfaceData Use Int32 memberIndex 0 MyDeviceInterfaceData new SP_DEVICE_INTERFACE_DATA Boolean success false MyDeviceInterfaceData success SetupDiEnumDeviceInterfaces deviceInfoSet ref myGuid memberIndex ref MyDeviceInterfaceData Details In the SP_DEVICE_INTERFACE_DATA structure the cbSize parameter is the size of the structure in bytes. The method returns the structure s size. The myGuid and deviceInfoSet parameters are values retrieved previously. The DeviceInfoData parameter can be a pointer to an SP_DEVINFO_DATA .

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.