utils.h

来自「RTL8139 网卡驱动源码 for WinCE.net CEPC」· C头文件 代码 · 共 68 行

H
68
字号
//****************************************************************************
//                              File UTILS.H
//
//                             Stuff methods
//
//                     Copyright (c) APSoft, 1998-2002.
//                          All rights reserved.
//
//****************************************************************************

#ifndef _UTILS_H_
#define _UTILS_H_


//****************************************************************************
//                      --- AllocateUnicodeString ---
//
// Purpose: Allocate unicode string and init. it
//   Input: PUNICODE_STRING pusTarget - New string
//          PUNICODE_STRING pusSource - Source string
//  Output: none
//****************************************************************************
void AllocateUnicodeString(PUNICODE_STRING pusTarget, PUNICODE_STRING pusSource);


//****************************************************************************
//                      --- AllocateUnicodeString ---
//
// Purpose: Allocate unicode string and init. it
//   Input: PUNICODE_STRING pusTarget  - New string
//          PWSTR           pwszSource - Source string
//  Output: none
//****************************************************************************
void AllocateUnicodeString(PUNICODE_STRING pusTarget, PWSTR pwszSource);


//****************************************************************************
//                        --- PnpQueryInterface ---
//
// Purpose: Query interface
//   Input: PDEVICE_OBJECT   pPdo     - Target device
//          CONST GUID     * Type     - Type of interface
//          PVOID            pIface   - Address of interface structure
//          USHORT           uSize    - Size of structure
//          USHORT           uVersion - Version of interface
//  Output: NTSTATUS                  - Operation status
//****************************************************************************
NTSTATUS PnpQueryInterface(PDEVICE_OBJECT   pPdo,
                           CONST GUID     * Type,
                           PVOID            pIface,
                           USHORT           uSize,
                           USHORT           uVer);


//****************************************************************************
//                         --- PnpGetDeviceID ---
//
// Purpose: Returns device ID
//   Input: PDEVICE_OBJECT    pPdo - Target device
//          BUS_QUERY_ID_TYPE Type - Type of ID to return
//  Output: PWSTR                  - ID string (MULTI_SZ for HardwareIDs
//                                   and ComptibleIDs). User MUST delete string
//                                   using ExFreePool!
//****************************************************************************
PWSTR PnpGetDeviceID(PDEVICE_OBJECT pPdo, BUS_QUERY_ID_TYPE Type);

#endif                                      // #ifndef _UTILS_H_

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?