[COMCTL32] Button: Don't use a class brush. CORE-13445
[reactos.git] / dll / ntdll / csr / api.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * FILE: dll/ntdll/csr/api.c
5 * PURPOSE: CSR APIs exported through NTDLL
6 * PROGRAMMER: Alex Ionescu (alex@relsoft.net)
7 */
8
9 /* INCLUDES *******************************************************************/
10
11 #include <ntdll.h>
12
13 #define NDEBUG
14 #include <debug.h>
15
16 /* GLOBALS ********************************************************************/
17
18 extern HANDLE CsrApiPort;
19
20 /* FUNCTIONS ******************************************************************/
21
22 /*
23 * @implemented
24 */
25 NTSTATUS
26 NTAPI
27 CsrNewThread(VOID)
28 {
29 /* Register the termination port to CSR's */
30 return NtRegisterThreadTerminatePort(CsrApiPort);
31 }
32
33 /*
34 * @implemented
35 */
36 NTSTATUS
37 NTAPI
38 CsrSetPriorityClass(HANDLE hProcess,
39 PULONG PriorityClass)
40 {
41 NTSTATUS Status;
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,
53 CSR_CREATE_API_NUMBER(CSRSRV_SERVERDLL_INDEX, CsrpSetPriorityClass),
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 }
62
63 /*
64 * @implemented
65 */
66 NTSTATUS
67 NTAPI
68 CsrIdentifyAlertableThread(VOID)
69 {
70 NTSTATUS Status;
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,
82 CSR_CREATE_API_NUMBER(CSRSRV_SERVERDLL_INDEX, CsrpIdentifyAlertable),
83 sizeof(CSR_IDENTIFY_ALTERTABLE_THREAD));
84
85 /* Return to caller */
86 return Status;
87 }
88
89 /* EOF */