44 if (uLen1 != uLen2 ||
_tcscmp(szPassword1, szPassword2) != 0)
47 TEXT(
"The passwords you entered are not the same!"),
316 lvi.pszText =
user.usri3_name;
322 user.usri3_full_name);
374 wsprintf(szText,
TEXT(
"Do you really want to delete the user \"%s\"?"), szUserName);
434 DWORD resume_handle = 0;
444 &totalentries, &resume_handle);
448 for (
i = 0;
i < entriesread;
i++)
450 memset(&lvi, 0x00,
sizeof(lvi));
452 lvi.pszText =
pBuffer[
i].usri20_name;
526 if (pnmv->item.iItem == -1)
536 if (pnmv->item.pszText ==
NULL)
540 lstrcpy(szNewUserName, pnmv->item.pszText);
543 if (
lstrcmp(szOldUserName, szNewUserName) == 0)
586 if (lpnmlv->
iItem != -1)
592 if (uItem != (
UINT)-1)
638 memset(&lvi, 0x00,
sizeof(lvi));
659 PCWSTR pszAutoAdminLogonValue;
662 L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon",
672 ERR(
"OnToggleRequireLogon: Failed to open or create Winlogon registry key. Error code: %ld\n", lResult);
677 pszAutoAdminLogonValue = bIsChecked ?
L"0" :
L"1";
683 (
const BYTE*)pszAutoAdminLogonValue,
687 ERR(
"OnToggleRequireLogon: Failed to set AutoAdminLogon registry value. Error code: %ld\n", lResult);
711 WCHAR szAutoAdminLogonValue[2];
723 L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon",
735 (
LPBYTE)szAutoAdminLogonValue,
740 wcscmp(szAutoAdminLogonValue,
L"1") == 0)
742 bRequireLogon =
FALSE;
void user(int argc, const char *argv[])
#define RegCloseKey(hKey)
BOOL CheckAccountName(HWND hwndDlg, INT nIdDlgItem, LPTSTR lpAccountName)
#define IDC_USERS_PROPERTIES
#define IDC_USER_NEW_FULL_NAME
#define IDC_USER_NEW_CANNOT_CHANGE
#define IDC_USER_NEW_DESCRIPTION
#define IDM_USER_CHANGE_PASSWORD
#define IDC_USER_NEW_NAME
#define IDD_CHANGE_PASSWORD
#define IDC_EDIT_PASSWORD1
#define IDC_EDIT_PASSWORD2
#define IDC_USER_NEW_NEVER_EXPIRES
#define IDM_USER_PROPERTIES
#define IDC_USER_NEW_PASSWORD2
#define IDC_USER_NEW_FORCE_CHANGE
#define IDC_USERS_STARTUP_REQUIRE
#define IDC_USER_NEW_DISABLED
#define IDC_USER_NEW_PASSWORD1
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
HIMAGELIST WINAPI ImageList_Create(INT cx, INT cy, UINT flags, INT cInitial, INT cGrow)
#define HeapFree(x, y, z)
NET_API_STATUS WINAPI NetApiBufferFree(LPVOID Buffer)
NET_API_STATUS WINAPI NetUserEnum(LPCWSTR servername, DWORD level, DWORD filter, LPBYTE *bufptr, DWORD prefmaxlen, LPDWORD entriesread, LPDWORD totalentries, LPDWORD resume_handle)
NET_API_STATUS WINAPI NetUserAdd(LPCWSTR servername, DWORD level, LPBYTE bufptr, LPDWORD parm_err)
NET_API_STATUS WINAPI NetUserGetInfo(LPCWSTR servername, LPCWSTR username, DWORD level, LPBYTE *bufptr)
NET_API_STATUS WINAPI NetUserSetInfo(LPCWSTR servername, LPCWSTR username, DWORD level, LPBYTE buf, LPDWORD parm_err)
NET_API_STATUS WINAPI NetUserDel(LPCWSTR servername, LPCWSTR username)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define UF_ACCOUNTDISABLE
#define UF_DONT_EXPIRE_PASSWD
#define UF_PASSWD_CANT_CHANGE
struct _USER_INFO_3 * PUSER_INFO_3
struct _USER_INFO_1003 * PUSER_INFO_1003
#define USER_MAXSTORAGE_UNLIMITED
#define FILTER_NORMAL_ACCOUNT
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
#define REG_OPTION_NON_VOLATILE
#define UNREFERENCED_PARAMETER(P)
#define MAKEINTRESOURCE(i)
#define ListView_InsertItem(hwnd, pitem)
#define ListView_EditLabel(hwndLV, i)
#define ListView_InsertColumn(hwnd, iCol, pcol)
#define ListView_SetImageList(hwnd, himl, iImageList)
#define ListView_GetEditControl(hwndLV)
#define ListView_GetItemText(hwndLV, i, iSubItem_, pszText_, cchTextMax_)
#define ListView_GetNextItem(hwnd, i, flags)
#define LVS_EX_FULLROWSELECT
#define LVN_BEGINLABELEDIT
#define ListView_SetExtendedListViewStyle(hwndLV, dw)
struct tagNMLISTVIEW * LPNMLISTVIEW
#define ListView_SetItemText(hwndLV, i, iSubItem_, pszText_)
#define ListView_SetItem(hwnd, pitem)
#define ImageList_AddIcon(himl, hicon)
#define ListView_DeleteItem(hwnd, i)
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
DWORD usri3_password_expired
BOOL UserProperties(HWND hwndDlg)
static BOOL UserDelete(HWND hwndDlg)
struct _USER_DATA * PUSER_DATA
INT_PTR CALLBACK ChangePasswordDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
static VOID SetUsersListColumns(HWND hwndListView)
INT_PTR CALLBACK UsersPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
static VOID UpdateUsersList(HWND hwndListView)
VOID OnToggleRequireLogon(_In_ HWND hwndDlg)
static VOID OnInitDialog(HWND hwndDlg)
static VOID UpdateNewUserOptions(HWND hwndDlg, PUSER_INFO_3 userInfo, BOOL bInit)
static VOID UserNew(HWND hwndDlg)
static BOOL OnNotify(HWND hwndDlg, PUSER_DATA pUserData, NMHDR *phdr)
struct _USER_DATA USER_DATA
static BOOL OnBeginLabelEdit(LPNMLVDISPINFO pnmv)
INT_PTR CALLBACK NewUserDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
static VOID UserChangePassword(HWND hwndDlg)
static VOID UpdateUserProperties(HWND hwndDlg)
static BOOL CheckPasswords(HWND hwndDlg, INT nIdDlgItem1, INT nIdDlgItem2)
static BOOL OnEndLabelEdit(LPNMLVDISPINFO pnmv)
static VOID UserRename(HWND hwndDlg)
LPTSTR GetDlgItemTextAlloc(HWND hwndDlg, INT nDlgItem)
#define HKEY_LOCAL_MACHINE
UINT WINAPI GetMenuDefaultItem(_In_ HMENU hMenu, _In_ UINT fByPos, _In_ UINT gmdiFlags)
BOOL WINAPI SetMenuDefaultItem(_In_ HMENU, _In_ UINT, _In_ UINT)
BOOL WINAPI CheckDlgButton(_In_ HWND, _In_ int, _In_ UINT)
BOOL WINAPI ClientToScreen(_In_ HWND, _Inout_ LPPOINT)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
UINT WINAPI IsDlgButtonChecked(_In_ HWND, _In_ int)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
HWND WINAPI SetFocus(_In_opt_ HWND)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
BOOL WINAPI DestroyMenu(_In_ HMENU)
BOOL WINAPI TrackPopupMenu(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _Reserved_ int, _In_ HWND, _Reserved_ LPCRECT)
#define SendDlgItemMessage
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
BOOL WINAPI DestroyIcon(_In_ HICON)
#define DOMAIN_GROUP_RID_USERS