89{
96
98 {
100 {
101
103 return -1;
104 }
105
107 if (!ppdev)
108 {
110 return -1;
111 }
112
113
115
117 if (!psurf)
118 {
121 return 0;
122 }
124 }
125 else
126 {
129 {
131 return -1;
132 }
133
134
135 ppdev = pDC->ppdev;
137
138
139 psurf = pDC->dclevel.pSurface;
140 if (!psurf)
141 {
144 return 0;
145 }
147
148
150 }
151
152
154 {
157 }
158
159 if ( InSize && UnsafeInData )
160 {
162 {
164 InSize,
165 1);
166 }
168 {
170 }
172
174 {
177 }
178
180 if ( !SafeInData )
181 {
185 }
186
188 {
189
191 UnsafeInData,
192 InSize);
193 }
195 {
197 }
199
201 {
205 }
206 }
207
208 if ( OutSize && UnsafeOutData )
209 {
211 {
213 OutSize,
214 1);
215 }
217 {
219 }
221
223 {
227 }
228
230 if ( !SafeOutData )
231 {
235 }
236 }
237
238
242 InSize,
243 SafeInData,
244 OutSize,
245 SafeOutData );
246
249 {
251 }
254
255 if ( SafeInData )
256 {
258 }
259
260 if ( SafeOutData )
261 {
263 {
265 {
266
268 }
270 {
272 }
274
276 {
279 }
280 }
281
283 }
284
286}
#define ERROR_NOT_ENOUGH_MEMORY
#define NT_SUCCESS(StatCode)
#define ExAllocatePoolWithTag(hernya, size, tag)
VOID NTAPI ProbeForRead(IN CONST VOID *Address, IN SIZE_T Length, IN ULONG Alignment)
VOID NTAPI ProbeForWrite(IN PVOID Address, IN SIZE_T Length, IN ULONG Alignment)
VOID WINAPI EngReleaseSemaphore(IN HSEMAPHORE hsem)
#define EXCEPTION_EXECUTE_HANDLER
#define ExFreePoolWithTag(_P, _T)
PPDEVOBJ NTAPI EngpGetPDEV(_In_opt_ PUNICODE_STRING pustrDeviceName)
VOID NTAPI PDEVOBJ_vRelease(_Inout_ PPDEVOBJ ppdev)
FORCEINLINE VOID PDEVOBJ_vReference(_In_ PPDEVOBJ ppdev)
#define _SEH2_GetExceptionCode()
#define _SEH2_EXCEPT(...)
DRIVER_FUNCTIONS DriverFunctions
#define RtlCopyMemory(Destination, Source, Length)
VOID FASTCALL SetLastNtError(_In_ NTSTATUS Status)
#define SURFACE_ShareUnlockSurface(pBMObj)
FORCEINLINE VOID SURFACE_ShareLockByPointer(PSURFACE psurf)
ENGAPI VOID APIENTRY EngAcquireSemaphore(_Inout_ HSEMAPHORE hsem)
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO