2008-10-08 11:51:03 +00:00
|
|
|
/*
|
|
|
|
* PROJECT: Unicode name dll
|
|
|
|
* FILE: dll\win32\getuname\getuname.c
|
|
|
|
* PURPOSE: Main file
|
|
|
|
* PROGRAMMERS: Dmitry Chapyshev (dmitry@reactos.org)
|
2013-06-29 13:44:17 +00:00
|
|
|
* Baruch Rutman (peterooch at gmail dot com)
|
2008-10-08 11:51:03 +00:00
|
|
|
*/
|
|
|
|
|
2013-06-29 13:44:17 +00:00
|
|
|
#include <stdarg.h>
|
2013-01-24 23:00:42 +00:00
|
|
|
#include <windef.h>
|
2013-06-29 13:44:17 +00:00
|
|
|
#include <winuser.h>
|
|
|
|
|
|
|
|
HINSTANCE hInstance;
|
2008-10-08 11:51:03 +00:00
|
|
|
|
|
|
|
int
|
|
|
|
WINAPI
|
|
|
|
GetUName(IN WORD wCharCode,
|
|
|
|
OUT LPWSTR lpBuf)
|
|
|
|
{
|
2013-06-29 13:44:17 +00:00
|
|
|
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;
|
|
|
|
}
|
2008-10-08 11:51:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
BOOL
|
|
|
|
WINAPI
|
|
|
|
DllMain(IN HINSTANCE hinstDLL,
|
|
|
|
IN DWORD dwReason,
|
|
|
|
IN LPVOID lpvReserved)
|
|
|
|
{
|
|
|
|
switch (dwReason)
|
|
|
|
{
|
|
|
|
case DLL_PROCESS_ATTACH:
|
2013-06-29 13:44:17 +00:00
|
|
|
hInstance = hinstDLL;
|
2008-10-08 11:51:03 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|