mirror of
https://github.com/reactos/reactos.git
synced 2025-01-04 21:38:43 +00:00
[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:
parent
1c1f89cd6b
commit
56a80263d4
4 changed files with 16074 additions and 3 deletions
|
@ -11,5 +11,5 @@ add_library(getuname SHARED
|
||||||
|
|
||||||
|
|
||||||
set_module_type(getuname win32dll UNICODE)
|
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)
|
add_cd_file(TARGET getuname DESTINATION reactos/system32 FOR all)
|
||||||
|
|
|
@ -3,17 +3,32 @@
|
||||||
* FILE: dll\win32\getuname\getuname.c
|
* FILE: dll\win32\getuname\getuname.c
|
||||||
* PURPOSE: Main file
|
* PURPOSE: Main file
|
||||||
* PROGRAMMERS: Dmitry Chapyshev (dmitry@reactos.org)
|
* PROGRAMMERS: Dmitry Chapyshev (dmitry@reactos.org)
|
||||||
|
* Baruch Rutman (peterooch at gmail dot com)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <stdarg.h>
|
||||||
#include <windef.h>
|
#include <windef.h>
|
||||||
|
#include <winuser.h>
|
||||||
|
|
||||||
|
HINSTANCE hInstance;
|
||||||
|
|
||||||
int
|
int
|
||||||
WINAPI
|
WINAPI
|
||||||
GetUName(IN WORD wCharCode,
|
GetUName(IN WORD wCharCode,
|
||||||
OUT LPWSTR lpBuf)
|
OUT LPWSTR lpBuf)
|
||||||
{
|
{
|
||||||
wcscpy(lpBuf, L"Undefined");
|
WCHAR szDescription[256];
|
||||||
return 0;
|
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)
|
switch (dwReason)
|
||||||
{
|
{
|
||||||
case DLL_PROCESS_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
|
hInstance = hinstDLL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,3 +5,9 @@
|
||||||
#define REACTOS_STR_INTERNAL_NAME "getuname\0"
|
#define REACTOS_STR_INTERNAL_NAME "getuname\0"
|
||||||
#define REACTOS_STR_ORIGINAL_FILENAME "getuname.dll\0"
|
#define REACTOS_STR_ORIGINAL_FILENAME "getuname.dll\0"
|
||||||
#include <reactos/version.rc>
|
#include <reactos/version.rc>
|
||||||
|
|
||||||
|
//UTF-8
|
||||||
|
#pragma code_page(65001)
|
||||||
|
#ifdef LANGUAGE_EN_US
|
||||||
|
#include "lang/en-US.rc"
|
||||||
|
#endif
|
||||||
|
|
16049
reactos/dll/win32/getuname/lang/en-US.rc
Normal file
16049
reactos/dll/win32/getuname/lang/en-US.rc
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue