ReactOS  0.4.13-dev-52-g0efcfec
api.c File Reference
#include <ntdll.h>
#include <debug.h>
Include dependency graph for api.c:

Go to the source code of this file.

Macros

#define NDEBUG
 

Functions

NTSTATUS NTAPI CsrNewThread (VOID)
 
NTSTATUS NTAPI CsrSetPriorityClass (HANDLE hProcess, PULONG PriorityClass)
 
NTSTATUS NTAPI CsrIdentifyAlertableThread (VOID)
 

Variables

HANDLE CsrApiPort
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 13 of file api.c.

Function Documentation

◆ CsrIdentifyAlertableThread()

NTSTATUS NTAPI CsrIdentifyAlertableThread ( VOID  )

Definition at line 68 of file api.c.

69 {
71  CSR_API_MESSAGE ApiMessage;
72  PCSR_IDENTIFY_ALTERTABLE_THREAD IdentifyAlertableThread;
73 
74  /* Set up the data for CSR */
75  DbgBreakPoint();
76  IdentifyAlertableThread = &ApiMessage.Data.IdentifyAlertableThread;
77  IdentifyAlertableThread->Cid = NtCurrentTeb()->ClientId;
78 
79  /* Call it */
80  Status = CsrClientCallServer(&ApiMessage,
81  NULL,
84 
85  /* Return to caller */
86  return Status;
87 }
NTSTATUS NTAPI CsrClientCallServer(IN OUT PCSR_API_MESSAGE ApiMessage, IN OUT PCSR_CAPTURE_BUFFER CaptureBuffer OPTIONAL, IN CSR_API_NUMBER ApiNumber, IN ULONG DataLength)
Definition: connect.c:360
LONG NTSTATUS
Definition: precomp.h:26
void DbgBreakPoint()
Definition: mach.c:558
smooth NULL
Definition: ftsmooth.c:416
#define CSR_CREATE_API_NUMBER(ServerId, ApiId)
Definition: csrmsg.h:37
union _CSR_API_MESSAGE::@3317::@3319::@3321 Data
Status
Definition: gdiplustypes.h:24
FORCEINLINE struct _TEB * NtCurrentTeb(VOID)
Definition: psfuncs.h:420
#define CSRSRV_SERVERDLL_INDEX
Definition: csrmsg.h:20

◆ CsrNewThread()

NTSTATUS NTAPI CsrNewThread ( VOID  )

Definition at line 27 of file api.c.

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

Referenced by __declspec(), and DllMain().

◆ CsrSetPriorityClass()

NTSTATUS NTAPI CsrSetPriorityClass ( HANDLE  hProcess,
PULONG  PriorityClass 
)

Definition at line 38 of file api.c.

40 {
42  CSR_API_MESSAGE ApiMessage;
43  PCSR_SET_PRIORITY_CLASS SetPriorityClass = &ApiMessage.Data.SetPriorityClass;
44 
45  /* Set up the data for CSR */
46  DbgBreakPoint();
47  SetPriorityClass->hProcess = hProcess;
48  SetPriorityClass->PriorityClass = *PriorityClass;
49 
50  /* Call it */
51  Status = CsrClientCallServer(&ApiMessage,
52  NULL,
54  sizeof(CSR_SET_PRIORITY_CLASS));
55 
56  /* Return what we got, if requested */
57  if (*PriorityClass) *PriorityClass = SetPriorityClass->PriorityClass;
58 
59  /* Return to caller */
60  return Status;
61 }
NTSTATUS NTAPI CsrClientCallServer(IN OUT PCSR_API_MESSAGE ApiMessage, IN OUT PCSR_CAPTURE_BUFFER CaptureBuffer OPTIONAL, IN CSR_API_NUMBER ApiNumber, IN ULONG DataLength)
Definition: connect.c:360
LONG NTSTATUS
Definition: precomp.h:26
BOOL WINAPI SetPriorityClass(IN HANDLE hProcess, IN DWORD dwPriorityClass)
Definition: proc.c:1722
_In_ BOOL _In_ HANDLE hProcess
Definition: mapping.h:70
void DbgBreakPoint()
Definition: mach.c:558
smooth NULL
Definition: ftsmooth.c:416
#define CSR_CREATE_API_NUMBER(ServerId, ApiId)
Definition: csrmsg.h:37
union _CSR_API_MESSAGE::@3317::@3319::@3321 Data
Status
Definition: gdiplustypes.h:24
#define CSRSRV_SERVERDLL_INDEX
Definition: csrmsg.h:20

Variable Documentation

◆ CsrApiPort