阅读:2679回复:20
在驱动编写过程中,如何保存数据到文件??
如题,我最近在写一个打印机驱动程序,想把rendr前的文本信息保存到指定的文件里,网上有些人说用ZwCreateFile保存, 请问高手这方法能行的通吗?
其次,ZwCreateFile函数在Ntddk.h里,我把它包含进去了,可是出来一堆的重定义。希望高手能指点一二。谢谢!!! |
|
沙发#
发布于:2007-07-02 15:46
???怎么不见高手来呀?
|
|
板凳#
发布于:2007-07-02 16:18
用户被禁言,该主题自动屏蔽! |
|
地板#
发布于:2007-07-02 16:24
gutian98 ,你能具体描述一下?因为我也有用这些函数,但是包括NTDDK.h时,始终提示我重定义。我是用build来编译的
|
|
地下室#
发布于:2007-07-02 17:11
用户被禁言,该主题自动屏蔽! |
|
5楼#
发布于:2007-07-02 17:39
一样的,也是一堆的重定义。
|
|
6楼#
发布于:2007-07-02 17:43
在这里能用CreateFile代替吗?编译倒没问题,就是没有反应。
|
|
7楼#
发布于:2007-07-02 17:46
引用第6楼hjy82919于2007-07-02 17:43发表的 : 。。。 你确定是用DDK编译的吗? |
|
|
8楼#
发布于:2007-07-02 17:54
嗯,我的是XP系统,所以用Windows XP Checked Build Environment编译的
|
|
9楼#
发布于:2007-07-02 17:59
我是在DDK自带的printer->oemdll->bitmap的interfce里包含的,只是包含了头文件,别的地方还没改呢!!
|
|
10楼#
发布于:2007-07-02 18:01
error C2065: 'PUNICODE_STRING' : undeclared identifier
error C2146: syntax error : missing ')' before identifier 'DestinationString' 这是其中的一些错误。 |
|
11楼#
发布于:2007-07-02 18:02
100>c:\winddk\3790.1830\src\print\oemdll\bitmap\ntddk.h(2410) : error C2146: syn
tax error : missing ')' before identifier 'DestinationString' 100>c:\winddk\3790.1830\src\print\oemdll\bitmap\ntddk.h(2410) : error C4229: ana chronism used : modifiers on data are ignored 100>c:\winddk\3790.1830\src\print\oemdll\bitmap\ntddk.h(2410) : error C2182: 'Rt lCopyString' : illegal use of type 'void' 100>c:\winddk\3790.1830\src\print\oemdll\bitmap\ntddk.h(2410) : error C2491: 'Rt lCopyString' : definition of dllimport data not allowed 100>c:\winddk\3790.1830\src\print\oemdll\bitmap\ntddk.h(2412) : error C2059: syn tax error : ')' 100>c:\winddk\3790.1830\src\print\oemdll\bitmap\ntddk.h(2425) : error C2143: syn tax error : missing ',' before '*' 100>c:\winddk\3790.1830\src\print\oemdll\bitmap\ntddk.h(2434) : error C2143: syn tax error : missing ',' before '*' 100>c:\winddk\3790.1830\src\print\oemdll\bitmap\ntddk.h(2444) : error C3861: 'PS TRING': identifier not found, even with argument-dependent lookup 100>c:\winddk\3790.1830\src\print\oemdll\bitmap\ntddk.h(2444) : error C2146: syn tax error : missing ')' before identifier 'DestinationString' 100>c:\winddk\3790.1830\src\print\oemdll\bitmap\ntddk.h(2444) : error C4229: ana chronism used : modifiers on data are ignored 100>c:\winddk\3790.1830\src\print\oemdll\bitmap\ntddk.h(2444) : error C2182: 'Rt lUpperString' : illegal use of type 'void' 100>c:\winddk\3790.1830\src\print\oemdll\bitmap\ntddk.h(2444) : error C2491: 'Rt lUpperString' : definition of dllimport data not allowed 100>c:\winddk\3790.1830\src\print\oemdll\bitmap\ntddk.h(2446) : error C2059: syn tax error : ')' 100>c:\winddk\3790.1830\src\print\oemdll\bitmap\ntddk.h(2454) : error C2143: syn tax error : missing ';' before '__stdcall' 100>c:\winddk\3790.1830\src\print\oemdll\bitmap\ntddk.h(2454) : error C2501: 'NT STATUS' : missing storage-class or type specifiers 100>c:\winddk\3790.1830\src\print\oemdll\bitmap\ntddk.h(2456) : error C3861: 'PU NICODE_STRING': identifier not found, even with argument-dependent lookup 100>c:\winddk\3790.1830\src\print\oemdll\bitmap\ntddk.h(2456) : error C2146: syn tax error : missing ')' before identifier 'DestinationString' 100>c:\winddk\3790.1830\src\print\oemdll\bitmap\ntddk.h(2456) : error C4229: ana chronism used : modifiers on data are ignored 100>c:\winddk\3790.1830\src\print\oemdll\bitmap\ntddk.h(2456) : error C2501: 'Rt lAnsiStringToUnicodeString' : missing storage-class or type specifiers 100>c:\winddk\3790.1830\src\print\oemdll\bitmap\ntddk.h(2459) : error C2059: syn tax error : ')' 100>c:\winddk\3790.1830\src\print\oemdll\bitmap\ntddk.h(2464) : error C2143: syn tax error : missing ';' before '__stdcall' 100>c:\winddk\3790.1830\src\print\oemdll\bitmap\ntddk.h(2464) : error C2501: 'NT STATUS' : missing storage-class or type specifiers 100>c:\winddk\3790.1830\src\print\oemdll\bitmap\ntddk.h(2466) : error C3861: 'PA NSI_STRING': identifier not found, even with argument-dependent lookup 100>c:\winddk\3790.1830\src\print\oemdll\bitmap\ntddk.h(2466) : error C2146: syn tax error : missing ')' before identifier 'DestinationString' 100>c:\winddk\3790.1830\src\print\oemdll\bitmap\ntddk.h(2466) : error C4229: ana chronism used : modifiers on data are ignored 100>c:\winddk\3790.1830\src\print\oemdll\bitmap\ntddk.h(2466) : error C2501: 'Rt lUnicodeStringToAnsiString' : missing storage-class or type specifiers 100>c:\winddk\3790.1830\src\print\oemdll\bitmap\ntddk.h(2469) : error C2059: syn tax error : ')' 100>c:\winddk\3790.1830\src\print\oemdll\bitmap\ntddk.h(2476) : error C3861: 'PC UNICODE_STRING': identifier not found, even with argument-dependent lookup 100>c:\winddk\3790.1830\src\print\oemdll\bitmap\ntddk.h(2476) : error C2146: syn tax error : missing ')' before identifier 'String1' 100>c:\winddk\3790.1830\src\print\oemdll\bitmap\ntddk.h(2476) : error C4229: ana chronism used : modifiers on data are ignored 100>c:\winddk\3790.1830\src\print\oemdll\bitmap\ntddk.h(2476) : error C2491: 'Rt lCompareUnicodeString' : definition of dllimport data not allowed 100>c:\winddk\3790.1830\src\print\oemdll\bitmap\ntddk.h(2476) : error C1003: err or count exceeds 100; stopping compilation |
|
12楼#
发布于:2007-07-02 18:06
|
|
13楼#
发布于:2007-07-03 09:34
怎么没人给点建议呀?
|
|
14楼#
发布于:2007-07-03 09:49
看看源码,想想估计就好了,只是头文件包含问题而已么
|
|
|
15楼#
发布于:2007-07-03 10:31
对呀,就是用DDK里面的例子,而且只是加入了NTDDK。H这个头文件
|
|
16楼#
发布于:2007-07-03 11:08
用户被禁言,该主题自动屏蔽! |
|
17楼#
发布于:2007-07-03 15:09
但是网上好多人说在保存数据就得用ZwCreateFile,而这个函数就是定义在ntddk.h头文件里呀!
|
|
18楼#
发布于:2007-07-03 15:47
把函数定义复制出来,自己定义!
|
|
|
19楼#
发布于:2007-07-18 15:56
谢谢 gutian98 ,发现还真是这个问题。
|
|
上一页
下一页