ReactOS 0.4.15-dev-7934-g1dc8d80
api.c File Reference
#include "csrlib.h"
#include <ndk/psfuncs.h>
#include <debug.h>
Include dependency graph for api.c:

Go to the source code of this file.

Macros

#define NTOS_MODE_USER
 
#define NDEBUG
 

Functions

NTSTATUS NTAPI CsrNewThread (VOID)
 
NTSTATUS NTAPI CsrIdentifyAlertableThread (VOID)
 
NTSTATUS NTAPI CsrSetPriorityClass (_In_ HANDLE Process, _Inout_ PULONG PriorityClass)
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 16 of file api.c.

◆ NTOS_MODE_USER

#define NTOS_MODE_USER

Definition at line 13 of file api.c.

Function Documentation

◆ CsrIdentifyAlertableThread()

NTSTATUS NTAPI CsrIdentifyAlertableThread ( VOID  )

Definition at line 37 of file api.c.

38{
39#if (NTDDI_VERSION < NTDDI_WS03)
41 CSR_API_MESSAGE ApiMessage;
42 PCSR_IDENTIFY_ALERTABLE_THREAD IdentifyAlertableThread;
43
44 /* Set up the data for CSR */
45 IdentifyAlertableThread = &ApiMessage.Data.IdentifyAlertableThread;
46 IdentifyAlertableThread->Cid = NtCurrentTeb()->ClientId;
47
48 /* Call it */
49 Status = CsrClientCallServer(&ApiMessage,
50 NULL,
52 sizeof(*IdentifyAlertableThread));
53
54 /* Return to caller */
55 return Status;
56#else
57 /* Deprecated */
58 return STATUS_SUCCESS;
59#endif
60}
LONG NTSTATUS
Definition: precomp.h:26
#define CSR_CREATE_API_NUMBER(ServerId, ApiId)
Definition: csrmsg.h:37
#define CSRSRV_SERVERDLL_INDEX
Definition: csrmsg.h:20
@ CsrpIdentifyAlertableThread
Definition: csrmsg.h:28
#define NULL
Definition: types.h:112
Status
Definition: gdiplustypes.h:25
#define NtCurrentTeb
NTSTATUS NTAPI CsrClientCallServer(_Inout_ PCSR_API_MESSAGE ApiMessage, _Inout_opt_ PCSR_CAPTURE_BUFFER CaptureBuffer, _In_ CSR_API_NUMBER ApiNumber, _In_ ULONG DataLength)
Definition: connect.c:366
#define STATUS_SUCCESS
Definition: shellext.h:65
union _CSR_API_MESSAGE::@3486::@3488::@3490 Data

◆ CsrNewThread()

NTSTATUS NTAPI CsrNewThread ( VOID  )

Definition at line 26 of file api.c.

27{
28 /* Register the termination port to CSR's */
30}
NTSTATUS NTAPI NtRegisterThreadTerminatePort(IN HANDLE PortHandle)
Definition: kill.c:1342
HANDLE CsrApiPort
Definition: connect.c:27

Referenced by BaseThreadStartup(), and DllMain().

◆ CsrSetPriorityClass()

NTSTATUS NTAPI CsrSetPriorityClass ( _In_ HANDLE  Process,
_Inout_ PULONG  PriorityClass 
)

Definition at line 67 of file api.c.

70{
71#if (NTDDI_VERSION < NTDDI_WS03)
73 CSR_API_MESSAGE ApiMessage;
74 PCSR_SET_PRIORITY_CLASS SetPriorityClass = &ApiMessage.Data.SetPriorityClass;
75
76 /* Set up the data for CSR */
77 SetPriorityClass->hProcess = Process;
78 SetPriorityClass->PriorityClass = *PriorityClass;
79
80 /* Call it */
81 Status = CsrClientCallServer(&ApiMessage,
82 NULL,
84 sizeof(*SetPriorityClass));
85
86 /* Return what we got, if requested */
87 if (*PriorityClass) *PriorityClass = SetPriorityClass->PriorityClass;
88
89 /* Return to caller */
90 return Status;
91#else
93 UNREFERENCED_PARAMETER(PriorityClass);
94
95 /* Deprecated */
97#endif
98}
@ CsrpSetPriorityClass
Definition: csrmsg.h:29
BOOL WINAPI SetPriorityClass(IN HANDLE hProcess, IN DWORD dwPriorityClass)
Definition: proc.c:1692
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:223
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135