ReactOS 0.4.15-dev-7677-g8209aa5
usersrv.h File Reference
#include "../winsrv.h"
#include <stdarg.h>
#include <win/base.h>
#include <win/winmsg.h>
Include dependency graph for usersrv.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define WIN32_NO_STATUS
 
#define _INC_WINDOWS
 
#define COM_NO_WINDOWS_H
 

Functions

BOOL CALLBACK FindTopLevelWnd (IN HWND hWnd, IN LPARAM lParam)
 
VOID UserInitHardErrorsCache (VOID)
 

Variables

HINSTANCE UserServerDllInstance
 
HANDLE UserServerHeap
 
ULONG_PTR ServicesProcessId
 
ULONG_PTR LogonProcessId
 

Macro Definition Documentation

◆ _INC_WINDOWS

#define _INC_WINDOWS

Definition at line 19 of file usersrv.h.

◆ COM_NO_WINDOWS_H

#define COM_NO_WINDOWS_H

Definition at line 20 of file usersrv.h.

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 18 of file usersrv.h.

Function Documentation

◆ FindTopLevelWnd()

BOOL CALLBACK FindTopLevelWnd ( IN HWND  hWnd,
IN LPARAM  lParam 
)

Definition at line 94 of file init.c.

97{
98 if (GetWindow(hWnd, GW_OWNER) == NULL)
99 {
100 *(HWND*)lParam = hWnd;
101 return FALSE;
102 }
103 return TRUE;
104}
HWND hWnd
Definition: settings.c:17
LPARAM lParam
Definition: combotst.c:139
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define GW_OWNER
Definition: winuser.h:766
HWND WINAPI GetWindow(_In_ HWND, _In_ UINT)

Referenced by ThreadShutdownNotify(), and UserpFormatMessages().

◆ UserInitHardErrorsCache()

VOID UserInitHardErrorsCache ( VOID  )

Definition at line 1189 of file harderror.c.

1190{
1192 LCID CurrentUserLCID = 0;
1193
1194 Status = NtQueryDefaultLocale(TRUE, &CurrentUserLCID);
1195 if (!NT_SUCCESS(Status) || CurrentUserLCID == 0)
1196 {
1197 /* Fall back to english locale */
1198 DPRINT1("NtQueryDefaultLocale failed with Status = 0x%08lx\n", Status);
1199 // LOCALE_SYSTEM_DEFAULT;
1201 }
1202 if (g_CurrentUserLangId == LANGIDFROMLCID(CurrentUserLCID))
1203 {
1204 /* The current lang ID and the hard error strings have already been cached */
1205 return;
1206 }
1207
1208 /* Load the strings using the current system locale */
1210 &g_SuccessU, L"Success");
1212 &g_InformationU, L"System Information");
1214 &g_WarningU, L"System Warning");
1216 &g_ErrorU, L"System Error");
1217 // "unknown software exception"
1219 &g_SystemProcessU, L"System Process");
1221 &g_OKTerminateU, L"Click on OK to terminate the program.");
1223 &g_CancelDebugU, L"Click on CANCEL to debug the program.");
1224
1225 /* Remember that we cached the hard error strings */
1226 g_CurrentUserLangId = LANGIDFROMLCID(CurrentUserLCID);
1227}
LONG NTSTATUS
Definition: precomp.h:26
#define DPRINT1
Definition: precomp.h:8
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
Status
Definition: gdiplustypes.h:25
VOID RtlLoadUnicodeString(IN HINSTANCE hInstance OPTIONAL, IN UINT uID, OUT PUNICODE_STRING pUnicodeString, IN PCWSTR pDefaultString)
Definition: harderror.c:40
LANGID g_CurrentUserLangId
Definition: harderror.c:30
UNICODE_STRING g_ErrorU
Definition: harderror.c:34
UNICODE_STRING g_SuccessU
Definition: harderror.c:31
UNICODE_STRING g_WarningU
Definition: harderror.c:33
UNICODE_STRING g_InformationU
Definition: harderror.c:32
UNICODE_STRING g_OKTerminateU
Definition: harderror.c:36
UNICODE_STRING g_SystemProcessU
Definition: harderror.c:35
UNICODE_STRING g_CancelDebugU
Definition: harderror.c:37
#define SORT_DEFAULT
#define MAKELCID(lgid, srtid)
NTSTATUS NTAPI NtQueryDefaultLocale(IN BOOLEAN UserProfile, OUT PLCID DefaultLocaleId)
Definition: locale.c:396
#define L(x)
Definition: ntvdm.h:50
#define MAKELANGID(p, s)
Definition: nls.h:15
#define LANG_ENGLISH
Definition: nls.h:52
#define LANGIDFROMLCID(l)
Definition: nls.h:18
DWORD LCID
Definition: nls.h:13
#define SUBLANG_ENGLISH_US
Definition: nls.h:222
HINSTANCE UserServerDllInstance
Definition: init.c:21
#define IDS_SEVERITY_INFORMATIONAL
Definition: resource.h:20
#define IDS_SEVERITY_WARNING
Definition: resource.h:21
#define IDS_SEVERITY_SUCCESS
Definition: resource.h:19
#define IDS_SYSTEM_PROCESS
Definition: resource.h:24
#define IDS_OK_TERMINATE_PROGRAM
Definition: resource.h:26
#define IDS_SEVERITY_ERROR
Definition: resource.h:22
#define IDS_CANCEL_DEBUG_PROGRAM
Definition: resource.h:27

Referenced by CSR_SERVER_DLL_INIT(), and UserServerHardError().

Variable Documentation

◆ LogonProcessId

ULONG_PTR LogonProcessId
extern

Definition at line 21 of file register.c.

Referenced by CSR_API(), UserClientShutdown(), and UserExitReactOS().

◆ ServicesProcessId

ULONG_PTR ServicesProcessId
extern

Definition at line 20 of file register.c.

Referenced by CSR_API(), and RegisterServicesProcess().

◆ UserServerDllInstance

HINSTANCE UserServerDllInstance
extern

Definition at line 21 of file init.c.

Referenced by CSR_SERVER_DLL_INIT(), EndNowThreadProc(), and UserInitHardErrorsCache().

◆ UserServerHeap

HANDLE UserServerHeap
extern

Definition at line 31 of file init.c.

Referenced by CSR_SERVER_DLL_INIT(), and EndNowDlgProc().