[GETUNAME]

- Implement GetUName. Patch by Baruch Rutman.
CORE-7264 #resolve #comment Awesome, thanks! Committed in r59363.

svn path=/trunk/; revision=59363
This commit is contained in:
Thomas Faber 2013-06-29 13:44:17 +00:00
parent 1c1f89cd6b
commit 56a80263d4
4 changed files with 16074 additions and 3 deletions

View file

@ -11,5 +11,5 @@ add_library(getuname SHARED
set_module_type(getuname win32dll UNICODE)
add_importlibs(getuname msvcrt kernel32 ntdll)
add_importlibs(getuname user32 msvcrt kernel32 ntdll)
add_cd_file(TARGET getuname DESTINATION reactos/system32 FOR all)

View file

@ -3,17 +3,32 @@
* FILE: dll\win32\getuname\getuname.c
* PURPOSE: Main file
* PROGRAMMERS: Dmitry Chapyshev (dmitry@reactos.org)
* Baruch Rutman (peterooch at gmail dot com)
*/
#include <stdarg.h>
#include <windef.h>
#include <winuser.h>
HINSTANCE hInstance;
int
WINAPI
GetUName(IN WORD wCharCode,
OUT LPWSTR lpBuf)
{
wcscpy(lpBuf, L"Undefined");
return 0;
WCHAR szDescription[256];
int res = LoadStringW(hInstance, wCharCode, szDescription, 256);
if (res != 0)
{
wcscpy(lpBuf, szDescription);
return 0;
}
else
{
wcscpy(lpBuf, L"Undefined");
return 0;
}
}
@ -26,6 +41,7 @@ DllMain(IN HINSTANCE hinstDLL,
switch (dwReason)
{
case DLL_PROCESS_ATTACH:
hInstance = hinstDLL;
break;
}

View file

@ -5,3 +5,9 @@
#define REACTOS_STR_INTERNAL_NAME "getuname\0"
#define REACTOS_STR_ORIGINAL_FILENAME "getuname.dll\0"
#include <reactos/version.rc>
//UTF-8
#pragma code_page(65001)
#ifdef LANGUAGE_EN_US
#include "lang/en-US.rc"
#endif

File diff suppressed because it is too large Load diff