ReactOS  0.4.14-dev-323-g6fe6a88
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 }
#define TRUE
Definition: types.h:120
HWND hWnd
Definition: settings.c:17
smooth NULL
Definition: ftsmooth.c:416
HWND WINAPI GetWindow(_In_ HWND, _In_ UINT)
#define GW_OWNER
Definition: winuser.h:761
LPARAM lParam
Definition: combotst.c:139

Referenced by ThreadShutdownNotify(), and UserpFormatMessages().

◆ UserInitHardErrorsCache()

VOID UserInitHardErrorsCache ( VOID  )

Definition at line 1189 of file harderror.c.

1190 {
1191  NTSTATUS Status;
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 }
#define MAKELCID(lgid, srtid)
UNICODE_STRING g_OKTerminateU
Definition: harderror.c:36
#define TRUE
Definition: types.h:120
#define IDS_SYSTEM_PROCESS
Definition: resource.h:24
UNICODE_STRING g_CancelDebugU
Definition: harderror.c:37
UNICODE_STRING g_ErrorU
Definition: harderror.c:34
LONG NTSTATUS
Definition: precomp.h:26
UNICODE_STRING g_SuccessU
Definition: harderror.c:31
DWORD LCID
Definition: nls.h:13
UNICODE_STRING g_InformationU
Definition: harderror.c:32
#define IDS_SEVERITY_SUCCESS
Definition: resource.h:19
#define SUBLANG_ENGLISH_US
Definition: nls.h:222
#define IDS_SEVERITY_ERROR
Definition: resource.h:22
#define IDS_CANCEL_DEBUG_PROGRAM
Definition: resource.h:27
UNICODE_STRING g_WarningU
Definition: harderror.c:33
#define IDS_OK_TERMINATE_PROGRAM
Definition: resource.h:26
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define SORT_DEFAULT
#define LANG_ENGLISH
Definition: nls.h:52
static const WCHAR L[]
Definition: oid.c:1250
#define IDS_SEVERITY_INFORMATIONAL
Definition: resource.h:20
#define LANGIDFROMLCID(l)
Definition: nls.h:18
HINSTANCE UserServerDllInstance
Definition: init.c:21
Status
Definition: gdiplustypes.h:24
LANGID g_CurrentUserLangId
Definition: harderror.c:30
NTSTATUS NTAPI NtQueryDefaultLocale(IN BOOLEAN UserProfile, OUT PLCID DefaultLocaleId)
Definition: locale.c:162
VOID RtlLoadUnicodeString(IN HINSTANCE hInstance OPTIONAL, IN UINT uID, OUT PUNICODE_STRING pUnicodeString, IN PCWSTR pDefaultString)
Definition: harderror.c:40
#define DPRINT1
Definition: precomp.h:8
#define IDS_SEVERITY_WARNING
Definition: resource.h:21
#define MAKELANGID(p, s)
Definition: nls.h:15
UNICODE_STRING g_SystemProcessU
Definition: harderror.c:35

Referenced by CSR_SERVER_DLL_INIT(), and UserServerHardError().

Variable Documentation

◆ LogonProcessId

ULONG_PTR LogonProcessId

Definition at line 21 of file register.c.

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

◆ ServicesProcessId

ULONG_PTR ServicesProcessId

Definition at line 20 of file register.c.

Referenced by CSR_API(), and RegisterServicesProcess().

◆ UserServerDllInstance

HINSTANCE UserServerDllInstance

Definition at line 21 of file init.c.

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

◆ UserServerHeap

HANDLE UserServerHeap

Definition at line 31 of file init.c.

Referenced by CSR_SERVER_DLL_INIT(), and EndNowDlgProc().