From 671be67001d745c9dc85c64d995fcfb593c2328d Mon Sep 17 00:00:00 2001 From: Magnus Olsen Date: Sat, 30 Apr 2005 19:00:46 +0000 Subject: [PATCH] Remove all hardcode string to En.rc Hopplyfull all hardcoing string are gone now svn path=/trunk/; revision=14888 --- reactos/subsys/system/userinit/En.rc | 12 ++++++++++++ reactos/subsys/system/userinit/userinit.c | 7 ++++++- reactos/subsys/system/userinit/userinit.rc | 3 +++ 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 reactos/subsys/system/userinit/En.rc diff --git a/reactos/subsys/system/userinit/En.rc b/reactos/subsys/system/userinit/En.rc new file mode 100644 index 00000000000..2f18fe42cfc --- /dev/null +++ b/reactos/subsys/system/userinit/En.rc @@ -0,0 +1,12 @@ +#include "resource.h" +/* Start move all hard code string to En.rc + * By Magnus Olsen 2005 + */ + +LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT +STRINGTABLE DISCARDABLE +{ + +STRING_USERINIT_FAIL, "Userinit failed to start the shell!\n" + +} diff --git a/reactos/subsys/system/userinit/userinit.c b/reactos/subsys/system/userinit/userinit.c index 2e7bfd1f9b1..af57b0c200b 100644 --- a/reactos/subsys/system/userinit/userinit.c +++ b/reactos/subsys/system/userinit/userinit.c @@ -24,6 +24,7 @@ * PROGRAMMERS: Thomas Weidenmueller (w3seek@users.sourceforge.net) */ #include +#include "resource.h" /* GLOBALS ******************************************************************/ @@ -77,6 +78,7 @@ void StartShell(void) PROCESS_INFORMATION pi; WCHAR Shell[MAX_PATH]; WCHAR ExpandedShell[MAX_PATH]; + TCHAR szMsg[RC_STRING_MAX_SIZE]; GetShell(Shell); @@ -102,7 +104,10 @@ void StartShell(void) CloseHandle(pi.hThread); } else - MessageBox(0, L"Userinit failed to start the shell!\n", NULL, 0); + { + LoadString( GetModuleHandle(NULL), STRING_USERINIT_FAIL, (LPTSTR) szMsg,sizeof(szMsg)); + MessageBox(0, szMsg, NULL, 0); + } } static diff --git a/reactos/subsys/system/userinit/userinit.rc b/reactos/subsys/system/userinit/userinit.rc index 3df26335ee4..29b20bbc05e 100644 --- a/reactos/subsys/system/userinit/userinit.rc +++ b/reactos/subsys/system/userinit/userinit.rc @@ -1,6 +1,9 @@ /* $Id$ */ +#include #define REACTOS_STR_FILE_DESCRIPTION "Userinit Logon Application\0" #define REACTOS_STR_INTERNAL_NAME "userinit\0" #define REACTOS_STR_ORIGINAL_FILENAME "userinit.dll\0" #include +#include "En.rc" +