#include <stdio.h>
#include <string.h>
#include <windows.h>
#include <ndk/ntndk.h>
Go to the source code of this file.
◆ BUFFER_SIZE
◆ NTOS_MODE_USER
◆ WIN32_NO_STATUS
◆ main()
Definition at line 10 of file atomtest.c.
11{
13 RTL_ATOM AtomA = -1, AtomB = -1, AtomC = -1;
16 ULONG NameLength, Data1, Data2;
17
18 printf(
"Atom table test app\n\n");
19
20 printf(
"RtlCreateAtomTable()\n");
22 &AtomTable);
24
26 {
27 printf(
" AtomTable %p\n", AtomTable);
28
29 printf(
"RtlAddAtomToAtomTable()\n");
32 &AtomA);
35 {
36 printf(
" AtomA 0x%x\n", AtomA);
37 }
38
39 printf(
"RtlAddAtomToAtomTable()\n");
42 &AtomB);
45 {
46 printf(
" AtomB 0x%x\n", AtomB);
47 }
48
49
50 printf(
"RtlLookupAtomInAtomTable()\n");
53 &AtomC);
56 {
57 printf(
" AtomC 0x%x\n", AtomC);
58 }
59
60
61 printf(
"RtlPinAtomInAtomTable()\n");
63 AtomC);
65
66 printf(
"RtlPinAtomInAtomTable()\n");
68 AtomC);
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91 printf(
"RtlQueryAtomInAtomTable()\n");
94 AtomC,
95 &Data1,
96 &Data2,
98 &NameLength);
101 {
102 printf(
" RefCount %ld\n", Data1);
103 printf(
" PinCount %ld\n", Data2);
104 printf(
" NameLength %lu\n", NameLength);
106 }
107
108 printf(
"RtlDestroyAtomTable()\n");
110
111
112 printf(
"Atom table test app finished\n");
113 }
114
115 return(0);
116}
#define NT_SUCCESS(StatCode)
struct atom_table ** PRTL_ATOM_TABLE
NTSYSAPI NTSTATUS NTAPI RtlPinAtomInAtomTable(_In_ PRTL_ATOM_TABLE AtomTable, _In_ RTL_ATOM Atom)
NTSYSAPI NTSTATUS NTAPI RtlDestroyAtomTable(IN PRTL_ATOM_TABLE AtomTable)
NTSYSAPI NTSTATUS NTAPI RtlAddAtomToAtomTable(_In_ PRTL_ATOM_TABLE AtomTable, _In_ PWSTR AtomName, _Out_ PRTL_ATOM Atom)
NTSYSAPI NTSTATUS NTAPI RtlLookupAtomInAtomTable(_In_ PRTL_ATOM_TABLE AtomTable, _In_ PWSTR AtomName, _Out_ PRTL_ATOM Atom)
NTSYSAPI NTSTATUS NTAPI RtlCreateAtomTable(_In_ ULONG TableSize, _Inout_ PRTL_ATOM_TABLE *AtomTable)
NTSYSAPI NTSTATUS NTAPI RtlQueryAtomInAtomTable(_In_ PRTL_ATOM_TABLE AtomTable, _In_ RTL_ATOM Atom, _Out_opt_ PULONG RefCount, _Out_opt_ PULONG PinCount, _Out_opt_z_bytecap_(*NameLength) PWSTR AtomName, _Inout_opt_ PULONG NameLength)