Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenapi.c
Go to the documentation of this file.
00001 /* 00002 * COPYRIGHT: See COPYING in the top level directory 00003 * PROJECT: ReactOS kernel 00004 * FILE: lib/ntdll/csr/api.c 00005 * PURPOSE: CSR APIs exported through NTDLL 00006 * PROGRAMMER: Alex Ionescu (alex@relsoft.net) 00007 */ 00008 00009 /* INCLUDES *****************************************************************/ 00010 00011 #include <ntdll.h> 00012 #define NDEBUG 00013 #include <debug.h> 00014 00015 /* GLOBALS *******************************************************************/ 00016 extern HANDLE CsrApiPort; 00017 00018 /* FUNCTIONS *****************************************************************/ 00019 00020 /* 00021 * @implemented 00022 */ 00023 NTSTATUS 00024 NTAPI 00025 CsrNewThread(VOID) 00026 { 00027 /* Register the termination port to CSR's */ 00028 return NtRegisterThreadTerminatePort(CsrApiPort); 00029 } 00030 00031 /* 00032 * @implemented 00033 */ 00034 NTSTATUS 00035 NTAPI 00036 CsrSetPriorityClass(HANDLE hProcess, 00037 PULONG PriorityClass) 00038 { 00039 NTSTATUS Status; 00040 CSR_API_MESSAGE2 ApiMessage; /* <- Remove the "2" when CSR is commited */ 00041 PCSR_SET_PRIORITY_CLASS SetPriorityClass = &ApiMessage.SetPriorityClass; 00042 00043 /* Set up the data for CSR */ 00044 DbgBreakPoint(); 00045 SetPriorityClass->hProcess = hProcess; 00046 SetPriorityClass->PriorityClass = *PriorityClass; 00047 00048 /* Call it */ 00049 Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage, 00050 NULL, 00051 CSR_MAKE_OPCODE(CsrpSetPriorityClass, 00052 CSR_SRV_SERVER), 00053 sizeof(CSR_SET_PRIORITY_CLASS)); 00054 00055 /* Return what we got, if requested */ 00056 if (*PriorityClass) *PriorityClass = SetPriorityClass->PriorityClass; 00057 00058 /* Return to caller */ 00059 return Status; 00060 } 00061 00062 /* 00063 * @implemented 00064 */ 00065 NTSTATUS 00066 NTAPI 00067 CsrIdentifyAlertableThread (VOID) 00068 { 00069 NTSTATUS Status; 00070 CSR_API_MESSAGE2 ApiMessage; /* <- Remove the "2" when CSR is commited */ 00071 PCSR_IDENTIFY_ALTERTABLE_THREAD IdentifyAlertableThread; 00072 00073 /* Set up the data for CSR */ 00074 DbgBreakPoint(); 00075 IdentifyAlertableThread = &ApiMessage.IdentifyAlertableThread; 00076 IdentifyAlertableThread->Cid = NtCurrentTeb()->ClientId; 00077 00078 /* Call it */ 00079 Status = CsrClientCallServer((PCSR_API_MESSAGE)&ApiMessage, 00080 NULL, 00081 CSR_MAKE_OPCODE(CsrpIdentifyAlertable, 00082 CSR_SRV_SERVER), 00083 sizeof(CSR_SET_PRIORITY_CLASS)); 00084 00085 /* Return to caller */ 00086 return Status; 00087 } 00088 00089 /* EOF */ Generated on Sat May 26 2012 04:20:59 for ReactOS by
1.7.6.1
|