{"id":98482,"date":"2026-08-31T22:49:06","date_gmt":"2026-08-31T14:49:06","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/98482.html"},"modified":"2026-08-31T22:49:06","modified_gmt":"2026-08-31T14:49:06","slug":"windows-%e9%a9%b1%e5%8a%a8%e5%ae%9e%e4%be%8b%e5%88%86%e6%9e%90%e7%b3%bb%e5%88%97-libusb%e9%a9%b1%e5%8a%a8%e5%88%86%e6%9e%90-%e9%a9%b1%e5%8a%a8%e5%b1%82%e6%ba%90%e7%a0%81%e7%af%87%e4%b8%80","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/98482.html","title":{"rendered":"windows \u9a71\u52a8\u5b9e\u4f8b\u5206\u6790\u7cfb\u5217: libusb\u9a71\u52a8\u5206\u6790-\u9a71\u52a8\u5c42\u6e90\u7801\u7bc7(\u4e00)"},"content":{"rendered":"<h2>libusb-win32 \u5185\u6838\u9a71\u52a8\u6e90\u7801\u5206\u6790&#xff08;\u7b2c\u4e00\u7bc7&#xff09;&#xff1a;\u9a71\u52a8\u6846\u67b6\u3001PnP \u4e0e\u7535\u6e90\u7ba1\u7406<\/h2>\n<h3>1. \u9a71\u52a8\u6982\u8ff0<\/h3>\n<p>src\/driver\/ \u76ee\u5f55\u5305\u542b libusb-win32 \u7684\u5185\u6838\u6a21\u5f0f\u9a71\u52a8\u7a0b\u5e8f libusb0.sys \u7684\u5b8c\u6574\u5b9e\u73b0\u3002\u8be5\u9a71\u52a8\u662f\u4e00\u4e2a WDM&#xff08;Windows Driver Model&#xff09;\u6216 KMDF&#xff08;\u5185\u6838\u6a21\u5f0f\u9a71\u52a8\u6846\u67b6&#xff09;\u98ce\u683c\u7684\u9a71\u52a8\u7a0b\u5e8f&#xff0c;\u4e3b\u8981\u804c\u8d23\u5305\u62ec&#xff1a;<\/p>\n<ul>\n<li>\u4f5c\u4e3a USB \u8bbe\u5907\u7684\u529f\u80fd\u9a71\u52a8\u6216\u8fc7\u6ee4\u9a71\u52a8&#xff0c;\u4e0e\u7528\u6237\u6001 DLL \u4ea4\u4e92\u3002<\/li>\n<li>\u5904\u7406 PnP&#xff08;\u5373\u63d2\u5373\u7528&#xff09;\u548c\u7535\u6e90\u7ba1\u7406 IRP\u3002<\/li>\n<li>\u63a5\u6536\u6765\u81ea\u7528\u6237\u6001\u7684 IOCTL \u8bf7\u6c42&#xff0c;\u5e76\u5c06\u5176\u8f6c\u6362\u4e3a USB \u8bf7\u6c42\u5757&#xff08;URB&#xff09;\u63d0\u4ea4\u7ed9 USB \u4e3b\u673a\u63a7\u5236\u5668\u9a71\u52a8&#xff08;USBD&#xff09;\u3002<\/li>\n<li>\u7ba1\u7406\u8bbe\u5907\u914d\u7f6e\u3001\u63a5\u53e3\u58f0\u660e\u3001\u7aef\u70b9\u7ba1\u9053\u7b49 USB \u8d44\u6e90\u3002<\/li>\n<li>\u63d0\u4f9b\u8bbe\u5907\u63a5\u53e3&#xff08;Device Interface&#xff09;\u4f9b\u7528\u6237\u6001\u7a0b\u5e8f\u901a\u8fc7 SetupAPI \u53d1\u73b0\u8bbe\u5907\u3002<\/li>\n<\/ul>\n<p>\u9a71\u52a8\u91c7\u7528 \u5355\u4e8c\u8fdb\u5236\u53cc\u6a21\u5f0f \u8bbe\u8ba1&#xff1a;\u901a\u8fc7\u6ce8\u518c\u8868\u9879 SurpriseRemovalOK \u5224\u65ad\u662f\u4f5c\u4e3a\u529f\u80fd\u9a71\u52a8&#xff08;\u975e\u8fc7\u6ee4&#xff09;\u8fd8\u662f\u8fc7\u6ee4\u9a71\u52a8&#xff08;Upper\/Lower Filter&#xff09;\u3002<\/p>\n<h3>2. \u5165\u53e3\u51fd\u6570 DriverEntry&#xff08;libusb_driver.c&#xff09;<\/h3>\n<p>\u9a71\u52a8\u5165\u53e3\u6309\u7167\u6807\u51c6 WDM \u9a71\u52a8\u5b9e\u73b0&#xff1a;<\/p>\n<ul>\n<li>\u586b\u5145 DRIVER_OBJECT \u7684 MajorFunction \u6570\u7ec4&#xff0c;\u5c06 \u6240\u6709 IRP \u4e3b\u529f\u80fd\u7801 \u6307\u5411\u7edf\u4e00\u7684\u6d3e\u53d1\u51fd\u6570 dispatch\u3002<\/li>\n<li>\u8bbe\u7f6e DriverExtension-&gt;AddDevice \u4e3a add_device\u3002<\/li>\n<li>\u8bbe\u7f6e DriverUnload \u4e3a unload\u3002<\/li>\n<li>\u68c0\u6d4b\u64cd\u4f5c\u7cfb\u7edf\u7248\u672c&#xff1a;\u901a\u8fc7 RtlGetVersion \u83b7\u53d6\u7248\u672c\u4fe1\u606f&#xff0c;\u82e5\u4e3a Windows 8 \u53ca\u4ee5\u4e0a&#xff08;\u7248\u672c\u53f7 &gt; 6.1&#xff09;&#xff0c;\u5219\u4f7f\u7528 NonPagedPoolNx \u4f5c\u4e3a\u5185\u5b58\u6c60\u7c7b\u578b&#xff0c;\u5426\u5219\u4f7f\u7528 NonPagedPool\u3002\u8fd9\u4fdd\u8bc1\u4e86\u9a71\u52a8\u80fd\u901a\u8fc7 Windows 8 \u53ca\u66f4\u9ad8\u7248\u672c\u7684\u9a71\u52a8\u9a8c\u8bc1\u6d4b\u8bd5&#xff08;\u8981\u6c42\u975e\u53ef\u6267\u884c\u5206\u9875\u6c60&#xff09;\u3002<\/li>\n<\/ul>\n<h3>3. \u8bbe\u5907\u6dfb\u52a0 AddDevice&#xff08;libusb_driver.c&#xff09;<\/h3>\n<p>add_device \u662f\u9a71\u52a8\u4e3a\u6bcf\u4e2a\u7269\u7406\u8bbe\u5907\u521b\u5efa\u529f\u80fd\u8bbe\u5907\u5bf9\u8c61&#xff08;FDO&#xff09;\u5e76\u9644\u52a0\u5230\u8bbe\u5907\u6808\u7684\u5165\u53e3\u3002<\/p>\n<h4>3.1 \u786c\u4ef6\u8fc7\u6ee4<\/h4>\n<ul>\n<li>\u8bfb\u53d6\u786c\u4ef6 ID&#xff08;reg_get_hardware_id&#xff09;\u548c\u517c\u5bb9 ID\u3002<\/li>\n<li>\u4ec5\u5904\u7406 USB \u8bbe\u5907&#xff08;\u5305\u542b usb\\\\ \u4e14\u5305\u542b vid_ \u548c pid_&#xff09;&#xff0c;\u8df3\u8fc7 USB \u96c6\u7ebf\u5668&#xff08;\u542b hub \u6216 class_09&#xff09;\u3002<\/li>\n<li>\u68c0\u67e5\u5df2\u9644\u52a0\u7684\u8bbe\u5907\u9a71\u52a8&#xff0c;\u82e5\u5b58\u5728 picopp \u6216 libusb0 \u5219\u8df3\u8fc7&#xff08;\u907f\u514d\u91cd\u590d\u7ed1\u5b9a&#xff09;\u3002<\/li>\n<li>\u68c0\u67e5\u662f\u5426\u5b58\u5728 WDF \u9a71\u52a8&#xff08;\u5982 WinUSB\u3001WUDF&#xff09;&#xff0c;\u82e5\u5b58\u5728\u5219\u8bbe\u7f6e has_wdf &#061; TRUE&#xff0c;\u540e\u7eed\u5c06\u7981\u6b62\u8be5\u8bbe\u5907\u6210\u4e3a\u7535\u6e90\u7b56\u7565\u62e5\u6709\u8005&#xff0c;\u9632\u6b62\u84dd\u5c4f\u3002<\/li>\n<\/ul>\n<h4>3.2 \u521b\u5efa\u8bbe\u5907\u5bf9\u8c61\u4e0e\u7b26\u53f7\u94fe\u63a5<\/h4>\n<ul>\n<li>\u5c1d\u8bd5\u521b\u5efa\u8bbe\u5907\u540d \\\\Device\\\\libusb0-xxxx&#xff08;\u5faa\u73af 1 \u5230 LIBUSB_MAX_NUMBER_OF_DEVICES \u627e\u5230\u672a\u4f7f\u7528\u7684\u7f16\u53f7&#xff09;\u3002<\/li>\n<li>\u521b\u5efa\u7b26\u53f7\u94fe\u63a5 \\\\DosDevices\\\\libusb0-xxxx \u4f9b\u7528\u6237\u6001 CreateFile \u6253\u5f00\u3002<\/li>\n<li>\u8bbe\u5907\u6269\u5c55\u5927\u5c0f\u56fa\u5b9a\u4e3a sizeof(libusb_device_t)\u3002<\/li>\n<\/ul>\n<h4>3.3 \u521d\u59cb\u5316\u8bbe\u5907\u6269\u5c55&#xff08;libusb_device_t&#xff09;<\/h4>\n<ul>\n<li>\u4fdd\u5b58\u7269\u7406\u8bbe\u5907\u5bf9\u8c61&#xff08;physical_device_object&#xff09;\u3001\u8bbe\u5907\u7f16\u53f7\u3001\u8bbe\u5907 ID\u3002<\/li>\n<li>\u8bbe\u7f6e\u521d\u59cb\u7535\u6e90\u72b6\u6001 PowerDeviceD0 \u548c PowerSystemWorking\u3002<\/li>\n<li>\u8c03\u7528 reg_get_properties \u4ece\u6ce8\u518c\u8868\u8bfb\u53d6\u5173\u952e\u914d\u7f6e&#xff1a;\n<ul>\n<li>SurpriseRemovalOK&#xff1a;\u82e5\u4e3a DWORD 1&#xff0c;\u5219\u9a71\u52a8\u4f5c\u4e3a\u529f\u80fd\u9a71\u52a8&#xff08;is_filter &#061; FALSE&#xff09;&#xff0c;\u5426\u5219\u4f5c\u4e3a\u8fc7\u6ee4\u9a71\u52a8&#xff08;is_filter &#061; TRUE&#xff09;\u3002<\/li>\n<li>InitialConfigValue&#xff1a;\u6307\u5b9a\u521d\u59cb\u914d\u7f6e\u503c&#xff08;\u9ed8\u8ba4 SET_CONFIG_ACTIVE_CONFIG&#xff0c;\u5373\u81ea\u52a8\u9009\u62e9\u6d3b\u52a8\u914d\u7f6e&#xff09;\u3002<\/li>\n<li>DeviceInterfaceGUIDs&#xff1a;\u7528\u6237\u6307\u5b9a\u7684\u8bbe\u5907\u63a5\u53e3 GUID&#xff0c;\u82e5\u4e0d\u5b58\u5728\u5219\u4f7f\u7528\u9ed8\u8ba4 GUID&#xff08;Libusb0DeviceGuid \u6216 Libusb0FilterGuid&#xff09;\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u82e5\u68c0\u6d4b\u5230 has_wdf&#xff0c;\u8bbe\u7f6e disallow_power_control &#061; TRUE&#xff0c;\u7981\u6b62\u8be5\u9a71\u52a8\u6210\u4e3a\u7535\u6e90\u7b56\u7565\u62e5\u6709\u8005\u3002<\/li>\n<li>\u8c03\u7528 clear_pipe_info \u6e05\u7a7a\u7aef\u70b9\u7f13\u5b58\u3002<\/li>\n<li>\u521d\u59cb\u5316\u79fb\u9664\u9501&#xff08;remove_lock_initialize&#xff09;\u3002<\/li>\n<li>\u82e5\u8bbe\u5907\u63a5\u53e3\u542f\u7528&#xff0c;\u8c03\u7528 IoRegisterDeviceInterface \u6ce8\u518c\u8bbe\u5907\u63a5\u53e3&#xff0c;\u5e76\u5728\u8bbe\u5907\u63a5\u53e3\u6ce8\u518c\u8868\u4e2d\u5199\u5165 LUsb0 \u503c&#xff08;\u8bbe\u5907\u7f16\u53f7&#xff09;&#xff0c;\u4fbf\u4e8e\u7528\u6237\u6001\u5feb\u901f\u6253\u5f00\u3002<\/li>\n<\/ul>\n<h4>3.4 \u9644\u7740\u5230\u8bbe\u5907\u6808<\/h4>\n<ul>\n<li>\u8c03\u7528 IoAttachDeviceToDeviceStack \u5c06\u65b0\u521b\u5efa\u7684\u8bbe\u5907\u5bf9\u8c61\u9644\u7740\u5230\u7269\u7406\u8bbe\u5907\u5bf9\u8c61\u4e4b\u4e0a\u3002<\/li>\n<li>\u82e5\u6210\u529f&#xff0c;\u5219 dev-&gt;next_stack_device \u6307\u5411\u4e0b\u5c42\u8bbe\u5907\u3002<\/li>\n<li>\u6839\u636e is_filter \u51b3\u5b9a target_device&#xff1a;\n<ul>\n<li>\u8fc7\u6ee4\u9a71\u52a8&#xff1a;target_device &#061; physical_device_object&#xff08;\u76f4\u63a5\u5411 PDO \u53d1\u9001 URB&#xff09;\u3002<\/li>\n<li>\u529f\u80fd\u9a71\u52a8&#xff1a;target_device &#061; next_stack_device&#xff08;\u5411\u6808\u4e2d\u7684\u4e0b\u4e00\u8bbe\u5907\u53d1\u9001&#xff09;\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u82e5\u652f\u6301 LIBUSB_ENABLE_CONTRACT_VERSION_602&#xff08;Win8&#043;&#xff09;&#xff0c;\u8c03\u7528 USBD_CreateHandle \u548c USBD_QueryUsbCapability \u68c0\u6d4b\u8bbe\u5907\u901f\u5ea6&#xff08;SuperSpeed\/HighSpeed\/FullSpeed&#xff09;\u3002<\/li>\n<li>\u590d\u5236\u4e0b\u5c42\u8bbe\u5907\u7684\u6807\u5fd7&#xff08;DO_BUFFERED_IO\u3001DO_DIRECT_IO\u3001DO_POWER_PAGABLE&#xff09;&#xff0c;\u786e\u4fdd\u517c\u5bb9\u3002<\/li>\n<li>\u6700\u540e\u6e05\u9664 DO_DEVICE_INITIALIZING \u6807\u5fd7&#xff0c;\u8bbe\u5907\u53ef\u88ab\u6253\u5f00\u3002<\/li>\n<\/ul>\n<h3>4. \u8bbe\u5907\u6269\u5c55\u7ed3\u6784 libusb_device_t&#xff08;libusb_driver.h&#xff09;<\/h3>\n<p>\u8be5\u7ed3\u6784\u662f\u6bcf\u4e2a\u8bbe\u5907\u5b9e\u4f8b\u7684\u4e0a\u4e0b\u6587&#xff0c;\u5305\u542b\u4e30\u5bcc\u7684\u6210\u5458&#xff1a;<\/p>\n<table>\n<tr>\u6210\u5458\u7528\u9014<\/tr>\n<tbody>\n<tr>\n<td>self<\/td>\n<td>\u672c\u8bbe\u5907\u5bf9\u8c61<\/td>\n<\/tr>\n<tr>\n<td>physical_device_object<\/td>\n<td>\u7269\u7406\u8bbe\u5907\u5bf9\u8c61&#xff08;PDO&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>next_stack_device<\/td>\n<td>\u6808\u4e2d\u7684\u4e0b\u5c42\u8bbe\u5907<\/td>\n<\/tr>\n<tr>\n<td>target_device<\/td>\n<td>\u5b9e\u9645\u53d1\u9001 URB \u7684\u76ee\u6807\u8bbe\u5907<\/td>\n<\/tr>\n<tr>\n<td>handle&#xff08;USBD_HANDLE&#xff09;<\/td>\n<td>USBD \u53e5\u67c4&#xff08;Win8&#043;&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>remove_lock<\/td>\n<td>\u79fb\u9664\u9501&#xff0c;\u4fdd\u62a4\u5e76\u53d1 PnP \u64cd\u4f5c<\/td>\n<\/tr>\n<tr>\n<td>is_filter \/ is_started<\/td>\n<td>\u9a71\u52a8\u6a21\u5f0f\u6807\u5fd7\u548c\u8bbe\u5907\u542f\u52a8\u72b6\u6001<\/td>\n<\/tr>\n<tr>\n<td>surprise_removal_ok<\/td>\n<td>\u662f\u5426\u652f\u6301\u610f\u5916\u79fb\u9664<\/td>\n<\/tr>\n<tr>\n<td>id<\/td>\n<td>\u8bbe\u5907\u7f16\u53f7&#xff08;\u7528\u4e8e\u7b26\u53f7\u94fe\u63a5&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>device_descriptor<\/td>\n<td>\u7f13\u5b58\u7684\u8bbe\u5907\u63cf\u8ff0\u7b26<\/td>\n<\/tr>\n<tr>\n<td>config<\/td>\n<td>\u5f53\u524d\u914d\u7f6e\u4fe1\u606f&#xff08;\u53e5\u67c4\u3001\u503c\u3001\u7d22\u5f15\u3001\u63cf\u8ff0\u7b26\u7f13\u5b58\u3001\u63a5\u53e3\u6570\u7ec4&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>power_state<\/td>\n<td>\u5f53\u524d\u7535\u6e90\u72b6\u6001&#xff08;\u7cfb\u7edf\/\u8bbe\u5907&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>device_power_states<\/td>\n<td>\u652f\u6301\u7684\u5404\u7cfb\u7edf\u72b6\u6001\u5bf9\u5e94\u7684\u8bbe\u5907\u72b6\u6001<\/td>\n<\/tr>\n<tr>\n<td>initial_config_value<\/td>\n<td>\u521d\u59cb\u914d\u7f6e\u503c<\/td>\n<\/tr>\n<tr>\n<td>device_id<\/td>\n<td>\u786c\u4ef6 ID \u5b57\u7b26\u4e32<\/td>\n<\/tr>\n<tr>\n<td>disallow_power_control<\/td>\n<td>\u662f\u5426\u7981\u6b62\u6210\u4e3a\u7535\u6e90\u7b56\u7565\u62e5\u6709\u8005<\/td>\n<\/tr>\n<tr>\n<td>device_interface_guid \/ device_interface_name<\/td>\n<td>\u8bbe\u5907\u63a5\u53e3 GUID \u548c\u540d\u79f0<\/td>\n<\/tr>\n<tr>\n<td>control_read\/write_timeout<\/td>\n<td>\u63a7\u5236\u4f20\u8f93\u8d85\u65f6&#xff08;\u53ef\u7531\u7528\u6237\u6001\u8bbe\u7f6e&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>speed<\/td>\n<td>USB \u901f\u5ea6&#xff08;Low\/Full\/High\/Super&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>pending_sequence \/ pending_busy<\/td>\n<td>\u7528\u4e8e\u4fdd\u8bc1\u7aef\u70b9\u4f20\u8f93\u987a\u5e8f\u7684\u539f\u5b50\u53d8\u91cf<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>5. IRP \u5206\u53d1 dispatch&#xff08;dispatch.c&#xff09;<\/h3>\n<p>\u6240\u6709 IRP \u9996\u5148\u8fdb\u5165 dispatch \u51fd\u6570&#xff0c;\u6839\u636e\u4e3b\u529f\u80fd\u7801\u548c\u5f53\u524d\u8bbe\u5907\u72b6\u6001\u5206\u6d41&#xff1a;<\/p>\n<ul>\n<li>IRP_MJ_PNP \u2192 dispatch_pnp<\/li>\n<li>IRP_MJ_POWER \u2192 dispatch_power&#xff08;\u82e5\u6ca1\u6709\u4e0b\u5c42\u8bbe\u5907&#xff0c;\u76f4\u63a5\u8fd4\u56de STATUS_INVALID_DEVICE_STATE&#xff09;<\/li>\n<li>\u5bf9\u4e8e\u5176\u4ed6 IRP&#xff0c;\u68c0\u67e5\u662f\u5426\u5c5e\u4e8e\u672c\u9a71\u52a8&#xff08;accept_irp&#xff09;&#xff1a;\n<ul>\n<li>IRP_MJ_DEVICE_CONTROL&#xff1a;\u82e5\u8bbe\u5907\u5df2\u542f\u52a8&#xff0c;\u8c03\u7528 dispatch_ioctl&#xff1b;\u5426\u5219\u8fd4\u56de\u9519\u8bef\u3002<\/li>\n<li>IRP_MJ_CREATE&#xff1a;\u82e5\u8bbe\u5907\u5df2\u542f\u52a8&#xff0c;\u82e5\u7535\u6e90\u72b6\u6001\u975e D0 \u4e14\u5141\u8bb8\u7535\u6e90\u63a7\u5236&#xff0c;\u5219\u8c03\u7528 power_set_device_state \u4e0a\u7535&#xff0c;\u7136\u540e\u8fd4\u56de\u6210\u529f\u3002<\/li>\n<li>IRP_MJ_CLOSE&#xff1a;\u91ca\u653e\u8be5\u6587\u4ef6\u5bf9\u8c61\u7ed1\u5b9a\u7684\u6240\u6709\u63a5\u53e3&#xff08;release_all_interfaces&#xff09;\u3002<\/li>\n<li>IRP_MJ_CLEANUP&#xff1a;\u76f4\u63a5\u5b8c\u6210\u3002<\/li>\n<li>\u5176\u4ed6 \u2192 \u8fd4\u56de STATUS_NOT_SUPPORTED\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u82e5 IRP \u4e0d\u5c5e\u4e8e\u672c\u9a71\u52a8&#xff08;\u5373\u53d1\u5f80\u4e0b\u5c42\u8bbe\u5907&#xff09;&#xff0c;\u5219\u8c03\u7528 pass_irp_down \u5411\u4e0b\u4f20\u9012\u3002<\/li>\n<\/ul>\n<p>accept_irp \u5224\u65ad\u4f9d\u636e&#xff1a;\u82e5 OriginalFileObject-&gt;DeviceObject &#061;&#061; dev-&gt;self&#xff0c;\u6216&#xff08;\u975e\u8fc7\u6ee4\u6a21\u5f0f\u4e14\u8bbe\u5907\u63a5\u53e3\u542f\u7528\u4e14 DeviceObject &#061;&#061; physical_device_object&#xff09;\u5219\u63a5\u53d7\u3002<\/p>\n<h3>6. PnP \u5904\u7406&#xff08;pnp.c&#xff09;<\/h3>\n<p>dispatch_pnp \u5904\u7406\u5404 PnP \u5b50\u529f\u80fd\u7801&#xff1a;<\/p>\n<ul>\n<li>\n<p>IRP_MN_START_DEVICE&#xff1a;\u8c03\u7528 PoSetPowerState \u901a\u77e5\u7535\u6e90\u7ba1\u7406\u5668\u8bbe\u5907\u5df2\u8fdb\u5165 D0&#xff1b;\u82e5\u8bbe\u5907\u63a5\u53e3\u542f\u7528&#xff0c;\u8c03\u7528 IoSetDeviceInterfaceState(TRUE) \u542f\u7528\u63a5\u53e3&#xff1b;\u6700\u540e\u5c06 IRP \u5411\u4e0b\u4f20\u9012&#xff0c;\u5e76\u8bbe\u7f6e\u5b8c\u6210\u4f8b\u7a0b on_start_complete\u3002\u5728\u5b8c\u6210\u4f8b\u7a0b\u4e2d&#xff0c;\u82e5\u975e\u8fc7\u6ee4\u6a21\u5f0f\u4e14\u5c1a\u672a\u542f\u52a8&#xff0c;\u5219\u6839\u636e initial_config_value \u8c03\u7528 set_configuration \u8bbe\u7f6e\u914d\u7f6e&#xff08;\u82e5\u914d\u7f6e\u503c\u4e3a SET_CONFIG_ACTIVE_CONFIG \u5219\u5c1d\u8bd5\u8bbe\u7f6e\u4e3a\u6d3b\u52a8\u914d\u7f6e&#xff09;\u3002\u6807\u8bb0 is_started &#061; TRUE\u3002<\/p>\n<\/li>\n<li>\n<p>IRP_MN_REMOVE_DEVICE&#xff1a;\u7981\u7528\u8bbe\u5907\u63a5\u53e3&#xff0c;\u8bbe\u7f6e is_started &#061; FALSE&#xff0c;\u8c03\u7528 remove_lock_release_and_wait \u7b49\u5f85\u6240\u6709\u672a\u51b3\u8bf7\u6c42\u5b8c\u6210&#xff0c;\u5173\u95ed USBD \u53e5\u67c4&#xff0c;\u5411\u4e0b\u4f20\u9012 IRP&#xff0c;\u6700\u540e\u5220\u9664\u7b26\u53f7\u94fe\u63a5\u3001\u91ca\u653e\u8bbe\u5907\u63a5\u53e3\u540d\u79f0\u3001\u91ca\u653e\u7f13\u5b58\u7684\u914d\u7f6e\u63cf\u8ff0\u7b26\u3001\u5206\u79bb\u8bbe\u5907\u5bf9\u8c61\u5e76\u5220\u9664\u672c\u8bbe\u5907\u5bf9\u8c61\u3002<\/p>\n<\/li>\n<li>\n<p>IRP_MN_SURPRISE_REMOVAL&#xff1a;\u7981\u7528\u8bbe\u5907\u63a5\u53e3&#xff0c;\u91ca\u653e\u63a5\u53e3\u540d\u79f0&#xff0c;\u6e05\u9664\u914d\u7f6e\u7f13\u5b58&#xff0c;\u6807\u8bb0 is_started &#061; FALSE\u3002<\/p>\n<\/li>\n<li>\n<p>IRP_MN_STOP_DEVICE&#xff1a;\u4ec5\u6807\u8bb0 is_started &#061; FALSE&#xff0c;\u4e0d\u6267\u884c\u7279\u6b8a\u64cd\u4f5c&#xff0c;\u76f4\u63a5\u5411\u4e0b\u4f20\u9012\u3002<\/p>\n<\/li>\n<li>\n<p>IRP_MN_DEVICE_USAGE_NOTIFICATION&#xff1a;\u6839\u636e\u4e0b\u5c42\u8bbe\u5907\u7684 DO_POWER_PAGABLE \u6807\u5fd7\u8bbe\u7f6e\u672c\u8bbe\u5907\u5bf9\u8c61\u6807\u5fd7&#xff0c;\u5411\u4e0b\u4f20\u9012\u5e76\u8bbe\u7f6e\u5b8c\u6210\u4f8b\u7a0b&#xff0c;\u5728\u5b8c\u6210\u540e\u6062\u590d\u6807\u5fd7\u3002<\/p>\n<\/li>\n<li>\n<p>IRP_MN_QUERY_CAPABILITIES&#xff1a;\u82e5\u975e\u8fc7\u6ee4\u6a21\u5f0f&#xff0c;\u5c06 Capabilities-&gt;SurpriseRemovalOK \u8bbe\u7f6e\u4e3a dev-&gt;surprise_removal_ok&#xff1b;\u5411\u4e0b\u4f20\u9012&#xff0c;\u5728\u5b8c\u6210\u4f8b\u7a0b\u4e2d\u4fdd\u5b58 Capabilities-&gt;DeviceState \u5230 dev-&gt;device_power_states\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u5176\u4ed6 PnP IRP \u76f4\u63a5\u5411\u4e0b\u4f20\u9012\u3002<\/p>\n<h3>7. \u7535\u6e90\u7ba1\u7406&#xff08;power.c&#xff09;<\/h3>\n<p>\u7535\u6e90\u7ba1\u7406\u5904\u7406 IRP_MJ_POWER&#xff0c;\u7279\u522b\u662f IRP_MN_SET_POWER\u3002<\/p>\n<ul>\n<li>\u82e5\u8bbe\u5907\u4e3a\u8fc7\u6ee4\u9a71\u52a8\u6216 disallow_power_control \u4e3a\u771f&#xff0c;\u5219\u8bbe\u7f6e\u5b8c\u6210\u4f8b\u7a0b on_filter_power_state_complete&#xff0c;\u8be5\u4f8b\u7a0b\u4ec5\u8bb0\u5f55\u7535\u6e90\u72b6\u6001\u53d8\u5316\u5e76\u8c03\u7528 PoSetPowerState \u540c\u6b65\u8bbe\u5907\u72b6\u6001\u3002<\/li>\n<li>\u82e5\u4e3a\u529f\u80fd\u9a71\u52a8\u4e14\u5141\u8bb8\u7535\u6e90\u63a7\u5236&#xff0c;\u5219\u8bbe\u7f6e\u5b8c\u6210\u4f8b\u7a0b on_power_state_complete&#xff0c;\u8be5\u4f8b\u7a0b\u5728\u7cfb\u7edf\u7535\u6e90\u72b6\u6001\u53d8\u5316\u65f6&#xff0c;\u6839\u636e dev-&gt;device_power_states \u6620\u5c04\u8868\u8c03\u7528 power_set_device_state \u66f4\u6539\u8bbe\u5907\u72b6\u6001&#xff08;\u975e\u963b\u585e&#xff09;\u3002<\/li>\n<li>\u5bf9\u4e8e\u8bbe\u5907\u7535\u6e90\u72b6\u6001\u53d8\u5316&#xff0c;\u82e5\u65b0\u72b6\u6001\u4f4e\u4e8e\u5f53\u524d\u72b6\u6001&#xff08;\u5982\u8fdb\u5165 D3&#xff09;&#xff0c;\u5728\u53d1\u9001 IRP \u524d\u5148\u8c03\u7528 PoSetPowerState \u901a\u77e5\u7535\u6e90\u7ba1\u7406\u5668\u3002<\/li>\n<li>power_set_device_state \u51fd\u6570\u901a\u8fc7 PoRequestPowerIrp \u53d1\u51fa\u8bbe\u5907\u7535\u6e90\u8bbe\u7f6e IRP&#xff0c;\u53ef\u9009\u62e9\u963b\u585e\u7b49\u5f85\u5b8c\u6210\u3002<\/li>\n<\/ul>\n<p>\u8be5\u8bbe\u8ba1\u5141\u8bb8\u8fc7\u6ee4\u9a71\u52a8\u4e0d\u5e72\u9884\u7535\u6e90\u7b56\u7565&#xff0c;\u800c\u529f\u80fd\u9a71\u52a8\u53ef\u5b8c\u5168\u63a7\u5236\u8bbe\u5907\u7535\u6e90\u3002<\/p>\n<h3>8. \u8bbe\u5907\u63a5\u53e3\u4e0e\u6ce8\u518c\u8868\u952e\u503c<\/h3>\n<p>\u9a71\u52a8\u5728 add_device \u9636\u6bb5\u4ece\u6ce8\u518c\u8868&#xff08;\u8bbe\u5907\u786c\u4ef6\u952e&#xff09;\u8bfb\u53d6\u82e5\u5e72\u503c&#xff1a;<\/p>\n<ul>\n<li>SurpriseRemovalOK&#xff1a;\u51b3\u5b9a\u662f\u5426\u4e3a\u529f\u80fd\u9a71\u52a8\u3002<\/li>\n<li>InitialConfigValue&#xff1a;\u51b3\u5b9a\u542f\u52a8\u540e\u81ea\u52a8\u8bbe\u7f6e\u7684\u914d\u7f6e\u3002<\/li>\n<li>DeviceInterfaceGUIDs&#xff1a;\u7528\u6237\u53ef\u6307\u5b9a\u8bbe\u5907\u63a5\u53e3 GUID&#xff0c;\u5426\u5219\u4f7f\u7528\u9ed8\u8ba4\u503c&#xff08;\u8fc7\u6ee4\u9a71\u52a8\u7528 Libusb0FilterGuid&#xff0c;\u529f\u80fd\u9a71\u52a8\u7528 Libusb0DeviceGuid&#xff09;\u3002<\/li>\n<\/ul>\n<p>\u9a71\u52a8\u5728\u542f\u52a8\/\u79fb\u9664\u65f6\u8c03\u7528 IoSetDeviceInterfaceState \u542f\u7528\/\u7981\u7528\u63a5\u53e3&#xff0c;\u4f7f\u7528\u6237\u6001\u7a0b\u5e8f\u53ef\u901a\u8fc7 SetupAPI \u53d1\u73b0\u8bbe\u5907\u3002<\/p>\n<h3>9. \u79fb\u9664\u9501\u673a\u5236<\/h3>\n<p>\u4e3a\u9632\u6b62\u8bbe\u5907\u5728 PnP \u79fb\u9664\u8fc7\u7a0b\u4e2d\u4ecd\u6709 I\/O \u8bf7\u6c42\u6b63\u5728\u5904\u7406&#xff0c;\u9a71\u52a8\u5b9e\u73b0\u4e86\u81ea\u5b9a\u4e49\u79fb\u9664\u9501&#xff08;libusb_remove_lock_t&#xff09;&#xff1a;<\/p>\n<ul>\n<li>usage_count&#xff1a;\u539f\u5b50\u8ba1\u6570&#xff0c;\u8868\u793a\u5f53\u524d\u6d3b\u8dc3\u7684 I\/O \u8bf7\u6c42\u6570\u3002<\/li>\n<li>remove_pending&#xff1a;\u6807\u8bb0\u8bbe\u5907\u6b63\u5728\u88ab\u79fb\u9664\u3002<\/li>\n<li>event&#xff1a;\u4e8b\u4ef6\u5bf9\u8c61&#xff0c;\u7528\u4e8e\u7b49\u5f85\u6240\u6709\u8bf7\u6c42\u5b8c\u6210\u3002<\/li>\n<\/ul>\n<p>\u6240\u6709 IOCTL \u5904\u7406\u51fd\u6570\u5728\u5f00\u59cb\u5904\u7406\u524d\u8c03\u7528 remove_lock_acquire&#xff08;\u9012\u589e\u8ba1\u6570&#xff09;&#xff0c;\u5b8c\u6210\u65f6\u8c03\u7528 remove_lock_release&#xff08;\u9012\u51cf\u8ba1\u6570&#xff09;\u3002\u5f53\u6536\u5230 IRP_MN_REMOVE_DEVICE \u65f6&#xff0c;\u8c03\u7528 remove_lock_release_and_wait&#xff0c;\u5c06 remove_pending \u8bbe\u4e3a TRUE&#xff0c;\u91ca\u653e\u4e24\u6b21&#xff08;\u4f7f\u8ba1\u6570\u53ef\u80fd\u51cf\u4e3a 0&#xff09;&#xff0c;\u7136\u540e\u7b49\u5f85\u4e8b\u4ef6&#xff0c;\u76f4\u5230\u6240\u6709\u8bf7\u6c42\u91ca\u653e\u3002<\/p>\n<h3>10. \u603b\u7ed3<\/h3>\n<p>\u7b2c\u4e00\u7bc7\u6587\u6863\u6db5\u76d6\u4e86 libusb-win32 \u5185\u6838\u9a71\u52a8\u7684\u57fa\u7840\u9aa8\u67b6&#xff1a;<\/p>\n<ul>\n<li>\u5165\u53e3\u4e0e\u6dfb\u52a0&#xff1a;\u9a71\u52a8\u5982\u4f55\u521d\u59cb\u5316\u3001\u521b\u5efa\u8bbe\u5907\u5bf9\u8c61\u3001\u8bfb\u53d6\u6ce8\u518c\u8868\u914d\u7f6e\u5e76\u9644\u7740\u5230\u8bbe\u5907\u6808\u3002<\/li>\n<li>IRP \u5206\u53d1&#xff1a;\u7edf\u4e00\u7684\u6d3e\u53d1\u51fd\u6570\u6839\u636e IRP \u7c7b\u578b\u548c\u9a71\u52a8\u7a0b\u5e8f\u6a21\u5f0f\u8fdb\u884c\u5206\u53d1\u3002<\/li>\n<li>PnP \u5904\u7406&#xff1a;\u5b8c\u6574\u54cd\u5e94\u542f\u52a8\u3001\u505c\u6b62\u3001\u79fb\u9664\u3001\u67e5\u8be2\u80fd\u529b\u7b49\u5173\u952e PnP \u4e8b\u4ef6&#xff0c;\u5e76\u81ea\u52a8\u914d\u7f6e\u8bbe\u5907\u3002<\/li>\n<li>\u7535\u6e90\u7ba1\u7406&#xff1a;\u533a\u5206\u529f\u80fd\u9a71\u52a8\u4e0e\u8fc7\u6ee4\u9a71\u52a8&#xff0c;\u5b9e\u73b0\u4e0d\u540c\u7684\u7535\u6e90\u7b56\u7565\u5904\u7406\u3002<\/li>\n<li>\u8bbe\u5907\u63a5\u53e3\u4e0e\u79fb\u9664\u9501&#xff1a;\u4fdd\u969c\u8bbe\u5907\u53ef\u88ab\u7528\u6237\u6001\u53d1\u73b0&#xff0c;\u5e76\u5b89\u5168\u5904\u7406\u5e76\u53d1\u79fb\u9664\u3002<\/li>\n<\/ul>\n<p>\u540e\u7eed\u6587\u6863\u5c06\u6df1\u5165\u5206\u6790 IOCTL \u5904\u7406\u3001USB \u4f20\u8f93\u3001URB \u63d0\u4ea4\u3001\u7aef\u70b9\u7ba1\u7406\u3001\u63cf\u8ff0\u7b26\u7f13\u5b58 \u7b49\u6838\u5fc3\u529f\u80fd\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>libusb-win32 \u5185\u6838\u9a71\u52a8\u6e90\u7801\u5206\u6790&#xff08;\u7b2c\u4e00\u7bc7&#xff09;&#xff1a;\u9a71\u52a8\u6846\u67b6\u3001PnP \u4e0e\u7535\u6e90\u7ba1\u7406<br \/>\n1. \u9a71\u52a8\u6982\u8ff0<br \/>\nsrc\/driver\/ \u76ee\u5f55\u5305\u542b libusb-win32 \u7684\u5185\u6838\u6a21\u5f0f\u9a71\u52a8\u7a0b\u5e8f libusb0.sys \u7684\u5b8c\u6574\u5b9e\u73b0\u3002\u8be5\u9a71\u52a8\u662f\u4e00\u4e2a WDM&#xff08;Windows Driver Model&#xff09;\u6216 KMDF&#xff08;\u5185\u6838\u6a21\u5f0f\u9a71\u52a8\u6846\u67b6&#xff09;\u98ce\u683c\u7684\u9a71\u52a8\u7a0b\u5e8f&#xff0c;\u4e3b\u8981\u804c\u8d23\u5305\u62ec&#xff1a;<br \/>\n\u4f5c\u4e3a US<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[149,1363],"topic":[],"class_list":["post-98482","post","type-post","status-publish","format-standard","hentry","category-server","tag-windows","tag-1363"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>windows \u9a71\u52a8\u5b9e\u4f8b\u5206\u6790\u7cfb\u5217: libusb\u9a71\u52a8\u5206\u6790-\u9a71\u52a8\u5c42\u6e90\u7801\u7bc7(\u4e00) - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/98482.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"windows \u9a71\u52a8\u5b9e\u4f8b\u5206\u6790\u7cfb\u5217: libusb\u9a71\u52a8\u5206\u6790-\u9a71\u52a8\u5c42\u6e90\u7801\u7bc7(\u4e00) - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"libusb-win32 \u5185\u6838\u9a71\u52a8\u6e90\u7801\u5206\u6790&#xff08;\u7b2c\u4e00\u7bc7&#xff09;&#xff1a;\u9a71\u52a8\u6846\u67b6\u3001PnP \u4e0e\u7535\u6e90\u7ba1\u7406 1. \u9a71\u52a8\u6982\u8ff0 src\/driver\/ \u76ee\u5f55\u5305\u542b libusb-win32 \u7684\u5185\u6838\u6a21\u5f0f\u9a71\u52a8\u7a0b\u5e8f libusb0.sys \u7684\u5b8c\u6574\u5b9e\u73b0\u3002\u8be5\u9a71\u52a8\u662f\u4e00\u4e2a WDM&#xff08;Windows Driver Model&#xff09;\u6216 KMDF&#xff08;\u5185\u6838\u6a21\u5f0f\u9a71\u52a8\u6846\u67b6&#xff09;\u98ce\u683c\u7684\u9a71\u52a8\u7a0b\u5e8f&#xff0c;\u4e3b\u8981\u804c\u8d23\u5305\u62ec&#xff1a; \u4f5c\u4e3a US\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/98482.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-31T14:49:06+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/98482.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/98482.html\",\"name\":\"windows \u9a71\u52a8\u5b9e\u4f8b\u5206\u6790\u7cfb\u5217: libusb\u9a71\u52a8\u5206\u6790-\u9a71\u52a8\u5c42\u6e90\u7801\u7bc7(\u4e00) - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-08-31T14:49:06+00:00\",\"dateModified\":\"2026-08-31T14:49:06+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/98482.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/98482.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/98482.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"windows \u9a71\u52a8\u5b9e\u4f8b\u5206\u6790\u7cfb\u5217: libusb\u9a71\u52a8\u5206\u6790-\u9a71\u52a8\u5c42\u6e90\u7801\u7bc7(\u4e00)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"windows \u9a71\u52a8\u5b9e\u4f8b\u5206\u6790\u7cfb\u5217: libusb\u9a71\u52a8\u5206\u6790-\u9a71\u52a8\u5c42\u6e90\u7801\u7bc7(\u4e00) - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/98482.html","og_locale":"zh_CN","og_type":"article","og_title":"windows \u9a71\u52a8\u5b9e\u4f8b\u5206\u6790\u7cfb\u5217: libusb\u9a71\u52a8\u5206\u6790-\u9a71\u52a8\u5c42\u6e90\u7801\u7bc7(\u4e00) - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"libusb-win32 \u5185\u6838\u9a71\u52a8\u6e90\u7801\u5206\u6790&#xff08;\u7b2c\u4e00\u7bc7&#xff09;&#xff1a;\u9a71\u52a8\u6846\u67b6\u3001PnP \u4e0e\u7535\u6e90\u7ba1\u7406 1. \u9a71\u52a8\u6982\u8ff0 src\/driver\/ \u76ee\u5f55\u5305\u542b libusb-win32 \u7684\u5185\u6838\u6a21\u5f0f\u9a71\u52a8\u7a0b\u5e8f libusb0.sys \u7684\u5b8c\u6574\u5b9e\u73b0\u3002\u8be5\u9a71\u52a8\u662f\u4e00\u4e2a WDM&#xff08;Windows Driver Model&#xff09;\u6216 KMDF&#xff08;\u5185\u6838\u6a21\u5f0f\u9a71\u52a8\u6846\u67b6&#xff09;\u98ce\u683c\u7684\u9a71\u52a8\u7a0b\u5e8f&#xff0c;\u4e3b\u8981\u804c\u8d23\u5305\u62ec&#xff1a; \u4f5c\u4e3a US","og_url":"https:\/\/www.wsisp.com\/helps\/98482.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-08-31T14:49:06+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/98482.html","url":"https:\/\/www.wsisp.com\/helps\/98482.html","name":"windows \u9a71\u52a8\u5b9e\u4f8b\u5206\u6790\u7cfb\u5217: libusb\u9a71\u52a8\u5206\u6790-\u9a71\u52a8\u5c42\u6e90\u7801\u7bc7(\u4e00) - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-08-31T14:49:06+00:00","dateModified":"2026-08-31T14:49:06+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/98482.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/98482.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/98482.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"windows \u9a71\u52a8\u5b9e\u4f8b\u5206\u6790\u7cfb\u5217: libusb\u9a71\u52a8\u5206\u6790-\u9a71\u52a8\u5c42\u6e90\u7801\u7bc7(\u4e00)"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/98482","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=98482"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/98482\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=98482"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=98482"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=98482"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=98482"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}