mirror of
https://github.com/reactos/reactos.git
synced 2024-11-18 21:13:52 +00:00
9393fc320e
Excluded: 3rd-party code (incl. wine) and most of the win32ss.
49 lines
906 B
C
49 lines
906 B
C
/*
|
|
* PROJECT: Unicode name dll
|
|
* 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)
|
|
{
|
|
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;
|
|
}
|
|
}
|
|
|
|
|
|
BOOL
|
|
WINAPI
|
|
DllMain(IN HINSTANCE hinstDLL,
|
|
IN DWORD dwReason,
|
|
IN LPVOID lpvReserved)
|
|
{
|
|
switch (dwReason)
|
|
{
|
|
case DLL_PROCESS_ATTACH:
|
|
hInstance = hinstDLL;
|
|
break;
|
|
}
|
|
|
|
return TRUE;
|
|
}
|