diff --git a/reactos/dll/cpl/cpl.rbuild b/reactos/dll/cpl/cpl.rbuild
index 90af08b7f8b..55dae51aec4 100644
--- a/reactos/dll/cpl/cpl.rbuild
+++ b/reactos/dll/cpl/cpl.rbuild
@@ -37,3 +37,6 @@
+
+
+
diff --git a/reactos/dll/cpl/usrmgr/extra.c b/reactos/dll/cpl/usrmgr/extra.c
new file mode 100644
index 00000000000..048df172a1e
--- /dev/null
+++ b/reactos/dll/cpl/usrmgr/extra.c
@@ -0,0 +1,33 @@
+/* $Id$
+ *
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS User Manager Control Panel
+ * FILE: dll/cpl/usrmgr/extra.c
+ * PURPOSE: Extra property page
+ *
+ * PROGRAMMERS: Eric Kohl
+ */
+
+#include "usrmgr.h"
+
+INT_PTR CALLBACK
+ExtraPageProc(HWND hwndDlg,
+ UINT uMsg,
+ WPARAM wParam,
+ LPARAM lParam)
+{
+ UNREFERENCED_PARAMETER(lParam);
+ UNREFERENCED_PARAMETER(wParam);
+ UNREFERENCED_PARAMETER(hwndDlg);
+
+ switch (uMsg)
+ {
+ case WM_INITDIALOG:
+ break;
+
+ case WM_COMMAND:
+ break;
+ }
+
+ return FALSE;
+}
diff --git a/reactos/dll/cpl/usrmgr/groups.c b/reactos/dll/cpl/usrmgr/groups.c
new file mode 100644
index 00000000000..fbb3475e268
--- /dev/null
+++ b/reactos/dll/cpl/usrmgr/groups.c
@@ -0,0 +1,185 @@
+/* $Id$
+ *
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS User Manager Control Panel
+ * FILE: dll/cpl/usrmgr/groups.c
+ * PURPOSE: Groups property page
+ *
+ * PROGRAMMERS: Eric Kohl
+ */
+
+#include "usrmgr.h"
+
+typedef struct _GROUP_DATA
+{
+ HMENU hPopupMenu;
+
+ INT iCurrentItem;
+
+} GROUP_DATA, *PGROUP_DATA;
+
+
+static VOID
+SetGroupsListColumns(HWND hwndListView)
+{
+ LV_COLUMN column;
+ RECT rect;
+ TCHAR szStr[32];
+
+ GetClientRect(hwndListView, &rect);
+
+ memset(&column, 0x00, sizeof(column));
+ column.mask=LVCF_FMT | LVCF_WIDTH | LVCF_SUBITEM | LVCF_TEXT;
+ column.fmt=LVCFMT_LEFT;
+ column.cx = (INT)((rect.right - rect.left) * 0.40);
+ column.iSubItem = 0;
+ LoadString(hApplet, IDS_NAME, szStr, sizeof(szStr) / sizeof(szStr[0]));
+ column.pszText = szStr;
+ (void)ListView_InsertColumn(hwndListView, 0, &column);
+
+ column.cx = (INT)((rect.right - rect.left) * 0.60);
+ column.iSubItem = 1;
+ LoadString(hApplet, IDS_DESCRIPTION, szStr, sizeof(szStr) / sizeof(szStr[0]));
+ column.pszText = szStr;
+ (void)ListView_InsertColumn(hwndListView, 1, &column);
+}
+
+
+static VOID
+UpdateGroupsList(HWND hwndListView)
+{
+ NET_API_STATUS netStatus;
+ PLOCALGROUP_INFO_1 pBuffer;
+ DWORD entriesread;
+ DWORD totalentries;
+ DWORD resume_handle = 0;
+ DWORD i;
+
+ LV_ITEM lvi;
+ INT iItem;
+
+
+ for (;;)
+ {
+ netStatus = NetLocalGroupEnum(NULL, 1, (LPBYTE*)&pBuffer,
+ 1024, &entriesread,
+ &totalentries, &resume_handle);
+ if (netStatus != NERR_Success && netStatus != ERROR_MORE_DATA)
+ break;
+
+ for (i = 0; i < entriesread; i++)
+ {
+ memset(&lvi, 0x00, sizeof(lvi));
+ lvi.mask = LVIF_TEXT | LVIF_STATE; // | LVIF_PARAM;
+// lvi.lParam = (LPARAM)VarData;
+ lvi.pszText = pBuffer[i].lgrpi1_name;
+ lvi.state = 0; //(i == 0) ? LVIS_SELECTED : 0;
+ iItem = ListView_InsertItem(hwndListView, &lvi);
+
+ ListView_SetItemText(hwndListView, iItem, 1,
+ pBuffer[i].lgrpi1_comment);
+ }
+
+ NetApiBufferFree(&pBuffer);
+
+ /* No more data left */
+ if (netStatus != ERROR_MORE_DATA)
+ break;
+ }
+
+}
+
+
+static VOID
+OnInitDialog(HWND hwndDlg)
+{
+ HWND hwndListView;
+
+ hwndListView = GetDlgItem(hwndDlg, IDC_GROUPS_LIST);
+
+ (void)ListView_SetExtendedListViewStyle(hwndListView, LVS_EX_FULLROWSELECT);
+
+ SetGroupsListColumns(hwndListView);
+
+ UpdateGroupsList(hwndListView);
+
+// (void)ListView_SetColumnWidth(hwndListView, 3, LVSCW_AUTOSIZE_USEHEADER);
+// (void)ListView_Update(hwndListView, 0);
+}
+
+
+static VOID
+OnNotify(HWND hwndDlg, PGROUP_DATA pGroupData, NMHDR *phdr)
+{
+ LPNMLISTVIEW lpnmlv = (LPNMLISTVIEW)phdr;
+
+ switch (phdr->idFrom)
+ {
+ case IDC_GROUPS_LIST:
+ switch(phdr->code)
+ {
+ case NM_CLICK:
+ pGroupData->iCurrentItem = lpnmlv->iItem;
+ if (lpnmlv->iItem == -1)
+ {
+ }
+ else
+ {
+ }
+ break;
+
+ case NM_DBLCLK:
+ break;
+
+ case NM_RCLICK:
+ ClientToScreen(GetDlgItem(hwndDlg, IDC_GROUPS_LIST), &lpnmlv->ptAction);
+ TrackPopupMenu(GetSubMenu(pGroupData->hPopupMenu, (lpnmlv->iItem == -1) ? 0 : 1),
+ TPM_LEFTALIGN, lpnmlv->ptAction.x, lpnmlv->ptAction.y, 0, hwndDlg, NULL);
+ break;
+ }
+ break;
+ }
+}
+
+
+INT_PTR CALLBACK
+GroupsPageProc(HWND hwndDlg,
+ UINT uMsg,
+ WPARAM wParam,
+ LPARAM lParam)
+{
+ PGROUP_DATA pGroupData;
+
+ UNREFERENCED_PARAMETER(lParam);
+ UNREFERENCED_PARAMETER(wParam);
+ UNREFERENCED_PARAMETER(hwndDlg);
+
+
+ pGroupData = (PGROUP_DATA)GetWindowLongPtr(hwndDlg, DWLP_USER);
+
+ switch (uMsg)
+ {
+ case WM_INITDIALOG:
+ pGroupData = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(GROUP_DATA));
+ SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pGroupData);
+
+ pGroupData->hPopupMenu = LoadMenu(hApplet, MAKEINTRESOURCE(IDM_POPUP_GROUP));
+
+ OnInitDialog(hwndDlg);
+ break;
+
+ case WM_COMMAND:
+ break;
+
+ case WM_NOTIFY:
+ OnNotify(hwndDlg, pGroupData, (NMHDR *)lParam);
+ break;
+
+ case WM_DESTROY:
+ DestroyMenu(pGroupData->hPopupMenu);
+ HeapFree(GetProcessHeap(), 0, pGroupData);
+ break;
+ }
+
+ return FALSE;
+}
diff --git a/reactos/dll/cpl/usrmgr/lang/en-US.rc b/reactos/dll/cpl/usrmgr/lang/en-US.rc
new file mode 100644
index 00000000000..a26cba49faf
--- /dev/null
+++ b/reactos/dll/cpl/usrmgr/lang/en-US.rc
@@ -0,0 +1,90 @@
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+
+/*
+ * Attention Translators:
+ * DO NOT TRANSLATE THESE RESOURCES YET!
+ */
+
+/* Dialogs */
+
+IDD_USERS DIALOGEX DISCARDABLE 0, 0, 252, 223
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Users"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ CONTROL "", IDC_USERS_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP,
+ 7, 7, 238, 85, WS_EX_CLIENTEDGE
+END
+
+
+IDD_GROUPS DIALOGEX DISCARDABLE 0, 0, 252, 223
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Groups"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ CONTROL "", IDC_GROUPS_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP,
+ 7, 7, 238, 85, WS_EX_CLIENTEDGE
+END
+
+
+IDD_EXTRA DIALOGEX DISCARDABLE 0, 0, 252, 223
+STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "Extra"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ LTEXT "This space is intentionally left blank", IDC_STATIC, 66, 90, 112, 8
+END
+
+
+/* Menus */
+
+IDM_POPUP_GROUP MENU DISCARDABLE
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "New Group...", IDM_GROUP_NEW
+ END
+ POPUP ""
+ BEGIN
+ MENUITEM "Add Member", IDM_GROUP_ADD_MEMBER
+ MENUITEM SEPARATOR
+ MENUITEM "Delete", IDM_GROUP_DELETE
+ MENUITEM "Rename", IDM_GROUP_RENAME
+ MENUITEM SEPARATOR
+ MENUITEM "Properties", IDM_GROUP_PROPERTIES
+ END
+END
+
+
+IDM_POPUP_USER MENU DISCARDABLE
+BEGIN
+ POPUP ""
+ BEGIN
+ MENUITEM "New User...", IDM_USER_NEW
+ END
+ POPUP ""
+ BEGIN
+ MENUITEM "Change Password", IDM_USER_CHANGE_PASSWORD
+ MENUITEM SEPARATOR
+ MENUITEM "Delete", IDM_USER_DELETE
+ MENUITEM "Rename", IDM_USER_RENAME
+ MENUITEM SEPARATOR
+ MENUITEM "Properties", IDM_USER_PROPERTIES
+ END
+END
+
+
+/* Strings */
+
+STRINGTABLE
+BEGIN
+ IDS_CPLNAME "User Accounts"
+ IDS_CPLDESCRIPTION "Manages Users and Groups."
+END
+
+STRINGTABLE
+BEGIN
+ IDS_NAME "Name"
+ IDS_FULLNAME "Full Name"
+ IDS_DESCRIPTION "Description"
+END
diff --git a/reactos/dll/cpl/usrmgr/resource.h b/reactos/dll/cpl/usrmgr/resource.h
new file mode 100644
index 00000000000..27779466a70
--- /dev/null
+++ b/reactos/dll/cpl/usrmgr/resource.h
@@ -0,0 +1,55 @@
+#ifndef __CPL_USRMGR_RESOURCE_H__
+#define __CPL_USRMGR_RESOURCE_H__
+
+#include
+
+/* metrics */
+#define PROPSHEETWIDTH 246
+#define PROPSHEETHEIGHT 228
+#define PROPSHEETPADDING 6
+
+#define SYSTEM_COLUMN (18 * PROPSHEETPADDING)
+#define LABELLINE(x) (((PROPSHEETPADDING + 2) * x) + (x + 2))
+
+#define ICONSIZE 16
+
+/* ids */
+
+#define IDC_USRMGR_ICON 40
+#define IDC_USRMGR_ICON2 100 // Needed for theme compatability with Windows.
+
+#define IDD_USERS 100
+#define IDD_GROUPS 101
+#define IDD_EXTRA 102
+
+#define IDC_USERS_LIST 200
+
+#define IDC_GROUPS_LIST 300
+
+#define IDC_STATIC -1
+
+
+#define IDS_CPLNAME 2000
+#define IDS_CPLDESCRIPTION 2001
+
+#define IDS_NAME 2100
+#define IDS_FULLNAME 2101
+#define IDS_DESCRIPTION 2102
+
+/* Menus */
+#define IDM_POPUP_GROUP 120
+#define IDM_GROUP_ADD_MEMBER 121
+#define IDM_GROUP_NEW 122
+#define IDM_GROUP_DELETE 123
+#define IDM_GROUP_RENAME 124
+#define IDM_GROUP_PROPERTIES 125
+
+#define IDM_POPUP_USER 130
+#define IDM_USER_CHANGE_PASSWORD 131
+#define IDM_USER_NEW 132
+#define IDM_USER_DELETE 133
+#define IDM_USER_RENAME 134
+#define IDM_USER_PROPERTIES 135
+
+#endif /* __CPL_USRMGR_RESOURCE_H__ */
+
diff --git a/reactos/dll/cpl/usrmgr/resources/applet.ico b/reactos/dll/cpl/usrmgr/resources/applet.ico
new file mode 100644
index 00000000000..9a20e326137
Binary files /dev/null and b/reactos/dll/cpl/usrmgr/resources/applet.ico differ
diff --git a/reactos/dll/cpl/usrmgr/users.c b/reactos/dll/cpl/usrmgr/users.c
new file mode 100644
index 00000000000..f0d60ad492d
--- /dev/null
+++ b/reactos/dll/cpl/usrmgr/users.c
@@ -0,0 +1,200 @@
+/* $Id$
+ *
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS User Manager Control Panel
+ * FILE: dll/cpl/usrmgr/users.c
+ * PURPOSE: Users property page
+ *
+ * PROGRAMMERS: Eric Kohl
+ */
+
+#include "usrmgr.h"
+
+
+typedef struct _USER_DATA
+{
+ HMENU hPopupMenu;
+
+ INT iCurrentItem;
+
+} USER_DATA, *PUSER_DATA;
+
+
+static VOID
+SetUsersListColumns(HWND hwndListView)
+{
+ LV_COLUMN column;
+ RECT rect;
+ TCHAR szStr[32];
+
+ GetClientRect(hwndListView, &rect);
+
+ memset(&column, 0x00, sizeof(column));
+ column.mask=LVCF_FMT | LVCF_WIDTH | LVCF_SUBITEM | LVCF_TEXT;
+ column.fmt=LVCFMT_LEFT;
+ column.cx = (INT)((rect.right - rect.left) * 0.25);
+ column.iSubItem = 0;
+ LoadString(hApplet, IDS_NAME, szStr, sizeof(szStr) / sizeof(szStr[0]));
+ column.pszText = szStr;
+ (void)ListView_InsertColumn(hwndListView, 0, &column);
+
+ column.cx = (INT)((rect.right - rect.left) * 0.50);
+ column.iSubItem = 1;
+ LoadString(hApplet, IDS_FULLNAME, szStr, sizeof(szStr) / sizeof(szStr[0]));
+ column.pszText = szStr;
+ (void)ListView_InsertColumn(hwndListView, 1, &column);
+
+ column.cx = (INT)((rect.right - rect.left) * 0.25);
+ column.iSubItem = 2;
+ LoadString(hApplet, IDS_DESCRIPTION, szStr, sizeof(szStr) / sizeof(szStr[0]));
+ column.pszText = szStr;
+ (void)ListView_InsertColumn(hwndListView, 2, &column);
+}
+
+
+static VOID
+UpdateUsersList(HWND hwndListView)
+{
+ NET_API_STATUS netStatus;
+ PUSER_INFO_20 pBuffer;
+ DWORD entriesread;
+ DWORD totalentries;
+ DWORD resume_handle = 0;
+ DWORD i;
+
+ LV_ITEM lvi;
+ INT iItem;
+
+
+ for (;;)
+ {
+ netStatus = NetUserEnum(NULL, 20, FILTER_NORMAL_ACCOUNT,
+ (LPBYTE*)&pBuffer,
+ 1024, &entriesread,
+ &totalentries, &resume_handle);
+ if (netStatus != NERR_Success && netStatus != ERROR_MORE_DATA)
+ break;
+
+ for (i = 0; i < entriesread; i++)
+ {
+ memset(&lvi, 0x00, sizeof(lvi));
+ lvi.mask = LVIF_TEXT | LVIF_STATE; // | LVIF_PARAM;
+// lvi.lParam = (LPARAM)VarData;
+ lvi.pszText = pBuffer[i].usri20_name;
+ lvi.state = 0; //(i == 0) ? LVIS_SELECTED : 0;
+ iItem = ListView_InsertItem(hwndListView, &lvi);
+
+ ListView_SetItemText(hwndListView, iItem, 1,
+ pBuffer[i].usri20_full_name);
+
+ ListView_SetItemText(hwndListView, iItem, 2,
+ pBuffer[i].usri20_comment);
+ }
+
+ NetApiBufferFree(&pBuffer);
+
+ /* No more data left */
+ if (netStatus != ERROR_MORE_DATA)
+ break;
+ }
+
+}
+
+
+static VOID
+OnInitDialog(HWND hwndDlg)
+{
+ HWND hwndListView;
+
+ /* Set user environment variables */
+ hwndListView = GetDlgItem(hwndDlg, IDC_USERS_LIST);
+
+ (void)ListView_SetExtendedListViewStyle(hwndListView, LVS_EX_FULLROWSELECT);
+
+ SetUsersListColumns(hwndListView);
+
+ UpdateUsersList(hwndListView);
+
+// (void)ListView_SetColumnWidth(hwndListView, 3, LVSCW_AUTOSIZE_USEHEADER);
+// (void)ListView_Update(hwndListView, 0);
+}
+
+
+static VOID
+OnNotify(HWND hwndDlg, PUSER_DATA pUserData, NMHDR *phdr)
+{
+ LPNMLISTVIEW lpnmlv = (LPNMLISTVIEW)phdr;
+
+ switch (phdr->idFrom)
+ {
+ case IDC_USERS_LIST:
+ switch(phdr->code)
+ {
+ case NM_CLICK:
+ pUserData->iCurrentItem = lpnmlv->iItem;
+ if (lpnmlv->iItem == -1)
+ {
+ }
+ else
+ {
+ }
+ break;
+
+ case NM_DBLCLK:
+ break;
+
+ case NM_RCLICK:
+ ClientToScreen(GetDlgItem(hwndDlg, IDC_USERS_LIST), &lpnmlv->ptAction);
+ TrackPopupMenu(GetSubMenu(pUserData->hPopupMenu, (lpnmlv->iItem == -1) ? 0 : 1),
+ TPM_LEFTALIGN, lpnmlv->ptAction.x, lpnmlv->ptAction.y, 0, hwndDlg, NULL);
+ break;
+ }
+ break;
+ }
+}
+
+
+INT_PTR CALLBACK
+UsersPageProc(HWND hwndDlg,
+ UINT uMsg,
+ WPARAM wParam,
+ LPARAM lParam)
+{
+ PUSER_DATA pUserData;
+
+ UNREFERENCED_PARAMETER(wParam);
+
+ pUserData = (PUSER_DATA)GetWindowLongPtr(hwndDlg, DWLP_USER);
+
+ switch (uMsg)
+ {
+ case WM_INITDIALOG:
+ pUserData = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(USER_DATA));
+ SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pUserData);
+
+ pUserData->hPopupMenu = LoadMenu(hApplet, MAKEINTRESOURCE(IDM_POPUP_USER));
+
+ OnInitDialog(hwndDlg);
+ break;
+
+ case WM_COMMAND:
+ switch (LOWORD(wParam))
+ {
+ case IDM_USER_PROPERTIES:
+ MessageBeep(-1);
+ break;
+ }
+ break;
+
+ case WM_NOTIFY:
+ OnNotify(hwndDlg, pUserData, (NMHDR *)lParam);
+ break;
+
+ case WM_DESTROY:
+ DestroyMenu(pUserData->hPopupMenu);
+ HeapFree(GetProcessHeap(), 0, pUserData);
+ break;
+ }
+
+ return FALSE;
+}
diff --git a/reactos/dll/cpl/usrmgr/usrmgr.c b/reactos/dll/cpl/usrmgr/usrmgr.c
new file mode 100644
index 00000000000..e04aebae5ea
--- /dev/null
+++ b/reactos/dll/cpl/usrmgr/usrmgr.c
@@ -0,0 +1,123 @@
+/* $Id$
+ *
+ * COPYRIGHT: See COPYING in the top level directory
+ * PROJECT: ReactOS User Manager Control Panel
+ * FILE: dll/cpl/usrmgr/extra.c
+ * PURPOSE: Main functions
+ *
+ * PROGRAMMERS: Eric Kohl
+ */
+
+#include "usrmgr.h"
+
+#define NUM_APPLETS 1
+
+LONG APIENTRY UsrmgrApplet(HWND hwnd, UINT uMsg, LONG wParam, LONG lParam);
+
+HINSTANCE hApplet = 0;
+
+/* Applets */
+APPLET Applets[NUM_APPLETS] =
+{
+ {
+ IDC_USRMGR_ICON,
+ IDS_CPLNAME,
+ IDS_CPLDESCRIPTION,
+ UsrmgrApplet
+ }
+};
+
+
+static VOID
+InitPropSheetPage(PROPSHEETPAGE *psp, WORD idDlg, DLGPROC DlgProc)
+{
+ ZeroMemory(psp, sizeof(PROPSHEETPAGE));
+ psp->dwSize = sizeof(PROPSHEETPAGE);
+ psp->dwFlags = PSP_DEFAULT;
+ psp->hInstance = hApplet;
+ psp->pszTemplate = MAKEINTRESOURCE(idDlg);
+ psp->pfnDlgProc = DlgProc;
+}
+
+
+/* Display Applet */
+LONG APIENTRY
+UsrmgrApplet(HWND hwnd, UINT uMsg, LONG wParam, LONG lParam)
+{
+ PROPSHEETPAGE psp[3];
+ PROPSHEETHEADER psh;
+ TCHAR Caption[1024];
+
+ UNREFERENCED_PARAMETER(lParam);
+ UNREFERENCED_PARAMETER(wParam);
+ UNREFERENCED_PARAMETER(uMsg);
+ UNREFERENCED_PARAMETER(hwnd);
+
+ LoadString(hApplet, IDS_CPLNAME, Caption, sizeof(Caption) / sizeof(TCHAR));
+
+ ZeroMemory(&psh, sizeof(PROPSHEETHEADER));
+ psh.dwSize = sizeof(PROPSHEETHEADER);
+ psh.dwFlags = PSH_PROPSHEETPAGE;
+ psh.hwndParent = NULL;
+ psh.hInstance = hApplet;
+ psh.hIcon = LoadIcon(hApplet, MAKEINTRESOURCE(IDC_USRMGR_ICON));
+ psh.pszCaption = Caption;
+ psh.nPages = sizeof(psp) / sizeof(PROPSHEETPAGE);
+ psh.nStartPage = 0;
+ psh.ppsp = psp;
+
+ InitPropSheetPage(&psp[0], IDD_USERS, (DLGPROC)UsersPageProc);
+ InitPropSheetPage(&psp[1], IDD_GROUPS, (DLGPROC)GroupsPageProc);
+ InitPropSheetPage(&psp[2], IDD_EXTRA, (DLGPROC)ExtraPageProc);
+
+ return (LONG)(PropertySheet(&psh) != -1);
+}
+
+
+/* Control Panel Callback */
+LONG CALLBACK
+CPlApplet(HWND hwndCPl, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
+{
+ int i = (int)lParam1;
+
+ switch (uMsg)
+ {
+ case CPL_INIT:
+ return TRUE;
+
+ case CPL_GETCOUNT:
+ return NUM_APPLETS;
+
+ case CPL_INQUIRE:
+ {
+ CPLINFO *CPlInfo = (CPLINFO*)lParam2;
+ CPlInfo->lData = 0;
+ CPlInfo->idIcon = Applets[i].idIcon;
+ CPlInfo->idName = Applets[i].idName;
+ CPlInfo->idInfo = Applets[i].idDescription;
+ }
+ break;
+
+ case CPL_DBLCLK:
+ Applets[i].AppletProc(hwndCPl, uMsg, lParam1, lParam2);
+ break;
+ }
+
+ return FALSE;
+}
+
+
+BOOL WINAPI
+DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
+{
+ UNREFERENCED_PARAMETER(lpvReserved);
+
+ switch (dwReason)
+ {
+ case DLL_PROCESS_ATTACH:
+ hApplet = hinstDLL;
+ break;
+ }
+
+ return TRUE;
+}
diff --git a/reactos/dll/cpl/usrmgr/usrmgr.def b/reactos/dll/cpl/usrmgr/usrmgr.def
new file mode 100644
index 00000000000..f7876b55592
--- /dev/null
+++ b/reactos/dll/cpl/usrmgr/usrmgr.def
@@ -0,0 +1,6 @@
+LIBRARY usrmgr.cpl
+
+EXPORTS
+CPlApplet
+
+; EOF
diff --git a/reactos/dll/cpl/usrmgr/usrmgr.h b/reactos/dll/cpl/usrmgr/usrmgr.h
new file mode 100644
index 00000000000..8192fa58cea
--- /dev/null
+++ b/reactos/dll/cpl/usrmgr/usrmgr.h
@@ -0,0 +1,34 @@
+#ifndef __CPL_DESK_H__
+#define __CPL_DESK_H__
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include "resource.h"
+
+typedef struct _APPLET
+{
+ int idIcon;
+ int idName;
+ int idDescription;
+ APPLET_PROC AppletProc;
+} APPLET, *PAPPLET;
+
+extern HINSTANCE hApplet;
+
+
+INT_PTR CALLBACK UsersPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
+INT_PTR CALLBACK GroupsPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
+INT_PTR CALLBACK ExtraPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
+
+
+#endif /* __CPL_DESK_H__ */
+
diff --git a/reactos/dll/cpl/usrmgr/usrmgr.rbuild b/reactos/dll/cpl/usrmgr/usrmgr.rbuild
new file mode 100644
index 00000000000..def4b7fff07
--- /dev/null
+++ b/reactos/dll/cpl/usrmgr/usrmgr.rbuild
@@ -0,0 +1,24 @@
+
+
+ .
+
+
+
+
+ 0x600
+ 0x501
+
+
+ kernel32
+ user32
+ gdi32
+ comctl32
+ ntdll
+ netapi32
+ msvcrt
+ extra.c
+ groups.c
+ users.c
+ usrmgr.c
+ usrmgr.rc
+
diff --git a/reactos/dll/cpl/usrmgr/usrmgr.rc b/reactos/dll/cpl/usrmgr/usrmgr.rc
new file mode 100644
index 00000000000..2116290a6f9
--- /dev/null
+++ b/reactos/dll/cpl/usrmgr/usrmgr.rc
@@ -0,0 +1,17 @@
+#include
+#include "resource.h"
+
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+
+#define REACTOS_VERSION_DLL
+#define REACTOS_STR_FILE_DESCRIPTION "ReactOS User Manager Panel\0"
+#define REACTOS_STR_INTERNAL_NAME "usrmgr\0"
+#define REACTOS_STR_ORIGINAL_FILENAME "usrmgr.cpl\0"
+
+#include
+
+IDC_USRMGR_ICON ICON "resources/applet.ico"
+IDC_USRMGR_ICON2 ICON "resources/applet.ico"
+
+
+#include "lang/en-US.rc"