ReactOS 0.4.16-dev-197-g92996da
property.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Kernel Streaming
4 * FILE: drivers/ksfilter/ks/event.c
5 * PURPOSE: KS property handling functions
6 * PROGRAMMER: Johannes Anderwald
7 */
8
9#include "precomp.h"
10
11/* SEH support with PSEH */
12#include <pseh/pseh2.h>
13
14#define NDEBUG
15#include <debug.h>
16
17const GUID KSPROPTYPESETID_General = {0x97E99BA0L, 0xBDEA, 0x11CF, {0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00}};
18
22 IN const KSPROPERTY_SET* PropertySet,
23 IN ULONG PropertySetCount,
28 OUT PFNKSHANDLER *PropertyHandler,
29 OUT PKSPROPERTY_SET * Set,
30 OUT PKSPROPERTY_ITEM *PropertyItem)
31{
32 ULONG Index, ItemIndex;
35
36 for(Index = 0; Index < PropertySetCount; Index++)
37 {
38 ASSERT(PropertySet[Index].Set);
39
40 if (IsEqualGUIDAligned(&Property->Set, PropertySet[Index].Set))
41 {
42 for(ItemIndex = 0; ItemIndex < PropertySet[Index].PropertiesCount; ItemIndex++)
43 {
44
45 /* store property set */
46 *Set = (PKSPROPERTY_SET)&PropertySet[Index];
47 *PropertyItem = (PKSPROPERTY_ITEM)&PropertySet[Index].PropertyItem[ItemIndex];
48
49
50 if (PropertySet[Index].PropertyItem[ItemIndex].PropertyId == Property->Id)
51 {
53 {
54 if (sizeof(ULONG) > OutputBufferLength)
55 {
56 /* too small buffer */
58 }
59
60 /* get output buffer */
62
63 /* clear flags */
64 *Flags = 0;
65
66 IoStatus->Information = sizeof(ULONG);
67
68 if (PropertySet[Index].PropertyItem[ItemIndex].SupportHandler)
69 {
70 /* use support handler from driver */
71 *PropertyHandler = PropertySet[Index].PropertyItem[ItemIndex].SupportHandler;
72 return STATUS_SUCCESS;
73 }
74
75 if (PropertySet[Index].PropertyItem[ItemIndex].GetSupported)
77
78 if (PropertySet[Index].PropertyItem[ItemIndex].SetSupported)
80
82 {
83 /* get output buffer */
85
86 /* store result */
87 Description->DescriptionSize = sizeof(KSPROPERTY_DESCRIPTION);
88 Description->PropTypeSet.Set = KSPROPTYPESETID_General;
89 Description->PropTypeSet.Id = 0;
90 Description->PropTypeSet.Flags = 0;
91 Description->MembersListCount = 0;
92 Description->Reserved = 0;
93
94 IoStatus->Information = sizeof(KSPROPERTY_DESCRIPTION);
95 }
96 return STATUS_SUCCESS;
97 }
98
99 if (PropertySet[Index].PropertyItem[ItemIndex].MinProperty > InputBufferLength)
100 {
101 /* too small input buffer */
102 IoStatus->Information = PropertySet[Index].PropertyItem[ItemIndex].MinProperty;
104 }
105
106 if (PropertySet[Index].PropertyItem[ItemIndex].MinData > OutputBufferLength)
107 {
108 /* too small output buffer */
109 IoStatus->Information = PropertySet[Index].PropertyItem[ItemIndex].MinData;
110 return STATUS_MORE_ENTRIES;
111 }
112
113
114 if (Property->Flags & KSPROPERTY_TYPE_SET)
115 {
116 /* store property handler */
117 *PropertyHandler = PropertySet[Index].PropertyItem[ItemIndex].SetPropertyHandler;
118 return STATUS_SUCCESS;
119 }
120
121 if (Property->Flags & KSPROPERTY_TYPE_GET)
122 {
123 /* store property handler */
124 *PropertyHandler = PropertySet[Index].PropertyItem[ItemIndex].GetPropertyHandler;
125 return STATUS_SUCCESS;
126 }
127
128
129 }
130 }
131 }
132 }
133 return STATUS_NOT_FOUND;
134}
135
136
139 IN PIRP Irp,
140 IN ULONG PropertySetsCount,
141 IN const KSPROPERTY_SET* PropertySet,
142 IN PFNKSALLOCATOR Allocator OPTIONAL,
143 IN ULONG PropertyItemSize OPTIONAL)
144{
146 PKSPROPERTY_ITEM PropertyItem;
147 PKSPROPERTY_SET Set;
148 PIO_STACK_LOCATION IoStack;
150 PFNKSHANDLER PropertyHandler = NULL;
152 LPGUID Guid;
153 //UNICODE_STRING GuidBuffer;
154
155 /* get current irp stack */
157
158 /* get parameters */
159 OutputBufferLength = (IoStack->Parameters.DeviceIoControl.OutputBufferLength + 7) & ~7;
160 InputBufferLength = IoStack->Parameters.DeviceIoControl.InputBufferLength;
161
162 /* check for invalid buffer length size */
163 if (OutputBufferLength < IoStack->Parameters.DeviceIoControl.OutputBufferLength)
164 {
165 /* unsigned overflow */
167 }
168
169 /* check for integer overflow */
170 if (InputBufferLength + OutputBufferLength < IoStack->Parameters.DeviceIoControl.OutputBufferLength)
171 {
172 /* overflow */
174 }
175
176 /* check if inputbuffer at least holds KSPROPERTY item */
177 if (IoStack->Parameters.DeviceIoControl.InputBufferLength < sizeof(KSPROPERTY))
178 {
179 /* invalid parameter */
181 }
182
183 /* get total size */
185
186 /* get input property request */
187 Property = (PKSPROPERTY)IoStack->Parameters.DeviceIoControl.Type3InputBuffer;
188
189 /* have the parameters been checked yet */
190 if (!Irp->AssociatedIrp.SystemBuffer)
191 {
192 /* is it from user mode */
193 if (Irp->RequestorMode == UserMode)
194 {
195 /* probe user buffer */
196 ProbeForRead(IoStack->Parameters.DeviceIoControl.Type3InputBuffer, InputBufferLength, 1);
197 }
198
199 /* do we have an allocator */
200 if ((Allocator) && (Property->Flags & (KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_SET)))
201 {
202 /* call allocator */
203 Status = Allocator(Irp, TotalSize, (Property->Flags & KSPROPERTY_TYPE_GET));
204
205 /* check for success */
206 if (!NT_SUCCESS(Status))
207 return Status;
208 }
209 else
210 {
211 /* allocate buffer */
212 Irp->AssociatedIrp.SystemBuffer = AllocateItem(NonPagedPool, TotalSize);
213
214 /* sanity check */
215 ASSERT(Irp->AssociatedIrp.SystemBuffer != NULL);
216
217 /* mark irp as buffered so that changes the stream headers are propagated back */
219 }
220
221 /* now copy the buffer */
222 RtlCopyMemory((PVOID)((ULONG_PTR)Irp->AssociatedIrp.SystemBuffer + OutputBufferLength), IoStack->Parameters.DeviceIoControl.Type3InputBuffer, InputBufferLength);
223
224 /* use new property buffer */
225 Property = (PKSPROPERTY)((ULONG_PTR)Irp->AssociatedIrp.SystemBuffer + OutputBufferLength);
226
227 /* is it a set operation */
228 if (Property->Flags & KSPROPERTY_TYPE_SET)
229 {
230 /* for set operations, the output parameters need to be copied */
231 if (Irp->RequestorMode == UserMode)
232 {
233 /* probe user parameter */
234 ProbeForRead(Irp->UserBuffer, IoStack->Parameters.DeviceIoControl.OutputBufferLength, 1);
235 }
236
237 /* copy parameters, needs un-aligned parameter length */
238 RtlCopyMemory(Irp->AssociatedIrp.SystemBuffer, Irp->UserBuffer, IoStack->Parameters.DeviceIoControl.OutputBufferLength);
239 }
240
241 /* is there an output buffer */
242 if (IoStack->Parameters.DeviceIoControl.OutputBufferLength)
243 {
244 /* is it from user mode */
245 if (Irp->RequestorMode == UserMode)
246 {
247 /* probe buffer for writing */
248 ProbeForWrite(Irp->UserBuffer, IoStack->Parameters.DeviceIoControl.OutputBufferLength, 1);
249 }
250
251 if (!Allocator || !(Property->Flags & KSPROPERTY_TYPE_GET))
252 {
253 /* it is an input operation */
254 Irp->Flags |= IRP_INPUT_OPERATION;
255 }
256 }
257 }
258 else
259 {
260 /* use new property buffer */
261 Property = (PKSPROPERTY)((ULONG_PTR)Irp->AssociatedIrp.SystemBuffer + OutputBufferLength);
262 }
263
264 //RtlStringFromGUID(&Property->Set, &GuidBuffer);
265
266 //DPRINT("KspPropertyHandler Irp %p PropertySetsCount %u PropertySet %p Allocator %p PropertyItemSize %u ExpectedPropertyItemSize %u\n", Irp, PropertySetsCount, PropertySet, Allocator, PropertyItemSize, sizeof(KSPROPERTY_ITEM));
267 //DPRINT("PropertyId %lu PropertyFlags %x Guid %S\n", Property->Id, Property->Flags, GuidBuffer.Buffer);
268
269 //RtlFreeUnicodeString(&GuidBuffer);
270
271 /* sanity check */
272 ASSERT(PropertyItemSize == 0 || PropertyItemSize == sizeof(KSPROPERTY_ITEM));
273
274 /* find the property handler */
275 Status = FindPropertyHandler(&Irp->IoStatus, PropertySet, PropertySetsCount, Property, InputBufferLength, OutputBufferLength, Irp->AssociatedIrp.SystemBuffer, &PropertyHandler, &Set, &PropertyItem);
276
277 if (NT_SUCCESS(Status) && PropertyHandler)
278 {
279 /* store set */
280 KSPROPERTY_SET_IRP_STORAGE(Irp) = Set;
281
282 /* are any custom property item sizes used */
283 if (PropertyItemSize)
284 {
285 /* store custom property item */
286 KSPROPERTY_ITEM_IRP_STORAGE(Irp) = PropertyItem;
287 }
288
290 {
291 /* call property handler */
292 Status = PropertyHandler(Irp, Property, (OutputBufferLength > 0 ? Irp->AssociatedIrp.SystemBuffer : NULL));
293 }
295 {
297 }
298 _SEH2_END;
299
301 {
302 /* output buffer is too small */
303 if (Allocator)
304 {
305 /* allocate the requested amount */
306 Status = Allocator(Irp, (ULONG)Irp->IoStatus.Information, FALSE);
307
308 /* check if the block was allocated */
309 if (!NT_SUCCESS(Status))
310 {
311 /* no memory */
313 }
315 {
316 /* re-call property handler */
317 Status = PropertyHandler(Irp, Property, Irp->AssociatedIrp.SystemBuffer);
318 }
320 {
322 }
323 _SEH2_END;
324 }
325 }
326 }
328 {
329 // store output size
330 Irp->IoStatus.Information = sizeof(GUID) * PropertySetsCount;
331 if (IoStack->Parameters.DeviceIoControl.OutputBufferLength < sizeof(GUID) * PropertySetsCount)
332 {
333 // buffer too small
334 return STATUS_MORE_ENTRIES;
335 }
336
337 // get output buffer
338 Guid = (LPGUID)Irp->AssociatedIrp.SystemBuffer;
339
340 // copy property guids from property sets
341 for(Index = 0; Index < PropertySetsCount; Index++)
342 {
343 RtlMoveMemory(&Guid[Index], PropertySet[Index].Set, sizeof(GUID));
344 }
346 }
347
348 /* done */
349 return Status;
350}
351
352/*
353 @implemented
354*/
357NTAPI
359 IN PIRP Irp,
360 IN ULONG PropertySetsCount,
361 IN const KSPROPERTY_SET* PropertySet)
362{
363 return KspPropertyHandler(Irp, PropertySetsCount, PropertySet, NULL, 0);
364}
365
366
367/*
368 @implemented
369*/
373NTAPI
374KsPropertyHandlerWithAllocator(
375 _In_ PIRP Irp,
376 _In_ ULONG PropertySetsCount,
377 _In_reads_(PropertySetsCount) const KSPROPERTY_SET* PropertySet,
378 _In_opt_ PFNKSALLOCATOR Allocator,
379 _In_opt_ ULONG PropertyItemSize)
380{
381 return KspPropertyHandler(Irp, PropertySetsCount, PropertySet, Allocator, PropertyItemSize);
382}
383
386 IN ULONG FastIoCount,
387 IN const KSFASTPROPERTY_ITEM * FastIoTable,
389 OUT PFNKSFASTHANDLER * FastPropertyHandler)
390{
391 ULONG Index;
392
393 /* iterate through all items */
394 for(Index = 0; Index < FastIoCount; Index++)
395 {
396 if (PropertyId->Id == FastIoTable[Index].PropertyId)
397 {
398 if (PropertyId->Flags & KSPROPERTY_TYPE_SET)
399 {
400 if (FastIoTable[Index].SetSupported)
401 {
402 *FastPropertyHandler = FastIoTable[Index].SetPropertyHandler;
403 return STATUS_SUCCESS;
404 }
405 }
406
407 if (PropertyId->Flags & KSPROPERTY_TYPE_GET)
408 {
409 if (FastIoTable[Index].GetSupported)
410 {
411 *FastPropertyHandler = FastIoTable[Index].GetPropertyHandler;
412 return STATUS_SUCCESS;
413 }
414 }
415 }
416
417 }
418 /* no fast property handler found */
419 return STATUS_NOT_FOUND;
420}
421
422
423/*
424 @implemented
425*/
428NTAPI
432 IN ULONG PropertyLength,
436 IN ULONG PropertySetsCount,
437 IN const KSPROPERTY_SET* PropertySet)
438{
439 KSPROPERTY PropRequest;
442 ULONG Index;
443 PFNKSFASTHANDLER FastPropertyHandler;
444
445 if (PropertyLength < sizeof(KSPROPERTY))
446 {
447 /* invalid request */
448 return FALSE;
449 }
450
451 /* get previous mode */
453
454 if (Mode == KernelMode)
455 {
456 /* just copy it */
457 RtlMoveMemory(&PropRequest, Property, sizeof(KSPROPERTY));
458 }
459 else
460 {
461 /* need to probe the buffer */
463 {
464 ProbeForRead(Property, sizeof(KSPROPERTY), sizeof(UCHAR));
465 RtlMoveMemory(&PropRequest, Property, sizeof(KSPROPERTY));
466 }
468 {
469 /* Exception, get the error code */
471 }_SEH2_END;
472
473 if (!NT_SUCCESS(Status))
474 return FALSE;
475 }
476
477 /* are there any property sets provided */
478 if (PropertySetsCount)
479 {
480 /* iterate through all property sets count */
481 Index = 0;
482 do
483 {
484 /* does the property id match */
485 if (IsEqualGUIDAligned(PropertySet[Index].Set, &PropRequest.Set))
486 {
487 /* try to find a fast property handler */
488 Status = FindFastPropertyHandler(PropertySet[Index].FastIoCount, PropertySet[Index].FastIoTable, &PropRequest, &FastPropertyHandler);
489
490 if (NT_SUCCESS(Status))
491 {
492 /* call fast property handler */
493 ASSERT(PropertyLength == sizeof(KSPROPERTY)); /* FIXME check if property length is bigger -> copy params */
494 ASSERT(Mode == KernelMode); /* FIXME need to probe usermode output buffer */
495 return FastPropertyHandler(FileObject, &PropRequest, sizeof(KSPROPERTY), Data, DataLength, IoStatus);
496 }
497 }
498 /* move to next item */
499 Index++;
500 }while(Index < PropertySetsCount);
501 }
502 return FALSE;
503}
504
505/*
506 @implemented
507*/
510NTAPI
512 IN PIRP Irp,
513 IN PFNKSHANDLER Handler)
514{
515 PIO_STACK_LOCATION IoStack;
516
517 /* get current irp stack location */
519
520 return Handler(Irp, IoStack->Parameters.DeviceIoControl.Type3InputBuffer, Irp->UserBuffer);
521}
522
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
unsigned char BOOLEAN
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn UINT32 *TableIdx UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 ACPI_WALK_CALLBACK ACPI_WALK_CALLBACK void void **ReturnValue UINT32 ACPI_BUFFER *RetPathPtr ACPI_OBJECT_HANDLER Handler
Definition: acpixf.h:672
LONG NTSTATUS
Definition: precomp.h:26
_In_ PSTORAGE_PROPERTY_ID PropertyId
Definition: cdrom.h:932
_In_ ULONG _In_opt_ WDFREQUEST _In_opt_ PVOID _In_ size_t _In_ PVOID _In_ size_t _Out_ size_t * DataLength
Definition: cdrom.h:1444
#define UNALIGNED
Definition: crtdefs.h:149
_In_ PIRP Irp
Definition: csq.h:116
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
static const WCHAR Description[]
Definition: oid.c:1266
KSDDKAPI BOOLEAN NTAPI KsFastPropertyHandler(IN PFILE_OBJECT FileObject, IN PKSPROPERTY UNALIGNED Property, IN ULONG PropertyLength, IN OUT PVOID UNALIGNED Data, IN ULONG DataLength, OUT PIO_STATUS_BLOCK IoStatus, IN ULONG PropertySetsCount, IN const KSPROPERTY_SET *PropertySet)
Definition: property.c:429
const GUID KSPROPTYPESETID_General
Definition: property.c:17
NTSTATUS KspPropertyHandler(IN PIRP Irp, IN ULONG PropertySetsCount, IN const KSPROPERTY_SET *PropertySet, IN PFNKSALLOCATOR Allocator OPTIONAL, IN ULONG PropertyItemSize OPTIONAL)
Definition: property.c:138
NTSTATUS FindFastPropertyHandler(IN ULONG FastIoCount, IN const KSFASTPROPERTY_ITEM *FastIoTable, IN PKSPROPERTY PropertyId, OUT PFNKSFASTHANDLER *FastPropertyHandler)
Definition: property.c:385
KSDDKAPI NTSTATUS NTAPI KsPropertyHandler(IN PIRP Irp, IN ULONG PropertySetsCount, IN const KSPROPERTY_SET *PropertySet)
Definition: property.c:358
KSDDKAPI NTSTATUS NTAPI KsDispatchSpecificProperty(IN PIRP Irp, IN PFNKSHANDLER Handler)
Definition: property.c:511
NTSTATUS FindPropertyHandler(IN PIO_STATUS_BLOCK IoStatus, IN const KSPROPERTY_SET *PropertySet, IN ULONG PropertySetCount, IN PKSPROPERTY Property, IN ULONG InputBufferLength, IN ULONG OutputBufferLength, OUT PVOID OutputBuffer, OUT PFNKSHANDLER *PropertyHandler, OUT PKSPROPERTY_SET *Set, OUT PKSPROPERTY_ITEM *PropertyItem)
Definition: property.c:20
#define _IRQL_requires_max_(irql)
Definition: driverspecs.h:230
#define KSPROPERTY_TYPE_SET
Definition: dmksctrl.h:43
#define KSPROPERTY_TYPE_SETSUPPORT
Definition: dmksctrl.h:44
#define KSPROPERTY_TYPE_BASICSUPPORT
Definition: dmksctrl.h:45
struct KSIDENTIFIER * PKSPROPERTY
#define KSPROPERTY_TYPE_GET
Definition: dmksctrl.h:42
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
#define NonPagedPool
Definition: env_spec_w32.h:307
#define ExGetPreviousMode
Definition: ex.h:140
VOID NTAPI ProbeForRead(IN CONST VOID *Address, IN SIZE_T Length, IN ULONG Alignment)
Definition: exintrin.c:102
VOID NTAPI ProbeForWrite(IN PVOID Address, IN SIZE_T Length, IN ULONG Alignment)
Definition: exintrin.c:143
#define _SEH2_END
Definition: filesup.c:22
#define _SEH2_TRY
Definition: filesup.c:19
Status
Definition: gdiplustypes.h:25
_In_ ULONG Mode
Definition: hubbusif.h:303
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
#define GUID_NULL
Definition: ks.h:106
#define KSDDKAPI
Definition: ks.h:40
struct KSPROPERTY_DESCRIPTION * PKSPROPERTY_DESCRIPTION
PVOID AllocateItem(IN POOL_TYPE PoolType, IN SIZE_T NumberOfBytes)
Definition: misc.c:29
if(dx< 0)
Definition: linetemp.h:194
#define ASSERT(a)
Definition: mode.c:44
#define _In_
Definition: ms_sal.h:308
#define _In_opt_
Definition: ms_sal.h:309
#define _In_reads_(size)
Definition: ms_sal.h:319
__in UCHAR __in POWER_STATE __in_opt PVOID __in PIO_STATUS_BLOCK IoStatus
Definition: mxum.h:159
#define KernelMode
Definition: asm.h:34
#define UserMode
Definition: asm.h:35
#define STATUS_INVALID_BUFFER_SIZE
Definition: ntstatus.h:650
static BOOL Set
Definition: pageheap.c:10
GUID * LPGUID
Definition: guiddef.h:81
#define _SEH2_GetExceptionCode()
Definition: pseh2_64.h:165
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:66
#define _SEH2_YIELD(__stmt)
Definition: pseh2_64.h:168
#define STATUS_SUCCESS
Definition: shellext.h:65
#define STATUS_NOT_FOUND
Definition: shellext.h:72
#define STATUS_BUFFER_TOO_SMALL
Definition: shellext.h:69
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
GUID Set
Definition: dmksctrl.h:76
struct _IO_STACK_LOCATION::@1575::@1576 DeviceIoControl
union _IO_STACK_LOCATION::@1575 Parameters
uint32_t * PULONG
Definition: typedefs.h:59
#define NTAPI
Definition: typedefs.h:36
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define IN
Definition: typedefs.h:39
#define RtlMoveMemory(Destination, Source, Length)
Definition: typedefs.h:264
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
#define STATUS_MORE_ENTRIES
Definition: udferr_usr.h:124
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
_In_ WDFCOLLECTION _In_ ULONG Index
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
Definition: wdfdevice.h:550
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ WDFREQUEST _In_opt_ WDFFILEOBJECT _Inout_opt_ PWDF_REQUEST_PARAMETERS Parameters
Definition: wdfio.h:869
_In_ WDFREQUEST _In_ size_t OutputBufferLength
Definition: wdfio.h:320
_In_ WDFREQUEST _In_ size_t _In_ size_t InputBufferLength
Definition: wdfio.h:322
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR OutputBuffer
Definition: wdfiotarget.h:863
_Must_inspect_result_ _In_ WDFOBJECT _In_ CONST GUID * Guid
Definition: wdfobject.h:762
#define IsEqualGUIDAligned(guid1, guid2)
Definition: wdm.template.h:235
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
#define IRP_DEALLOCATE_BUFFER
#define IRP_INPUT_OPERATION
* PFILE_OBJECT
Definition: iotypes.h:1998
#define IRP_BUFFERED_IO
CCHAR KPROCESSOR_MODE
Definition: ketypes.h:7
unsigned char UCHAR
Definition: xmlstorage.h:181