阅读:2515回复:5
NTSTATUS是什么结构,在帮助里不见到
rt
|
|
沙发#
发布于:2004-11-13 00:26
Using NTSTATUS Values
Many kernel-mode standard driver routines and driver support routines use the NTSTATUS type for return values. Additionally, drivers provide an NTSTATUS-typed value in an IRP's IO_STATUS_BLOCK structure when completing IRPS. The NTSTATUS type is defined in ntdef.h, and system-supplied status codes are defined in ntstatus.h. (Vendors can also define private status codes, although they rarely need to. For more information, see Defining New NTSTATUS Values.) NTSTATUS values are divided into four types: success values, informational values, warnings, and error values. Numerous values are assigned to each type. A common mistake, when testing for a successful return from a routine, is to compare the routine's return value with STATUS_SUCCESS. This comparison checks for only one of several success values. When testing a return value, you should use one of the following system-supplied macros (defined in ntdef.h): NT_SUCCESS(Status) Evaluates to TRUE if the return value specified by Status is a success type or an informational type (0 |
|
板凳#
发布于:2004-11-14 12:50
请问楼上的,这个贴的出处是那儿的?是电子书么?能不能给我一份?riotpolice@etang.com
谢谢 |
|
地板#
发布于:2004-11-14 16:15
The Online DDK
http://www.osronline.com/ |
|
地下室#
发布于:2004-11-14 17:51
你也可以下一个win2k的DDK装上啊!网上很多的哦。
|
|
|
5楼#
发布于:2004-11-30 11:59
NTSTATUS实际就是一个长整型,但你应该使用NTSTATUS定义该函数的返回值而不是LONG,这样代码的可读性会更好。大部分内核模式支持例程都返回NTSTATUS状态代码,你可以在DDK头文件NTSTATUS.H中找到NTSTATUS的代码列表。
以上内容转贴 :D |
|