[ATL] Add CString.AllocSysString
[reactos.git] / sdk / lib / rossym / initkm.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * FILE: lib/rossym/initkm.c
5 * PURPOSE: Initialize library for use in kernel mode
6 *
7 * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com)
8 */
9
10 #include <ntdef.h>
11 #undef DECLSPEC_IMPORT
12 #define DECLSPEC_IMPORT
13 #include <wdm.h>
14 #include <reactos/rossym.h>
15 #include "rossympriv.h"
16
17 #define TAG_ROSSYM 'MYSR'
18
19 static PVOID
20 RosSymAllocMemKM(ULONG_PTR Size)
21 {
22 return ExAllocatePoolWithTag(NonPagedPool, Size, TAG_ROSSYM);
23 }
24
25 static VOID
26 RosSymFreeMemKM(PVOID Area)
27 {
28 ExFreePool(Area);
29 }
30
31 VOID
32 RosSymInitKernelMode(VOID)
33 {
34 static ROSSYM_CALLBACKS KmCallbacks =
35 {
36 RosSymAllocMemKM,
37 RosSymFreeMemKM,
38 RosSymZwReadFile,
39 RosSymZwSeekFile
40 };
41
42 RosSymInit(&KmCallbacks);
43 }
44
45 /* EOF */