ChineseAlexande
驱动牛犊
驱动牛犊
  • 注册日期2008-03-13
  • 最后登录2008-03-18
  • 粉丝0
  • 关注0
  • 积分150分
  • 威望16点
  • 贡献值0点
  • 好评度15点
  • 原创分0分
  • 专家分0分
阅读:1852回复:4

filedisk是不是用VC压根就编译不过去呀?

楼主#
更多 发布于:2008-03-14 15:48
是不是大家都用的都是脚本方式呀?
网上为什么有很多人VC都没有编译成功?
附件名称/大小 下载次数 最后更新
filedisk.rar (140KB)  32 2008-03-14 16:02
ynzjs
驱动牛犊
驱动牛犊
  • 注册日期2002-10-24
  • 最后登录2008-10-30
  • 粉丝0
  • 关注0
  • 积分6分
  • 威望7点
  • 贡献值0点
  • 好评度1点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2008-10-30 00:33
关于VC编译驱动时的环境设置网络上很多,filedisk的用户层Mount(EXE)部分VC、PellesC等可以直接编译。而驱动(SYS)部分安装完XPDDK后点击开始菜单中Win XP Free Build Environmentz或者Win XP Checked Build Environment在打开的DOS窗口内转到filedisk目录键入build即可完成编译。XPDDK已经在其bin文件夹包含了VC的ml、link等命令行编译器,Win XP Free Build Environmentz是调用了DDK中的setenv.bat完成环境设置的,就是一些环境变量而已,这些环境变量指出了有关.H、.lib的路径和编译选项,命令行方式是编译驱动的最好方式,用习惯了就觉得很方便了,而VC的IDE是为Visual的用户态程序而开发的,不是核心态驱动开发的好选择,其实用命令行方式也是在使用VC的编译器。

对于IOCTL_DISK_GET_LENGTH_INFO没有定义等都是DDK库和Include路径问题。看看DDK中setenv.bat吧。
zjs
baiytao
驱动牛犊
驱动牛犊
  • 注册日期2008-08-19
  • 最后登录2012-08-05
  • 粉丝0
  • 关注0
  • 积分9分
  • 威望101点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2008-09-01 10:42
我做成WindowS窗体版的,但是功能还十分有限.驱动直接用编译好的.
ChineseAlexande
驱动牛犊
驱动牛犊
  • 注册日期2008-03-13
  • 最后登录2008-03-18
  • 粉丝0
  • 关注0
  • 积分150分
  • 威望16点
  • 贡献值0点
  • 好评度15点
  • 原创分0分
  • 专家分0分
地板#
发布于:2008-03-16 00:54
有一点点进展,可能是搞错DDK版本了,下了一个for window2000的DDK,装上后,把#define _86_加上,结果是链接错误
filedisk error LNK2019: unresolved external symbol __imp__KeSetEvent referenced in function _FileDiskCreateDevice
ChineseAlexande
驱动牛犊
驱动牛犊
  • 注册日期2008-03-13
  • 最后登录2008-03-18
  • 粉丝0
  • 关注0
  • 积分150分
  • 威望16点
  • 贡献值0点
  • 好评度15点
  • 原创分0分
  • 专家分0分
地下室#
发布于:2008-03-14 15:52
/*
    This is a virtual disk driver for Windows NT/2000/XP that uses
    one or more files to emulate physical disks.
    Copyright (C) 1999-2004 Bo Brant閚.
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
#define _X86_
//原文件中没有后来加了这个,报 "no target architecture" 错误,后来加了,又说
IOCTL_DISK_GET_LENGTH_INFO没有定义,一大堆。
我用的是xpddk,在工程路径中包含所有与xp相关的如ddk/xp路径

咋整的呢?
游客

返回顶部