wregistry-ddk.h

00001 /*
00002  * wregistry-ddk.h - Windows registry utilities: resource list types.
00003  *
00004  * This file is part of WindowsUtils.
00005  *
00006  * from: http://www.codeproject.com/useritems/interrupthook.asp
00007  *
00008  * InterruptHook, Copyright (C) 2003  Alexander M.
00009  * Copyright (C) 2003, Leiden University.
00010  * WindowsUtils is free software, see below.
00011  *
00012  * $Revision: $
00013  * $Date: $
00014  * $Source: $
00015  * %Author: Martin J. Moene %
00016  *
00017  * Compiler        : Borland-C++ 5.5.1
00018  * Operating system: 32-bit Windows
00019  * Hardware system : PC
00020  *
00021  * WindowsUtils is free software; you can redistribute it and/or modify
00022  * it under the terms of the GNU General Public License as published by
00023  * the Free Software Foundation; either version 2 of the License, or
00024  * (at your option) any later version.
00025  *
00026  * WindowsUtils is distributed in the hope that it will be useful,
00027  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00028  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00029  * GNU General Public License for more details.
00030  *
00031  * You should have received a copy of the GNU General Public License
00032  * along with mngdriver; if not, write to the Free Software
00033  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00034  */
00035 
00036 /*
00037 InterruptHook
00038 Copyright (C) 2003  Alexander M.
00039 
00040 This program is free software; you can redistribute it and/or
00041 modify it under the terms of the GNU General Public License
00042 as published by the Free Software Foundation; either version 2
00043 of the License, or (at your option) any later version.
00044 
00045 This program is distributed in the hope that it will be useful,
00046 but WITHOUT ANY WARRANTY; without even the implied warranty of
00047 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00048 GNU General Public License for more details.
00049 
00050 You should have received a copy of the GNU General Public License
00051 along with this program; if not, write to the Free Software
00052 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00053 */
00054 
00055 #ifndef __WREGISTRY_DDK_H
00056 #define __WREGISTRY_DDK_H
00057 
00058 #ifndef _WINDOWS_
00059 #define WIN32_LEAN_AND_MEAN
00060    #include <windows.h>
00061 #undef WIN32_LEAN_AND_MEAN
00062 #endif
00063 
00064 /* *
00065  * namespace: WindowsUtils
00066  */
00067 
00068 namespace WindowsUtils {
00069 
00085 /* Taken from ntddk.h(shorten) */
00086 #define CmResourceTypeNull                0   
00087 #define CmResourceTypePort                1   
00088 #define CmResourceTypeInterrupt           2   
00089 #define CmResourceTypeMemory              3   
00090 #define CmResourceTypeDma                 4   
00091 #define CmResourceTypeDeviceSpecific      5   
00092 #define CmResourceTypeBusNumber           6   
00093 #define CmResourceTypeMaximum             7   
00094 #define CmResourceTypeAssignedResource    8   
00095 #define CmResourceTypeSubAllocateFrom     9   
00096 #define CmResourceTypeNonArbitrated     128   
00097 #define CmResourceTypeConfigData        128   
00098 #define CmResourceTypeDevicePrivate     129   
00099 #define CmResourceTypePcCardConfig      130   
00100 #define CmResourceTypeMfCardConfig      131   
00101 
00102 
00106 typedef enum _INTERFACE_TYPE {
00107     InterfaceTypeUndefined = -1,
00108     Internal,
00109     Isa,
00110     Eisa,
00111     MicroChannel,
00112     TurboChannel,
00113     PCIBus,
00114     VMEBus,
00115     NuBus,
00116     PCMCIABus,
00117     CBus,
00118     MPIBus,
00119     MPSABus,
00120     ProcessorInternal,
00121     InternalPowerBus,
00122     PNPISABus,
00123     PNPBus,
00124     MaximumInterfaceType
00125 }INTERFACE_TYPE, *PINTERFACE_TYPE;
00126 
00131 typedef LARGE_INTEGER PHYSICAL_ADDRESS, *PPHYSICAL_ADDRESS;
00132 
00133 #ifdef __BORLANDC__
00134    #pragma option -a4
00135 #else
00136    #pragma pack(4)
00137 #endif
00138 
00143 typedef struct _CM_PARTIAL_RESOURCE_DESCRIPTOR {
00144     UCHAR Type;
00145     UCHAR ShareDisposition;
00146     USHORT Flags;
00147     union {
00148 
00149         struct {
00150             PHYSICAL_ADDRESS Start;
00151             ULONG Length;
00152         } Generic;
00153 
00154         struct {
00155             PHYSICAL_ADDRESS Start;
00156             ULONG Length;
00157         } Port;
00158 
00159         struct {
00160             ULONG Level;
00161             ULONG Vector;
00162             ULONG Affinity;
00163         } Interrupt;
00164 
00165         struct {
00166             PHYSICAL_ADDRESS Start;    // 64 bit physical addresses.
00167             ULONG Length;
00168         } Memory;
00169 
00170         struct {
00171             ULONG Channel;
00172             ULONG Port;
00173             ULONG Reserved1;
00174         } Dma;
00175 
00176         struct {
00177             ULONG Data[3];
00178         } DevicePrivate;
00179 
00180         struct {
00181             ULONG Start;
00182             ULONG Length;
00183             ULONG Reserved;
00184         } BusNumber;
00185 
00186         struct {
00187             ULONG DataSize;
00188             ULONG Reserved1;
00189             ULONG Reserved2;
00190         } DeviceSpecificData;
00191     } u;
00192 } CM_PARTIAL_RESOURCE_DESCRIPTOR, *PCM_PARTIAL_RESOURCE_DESCRIPTOR;
00193 
00194 #ifdef __BORLANDC__
00195    #pragma option -a
00196 #else
00197    #pragma pack()
00198 #endif
00199 
00204 typedef struct _CM_PARTIAL_RESOURCE_LIST {
00205     USHORT Version;
00206     USHORT Revision;
00207     ULONG Count;
00208     CM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptors[1];
00209 } CM_PARTIAL_RESOURCE_LIST, *PCM_PARTIAL_RESOURCE_LIST;
00210 
00215 typedef struct _CM_FULL_RESOURCE_DESCRIPTOR {
00216     INTERFACE_TYPE InterfaceType;
00217     ULONG BusNumber;
00218     CM_PARTIAL_RESOURCE_LIST PartialResourceList;
00219 } CM_FULL_RESOURCE_DESCRIPTOR, *PCM_FULL_RESOURCE_DESCRIPTOR;
00220 
00225 typedef struct _CM_RESOURCE_LIST {
00226     ULONG Count;
00227     CM_FULL_RESOURCE_DESCRIPTOR List[1];
00228 } CM_RESOURCE_LIST, *PCM_RESOURCE_LIST;
00229 
00232 } // end namespace WindowsUtils
00233 
00234 #endif // __WREGISTRY_DDK_H
00235 
00236 /*
00237  * end of file
00238  */
00239 

Generated on Tue Sep 30 11:40:33 2003 for Windows Utilities by doxygen 1.3.4