ReactOS  r75636
psfuncs.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PsGetCurrentProcess   IoGetCurrentProcess
 
#define _PSGETCURRENTTHREAD_
 

Functions

 $if (_WDMDDK_) NTKERNELAPI NTSTATUS NTAPI PsWrapApcWow64Thread(_Inout_ PVOID *ApcContext
 
 _IRQL_requires_max_ (DISPATCH_LEVEL) FORCEINLINE PETHREAD NTAPI PsGetCurrentThread(VOID)
 
 $endif (_WDMDDK_) $if(_NTDDK_) __kernel_entry NTSYSCALLAPI NTSTATUS NTAPI NtOpenProcess(_Out_ PHANDLE ProcessHandle
 
__kernel_entry NTSYSCALLAPI
NTSTATUS NTAPI 
NtQueryInformationProcess (_In_ HANDLE ProcessHandle, _In_ PROCESSINFOCLASS ProcessInformationClass, _Out_ PVOID ProcessInformation, _In_ ULONG ProcessInformationLength, _Out_opt_ PULONG ReturnLength)
 
 $endif (_NTDDK_) $if(_NTIFS_) _Must_inspect_result_ _IRQL_requires_max_(APC_LEVEL) NTKERNELAPI NTSTATUS NTAPI PsLookupProcessByProcessId(_In_ HANDLE ProcessId
 
_Must_inspect_result_ _IRQL_requires_max_ (APC_LEVEL) NTKERNELAPI NTSTATUS NTAPI PsLookupThreadByThreadId(_In_ HANDLE UniqueThreadId
 
 $endif (_NTIFS_) $if(_WDMDDK_) _IRQL_requires_max_(APC_LEVEL) _Post_satisfies_(return< =0) _Must_inspect_result_ NTKERNELAPI NTSTATUS NTAPI PsCreateSystemThread(_Out_ PHANDLE ThreadHandle
 
_In_ ULONG _In_opt_
POBJECT_ATTRIBUTES _In_opt_
HANDLE _Out_opt_ PCLIENT_ID
_In_ PKSTART_ROUTINE _In_opt_ 
_When_ (return==0, __drv_aliasesMem) PVOID StartContext)
 
 _IRQL_requires_max_ (PASSIVE_LEVEL) NTKERNELAPI NTSTATUS NTAPI PsTerminateSystemThread(_In_ NTSTATUS ExitStatus)
 
NTKERNELAPI HANDLE NTAPI PsGetCurrentProcessId (VOID)
 
NTKERNELAPI BOOLEAN NTAPI PsGetVersion (OUT PULONG MajorVersion OPTIONAL, OUT PULONG MinorVersion OPTIONAL, OUT PULONG BuildNumber OPTIONAL, OUT PUNICODE_STRING CSDVersion OPTIONAL)
 
NTKERNELAPI PEPROCESS NTAPI PsGetThreadProcess (_In_ PETHREAD Thread)
 
NTKERNELAPI NTSTATUS NTAPI PsRemoveCreateThreadNotifyRoutine (_In_ PCREATE_THREAD_NOTIFY_ROUTINE NotifyRoutine)
 
NTKERNELAPI BOOLEAN NTAPI PsIsSystemThread (_In_ PETHREAD Thread)
 
NTKERNELAPI BOOLEAN NTAPI PsSetCurrentThreadPrefetching (IN BOOLEAN Prefetching)
 
NTKERNELAPI BOOLEAN NTAPI PsIsCurrentThreadPrefetching (VOID)
 
NTKERNELAPI NTSTATUS NTAPI PsSetCreateProcessNotifyRoutineEx (IN PCREATE_PROCESS_NOTIFY_ROUTINE_EX NotifyRoutine, IN BOOLEAN Remove)
 

Variables

_Inout_ PVOIDApcRoutine
 
_In_ ACCESS_MASK DesiredAccess
 
_In_ ACCESS_MASK _In_
POBJECT_ATTRIBUTES 
ObjectAttributes
 
_In_ ACCESS_MASK _In_
POBJECT_ATTRIBUTES _In_opt_
PCLIENT_ID 
ClientId
 
_Outptr_ PEPROCESSProcess
 
_Must_inspect_result_ _Outptr_
PETHREAD
Thread
 
_In_ ULONG _In_opt_
POBJECT_ATTRIBUTES _In_opt_
HANDLE 
ProcessHandle
 
_In_ ULONG _In_opt_
POBJECT_ATTRIBUTES _In_opt_
HANDLE _Out_opt_ PCLIENT_ID
_In_ PKSTART_ROUTINE 
StartRoutine
 
_In_ BOOLEAN Remove
 
_Out_ PBOOLEAN CopyOnOpen
 
_Out_ PBOOLEAN _Out_ PBOOLEAN EffectiveOnly
 
_Out_ PBOOLEAN _Out_ PBOOLEAN
_Out_
PSECURITY_IMPERSONATION_LEVEL 
ImpersonationLevel
 
_Must_inspect_result_ _In_opt_
PACCESS_TOKEN 
Token
 
_Inout_ PSE_IMPERSONATION_STATE ImpersonationState
 
_In_ POOL_TYPE PoolType
 
_In_ POOL_TYPE _In_ ULONG_PTR Amount
 

Macro Definition Documentation

#define _PSGETCURRENTTHREAD_

Definition at line 20 of file psfuncs.h.

#define PsGetCurrentProcess   IoGetCurrentProcess

Definition at line 17 of file psfuncs.h.

Referenced by _Function_class_(), _IRQL_requires_max_(), _MiWriteBackPage(), AdvancedErrorChecks(), CdFastIoCheckIfPossible(), CmInitSystem1(), CsrClientCallServer(), DbgkCreateThread(), DbgkExitProcess(), DbgkExitThread(), DbgkForwardException(), DbgkMapViewOfSection(), DbgkpOpenHandles(), DbgkpSendApiMessage(), DbgkpSendApiMessageLpc(), DbgkpSuspendProcess(), DbgkUnMapViewOfSection(), DriverEntry(), EngUnmapSectionView(), ExAllocatePoolWithQuotaTag(), ExpAllocateHandleTable(), ExpInitNls(), ExpRaiseHardError(), ExpWin32SessionCallout(), Ext2FastIoCheckIfPossible(), fast_io_check_if_possible(), FatiClose(), FFSFastIoCheckIfPossible(), GDI_CleanupForProcess(), InitCsrProcess(), IntAttachToCSRSS(), intDdCreateDirectDrawLocal(), IntFixWindowCoordinates(), IntGetDesktopObjectHandle(), IntMapDesktopView(), IntUnmapDesktopView(), IntUserHeapCreate(), IntVideoPortDispatchOpen(), IopLoadUnloadDriver(), IopLoadUnloadDriverWorker(), IopUpdateOperationCount(), IopUpdateTransferCount(), KdbEnterDebuggerException(), KdbpAttachToThread(), KdbpOverwriteInstruction(), KdbpSymFindModule(), KdbSymPrintAddress(), KdpGdbEnterDebuggerException(), Ke386CallBios(), KeContextToTrapFrame(), KiDispatchException(), KiTrap06Handler(), KiTrap0DHandler(), KiVdmTrap(), KsecGetKeyData(), LpcpCopyRequestData(), LpcpCreatePort(), LpcpDeletePort(), MiBalancerThread(), MiCheckForUserStackOverflow(), MiCopyFromUserPage(), MiCopyPageToPage(), MiCreatePagingFileMap(), MiDeleteVirtualAddresses(), MiDereferenceSession(), MiFillSystemPageDirectory(), MiGetPageProtection(), MiGetPageTableForProcess(), MiGetPteForProcess(), MiInitializeLargePageSupport(), MiInitializePageTable(), MiInitializePfn(), MiInitMachineDependent(), MiInsertPageInList(), MiInsertVadEx(), MiLoadImageSection(), MiLocateAddress(), MiLockVirtualMemory(), MiMapLockedPagesInUserSpace(), MiMapPageInHyperSpace(), MiQueryMemoryBasicInformation(), MiReadFilePage(), MiReadPage(), MiRosCleanupMemoryArea(), MiSessionAddProcess(), MiSessionCommitPageTables(), MiSessionCreateInternal(), MiSessionRemoveProcess(), MiUnlockVirtualMemory(), MiUnmapLockedPagesInUserSpace(), MiUnmapPageInHyperSpace(), MiUnmapViewOfSection(), MiZeroPhysicalPage(), MmAccessFaultCacheSection(), MmAdjustWorkingSetSize(), MmArmAccessFault(), MmCommitSessionMappedView(), MmCopyVirtualMemory(), MmCreateKernelStack(), MmCreateVirtualMappingUnsafe(), MmDeletePageTable(), MmFreeMemoryArea(), MmFreePageTable(), MmGetExecuteOptions(), MmGetImageInformation(), MmGetPageTableForProcess(), MmGetPageTableForProcessForPAE(), MmGetSessionLocaleId(), MmGrowKernelStackEx(), MmInitializeHandBuiltProcess(), MmInsertMemoryArea(), MmLoadSystemImage(), MmMapViewInSessionSpace(), MmMapViewOfArm3Section(), MmNotPresentFault(), MmNotPresentFaultCacheSection(), MmpAccessFault(), MmProbeAndLockPages(), MmpSectionAccessFaultInner(), MmSessionCreate(), MmSessionDelete(), MmSetExecuteOptions(), MmUnmapViewInSessionSpace(), NtAcceptConnectPort(), NtAllocateVirtualMemory(), NtCloseObjectAuditAlarm(), NtCreateJobObject(), NtDebugActiveProcess(), NtFreeVirtualMemory(), NtGetWriteWatch(), NtLockFile(), NtLockVirtualMemory(), NtMapViewOfSection(), NtProtectVirtualMemory(), NtQueryInformationProcess(), NtReadVirtualMemory(), NtResetWriteWatch(), NtSecureConnectPort(), NtSetDefaultHardErrorPort(), NtSetInformationObject(), NtSetInformationThread(), NtSetLdtEntries(), NtSetSystemPowerState(), NtSetTimerResolution(), NtTerminateProcess(), NtTerminateThread(), NtUnlockFile(), NtUnlockVirtualMemory(), NtUserCallOneParam(), NtUserConsoleControl(), NtUserGetThreadDesktop(), NtUserQueryInformationThread(), NtUserResolveDesktop(), NtUserSetInformationThread(), NtUserSetShellWindowEx(), NtUserSetThreadDesktop(), NtUserSetWindowsHookEx(), NtWaitForMultipleObjects(), NtWriteVirtualMemory(), ObClearProcessHandleTable(), ObDuplicateObject(), ObInitSystem(), ObpAllocateObject(), ObpChargeQuotaForObject(), ObpCloseHandle(), ObpCloseHandleTableEntry(), ObpCreateDeviceMap(), ObpCreateHandle(), ObpCreateUnnamedHandle(), ObpIncrementHandleCount(), ObpIncrementUnnamedHandleCount(), ObQueryObjectAuditingByHandle(), ObReferenceObjectByHandle(), ObSetHandleAttributes(), PsConvertToGuiThread(), PsGetCurrentProcessId(), PsGetCurrentProcessSessionId(), PsGetCurrentProcessWin32Process(), PsGetProcessExitTime(), PsInitializeQuotaSystem(), PsLocateSystemDll(), PspCreateProcess(), PspCreateThread(), PspInitPhase0(), ReadMemorySendHandler(), RfsdFastIoCheckIfPossible(), RxFastIoCheckIfPossible(), SeCaptureSubjectContext(), SeCreateAccessState(), SeIsTokenChild(), SepInitializationPhase0(), SepInitializationPhase1(), SeReleaseSubjectContext(), SystemTimerSet(), TestPoolQuota(), UDFFastIoCheckIfPossible(), UserCreateMenu(), UserGetShellWindow(), VideoPortInt10(), and WriteMemorySendHandler().

Function Documentation

$endif ( _WDMDDK_  )

Definition at line 202 of file ke.h.

226 {
227  ULONGLONG Low;
228  LONGLONG High;
229 } NEON128, *PNEON128;
Definition: strmini.h:380
int64_t LONGLONG
Definition: typedefs.h:67
uint64_t ULONGLONG
Definition: typedefs.h:66
Definition: strmini.h:378
NEON128
Definition: ke.h:229
* PNEON128
Definition: ke.h:229
$endif ( _NTDDK_  )

Definition at line 2487 of file iofuncs.h.

2495 {
2496  PriorityInfo->Size = sizeof(IO_PRIORITY_INFO);
2497  PriorityInfo->ThreadPriority = 0xffff;
2498  PriorityInfo->IoPriority = IoPriorityNormal;
2499  PriorityInfo->PagePriority = 0;
2500 }
struct _IO_PRIORITY_INFO IO_PRIORITY_INFO
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD _Inout_ PIO_PRIORITY_INFO PriorityInfo
Definition: fltkernel.h:2653
$endif ( _NTIFS_  )
pure virtual

Definition at line 2594 of file iofuncs.h.

2620 {
2621  ASSERT(Irp->CurrentLocation <= Irp->StackCount);
2622  Irp->CurrentLocation++;
2623 #ifdef NONAMELESSUNION
2624  Irp->Tail.Overlay.s.u.CurrentStackLocation++;
2625 #else
2626  Irp->Tail.Overlay.CurrentStackLocation++;
2627 #endif
2628 }
_In_ PIRP Irp
Definition: csq.h:116
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel)?(CompletionRoutine!=NULL):TRUE)
$if ( _WDMDDK_  )

Kernel definitions for AMD64

Kernel definitions for ARM

Definition at line 1 of file ke.h.

31 {
32  ULONG Dummy;
struct _KFLOATING_SAVE KFLOATING_SAVE
struct _KFLOATING_SAVE * PKFLOATING_SAVE
unsigned int ULONG
Definition: retypes.h:1
_IRQL_requires_max_ ( DISPATCH_LEVEL  )

Definition at line 21 of file psfuncs.h.

26 {
27  return (PETHREAD)KeGetCurrentThread();
28 }
#define KeGetCurrentThread
Definition: hal.h:44
_Must_inspect_result_ _IRQL_requires_max_ ( APC_LEVEL  )
_IRQL_requires_max_ ( PASSIVE_LEVEL  )

Definition at line 37 of file Messaging.c.

48 {
49  PFLT_SERVER_PORT_OBJECT PortObject;
51 
52  /* The caller must allow at least one connection */
53  if (MaxConnections == 0)
54  {
56  }
57 
58  /* The request must be for a kernel handle */
59  if (!(ObjectAttributes->Attributes & OBJ_KERNEL_HANDLE))
60  {
62  }
63 
64  /*
65  * Get rundown protection on the target to stop the owner
66  * from unloading whilst this port object is open. It gets
67  * removed in the FltpServerPortClose callback
68  */
69  Status = FltObjectReference(Filter);
70  if (!NT_SUCCESS(Status))
71  {
72  return Status;
73  }
74 
75  /* Create our new server port object */
76  Status = ObCreateObject(0,
79  KernelMode,
80  NULL,
81  sizeof(FLT_SERVER_PORT_OBJECT),
82  0,
83  0,
84  (PVOID *)&PortObject);
85  if (NT_SUCCESS(Status))
86  {
87  /* Zero out the struct */
88  RtlZeroMemory(PortObject, sizeof(FLT_SERVER_PORT_OBJECT));
89 
90  /* Increment the ref count on the target filter */
92 
93  /* Setup the filter port object */
94  PortObject->Filter = Filter;
98  PortObject->Cookie = ServerPortCookie;
99  PortObject->MaxConnections = MaxConnections;
100 
101  /* Insert the object */
102  Status = ObInsertObject(PortObject,
103  NULL,
105  0,
106  NULL,
108  if (NT_SUCCESS(Status))
109  {
110  /* Lock the connection list */
112 
113  /* Add the new port object to the connection list and increment the count */
116 
117  /* Unlock the connection list*/
119  }
120  }
121 
122  if (!NT_SUCCESS(Status))
123  {
124  /* Allow the filter to be cleaned up */
126  }
127 
128  return STATUS_NOT_IMPLEMENTED;
129 }
DWORD *typedef PVOID
Definition: winlogon.h:52
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:35
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
_Must_inspect_result_ _Outptr_ PFLT_PORT * ServerPort
Definition: fltkernel.h:1873
PFLT_CONNECT_NOTIFY ConnectNotify
Definition: fltmgrint.h:177
VOID FLTAPI FltObjectDereference(_Inout_ PVOID Object)
Definition: Object.c:53
#define InsertTailList(ListHead, Entry)
VOID FASTCALL ExReleaseFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:31
ULONG FltpObjectPointerReference(_In_ PFLT_OBJECT Object)
Definition: Object.c:252
LIST_ENTRY mList
Definition: fltmgrint.h:56
_Must_inspect_result_ _In_opt_ PFLT_FILTER Filter
Definition: fltkernel.h:1802
#define FILE_READ_DATA
Definition: nt_native.h:628
smooth NULL
Definition: ftsmooth.c:513
NTSTATUS NTAPI ObCreateObject(IN KPROCESSOR_MODE ProbeMode OPTIONAL, IN POBJECT_TYPE Type, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN KPROCESSOR_MODE AccessMode, IN OUT PVOID ParseContext OPTIONAL, IN ULONG ObjectSize, IN ULONG PagedPoolCharge OPTIONAL, IN ULONG NonPagedPoolCharge OPTIONAL, OUT PVOID *Object)
Definition: oblife.c:938
POBJECT_TYPE ServerPortObjectType
Definition: Messaging.c:23
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY _In_ PFLT_DISCONNECT_NOTIFY DisconnectNotifyCallback
Definition: fltkernel.h:1873
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:411
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY ConnectNotifyCallback
Definition: fltkernel.h:1873
Status
Definition: gdiplustypes.h:24
#define NT_SUCCESS(StatCode)
Definition: cmd.c:149
NTSTATUS NTAPI ObInsertObject(IN PVOID Object, IN PACCESS_STATE AccessState OPTIONAL, IN ACCESS_MASK DesiredAccess, IN ULONG ObjectPointerBias, OUT PVOID *NewObject OPTIONAL, OUT PHANDLE Handle)
Definition: obhandle.c:2925
LONG NTSTATUS
Definition: DriverTester.h:11
#define STANDARD_RIGHTS_ALL
Definition: nt_native.h:69
VOID FASTCALL ExAcquireFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:23
NTSTATUS FLTAPI FltObjectReference(_Inout_ PVOID Object)
Definition: Object.c:41
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID ServerPortCookie
Definition: fltkernel.h:1873
FAST_MUTEX mLock
Definition: fltmgrint.h:55
PFLT_MESSAGE_NOTIFY MessageNotify
Definition: fltmgrint.h:179
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY _In_ PFLT_DISCONNECT_NOTIFY _In_opt_ PFLT_MESSAGE_NOTIFY _In_ LONG MaxConnections
Definition: fltkernel.h:1873
PFLT_DISCONNECT_NOTIFY DisconnectNotify
Definition: fltmgrint.h:178
#define OBJ_KERNEL_HANDLE
Definition: winternl.h:231
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY _In_ PFLT_DISCONNECT_NOTIFY _In_opt_ PFLT_MESSAGE_NOTIFY MessageNotifyCallback
Definition: fltkernel.h:1873
FLT_MUTEX_LIST_HEAD ConnectionList
Definition: fltmgrint.h:86
__kernel_entry NTSYSCALLAPI NTSTATUS NTAPI NtQueryInformationProcess ( _In_ HANDLE  ProcessHandle,
_In_ PROCESSINFOCLASS  ProcessInformationClass,
_Out_ PVOID  ProcessInformation,
_In_ ULONG  ProcessInformationLength,
_Out_opt_ PULONG  ReturnLength 
)
NTKERNELAPI PEPROCESS NTAPI PsGetThreadProcess ( _In_ PETHREAD  Thread)
NTKERNELAPI BOOLEAN NTAPI PsGetVersion ( OUT PULONG MajorVersion  OPTIONAL,
OUT PULONG MinorVersion  OPTIONAL,
OUT PULONG BuildNumber  OPTIONAL,
OUT PUNICODE_STRING CSDVersion  OPTIONAL 
)

Definition at line 660 of file psmgr.c.

664 {
667  if (BuildNumber ) *BuildNumber = NtBuildNumber & 0x3FFF;
668 
669  if (CSDVersion)
670  {
671  CSDVersion->Length = CmCSDVersionString.Length;
672  CSDVersion->MaximumLength = CmCSDVersionString.MaximumLength;
673  CSDVersion->Buffer = CmCSDVersionString.Buffer;
674  }
675 
676  /* Return TRUE if this is a Checked Build */
677  return (NtBuildNumber >> 28) == 0xC;
678 }
ULONG MinorVersion
Definition: ros_glue.cpp:5
ULONG MajorVersion
Definition: ros_glue.cpp:4
USHORT MaximumLength
Definition: env_spec_w32.h:370
ULONG NtMajorVersion
Definition: init.c:42
ULONG NtMinorVersion
Definition: init.c:43
ULONG NtBuildNumber
Definition: init.c:47
UNICODE_STRING CmCSDVersionString
Definition: init.c:59
ULONG BuildNumber
Definition: ros_glue.cpp:6
NTKERNELAPI BOOLEAN NTAPI PsIsCurrentThreadPrefetching ( VOID  )
NTKERNELAPI BOOLEAN NTAPI PsIsSystemThread ( _In_ PETHREAD  Thread)
NTKERNELAPI NTSTATUS NTAPI PsRemoveCreateThreadNotifyRoutine ( _In_ PCREATE_THREAD_NOTIFY_ROUTINE  NotifyRoutine)
NTKERNELAPI NTSTATUS NTAPI PsSetCreateProcessNotifyRoutineEx ( IN PCREATE_PROCESS_NOTIFY_ROUTINE_EX  NotifyRoutine,
IN BOOLEAN  Remove 
)
NTKERNELAPI BOOLEAN NTAPI PsSetCurrentThreadPrefetching ( IN BOOLEAN  Prefetching)

Variable Documentation

Definition at line 211 of file psfuncs.h.

_Inout_ PVOID* ApcRoutine

Definition at line 11 of file psfuncs.h.

_In_ ULONG DesiredAccess

Definition at line 40 of file psfuncs.h.

Definition at line 154 of file psfuncs.h.

_In_ PSE_IMPERSONATION_STATE ImpersonationState

Definition at line 189 of file psfuncs.h.

Referenced by NtOpenThreadTokenEx().

Definition at line 40 of file psfuncs.h.

_Outptr_ PEPROCESS* Process

Definition at line 64 of file psfuncs.h.

Definition at line 87 of file psfuncs.h.

_In_ BOOLEAN Remove

Definition at line 110 of file psfuncs.h.

Referenced by ApphelpCacheUpdateEntry(), DECLARE_INTERFACE_(), and TrayIcon::~TrayIcon().

Definition at line 73 of file psfuncs.h.

Definition at line 178 of file psfuncs.h.