Go to the source code of this file.
◆ _Success_()
Returns the name of an atom.
- Parameters
-
atom | - The atom to be queried. |
pustrName | - Pointer to an initialized UNICODE_STRING that receives the name of the atom. The function does not update the Length member. The string is always NULL-terminated. |
- Returns
- The length of the name in characters, or 0 if the function fails.
- Note
- The function does not aquire any global lock, since synchronisation is handled by the RtlAtom function.
Definition at line 94 of file useratom.c.
101{
102 WCHAR awcBuffer[256];
104
105
107 if (cjLength != 0)
108 {
110 {
111
113 ProbeForWrite(pustrName->Buffer, pustrName->MaximumLength, 1);
114
115
117 {
118
120 cjLength);
121
122
124 pustrName->Buffer[cjLength /
sizeof(
WCHAR)] =
L'\0';
125 }
126 else
127 {
128 cjLength = 0;
129 }
130 }
132 {
133
135 cjLength = 0;
136 }
138 }
139
140
141 return cjLength /
sizeof(
WCHAR);
142}
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)
#define EXCEPTION_EXECUTE_HANDLER
#define _SEH2_GetExceptionCode()
#define _SEH2_EXCEPT(...)
#define RtlCopyMemory(Destination, Source, Length)
ULONG FASTCALL IntGetAtomName(RTL_ATOM nAtom, LPWSTR lpBuffer, ULONG cjBufSize)
VOID FASTCALL SetLastNtError(_In_ NTSTATUS Status)
◆ DBG_DEFAULT_CHANNEL()
DBG_DEFAULT_CHANNEL |
( |
UserMisc |
| ) |
|
◆ IntAddAtom()
Definition at line 13 of file useratom.c.
14{
18
21 {
24 }
25
27
29 {
32 }
34}
#define NT_SUCCESS(StatCode)
NTSYSAPI NTSTATUS NTAPI RtlAddAtomToAtomTable(_In_ PRTL_ATOM_TABLE AtomTable, _In_ PWSTR AtomName, _Out_ PRTL_ATOM Atom)
PVOID NTAPI PsGetCurrentThreadWin32Thread(VOID)
PRTL_ATOM_TABLE gAtomTable
Referenced by co_IntShellHookNotify(), and NtUserRegisterWindowMessage().
◆ IntAddGlobalAtom()
Definition at line 62 of file useratom.c.
63{
66
68
70 {
71 ERR(
"Error init Global Atom.\n");
72 return 0;
73 }
74
77
79}
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
NTSYSAPI NTSTATUS NTAPI RtlPinAtomInAtomTable(_In_ PRTL_ATOM_TABLE AtomTable, _In_ RTL_ATOM Atom)
Referenced by InitUserAtoms().
◆ IntGetAtomName()
Definition at line 37 of file useratom.c.
38{
42
45 {
47 return 0;
48 }
49
51
53 {
55 return 0;
56 }
57
59}
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)
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Referenced by _Success_(), and NtUserGetClipboardFormatName().