zbing
驱动牛犊
驱动牛犊
  • 注册日期2002-12-07
  • 最后登录2007-04-29
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:1333回复:1

如何安装串口设备

楼主#
更多 发布于:2004-09-18 22:59

有一朋友写了串口设备驱动,通过INF安装后该设备无法启动,调试发现在SerialMousePnP时CREATE SERIAL失败了,我是通过添加新硬件安装的。那是否是因为没有与SERIAL设备栈挂接正确?如何与SERIAL设备栈关联?
            
; test.inf
;
; Installation file (.inf) for the test ddd device.
;
; (c) Copyright 2004 Team
;

[Version]
Signature="$Windows NT$"
Provider=%team%
;ClassGUID={4D36E96F-E325-11CE-BFC1-08002BE10318}
ClassGuid={4D36E97D-E325-11CE-BFC1-08002BE10318}
Class=Mouse
CatalogFile=test.cat
DriverVer=09/18/2004

[DestinationDirs]
DefaultDestDir   = 12

;
; Driver information
;

[Manufacturer]
%team%   = team.Mfg

[team.Mfg]
%team.DeviceDesc0% = test, SERENUM\PNP0F01


;
; General installation section
;

[test]
AddReg=test.AddReg
; Copy the driver over
CopyFiles=test.CopyFiles

[test.AddReg]


;
; File sections
;

[test.CopyFiles]
test.sys


;
; Service Installation
;

[test.Services]
AddService = test, 0x00000002 , test_Service_Inst, test_EventLog_Inst
; Install mouclass.sys from msmouse.inf
Include=msmouse.inf
Needs=MouClass.Services

[test_Service_Inst]
ServiceType    = 1                  ; SERVICE_KERNEL_DRIVER
StartType      = 3                  ; SERVICE_DEMAND_START
ErrorControl   = 0                  ; SERVICE_ERROR_IGNORE
LoadOrderGroup = Pointer Port
ServiceBinary  = %12%\test.sys


[test_EventLog_Inst]
AddReg = test_EventLog_AddReg

[test_EventLog_AddReg]
HKR,,EventMessageFile,0x00020000,"%SystemRoot%\System32\IoLogMsg.dll;%SystemRoot%\System32\drivers\test.sys"
HKR,,TypesSupported,0x00010001,7




;
; Source file information
;

[SourceDisksNames.x86]
1 = %DiskId1%,,,""

[SourceDisksFiles]
; Files for disk Team Installation Disk #1 (Mouse)
test.sys = 1,,


[Strings]

;
; Non-Localizable Strings
;

REG_SZ         = 0x00000000
REG_MULTI_SZ   = 0x00010000
REG_EXPAND_SZ  = 0x00020000
REG_BINARY     = 0x00000001
REG_DWORD      = 0x00010001
SERVICEROOT    = "System\CurrentControlSet\Services"

;
; Localizable Strings
;

team.DeviceDesc0 = "test ddd"
DiskId1 = "Team Installation Disk #1 (Mouse)"
team = "Team"
 
 
////////////////////////////////////////////////////////////////

Chilin checked 22:21:34 DebugPrint logging started
Chilin checked 22:21:34 SerialMouseAddDevice
Chilin checked 22:21:34 SerialMouseAddDevice: OK
Chilin checked 22:21:34 SerialMousePnP: exit
Chilin checked 22:21:34 SerialMousePnP: exit
Chilin checked 22:21:34 SerialMousePnP: IRP_MN_START_DEVICE!
Chilin checked 22:21:34 SerialMousePnP: ### 1!
Chilin checked 22:21:34 SerialMousePnP: ### 2!
Chilin checked 22:21:34 SerialMousePnP: IRP_MJ_CREATE fail
Chilin checked 22:21:34 SerialMousePnP: exit
Chilin checked 22:21:34 SerialMousePnP: enter RemoveDevice
Chilin checked 22:21:34 SerialMousePnP: remove and wait done
Chilin checked 22:21:34 SerialMouseUnload
Chilin checked 22:21:34 DebugPrint logging ended
emugine
驱动牛犊
驱动牛犊
  • 注册日期2002-03-05
  • 最后登录2006-03-24
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2004-09-23 14:38
你的设备是mouse不是serial port
你有好的想法吗? 来,我们一起驱动它!
游客

返回顶部