Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

csrtask.c

Go to the documentation of this file.
00001 /*++ 00002 00003 Copyright (c) 1990 Microsoft Corporation 00004 00005 Module Name: 00006 00007 dlltask.c 00008 00009 Abstract: 00010 00011 This module implements Csr DLL tasking routines 00012 00013 Author: 00014 00015 Mark Lucovsky (markl) 13-Nov-1990 00016 00017 Revision History: 00018 00019 --*/ 00020 00021 #include "csrdll.h" 00022 00023 NTSTATUS 00024 CsrNewThread( 00025 VOID 00026 ) 00027 00028 /*++ 00029 00030 Routine Description: 00031 00032 This function is called by each new thread (except the first thread in 00033 a process.) It's function is to call the subsystem to notify it that 00034 a new thread is starting. 00035 00036 Arguments: 00037 00038 None. 00039 00040 Return Value: 00041 00042 Status Code from either client or server 00043 00044 --*/ 00045 00046 { 00047 return NtRegisterThreadTerminatePort( CsrPortHandle ); 00048 } 00049 00050 NTSTATUS 00051 CsrIdentifyAlertableThread( VOID ) 00052 { 00053 NTSTATUS Status; 00054 CSR_API_MSG m; 00055 PCSR_IDENTIFY_ALERTABLE_MSG a = &m.u.IndentifyAlertable; 00056 00057 a->ClientId = NtCurrentTeb()->ClientId; 00058 00059 Status = CsrClientCallServer( 00060 &m, 00061 NULL, 00062 CSR_MAKE_API_NUMBER( CSRSRV_SERVERDLL_INDEX, 00063 CsrpIdentifyAlertable 00064 ), 00065 sizeof( *a ) 00066 ); 00067 00068 return Status; 00069 } 00070 00071 00072 NTSTATUS 00073 CsrSetPriorityClass( 00074 IN HANDLE ProcessHandle, 00075 IN OUT PULONG PriorityClass 00076 ) 00077 { 00078 NTSTATUS Status; 00079 CSR_API_MSG m; 00080 PCSR_SETPRIORITY_CLASS_MSG a = &m.u.PriorityClass; 00081 00082 a->ProcessHandle = ProcessHandle; 00083 a->PriorityClass = *PriorityClass; 00084 00085 Status = CsrClientCallServer( 00086 &m, 00087 NULL, 00088 CSR_MAKE_API_NUMBER( CSRSRV_SERVERDLL_INDEX, 00089 CsrpSetPriorityClass 00090 ), 00091 sizeof( *a ) 00092 ); 00093 00094 if ( *PriorityClass == 0 ) { 00095 *PriorityClass = a->PriorityClass; 00096 } 00097 00098 return Status; 00099 00100 }

Generated on Sat May 15 19:39:36 2004 for test by doxygen 1.3.7