ReactOS 0.4.15-dev-5667-ged97270
winsrv.h File Reference
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#include <wingdi.h>
#include <winreg.h>
#include <winuser.h>
#include <imm.h>
#include <undocuser.h>
#include <ndk/cmfuncs.h>
#include <ndk/exfuncs.h>
#include <ndk/obfuncs.h>
#include <ndk/psfuncs.h>
#include <ndk/rtlfuncs.h>
#include <pseh/pseh2.h>
#include <ntuser.h>
#include <csr/csrsrv.h>
Include dependency graph for winsrv.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  tagSHUTDOWN_SETTINGS
 

Macros

#define WIN32_NO_STATUS
 
#define _INC_WINDOWS
 
#define COM_NO_WINDOWS_H
 
#define NTOS_MODE_USER
 

Typedefs

typedef struct tagSHUTDOWN_SETTINGS SHUTDOWN_SETTINGS
 
typedef struct tagSHUTDOWN_SETTINGSPSHUTDOWN_SETTINGS
 

Functions

VOID FASTCALL GetTimeouts (IN PSHUTDOWN_SETTINGS ShutdownSettings)
 

Variables

SHUTDOWN_SETTINGS ShutdownSettings
 

Macro Definition Documentation

◆ _INC_WINDOWS

#define _INC_WINDOWS

Definition at line 17 of file winsrv.h.

◆ COM_NO_WINDOWS_H

#define COM_NO_WINDOWS_H

Definition at line 18 of file winsrv.h.

◆ NTOS_MODE_USER

#define NTOS_MODE_USER

Definition at line 30 of file winsrv.h.

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 16 of file winsrv.h.

Typedef Documentation

◆ PSHUTDOWN_SETTINGS

◆ SHUTDOWN_SETTINGS

Function Documentation

◆ GetTimeouts()

VOID FASTCALL GetTimeouts ( IN PSHUTDOWN_SETTINGS  ShutdownSettings)

Definition at line 87 of file init.c.

88{
90 UNICODE_STRING RegistryString;
92 HANDLE CurrentUserKeyHandle;
94
95 /* Initialize with defaults first */
101
102 /* Open the per-user desktop key */
103 Status = RtlOpenCurrentUser(MAXIMUM_ALLOWED, &CurrentUserKeyHandle);
104 if (NT_SUCCESS(Status))
105 {
106 RtlInitUnicodeString(&RegistryString,
107 L"Control Panel\\Desktop");
109 &RegistryString,
111 CurrentUserKeyHandle,
112 NULL);
114 if (NT_SUCCESS(Status))
115 {
116 /* Read timeouts */
118 L"HungAppTimeout",
121 L"WaitToKillAppTimeout",
124 L"AutoEndTasks",
126 /* Done */
128 }
129
130 /* Done */
131 NtClose(CurrentUserKeyHandle);
132 }
133
134 /* Now open the control key */
135 RtlInitUnicodeString(&RegistryString,
136 L"\\Registry\\Machine\\System\\CurrentControlSet\\Control");
138 &RegistryString,
140 NULL, NULL);
142 if (NT_SUCCESS(Status))
143 {
144 /* Read the services timeout */
146 L"WaitToKillServiceTimeout",
148
149 /*
150 * Retrieve the process terminate timeout.
151 * See ftp://ftp.microsoft.com/MISC1/BUSSYS/WINNT/KB/Q234/6/06.TXT
152 * and https://web.archive.org/web/20050216235758/http://support.microsoft.com/kb/234606/EN-US/
153 * for more details.
154 *
155 * NOTE: Unused at the moment...
156 */
158 L"ProcessTerminateTimeout",
162
163 /* Done */
165 }
166}
LONG NTSTATUS
Definition: precomp.h:26
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:36
#define NULL
Definition: types.h:112
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
Status
Definition: gdiplustypes.h:25
#define OBJ_CASE_INSENSITIVE
Definition: winternl.h:228
#define InitializeObjectAttributes(p, n, a, r, s)
Definition: reg.c:106
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ ULONG _Out_ PNDIS_STRING _Out_ PNDIS_HANDLE KeyHandle
Definition: ndis.h:4715
NTSYSAPI NTSTATUS NTAPI RtlOpenCurrentUser(_In_ ACCESS_MASK DesiredAccess, _Out_ PHANDLE KeyHandle)
NTSYSAPI NTSTATUS NTAPI NtOpenKey(OUT PHANDLE KeyHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
Definition: ntapi.c:336
#define KEY_READ
Definition: nt_native.h:1023
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
Definition: obhandle.c:3402
#define MAXIMUM_ALLOWED
Definition: nt_native.h:83
#define L(x)
Definition: ntvdm.h:50
ULONG WaitToKillServiceTimeout
Definition: winsrv.h:51
ULONG HungAppTimeout
Definition: winsrv.h:49
ULONG WaitToKillAppTimeout
Definition: winsrv.h:50
ULONG ProcessTerminateTimeout
Definition: winsrv.h:52
#define DEFAULT_PROCESS_TERMINATE_TIMEOUT
Definition: init.c:22
static ULONG GetRegIntFromID(IN HANDLE KeyHandle, IN PWCHAR ValueName, IN ULONG DefaultValue)
Definition: init.c:36
#define DEFAULT_WAIT_TO_KILL_APP_TIMEOUT
Definition: init.c:21
SHUTDOWN_SETTINGS ShutdownSettings
Definition: init.c:24
#define DEFAULT_HUNG_APP_TIMEOUT
Definition: init.c:20
#define DEFAULT_AUTO_END_TASKS
Definition: init.c:19

Referenced by CSR_API().

Variable Documentation

◆ ShutdownSettings