Windows XP教程
  • Windows 2000教程
  • Windows 2003教程 Windows vista教程 Win 7教程 Win 8教程 linux教程 unix教程 windows 2008教程
    当前位置:教程网 > 操作系统 > Windows 2000教程 > 正文

    《Undocumented Windows 2000 Secrets》翻译 --- 第三章(2)

    编辑:教程网 来源:网络 时间:2011年08月28日 16:44

    第三章 编写内核模式驱动程序

    翻译: Kendiv

    更新: Tuesday, February 08, 2005

    作为补充这里给出 DrvInfo.h 的内容:

    // __________________________________________________________

    //

    // DrvInfo.h

    // Driver Info Definitions V1.00

    // 06-02-2000 Sven B. Schreiber

    // sbs@orgon.com

    // __________________________________________________________

    #ifndef _DRVINFO_H_

    #define _DRVINFO_H_

    // =================================================================

    // DISCLAIMER

    // =================================================================

    /*

    This software is provided "as is" and any express or implIEd

    warranties, including, but not limited to, the implied warranties of

    merchantability and fitness for a particular purpose are disclaimed.

    In no event shall the author Sven B. Schreiber be liable for any

    direct, indirect, incidental, special, exemplary, or consequential

    damages (including, but not limited to, procurement of substitute

    goods or services; loss of use, data, or profits; or business

    interruption) however caused and on any theory of liability,

    whether in contract, strict liability, or tort (including negligence

    or otherwise) arising in any way out of the use of this software,

    even if advised of the possibility of such damage.

    */

    // =================================================================

    // REVISION HISTORY

    // =================================================================

    /*

    05-26-2000 V1.00 Original version (SBS).

    */

    // =================================================================

    // BASIC TYPES

    // =================================================================

    typedef UCHAR BYTE, *PBYTE, **PPBYTE;

    typedef USHORT Word, *PWORD, **PPWORD;

    typedef ULONG DWORD, *PDWORD, **PPDWORD;

    typedef unsigned __int64 QWORD, *PQWORD, **PPQWORD;

    typedef int BOOL, *PBOOL, **PPBOOL;

    typedef void **PPVOID;

    // -----------------------------------------------------------------

    #define BYTE_ sizeof (BYTE)

    #define WORD_ sizeof (WORD)

    #define DWORD_ sizeof (DWORD)

    #define QWORD_ sizeof (QWORD)

    #define BOOL_ sizeof (BOOL)

    #define PVOID_ sizeof (PVOID)

    #define HANDLE_ sizeof (HANDLE)

    #define PHYSICAL_ADDRESS_ sizeof (PHYSICAL_ADDRESS)

    // =================================================================

    // MacROS

    // =================================================================

    #define _DRV_DEVICE(_name) Device ## _name

    #define _DRV_LINK(_name) DosDevices ## _name

    #define _DRV_PATH(_name) \. ## _name

    // -----------------------------------------------------------------

    #define _CSTRING(_text) #_text

    #define CSTRING(_text) _CSTRING (_text)

    #define _USTRING(_text) L##_text

    #define USTRING(_text) _USTRING (_text)

  • 原文来自 教程网-免费ps教程,cad教程,ppt教程,ppt教程,java教程,vb教程,php教程技术在线学习课程网 转载请注明:http://www.websmill.com/xitong/Windows2000/20130.html

  • 上一篇:Windows 2000 常用系统进程列表
  • 下一篇:Windows 2000 “查找”专题问答