ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

misc.c
Go to the documentation of this file.
00001 /*
00002  * COPYRIGHT:       See COPYING in the top level directory
00003  * PROJECT:         ReactOS User Manager Control Panel
00004  * FILE:            dll/cpl/usrmgr/misc.c
00005  * PURPOSE:         Miscellaneus functions
00006  *
00007  * PROGRAMMERS:     Eric Kohl
00008  */
00009 
00010 #include "usrmgr.h"
00011 
00012 
00013 VOID
00014 DebugPrintf(LPTSTR szFormat, ...)
00015 {
00016     TCHAR szOut[512];
00017     va_list arg_ptr;
00018 
00019 
00020     va_start (arg_ptr, szFormat);
00021     _vstprintf (szOut, szFormat, arg_ptr);
00022     va_end (arg_ptr);
00023 
00024     MessageBox(NULL, szOut, _T("Debug"), MB_OK);
00025 }
00026 
00027 BOOL
00028 CheckAccountName(HWND hwndDlg,
00029                  INT nIdDlgItem,
00030                  LPTSTR lpAccountName)
00031 {
00032     TCHAR szAccountName[256];
00033     UINT uLen;
00034 
00035     if (lpAccountName)
00036         uLen = _tcslen(lpAccountName);
00037     else
00038         uLen = GetDlgItemText(hwndDlg, nIdDlgItem, szAccountName, 256);
00039 
00040     /* Check the account name */
00041     if (uLen > 0 &&
00042         _tcspbrk((lpAccountName) ? lpAccountName : szAccountName, TEXT("\"*+,/\\:;<=>?[]|")) != NULL)
00043     {
00044         MessageBox(hwndDlg,
00045                    TEXT("The account name you entered is invalid! An account name must not contain the following charecters: *+,/:;<=>?[\\]|"),
00046                    TEXT("ERROR"),
00047                    MB_OK | MB_ICONERROR);
00048         return FALSE;
00049     }
00050 
00051     return TRUE;
00052 }

Generated on Sun May 27 2012 04:16:46 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.