Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

mf.h

Go to the documentation of this file.
00001 /*++ 00002 00003 Copyright (c) 1997 Microsoft Corporation 00004 00005 Module Name: 00006 00007 mf.h 00008 00009 Abstract: 00010 00011 This header describes the structures and interfaces required to interact 00012 with the multifunction enumerator. 00013 00014 Author: 00015 00016 Andy Thornton (andrewth) 20-Oct-97 00017 00018 Revision History: 00019 00020 --*/ 00021 00022 DEFINE_GUID( GUID_MF_ENUMERATION_INTERFACE, 00023 0xaeb895f0L, 0x5586, 0x11d1, 0x8d, 0x84, 0x00, 0xa0, 0xc9, 0x06, 0xb2, 0x44 ); 00024 00025 #if !defined(_MF_) 00026 #define _MF_ 00027 00028 // 00029 // MfFlags value 00030 // 00031 00032 #define MF_FLAGS_EVEN_IF_NO_RESOURCE 0x00000001 00033 #define MF_FLAGS_NO_CREATE_IF_NO_RESOURCE 0x00000002 00034 #define MF_FLAGS_FILL_IN_UNKNOWN_RESOURCE 0x00000004 00035 #define MF_FLAGS_CREATE_BUT_NO_SHOW_DISABLED 0x00000008 00036 00037 typedef struct _MF_RESOURCE_MAP { 00038 00039 ULONG Count; 00040 UCHAR Resources[ANYSIZE_ARRAY]; 00041 00042 } MF_RESOURCE_MAP, *PMF_RESOURCE_MAP; 00043 00044 00045 typedef struct _MF_VARYING_RESOURCE_ENTRY { 00046 00047 UCHAR ResourceIndex; 00048 UCHAR Reserved[3]; // Packing 00049 ULONG Offset; 00050 ULONG Size; 00051 ULONG MaxCount; 00052 00053 } MF_VARYING_RESOURCE_ENTRY, *PMF_VARYING_RESOURCE_ENTRY; 00054 00055 00056 typedef struct _MF_VARYING_RESOURCE_MAP { 00057 00058 ULONG Count; 00059 MF_VARYING_RESOURCE_ENTRY Resources[ANYSIZE_ARRAY]; 00060 00061 } MF_VARYING_RESOURCE_MAP, *PMF_VARYING_RESOURCE_MAP; 00062 00063 00064 typedef struct _MF_DEVICE_INFO *PMF_DEVICE_INFO; 00065 00066 typedef struct _MF_DEVICE_INFO { 00067 00068 // 00069 // Name for this child, unique with respect to the other children 00070 // 00071 UNICODE_STRING Name; 00072 00073 // 00074 // A REG_MULTI_SZ style list of hardware IDs 00075 // 00076 UNICODE_STRING HardwareID; 00077 00078 // 00079 // A REG_MULTI_SZ style list of compatible IDs 00080 // 00081 UNICODE_STRING CompatibleID; 00082 00083 // 00084 // Map of resource that we totally consume 00085 // 00086 PMF_RESOURCE_MAP ResourceMap; 00087 00088 // 00089 // Map of resource that we partially consume 00090 // 00091 PMF_VARYING_RESOURCE_MAP VaryingResourceMap; 00092 00093 // 00094 // Flags - 00095 // MF_FLAGS_FILL_IN_UNKNOWN_RESOURCE - if the parent resource doesn't 00096 // contain a descriptor referenced in the ResourceMap use a 00097 // null (CmResourceTypeNull) descriptor instead. 00098 // MF_FLAGS_EVEN_IF_NO_RESOURCE - enumerate the child even if it 00099 // doesn't have any resources. 00100 // MF_FLAGS_NO_CREATE_IF_NO_RESOURCE - if we can't find a resource 00101 // referenced for the child then don't enumerate the child 00102 // MF_FLAGS_CREATE_BUT_NO_SHOW_DISABLED - ?? 00103 // 00104 // BUGBUG - what do these mean? 00105 // 00106 ULONG MfFlags; 00107 00108 } MF_DEVICE_INFO; 00109 00110 typedef 00111 NTSTATUS 00112 (*PMF_ENUMERATE_CHILD)( 00113 IN PVOID Context, 00114 IN ULONG Index, 00115 OUT PMF_DEVICE_INFO ChildInfo 00116 ); 00117 00118 /*++ 00119 00120 00121 Routine Description: 00122 00123 This returns information about children to be enumerated by a multifunction 00124 driver. 00125 00126 Arguments: 00127 00128 Context - Context from the MF_ENUMERATION_INTERFACE 00129 00130 Index - Zero based index of the children 00131 00132 ChildInfo - Pointer to a caller allocated buffer that should be filled in 00133 by the callee. This will involve allocation of extra buffers for each 00134 piece of information. These will be freed by calling ExFreePool when 00135 they are no longer required. 00136 00137 Return Value: 00138 00139 Status code that indicates whether or not the function was successful. 00140 00141 STATUS_NO_MORE_ENTRIES indicates that the are no more children to enumerate 00142 00143 --*/ 00144 00145 typedef struct _MF_ENUMERATION_INTERFACE { 00146 00147 // 00148 // Generic interface header 00149 // 00150 USHORT Size; 00151 USHORT Version; 00152 PVOID Context; 00153 PINTERFACE_REFERENCE InterfaceReference; 00154 PINTERFACE_DEREFERENCE InterfaceDereference; 00155 00156 // 00157 // Multi-function enumeration data 00158 // 00159 PMF_ENUMERATE_CHILD EnumerateChild; 00160 00161 } MF_ENUMERATION_INTERFACE, *PMF_ENUMERATION_INTERFACE; 00162 00163 #endif

Generated on Sat May 15 19:40:47 2004 for test by doxygen 1.3.7