ReactOS
0.4.16-dev-522-gb68104a
getuname.c
Go to the documentation of this file.
1
/*
2
* PROJECT: Unicode name dll
3
* FILE: dll\win32\getuname\getuname.c
4
* PURPOSE: Main file
5
* PROGRAMMERS: Dmitry Chapyshev (dmitry@reactos.org)
6
* Baruch Rutman (peterooch at gmail dot com)
7
*/
8
9
#include <stdarg.h>
10
#include <
windef.h
>
11
#include <
winuser.h
>
12
13
HINSTANCE
hInstance
;
14
15
int
16
WINAPI
17
GetUName
(
IN
WORD
wCharCode,
18
OUT
LPWSTR
lpBuf)
19
{
20
WCHAR
szDescription
[256];
21
int
res
=
LoadStringW
(
hInstance
, wCharCode,
szDescription
, 256);
22
if
(
res
!= 0)
23
{
24
wcscpy
(lpBuf,
szDescription
);
25
return
0;
26
}
27
else
28
{
29
wcscpy
(lpBuf,
L
"Undefined"
);
30
return
0;
31
}
32
}
33
34
35
BOOL
36
WINAPI
37
DllMain
(
IN
HINSTANCE
hinstDLL,
38
IN
DWORD
dwReason
,
39
IN
LPVOID
lpvReserved
)
40
{
41
switch
(
dwReason
)
42
{
43
case
DLL_PROCESS_ATTACH
:
44
hInstance
= hinstDLL;
45
break
;
46
}
47
48
return
TRUE
;
49
}
dwReason
DWORD dwReason
Definition:
misc.cpp:141
wcscpy
wcscpy
Definition:
corecrt_wstring.h:120
TRUE
#define TRUE
Definition:
types.h:120
szDescription
static const WCHAR szDescription[]
Definition:
provider.c:55
DLL_PROCESS_ATTACH
#define DLL_PROCESS_ATTACH
Definition:
compat.h:131
BOOL
unsigned int BOOL
Definition:
ntddk_ex.h:94
DWORD
unsigned long DWORD
Definition:
ntddk_ex.h:95
WORD
unsigned short WORD
Definition:
ntddk_ex.h:93
hInstance
HINSTANCE hInstance
Definition:
getuname.c:13
DllMain
BOOL WINAPI DllMain(IN HINSTANCE hinstDLL, IN DWORD dwReason, IN LPVOID lpvReserved)
Definition:
getuname.c:37
GetUName
int WINAPI GetUName(IN WORD wCharCode, OUT LPWSTR lpBuf)
Definition:
getuname.c:17
res
GLuint res
Definition:
glext.h:9613
void
Definition:
nsiface.idl:2307
lpvReserved
static IN DWORD IN LPVOID lpvReserved
Definition:
load_notifications.c:17
L
#define L(x)
Definition:
ntvdm.h:50
IN
#define IN
Definition:
typedefs.h:39
OUT
#define OUT
Definition:
typedefs.h:40
windef.h
WINAPI
#define WINAPI
Definition:
msvc.h:6
winuser.h
LoadStringW
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
WCHAR
__wchar_t WCHAR
Definition:
xmlstorage.h:180
LPWSTR
WCHAR * LPWSTR
Definition:
xmlstorage.h:184
dll
win32
getuname
getuname.c
Generated on Fri Jan 17 2025 06:03:51 for ReactOS by
1.9.6