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

csrdll.h

Go to the documentation of this file.
00001 /*++ 00002 00003 Copyright (c) 1990 Microsoft Corporation 00004 00005 Module Name: 00006 00007 csrdll.h 00008 00009 Abstract: 00010 00011 Main include file for Client side of the Client Server Runtime (CSR) 00012 00013 Author: 00014 00015 Steve Wood (stevewo) 8-Oct-1990 00016 00017 Revision History: 00018 00019 --*/ 00020 00021 // 00022 // Include definitions common between the Client and Server portions. 00023 // 00024 00025 #include "csr.h" 00026 00027 // 00028 // Include definitions specific to the Client portion. 00029 // 00030 00031 #include "ntcsrdll.h" 00032 #include "ntcsrsrv.h" 00033 00034 #if DBG 00035 #define CSR_DEBUG_INIT 0x00000001 00036 #define CSR_DEBUG_LPC 0x00000002 00037 #define CSR_DEBUG_FLAG3 0x00000004 00038 #define CSR_DEBUG_FLAG4 0x00000008 00039 #define CSR_DEBUG_FLAG5 0x00000010 00040 #define CSR_DEBUG_FLAG6 0x00000020 00041 #define CSR_DEBUG_FLAG7 0x00000040 00042 #define CSR_DEBUG_FLAG8 0x00000080 00043 #define CSR_DEBUG_FLAG9 0x00000100 00044 #define CSR_DEBUG_FLAG10 0x00000200 00045 #define CSR_DEBUG_FLAG11 0x00000400 00046 #define CSR_DEBUG_FLAG12 0x00000800 00047 #define CSR_DEBUG_FLAG13 0x00001000 00048 #define CSR_DEBUG_FLAG14 0x00002000 00049 #define CSR_DEBUG_FLAG15 0x00004000 00050 #define CSR_DEBUG_FLAG16 0x00008000 00051 #define CSR_DEBUG_FLAG17 0x00010000 00052 #define CSR_DEBUG_FLAG18 0x00020000 00053 #define CSR_DEBUG_FLAG19 0x00040000 00054 #define CSR_DEBUG_FLAG20 0x00080000 00055 #define CSR_DEBUG_FLAG21 0x00100000 00056 #define CSR_DEBUG_FLAG22 0x00200000 00057 #define CSR_DEBUG_FLAG23 0x00400000 00058 #define CSR_DEBUG_FLAG24 0x00800000 00059 #define CSR_DEBUG_FLAG25 0x01000000 00060 #define CSR_DEBUG_FLAG26 0x02000000 00061 #define CSR_DEBUG_FLAG27 0x04000000 00062 #define CSR_DEBUG_FLAG28 0x08000000 00063 #define CSR_DEBUG_FLAG29 0x10000000 00064 #define CSR_DEBUG_FLAG30 0x20000000 00065 #define CSR_DEBUG_FLAG31 0x40000000 00066 #define CSR_DEBUG_FLAG32 0x80000000 00067 00068 ULONG CsrDebug; 00069 #define IF_CSR_DEBUG( ComponentFlag ) \ 00070 if (CsrDebug & (CSR_DEBUG_ ## ComponentFlag)) 00071 00072 #else 00073 #define IF_CSR_DEBUG( ComponentFlag ) if (FALSE) 00074 #endif 00075 00076 // 00077 // Common Types and Definitions 00078 // 00079 00080 // 00081 // CSR_HEAP_MEMORY_SIZE defines how much address space should be 00082 // reserved for the Client heap. This heap is used to store all 00083 // data structures maintained by the Client DLL. 00084 // 00085 00086 #define CSR_HEAP_MEMORY_SIZE (64*1024) 00087 00088 00089 // 00090 // CSR_PORT_MEMORY_SIZE defines how much address space should be 00091 // reserved for passing data to the Server. The memory is visible 00092 // to both the client and server processes. 00093 // 00094 00095 #define CSR_PORT_MEMORY_SIZE 0x10000 00096 00097 // 00098 // Global data accessed by Client DLL 00099 // 00100 00101 BOOLEAN CsrInitOnceDone; 00102 00103 // 00104 // This boolean is TRUE if the dll is attached to a server process. 00105 // 00106 00107 BOOLEAN CsrServerProcess; 00108 00109 // 00110 // This points to the server routine that dispatches APIs, if the dll is 00111 // being called by a server process. 00112 // 00113 00114 NTSTATUS (*CsrServerApiRoutine)(PCSR_API_MSG,PCSR_API_MSG); 00115 00116 // 00117 // The CsrNtSysInfo global variable contains NT specific constants of 00118 // interest, such as page size, allocation granularity, etc. It is filled 00119 // in once during process initialization. 00120 // 00121 00122 SYSTEM_BASIC_INFORMATION CsrNtSysInfo; 00123 00124 #define ROUND_UP_TO_PAGES(SIZE) (((ULONG)(SIZE) + CsrNtSysInfo.PageSize - 1) & ~(CsrNtSysInfo.PageSize - 1)) 00125 #define ROUND_DOWN_TO_PAGES(SIZE) (((ULONG)(SIZE)) & ~(CsrNtSysInfo.PageSize - 1)) 00126 00127 // 00128 // The CsrDebugFlag is non-zero if the Client Application was 00129 // invoked with the Debug option. 00130 // 00131 00132 ULONG CsrDebugFlag; 00133 00134 // 00135 // The CsrHeap global variable describes a single heap used by the Client 00136 // DLL for process wide storage management. Process private data maintained 00137 // by the Client DLL is allocated out of this heap. 00138 // 00139 00140 PVOID CsrHeap; 00141 00142 00143 // 00144 // The connection to the Server is described by the CsrPortHandle global 00145 // variable. The connection is established when the CsrConnectToServer 00146 // function is called. 00147 // 00148 00149 UNICODE_STRING CsrPortName; 00150 HANDLE CsrPortHandle; 00151 00152 00153 // 00154 // In order to pass large arguments to the Server (e.g. path name 00155 // arguments) the CsrPortHeap global variable describes a heap that 00156 // is visible to both the Windows Client process and the Server 00157 // process. 00158 // 00159 00160 PVOID CsrPortHeap; 00161 ULONG_PTR CsrPortMemoryRemoteDelta; 00162 00163 ULONG CsrPortBaseTag; 00164 00165 #define MAKE_CSRPORT_TAG( t ) (RTL_HEAP_MAKE_TAG( CsrPortBaseTag, t )) 00166 00167 #define CAPTURE_TAG 0 00168 00169 // 00170 // The CsrDllHandle global variable contains the DLL handle for the WINDLL 00171 // client stubs executable. 00172 // 00173 00174 HANDLE CsrDllHandle; 00175 00176 00177 // 00178 // The CsrObjectDirecotory global variable contains the handle to the 00179 // object directory that is the name of the server. 00180 // 00181 00182 HANDLE CsrObjectDirectory; 00183 00184 00185 // 00186 // The CsrCallbackInfo structure has the information passed to 00187 // CsrClientConnectToServer if it was present, otherwise it is initialized 00188 // to all zeros. 00189 // 00190 00191 #define CSR_MAX_CLIENT_DLL 16 00192 00193 PCSR_CALLBACK_INFO CsrLoadedClientDll[ CSR_MAX_CLIENT_DLL ]; 00194 00195 // 00196 // Routines defined in dllinit.c 00197 // 00198 00199 BOOLEAN 00200 CsrDllInitialize( 00201 IN PVOID DllHandle, 00202 IN ULONG Reason, 00203 IN PCONTEXT Context OPTIONAL 00204 ); 00205 00206 NTSTATUS 00207 CsrpConnectToServer( 00208 IN PWSTR ObjectDirectory 00209 ); 00210 00211 00212 // 00213 // Routines defined in dllutil.c 00214 //

Generated on Sat May 15 19:39:36 2004 for test by doxygen 1.3.7