xndxnd
驱动牛犊
驱动牛犊
  • 注册日期2004-02-01
  • 最后登录2004-10-25
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:1905回复:10

关于GUID的问题,求救!!

楼主#
更多 发布于:2004-03-25 19:00
为什么我用HidD_GetHidGuid(&HidGuid)得到的是
{4D1E55B2-F16F-11CF-88CB-001111000030}?我在驱动中定义的是
Class=USB
ClassGUID={36FC9E60-C465-11CF-8056-444553540000}
是不是有什么不对啊,我用的固件是D12+51??
y5318
驱动中牛
驱动中牛
  • 注册日期2001-09-18
  • 最后登录2018-05-29
  • 粉丝1
  • 关注0
  • 积分14分
  • 威望22点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
  • 社区居民
沙发#
发布于:2004-03-25 19:47
在注册表中是不是对??
xndxnd
驱动牛犊
驱动牛犊
  • 注册日期2004-02-01
  • 最后登录2004-10-25
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2004-03-25 20:43
怎么在注册表中看啊?
xndxnd
驱动牛犊
驱动牛犊
  • 注册日期2004-02-01
  • 最后登录2004-10-25
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
地板#
发布于:2004-03-25 20:54
看过了ClassGUID和Driver都是{36FC9E60-C465-11CF-8056-444553540000}
有什么要注意的吗?


[编辑 -  3/25/04 by  xndxnd]
zmwk
驱动中牛
驱动中牛
  • 注册日期2001-05-15
  • 最后登录2009-04-05
  • 粉丝0
  • 关注0
  • 积分59分
  • 威望51点
  • 贡献值0点
  • 好评度2点
  • 原创分0分
  • 专家分0分
地下室#
发布于:2004-03-25 23:04
为什么我用HidD_GetHidGuid(&HidGuid)得到的是
{4D1E55B2-F16F-11CF-88CB-001111000030}?我在驱动中定义的是
Class=USB
ClassGUID={36FC9E60-C465-11CF-8056-444553540000}
是不是有什么不对啊,我用的固件是D12+51??


没关系的!
INF文件的定义只是为了设置注册表项目,当然也就影响该设备在设备管理器中的位置。你的INF定义将使得设备添加到USB中去。
A strong man can save himself. A great man can save another.
zmwk
驱动中牛
驱动中牛
  • 注册日期2001-05-15
  • 最后登录2009-04-05
  • 粉丝0
  • 关注0
  • 积分59分
  • 威望51点
  • 贡献值0点
  • 好评度2点
  • 原创分0分
  • 专家分0分
5楼#
发布于:2004-03-25 23:07
1394 Host Bus Controller
Class = 1394
ClassGuid = {6bdd1fc1-810f-11d0-bec7-08002be2092f}
This class includes system-supplied drivers of 1394 host controllers connected on a PCI bus, but not drivers of 1394 peripherals.

Battery Devices
Class = Battery
ClassGuid = {72631e54-78a4-11d0-bcf7-00aa00b7b32a}
This class includes drivers of battery devices and UPSes.

CD-ROM Drives
Class = CDROM
ClassGuid = {4d36e965-e325-11ce-bfc1-08002be10318}
This class includes drivers of CD-ROM drives, including SCSI CD-ROM drives. By default, the system's CD-ROM class installer also installs a system-supplied CD audio driver and CD-ROM changer driver as PnP filters.

Disk Drives
Class = DiskDrive
ClassGuid = {4d36e967-e325-11ce-bfc1-08002be10318}
This class includes drivers of hard disk drives. See also the HDC and SCSIAdapter classes.

Display Adapters
Class = Display
ClassGuid = {4d36e968-e325-11ce-bfc1-08002be10318}
This class includes drivers of video adapters, including display drivers and video miniports.

Floppy Disk Controllers
Class = FDC
ClassGuid = {4d36e969-e325-11ce-bfc1-08002be10318}
This class includes drivers of floppy disk drive controllers.

Floppy Disk Drives
Class= FloppyDisk
ClassGuid= {4d36e980-e325-11ce-bfc1-08002be10318}
This class includes drivers of floppy drives.

Hard Disk Controllers
Class = HDC
ClassGuid = {4d36e96a-e325-11ce-bfc1-08002be10318}
This class includes drivers of hard disk controllers, including ATA/ATAPI controllers but not SCSI and RAID disk controllers.

Human Input Devices (HID)
Class = HIDClass
ClassGuid = {745a17a0-74d3-11d0-b6fe-00a0c90f57da}
This class includes devices that export interfaces of the HID class, including HID keyboard and mouse devices, which the installed HID device drivers enumerate as their respective "child" devices. (See also the Keyboard or Mouse classes later in this list.)

Imaging Device
Class = Image
ClassGuid = {6bdd1fc6-810f-11d0-bec7-08002be2092f}
This class includes drivers of still-image capture devices, digital cameras, and scanners.

IrDA Devices
Class = Infrared
ClassGuid = {6bdd1fc5-810f-11d0-bec7-08002be2092f}
This class includes Serial-IR and Fast-IR NDIS miniports, but see also the Network Adapter class for other NDIS NIC miniports.

Keyboard
Class = Keyboard
ClassGuid = {4d36e96b-e325-11ce-bfc1-08002be10318}
This class includes all keyboards. That is, it also must be specified in the (secondary) INF for an enumerated "child" HID keyboard device.

Medium Changers
Class= MediumChanger
ClassGuid= {ce5939ae-ebde-11d0-b181-0000f8753ec4}
This class includes drivers of SCSI media changer devices.

Memory Technology Driver
Class = MTD
ClassGUID = {4d36e970-e325-11ce-bfc1-08002be10318}
This class includes drivers for memory devices, such as flash memory cards.

Multimedia
Class = Media
ClassGuid = {4d36e96c-e325-11ce-bfc1-08002be10318}
This class includes Audio and DVD multimedia devices, joystick ports, and full-motion video-capture devices.

Modem
Class = Modem
ClassGuid = {4d36e96d-e325-11ce-bfc1-08002be10318}
This class installs modems. An INF for a device of this class installs no device driver(s), but rather specifies the features and configuration information of a particular modem and stores this information in the registry. See also the Multifunction class.

Monitor
Class = Monitor
ClassGuid = {4d36e96e-e325-11ce-bfc1-08002be10318}
This class includes display monitors. An INF for a device of this class installs no device driver(s), but rather specifies the features of a particular monitor to be stored in the registry for use by drivers of video adapters. (Monitors are enumerated as the child devices of display adapters.)

Mouse
Class = Mouse
ClassGuid = {4d36e96f-e325-11ce-bfc1-08002be10318}
This class includes all mice and other kinds of pointing devices, such as trackballs. That is, it also must be specified in the (secondary) INF for an enumerated "child" HID mouse device.

Multifunction Devices
Class = Multifunction
ClassGuid = {4d36e971-e325-11ce-bfc1-08002be10318}
This class includes combo cards, such as a PCMCIA modem and netcard adapter. The driver for such a PnP multifunction device is installed under this class and enumerates the modem and netcard separately as its "child" devices.

Multi-port Serial Adapters
Class = MultiportSerial
ClassGuid = {50906cb8-ba12-11d1-bf5d-0000f805f530}
This class includes intelligent multiport serial cards, but not peripheral devices that connect to its ports. It does not include unintelligent (16550-type) mutiport serial controllers or single-port serial controllers (see the Ports class).

Network Adapter
Class = Net
ClassGuid = {4d36e972-e325-11ce-bfc1-08002be10318}
This class includes NDIS NIC miniports excluding Fast-IR miniports, NDIS intermediate drivers (of "virtual adapters"), and CoNDIS MCM miniports.

Network Client
Class = NetClient
ClassGuid = {4d36e973-e325-11ce-bfc1-08002be10318}
This class includes network and/or print providers.

Network Service
Class = NetService
ClassGuid = {4d36e974-e325-11ce-bfc1-08002be10318}
This class includes network services, such as redirectors and servers.

Network Transport
Class = NetTrans
ClassGuid = {4d36e975-e325-11ce-bfc1-08002be10318}
This class includes NDIS protocols, CoNDIS stand-alone call managers, and CoNDIS clients, as well as higher level drivers in transport stacks.

PCMCIA Adapters
Class = PCMCIA
ClassGuid = {4d36e977-e325-11ce-bfc1-08002be10318}
This class includes system-supplied drivers of PCMCIA and CardBus host controllers, but not drivers of PCMCIA or CardBus peripherals.

Ports (COM & LPT serial ports)
Class = Ports
ClassGuid = {4d36e978-e325-11ce-bfc1-08002be10318}
This class includes drivers of serial or parallel port devices, but see also the MultiportSerial class.

Printer
Class = Printer
ClassGuid = {4d36e979-e325-11ce-bfc1-08002be10318}
This class includes printers.

SCSI and RAID Controllers
Class = SCSIAdapter
ClassGuid = {4d36e97b-e325-11ce-bfc1-08002be10318}
This class includes SCSI HBA miniports and disk-array controller drivers.

Smart Card Readers
Class = SmartCardReader
ClassGuid = {50dd5230-ba8a-11d1-bf5d-0000f805f530}
This class includes drivers for smart card readers.

Storage Volumes
Class = Volume
ClassGuid = {71a27cdd-812a-11d0-bec7-08002be2092f}
This class includes storage volumes as defined by the system-supplied logical volume manager and class drivers that create device objects to represent storage volumes, such as the system disk class driver.

System Devices
Class = System
ClassGuid = {4d36e97d-e325-11ce-bfc1-08002be10318}
This class includes the Windows? 2000 HALs, system bus drivers, the system ACPI driver, and the system volume-manager driver. It also includes battery drivers and UPS drivers.

Tape Drives
Class = TapeDrive
ClassGuid = {6d807884-7d21-11cf-801c-08002be10318}
This class includes drivers of tape drives, including all tape miniclass drivers.

USB
Class = USB
ClassGuid = {36fc9e60-c465-11cf-8056-444553540000}
This class includes system-supplied (bus) drivers of USB host controllers and drivers of USB hubs, but not drivers of USB peripherals.

The following classes and GUIDs should not be used to install devices (or drivers) on Windows 2000 platforms:

Adapter
Class = Adapter
ClassGUID = {4d36e964-e325-11ce-bfc1-08002be10318}
This class is obsolete.

APM
Class = APMSupport
ClassGUID = {d45b1c18-c8fa-11d1-9f77-0000f805f530}
This class is reserved for system use.

Computer
Class = Computer
ClassGUID = {4d36e966-e325-11ce-bfc1-08002be10318}
This class is reserved for system use.

Decoders
Class = Decoder
ClassGUID = {6bdd1fc2-810f-11d0-bec7-08002be2092f}
This class is reserved for future use.

Global Positioning System
Class = GPS
ClassGUID = {6bdd1fc3-810f-11d0-bec7-08002be2092f}
This class is reserved for future use.

No driver
Class = NoDriver
ClassGUID = {4d36e976-e325-11ce-bfc1-08002be10318}
This class is obsolete.

Non-Plug and Play Drivers
Class = LegacyDriver
ClassGUID = {8ecc055d-047f-11d1-a537-0000f8753ed1}
This class is reserved for system use.

Other Devices
Class = Unknown
ClassGUID = {4d36e97e-e325-11ce-bfc1-08002be10318}
This class is reserved for system use. Enumerated devices for which the system cannot determine the type are installed under this class. Do not use this class if you're unsure in which class your device belongs; either determine the correct device setup class or create a new class.

Printer Upgrade
Class = Printer Upgrade
ClassGUID = {4d36e97a-e325-11ce-bfc1-08002be10318}
This class is reserved for system use.

Sound
Class = Sound
ClassGUID = {4d36e97c-e325-11ce-bfc1-08002be10318}
This class is obsolete.

A strong man can save himself. A great man can save another.
xndxnd
驱动牛犊
驱动牛犊
  • 注册日期2004-02-01
  • 最后登录2004-10-25
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
6楼#
发布于:2004-03-26 09:03
那按楼上大虾的意思是我HidD_GetHidGuid(&HidGuid)得到的是对的?
因为我在INF中看到的只是加到USB类中去的,而真正GUID不是那个?
zmwk
驱动中牛
驱动中牛
  • 注册日期2001-05-15
  • 最后登录2009-04-05
  • 粉丝0
  • 关注0
  • 积分59分
  • 威望51点
  • 贡献值0点
  • 好评度2点
  • 原创分0分
  • 专家分0分
7楼#
发布于:2004-03-26 13:13
没错!
INF文件用于注册表,你要用的GUID在驱动代码中定义。
A strong man can save himself. A great man can save another.
xndxnd
驱动牛犊
驱动牛犊
  • 注册日期2004-02-01
  • 最后登录2004-10-25
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
8楼#
发布于:2004-03-26 16:09
哦,谢谢大虾相助,我现在能打开端口了.

是不是接下去就能调用READFILE 和 WRITEFILE了?

还有,我不大明白的地方,就是,我该什么时候去READFILE?我怎么知道我的设备什么时候有数据发送?
zmwk
驱动中牛
驱动中牛
  • 注册日期2001-05-15
  • 最后登录2009-04-05
  • 粉丝0
  • 关注0
  • 积分59分
  • 威望51点
  • 贡献值0点
  • 好评度2点
  • 原创分0分
  • 专家分0分
9楼#
发布于:2004-03-26 17:23
哦,谢谢大虾相助,我现在能打开端口了.

是不是接下去就能调用READFILE 和 WRITEFILE了?

还有,我不大明白的地方,就是,我该什么时候去READFILE?我怎么知道我的设备什么时候有数据发送?


除了Read , Write, 还可以DeviceIoControl呀!

你的驱动中应该实现如下机制:
在读URB之前,应该给设备发一个VendorRequest,通知设备上传指定数据!并且你的读写应该加入超时机制。
A strong man can save himself. A great man can save another.
xndxnd
驱动牛犊
驱动牛犊
  • 注册日期2004-02-01
  • 最后登录2004-10-25
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
10楼#
发布于:2004-03-26 18:38
非常感谢,我再研究一下,我现在已经能用WriteFile 实现简单的数据传送了.
游客

返回顶部