[XDK] Move more stuff from ntddk.template.h into appropriate headers
[reactos.git] / include / xdk / psfuncs.h
1 /******************************************************************************
2 * Process Manager Functions *
3 ******************************************************************************/
4 $if (_WDMDDK_)
5
6 NTKERNELAPI
7 NTSTATUS
8 NTAPI
9 PsWrapApcWow64Thread(
10 IN OUT PVOID *ApcContext,
11 IN OUT PVOID *ApcRoutine);
12
13 /*
14 * PEPROCESS
15 * PsGetCurrentProcess(VOID)
16 */
17 #define PsGetCurrentProcess IoGetCurrentProcess
18
19 #if !defined(_PSGETCURRENTTHREAD_)
20 #define _PSGETCURRENTTHREAD_
21 FORCEINLINE
22 PETHREAD
23 NTAPI
24 PsGetCurrentThread(VOID)
25 {
26 return (PETHREAD)KeGetCurrentThread();
27 }
28 #endif /* !_PSGETCURRENTTHREAD_ */
29
30 $endif /* _WDMDDK_ */
31 $if (_NTDDK_)
32
33 NTSYSCALLAPI
34 NTSTATUS
35 NTAPI
36 NtOpenProcess(
37 OUT PHANDLE ProcessHandle,
38 IN ACCESS_MASK DesiredAccess,
39 IN POBJECT_ATTRIBUTES ObjectAttributes,
40 IN PCLIENT_ID ClientId OPTIONAL);
41
42 NTSYSCALLAPI
43 NTSTATUS
44 NTAPI
45 NtQueryInformationProcess(
46 IN HANDLE ProcessHandle,
47 IN PROCESSINFOCLASS ProcessInformationClass,
48 OUT PVOID ProcessInformation OPTIONAL,
49 IN ULONG ProcessInformationLength,
50 OUT PULONG ReturnLength OPTIONAL);
51 $endif /* _NTDDK_ */
52
53 #if (NTDDI_VERSION >= NTDDI_WIN2K)
54
55 $if (_WDMDDK_)
56 NTKERNELAPI
57 NTSTATUS
58 NTAPI
59 PsCreateSystemThread(
60 OUT PHANDLE ThreadHandle,
61 IN ULONG DesiredAccess,
62 IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
63 IN HANDLE ProcessHandle OPTIONAL,
64 OUT PCLIENT_ID ClientId OPTIONAL,
65 IN PKSTART_ROUTINE StartRoutine,
66 IN PVOID StartContext OPTIONAL);
67
68 NTKERNELAPI
69 NTSTATUS
70 NTAPI
71 PsTerminateSystemThread(
72 IN NTSTATUS ExitStatus);
73
74 $endif /* _WDMDDK_ */
75 $if (_NTDDK_)
76
77 NTKERNELAPI
78 NTSTATUS
79 NTAPI
80 PsSetCreateProcessNotifyRoutine(
81 IN PCREATE_PROCESS_NOTIFY_ROUTINE NotifyRoutine,
82 IN BOOLEAN Remove);
83
84 NTKERNELAPI
85 NTSTATUS
86 NTAPI
87 PsSetCreateThreadNotifyRoutine(
88 IN PCREATE_THREAD_NOTIFY_ROUTINE NotifyRoutine);
89
90 NTKERNELAPI
91 NTSTATUS
92 NTAPI
93 PsSetLoadImageNotifyRoutine(
94 IN PLOAD_IMAGE_NOTIFY_ROUTINE NotifyRoutine);
95
96 NTKERNELAPI
97 HANDLE
98 NTAPI
99 PsGetCurrentProcessId(VOID);
100
101 NTKERNELAPI
102 HANDLE
103 NTAPI
104 PsGetCurrentThreadId(VOID);
105
106 NTKERNELAPI
107 BOOLEAN
108 NTAPI
109 PsGetVersion(
110 OUT PULONG MajorVersion OPTIONAL,
111 OUT PULONG MinorVersion OPTIONAL,
112 OUT PULONG BuildNumber OPTIONAL,
113 OUT PUNICODE_STRING CSDVersion OPTIONAL);
114 $endif /* _NTDDK_ */
115
116 #endif /* (NTDDI_VERSION >= NTDDI_WIN2K) */
117
118 $if (_NTDDK_)
119 #if (NTDDI_VERSION >= NTDDI_WINXP)
120
121 NTKERNELAPI
122 HANDLE
123 NTAPI
124 PsGetProcessId(
125 IN PEPROCESS Process);
126
127 NTKERNELAPI
128 HANDLE
129 NTAPI
130 PsGetThreadId(
131 IN PETHREAD Thread);
132
133 NTKERNELAPI
134 NTSTATUS
135 NTAPI
136 PsRemoveCreateThreadNotifyRoutine(
137 IN PCREATE_THREAD_NOTIFY_ROUTINE NotifyRoutine);
138
139 NTKERNELAPI
140 NTSTATUS
141 NTAPI
142 PsRemoveLoadImageNotifyRoutine(
143 IN PLOAD_IMAGE_NOTIFY_ROUTINE NotifyRoutine);
144
145 NTKERNELAPI
146 LONGLONG
147 NTAPI
148 PsGetProcessCreateTimeQuadPart(
149 IN PEPROCESS Process);
150
151 #endif /* (NTDDI_VERSION >= NTDDI_WINXP) */
152
153 #if (NTDDI_VERSION >= NTDDI_WS03)
154 NTKERNELAPI
155 HANDLE
156 NTAPI
157 PsGetThreadProcessId(
158 IN PETHREAD Thread);
159 #endif /* (NTDDI_VERSION >= NTDDI_WS03) */
160
161 #if (NTDDI_VERSION >= NTDDI_VISTA)
162
163 NTKERNELAPI
164 BOOLEAN
165 NTAPI
166 PsSetCurrentThreadPrefetching(
167 IN BOOLEAN Prefetching);
168
169 NTKERNELAPI
170 BOOLEAN
171 NTAPI
172 PsIsCurrentThreadPrefetching(VOID);
173
174 #endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
175
176 #if (NTDDI_VERSION >= NTDDI_VISTASP1)
177 NTKERNELAPI
178 NTSTATUS
179 NTAPI
180 PsSetCreateProcessNotifyRoutineEx(
181 IN PCREATE_PROCESS_NOTIFY_ROUTINE_EX NotifyRoutine,
182 IN BOOLEAN Remove);
183 #endif /* (NTDDI_VERSION >= NTDDI_VISTASP1) */
184 $endif