ReactOS
0.4.16-dev-112-g52265ae
misc.c
Go to the documentation of this file.
1
/*
2
* COPYRIGHT: See COPYING in the top level directory
3
* PROJECT: ReactOS User Manager Control Panel
4
* FILE: dll/cpl/usrmgr/misc.c
5
* PURPOSE: Miscellaneous functions
6
*
7
* PROGRAMMERS: Eric Kohl
8
*/
9
10
#include "
usrmgr.h
"
11
12
BOOL
13
CheckAccountName
(
HWND
hwndDlg,
14
INT
nIdDlgItem,
15
LPTSTR
lpAccountName
)
16
{
17
TCHAR
szAccountName[256];
18
UINT
uLen;
19
20
if
(
lpAccountName
)
21
uLen =
_tcslen
(
lpAccountName
);
22
else
23
uLen =
GetDlgItemText
(hwndDlg, nIdDlgItem, szAccountName, 256);
24
25
/* Check the account name */
26
if
(uLen > 0 &&
27
_tcspbrk
((
lpAccountName
) ?
lpAccountName
: szAccountName,
TEXT
(
"\"*+,/\\:;<=>?[]|"
)) !=
NULL
)
28
{
29
MessageBox
(hwndDlg,
30
TEXT
(
"The account name you entered is invalid! An account name must not contain the following characters: *+,/:;<=>?[\\]|"
),
31
TEXT
(
"ERROR"
),
32
MB_OK
|
MB_ICONERROR
);
33
return
FALSE
;
34
}
35
36
return
TRUE
;
37
}
NULL
#define NULL
Definition:
types.h:112
TRUE
#define TRUE
Definition:
types.h:120
FALSE
#define FALSE
Definition:
types.h:117
CheckAccountName
BOOL CheckAccountName(HWND hwndDlg, INT nIdDlgItem, LPTSTR lpAccountName)
Definition:
misc.c:13
BOOL
unsigned int BOOL
Definition:
ntddk_ex.h:94
_tcspbrk
#define _tcspbrk
Definition:
tchar.h:1412
void
Definition:
nsiface.idl:2307
TEXT
#define TEXT(s)
Definition:
k32.h:26
UINT
unsigned int UINT
Definition:
ndis.h:50
INT
int32_t INT
Definition:
typedefs.h:58
usrmgr.h
lpAccountName
_In_ LPCSTR lpAccountName
Definition:
winbase.h:2741
GetDlgItemText
#define GetDlgItemText
Definition:
winuser.h:5797
MB_ICONERROR
#define MB_ICONERROR
Definition:
winuser.h:790
MB_OK
#define MB_OK
Definition:
winuser.h:793
MessageBox
#define MessageBox
Definition:
winuser.h:5834
TCHAR
char TCHAR
Definition:
xmlstorage.h:189
LPTSTR
CHAR * LPTSTR
Definition:
xmlstorage.h:192
_tcslen
#define _tcslen
Definition:
xmlstorage.h:198
dll
cpl
usrmgr
misc.c
Generated on Thu Oct 10 2024 06:05:54 for ReactOS by
1.9.6