ReactOS  0.4.15-dev-1177-g6cb3b62
umfuncs.h
Go to the documentation of this file.
1 /*++ NDK Version: 0098
2 
3 Copyright (c) Alex Ionescu. All rights reserved.
4 
5 Header Name:
6 
7  umfuncs.h
8 
9 Abstract:
10 
11  Function definitions for Native DLL (ntdll) APIs exclusive to User Mode.
12 
13 Author:
14 
15  Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
16 
17 --*/
18 
19 #ifndef _UMFUNCS_H
20 #define _UMFUNCS_H
21 
22 //
23 // Dependencies
24 //
25 #include <umtypes.h>
26 #include <dbgktypes.h>
27 
28 //
29 // Debug Functions
30 //
33 VOID
34 NTAPI
37 );
38 
40 NTAPI
42  VOID
43 );
44 
46 NTAPI
49  _In_ NTSTATUS ContinueStatus
50 );
51 
53 NTAPI
56 );
57 
59 NTAPI
62 );
63 
66 NTAPI
68  _In_ PDBGUI_WAIT_STATE_CHANGE DbgUiWaitStateCange,
69  _In_ PLARGE_INTEGER TimeOut
70 );
71 
73 NTAPI
75  _In_ PDBGUI_WAIT_STATE_CHANGE WaitStateChange,
77 );
78 
79 VOID
80 NTAPI
82  VOID
83 );
84 
86 NTAPI
89 );
90 
91 HANDLE
92 NTAPI
94  VOID
95 );
96 
97 //
98 // Loader Functions
99 //
100 
101 NTSTATUS
102 NTAPI
104  _In_ ULONG Flags,
106 );
107 
108 NTSTATUS
109 NTAPI
112 );
113 
114 NTSTATUS
115 NTAPI
118  _In_ PULONG DllCharacteristics,
119  _In_ PUNICODE_STRING DllName,
120  _Out_ PVOID *DllHandle
121 );
122 
123 NTSTATUS
124 NTAPI
126  _In_ ULONG Flags,
128  _In_opt_ PULONG DllCharacteristics,
129  _In_ PUNICODE_STRING DllName,
130  _Out_opt_ PVOID *DllHandle);
131 
132 NTSTATUS
133 NTAPI
137 );
138 
139 NTSTATUS
140 NTAPI
144  _In_ ULONG Ordinal,
145  _Out_ PVOID *ProcedureAddress
146 );
147 
148 VOID
149 NTAPI
151  ULONG Unknown1,
152  ULONG Unknown2,
153  ULONG Unknown3,
155 );
156 
157 NTSTATUS
158 NTAPI
159 LdrLoadDll(
161  _In_opt_ PULONG LoadFlags,
164 );
165 
167 NTAPI
170  _In_ ULONG Count,
171  _In_ PUSHORT TypeOffset,
173 );
174 
175 NTSTATUS
176 NTAPI
178  _In_ PUNICODE_STRING SubKey,
180  _In_ ULONG ValueSize,
183  _Out_opt_ PULONG RetunedLength
184 );
185 
186 NTSTATUS
187 NTAPI
189  _In_opt_ PRTL_PROCESS_MODULES ModuleInformation,
191  _Out_ PULONG ReturnedSize
192 );
193 
194 VOID
195 NTAPI
198 
199 NTSTATUS
200 NTAPI
202  VOID
203 );
204 
205 NTSTATUS
206 NTAPI
208  VOID
209 );
210 
211 NTSTATUS
212 NTAPI
215 );
216 
218 NTSTATUS
219 NTAPI
224  _Out_ PUSHORT ImageCharacterstics
225 );
226 
227 NTSTATUS
228 NTAPI
230  _In_ PUNICODE_STRING SubKey,
231  _In_ BOOLEAN Wow64,
232  _Out_ PHANDLE NewKeyHandle
233 );
234 
235 NTSTATUS
236 NTAPI
240  _In_ ULONG Type,
244 );
245 
246 #endif
signed char * PCHAR
Definition: retypes.h:7
NTSTATUS NTAPI DbgUiStopDebugging(_In_ HANDLE Process)
const uint16_t * PCWSTR
Definition: typedefs.h:57
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES IN DWORD Unknown3
Definition: conport.c:35
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR _In_ ULONGLONG _In_ ULONGLONG _In_opt_ PEVENT_FILTER_DESCRIPTOR _Inout_opt_ PVOID CallbackContext
Definition: wmitypes.h:55
VOID(NTAPI * PLDR_CALLBACK)(PVOID CallbackContext, PCHAR Name)
Definition: umfuncs.h:217
Type
Definition: Type.h:6
NTSTATUS NTAPI LdrGetDllHandleEx(_In_ ULONG Flags, _In_opt_ PWSTR DllPath, _In_opt_ PULONG DllCharacteristics, _In_ PUNICODE_STRING DllName, _Out_opt_ PVOID *DllHandle)
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ ULONG _Out_ PNDIS_STRING _Out_ PNDIS_HANDLE KeyHandle
Definition: ndis.h:4711
uint16_t * PWSTR
Definition: typedefs.h:56
LONG NTSTATUS
Definition: precomp.h:26
#define DebugEvent(tess)
Definition: sweep.c:59
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1223
NTSTATUS NTAPI DbgUiConvertStateChangeStructure(_In_ PDBGUI_WAIT_STATE_CHANGE WaitStateChange, _In_ PVOID DebugEvent)
NTSTATUS NTAPI LdrGetProcedureAddress(_In_ PVOID BaseAddress, _In_ PANSI_STRING Name, _In_ ULONG Ordinal, _Out_ PVOID *ProcedureAddress)
NTSTATUS NTAPI LdrQueryImageFileExecutionOptions(_In_ PUNICODE_STRING SubKey, _In_ PCWSTR ValueName, _In_ ULONG ValueSize, _Out_ PVOID Buffer, _In_ ULONG BufferSize, _Out_opt_ PULONG RetunedLength)
NTSTATUS NTAPI LdrVerifyImageMatchesChecksum(_In_ HANDLE FileHandle, _In_ PLDR_CALLBACK Callback, _In_ PVOID CallbackContext, _Out_ PUSHORT ImageCharacterstics)
NTSTATUS NTAPI LdrOpenImageFileOptionsKey(_In_ PUNICODE_STRING SubKey, _In_ BOOLEAN Wow64, _Out_ PHANDLE NewKeyHandle)
#define NTSYSAPI
Definition: ntoskrnl.h:14
#define _In_opt_
Definition: no_sal2.h:213
#define SearchPath
Definition: winbase.h:3740
uint32_t ULONG_PTR
Definition: typedefs.h:65
HANDLE NTAPI DbgUiGetThreadDebugObject(VOID)
Definition: dbgui.c:333
LDR_MANIFEST_PROBER_ROUTINE * PLDR_MANIFEST_PROBER_ROUTINE
Definition: ldrtypes.h:248
_In_ PUNICODE_STRING ValueName
Definition: cmfuncs.h:264
HANDLE FileHandle
Definition: stats.c:38
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
PIMAGE_BASE_RELOCATION NTAPI LdrProcessRelocationBlock(_In_ ULONG_PTR Address, _In_ ULONG Count, _In_ PUSHORT TypeOffset, _In_ LONG_PTR Delta)
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
PRTL_UNICODE_STRING_BUFFER PULONG PULONG Unknown4
NTSTATUS NTAPI LdrShutdownThread(VOID)
Definition: ldrinit.c:1078
struct NameRec_ * Name
Definition: cdprocs.h:459
unsigned char BOOLEAN
static WCHAR Address[46]
Definition: ping.c:68
#define _Out_
Definition: no_sal2.h:323
Definition: bufpool.h:45
NTSTATUS NTAPI DbgUiDebugActiveProcess(_In_ HANDLE Process)
#define _Out_opt_
Definition: no_sal2.h:339
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
Definition: mmfuncs.h:404
NTSYSAPI NTSTATUS NTAPI DbgUiWaitStateChange(_In_ PDBGUI_WAIT_STATE_CHANGE DbgUiWaitStateCange, _In_ PLARGE_INTEGER TimeOut)
_Out_ PCLIENT_ID ClientId
Definition: kefuncs.h:1163
#define BufferSize
Definition: mmc.h:75
VOID NTAPI LdrInitializeThunk(ULONG Unknown1, ULONG Unknown2, ULONG Unknown3, ULONG Unknown4)
Definition: stubs.c:22
NTSTATUS NTAPI LdrShutdownProcess(VOID)
Definition: ldrinit.c:939
Status
Definition: gdiplustypes.h:24
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:454
#define VOID
Definition: acefi.h:82
_In_ ULONG _In_ BATTERY_QUERY_INFORMATION_LEVEL _In_ LONG _In_ ULONG _Out_ PULONG ReturnedLength
Definition: batclass.h:187
Definition: btrfs_drv.h:1922
NTSTATUS NTAPI DbgUiConnectToDbg(VOID)
Definition: dbgui.c:25
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:361
VOID NTAPI DbgUiRemoteBreakin(VOID)
Definition: dbgui.c:289
#define _In_
Definition: no_sal2.h:204
NTSTATUS NTAPI LdrQueryProcessModuleInformation(_In_opt_ PRTL_PROCESS_MODULES ModuleInformation, _In_opt_ ULONG Size, _Out_ PULONG ReturnedSize)
NTSTATUS NTAPI LdrUnloadDll(_In_ PVOID BaseAddress)
static const char const char * DllPath
Definition: image.c:34
static ULONG Delta
Definition: xboxvideo.c:33
NTSTATUS NTAPI DbgUiContinue(_In_ PCLIENT_ID ClientId, _In_ NTSTATUS ContinueStatus)
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int * PULONG
Definition: retypes.h:1
NTSTATUS NTAPI LdrQueryImageFileKeyOption(_In_ HANDLE KeyHandle, _In_ PCWSTR ValueName, _In_ ULONG Type, _Out_ PVOID Buffer, _In_ ULONG BufferSize, _Out_opt_ PULONG ReturnedLength)
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:219
VOID NTAPI LdrSetDllManifestProber(_In_ PLDR_MANIFEST_PROBER_ROUTINE Routine)
Definition: ldrapi.c:73
unsigned int ULONG
Definition: retypes.h:1
NTSTATUS NTAPI LdrGetDllHandle(_In_opt_ PWSTR DllPath, _In_ PULONG DllCharacteristics, _In_ PUNICODE_STRING DllName, _Out_ PVOID *DllHandle)
__analysis_noreturn NTSYSAPI VOID NTAPI DbgBreakPointWithStatus(_In_ ULONG Status)
#define __analysis_noreturn
Definition: specstrings.h:68
NTSTATUS NTAPI LdrDisableThreadCalloutsForDll(_In_ PVOID BaseAddress)
LPFNPSPCALLBACK Callback
Definition: desk.c:112
NTSTATUS NTAPI DbgUiIssueRemoteBreakin(_In_ HANDLE Process)
NTSTATUS NTAPI LdrFindEntryForAddress(_In_ PVOID Address, _Out_ PLDR_DATA_TABLE_ENTRY *Module)
unsigned short * PUSHORT
Definition: retypes.h:2
NTSTATUS NTAPI LdrAddRefDll(_In_ ULONG Flags, _In_ PVOID BaseAddress)
NTSTATUS NTAPI LdrLoadDll(_In_opt_ PWSTR SearchPath, _In_opt_ PULONG LoadFlags, _In_ PUNICODE_STRING Name, _Out_opt_ PVOID *BaseAddress)