阅读:1432回复:1
开发usb应用程序遇到的问题
1。请问我怎样才能使用ddk环境?我察看了很多开启usb设备的程序,他们无一例外的都是参考98ddk,ntddk。但是我直接调用编译usbview等源程序总是报错,请问怎样才能在vc6.0调入ddk并编译程序成功?
2。我试图先读写闪盘,但是闪盘的.inf文件里不含guid号,CreateFile的第一个参数――文件名我只知道从guid入手得到,请问怎样才能得到打开闪盘并进行访问?《usb大全》提供了hid类的函数,但是我如何获得mass storage类的函数? 3。我当前打开的usb设备采用的驱动自定义驱动为特定类,如果我希望改成标准类,如08hmass storge,subclass 06h,protocol50h,需要改动什么? 4。很多厂商把这种读取定义封装成.dll文件,请问我怎样才能打开并读取其中的代码? 谢谢大家! |
|
沙发#
发布于:2003-06-17 15:00
继续讨论:
我依照提示在开始菜单中进入checked build environment的dos环境,并进入ntddk/src/wdm/usb/usbview下,运行build,结果如下: New or updated MSVC detected. Updating DDK environment.... Setting environment for using Microsoft Visual C++ tools. Starting dirs creation...Completed. D:\\NTDDK>cd src D:\\NTDDK\\src>cd wdm D:\\NTDDK\\src\\wdm>cd usb D:\\NTDDK\\src\\wdm\\usb>cd usbview D:\\NTDDK\\src\\wdm\\usb\\usbview>build BUILD: Object root set to: ==> objchk BUILD: /i switch ignored BUILD: Compile and Link for i386 BUILD: Loading d:\\NTDDK\\build.dat... BUILD: Computing Include file dependencies: BUILD: Examining d:\\ntddk\\src\\wdm\\usb\\usbview directory for files to compile. BUILD: d:\\ntddk\\src\\wdm\\usb\\usbview\\usbview.rc: d:\\ntddk\\inc\\winbase.h: cannot f ind include file <macwin32.h> BUILD: d:\\ntddk\\src\\wdm\\usb\\usbview\\usbview.rc: d:\\ntddk\\inc\\wingdi.h: cannot fi nd include file <macwin32.h> BUILD: d:\\ntddk\\src\\wdm\\usb\\usbview\\usbview.rc: d:\\ntddk\\inc\\winuser.h: cannot f ind include file <macwin32.h> BUILD: d:\\ntddk\\src\\wdm\\usb\\usbview\\usbview.rc: d:\\ntddk\\inc\\winnls.h: cannot fi nd include file <macwin32.h> BUILD: d:\\ntddk\\src\\wdm\\usb\\usbview\\usbview.rc: d:\\ntddk\\inc\\winreg.h: cannot fi nd include file <macwin32.h> BUILD: d:\\ntddk\\src\\wdm\\usb\\usbview\\usbview.rc: d:\\ntddk\\inc\\mmsystem.h: cannot find include file <macwin32.h> BUILD: Linking d:\\ntddk\\src\\wdm\\usb\\usbview directory BUILD: Done 请问这样的错误怎么解决? 我的意图是希望能在vc下运行ddk环境,这样子能达到我的希望目标吗? 之所以想在vc下运行ddk环境,因为setupdi***等命令我以为不能直接运行在vc环境下,我实际上不需要利用ddk 编写驱动程序,我所需要的是他能支持以上所述的命令和deviceiocontrol等,能调入api32.dll等。我也不知道如何操作 |
|