ReactOS 0.4.15-dev-6068-g8061a6f
groupprops.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/groupprops.c
5 * PURPOSE: Group property sheet
6 *
7 * PROGRAMMERS: Eric Kohl
8 */
9
10#include "usrmgr.h"
11
12typedef struct _GENERAL_GROUP_DATA
13{
16
17
18static VOID
20 LPTSTR pTextSid)
21{
23 DWORD dwSubAuthorities;
24 DWORD dwSidRev = SID_REVISION;
26 DWORD dwSidSize;
27
29
30 dwSubAuthorities = *GetSidSubAuthorityCount(pSid);
31
32 dwSidSize = wsprintf(pTextSid, TEXT("S-%lu-"), dwSidRev);
33
34 if ((psia->Value[0] != 0) || (psia->Value[1] != 0))
35 {
36 dwSidSize += wsprintf(pTextSid + lstrlen(pTextSid),
37 TEXT("0x%02hx%02hx%02hx%02hx%02hx%02hx"),
38 (USHORT)psia->Value[0],
39 (USHORT)psia->Value[1],
40 (USHORT)psia->Value[2],
41 (USHORT)psia->Value[3],
42 (USHORT)psia->Value[4],
43 (USHORT)psia->Value[5]);
44 }
45 else
46 {
47 dwSidSize += wsprintf(pTextSid + lstrlen(pTextSid),
48 TEXT("%lu"),
49 (ULONG)(psia->Value[5]) +
50 (ULONG)(psia->Value[4] << 8) +
51 (ULONG)(psia->Value[3] << 16) +
52 (ULONG)(psia->Value[2] << 24));
53 }
54
55 for (dwCounter = 0 ; dwCounter < dwSubAuthorities ; dwCounter++)
56 {
57 dwSidSize += wsprintf(pTextSid + dwSidSize, TEXT("-%lu"),
59 }
60}
61
62
63static VOID
65 PGENERAL_GROUP_DATA pGroupData)
66{
67 HWND hwndLV;
69 RECT rect;
70 TCHAR szStr[32];
71 HIMAGELIST hImgList;
73
74 NET_API_STATUS netStatus;
75 PUSER_INFO_20 pUserBuffer;
76 DWORD entriesread;
77 DWORD totalentries;
78 DWORD resume_handle = 0;
79 DWORD i;
80 LV_ITEM lvi;
81 INT iItem;
82
84 GetClientRect(hwndLV, &rect);
85
86 hImgList = ImageList_Create(16,16,ILC_COLOR32 | ILC_MASK,5,5);
88 ImageList_AddIcon(hImgList,hIcon);
91 ImageList_AddIcon(hImgList, hIcon);
94 ImageList_AddIcon(hImgList, hIcon);
96
97 (void)ListView_SetImageList(hwndLV, hImgList, LVSIL_SMALL);
99
100 memset(&column, 0x00, sizeof(column));
102 column.fmt = LVCFMT_LEFT;
103 column.cx = (INT)((rect.right - rect.left) * 0.40);
104 column.iSubItem = 0;
105 LoadString(hApplet, IDS_NAME, szStr, sizeof(szStr) / sizeof(szStr[0]));
106 column.pszText = szStr;
107 (void)ListView_InsertColumn(hwndLV, 0, &column);
108
109 column.cx = (INT)((rect.right - rect.left) * 0.60);
110 column.iSubItem = 1;
111 LoadString(hApplet, IDS_DESCRIPTION, szStr, sizeof(szStr) / sizeof(szStr[0]));
112 column.pszText = szStr;
113 (void)ListView_InsertColumn(hwndLV, 1, &column);
114
115 /* TODO: Enumerate global groups and add them to the list! */
116
117 for (;;)
118 {
119 netStatus = NetUserEnum(NULL, 20, FILTER_NORMAL_ACCOUNT,
120 (LPBYTE*)&pUserBuffer,
121 1024, &entriesread,
122 &totalentries, &resume_handle);
123 if (netStatus != NERR_Success && netStatus != ERROR_MORE_DATA)
124 break;
125
126 for (i = 0; i < entriesread; i++)
127 {
128 memset(&lvi, 0x00, sizeof(lvi));
129 lvi.mask = LVIF_TEXT | LVIF_STATE | LVIF_IMAGE;
130 lvi.pszText = pUserBuffer[i].usri20_name;
131 lvi.state = 0;
132 lvi.iImage = (pUserBuffer[i].usri20_flags & UF_ACCOUNTDISABLE) ? 2 : 1;
133 iItem = ListView_InsertItem(hwndLV, &lvi);
134
135 ListView_SetItemText(hwndLV, iItem, 1,
136 pUserBuffer[i].usri20_full_name);
137
138 ListView_SetItemText(hwndLV, iItem, 2,
139 pUserBuffer[i].usri20_comment);
140 }
141
142 NetApiBufferFree(pUserBuffer);
143
144 /* No more data left */
145 if (netStatus != ERROR_MORE_DATA)
146 break;
147 }
148}
149
150
151static BOOL
153 PGENERAL_GROUP_DATA pGroupData)
154{
155 HWND hwndLV;
156 INT nSelectedItems;
157 INT nItem;
158 TCHAR szUserName[UNLEN + 1];
159 BOOL bResult = FALSE;
160 LOCALGROUP_MEMBERS_INFO_3 memberInfo;
162
163 hwndLV = GetDlgItem(hwndDlg, IDC_USER_ADD_MEMBERSHIP_LIST);
164
165 nSelectedItems = ListView_GetSelectedCount(hwndLV);
166 if (nSelectedItems > 0)
167 {
168 nItem = ListView_GetNextItem(hwndLV, -1, LVNI_SELECTED);
169 while (nItem != -1)
170 {
171 /* Get the new user name */
173 nItem, 0,
174 szUserName,
175 UNLEN + 1);
176 TRACE("Selected user: %s", dbgstrx(szUserName));
177
178 memberInfo.lgrmi3_domainandname = szUserName;
179
181 (LPBYTE)&memberInfo, 1);
183 {
184 TCHAR szText[256];
185 wsprintf(szText, TEXT("Error: %u"), status);
186 MessageBox(NULL, szText, TEXT("NetLocalGroupAddMembers"), MB_ICONERROR | MB_OK);
187 }
188 else
189 {
190 bResult = TRUE;
191 }
192
193 nItem = ListView_GetNextItem(hwndLV, nItem, LVNI_SELECTED);
194 }
195 }
196
197 return bResult;
198}
199
200
203 UINT uMsg,
206{
207 PGENERAL_GROUP_DATA pGroupData;
208
210
211 pGroupData = (PGENERAL_GROUP_DATA)GetWindowLongPtr(hwndDlg, DWLP_USER);
212
213 switch (uMsg)
214 {
215 case WM_INITDIALOG:
216 pGroupData = (PGENERAL_GROUP_DATA)lParam;
217 SetWindowLongPtr(hwndDlg, DWLP_USER, (INT_PTR)pGroupData);
218 InitGroupMembersList(hwndDlg, pGroupData);
219 break;
220
221 case WM_COMMAND:
222 switch (LOWORD(wParam))
223 {
224 case IDOK:
225 if (AddSelectedUsersToGroup(hwndDlg, pGroupData))
226 EndDialog(hwndDlg, IDOK);
227 else
228 EndDialog(hwndDlg, IDCANCEL);
229 break;
230
231 case IDCANCEL:
232 EndDialog(hwndDlg, IDCANCEL);
233 break;
234 }
235 break;
236
237 default:
238 return FALSE;
239 }
240
241 return TRUE;
242}
243
244
245static VOID
247 PGENERAL_GROUP_DATA pGroupData)
248{
249 HWND hwndLV;
250// NET_API_STATUS status;
251 PLOCALGROUP_MEMBERS_INFO_1 membersInfo = NULL;
252 DWORD dwRead;
253 DWORD dwTotal;
254 DWORD_PTR resumeHandle = 0;
255 DWORD i;
256 LV_ITEM lvi;
257 TCHAR szGroupName[256];
258
261 hwndDlg,
263 (LPARAM)pGroupData) == IDOK)
264 {
265 hwndLV = GetDlgItem(hwndDlg, IDC_GROUP_GENERAL_MEMBERS);
266
268
269// DebugPrintf(_T("Removed all users from the list!"));
270
271 /* Set group members */
272 NetLocalGroupGetMembers(NULL, pGroupData->szGroupName, 1, (LPBYTE*)&membersInfo,
273 MAX_PREFERRED_LENGTH, &dwRead, &dwTotal,
274 &resumeHandle);
275
276 for (i = 0; i < dwRead; i++)
277 {
278 ZeroMemory(&lvi, sizeof(lvi));
279 lvi.mask = LVIF_TEXT | LVIF_STATE | LVIF_IMAGE;
280 lvi.pszText = membersInfo[i].lgrmi1_name;
281 lvi.state = 0;
282 lvi.iImage = (membersInfo[i].lgrmi1_sidusage == SidTypeGroup ||
283 membersInfo[i].lgrmi1_sidusage == SidTypeWellKnownGroup) ? 1 : 0;
284
285 if (membersInfo[i].lgrmi1_sidusage == SidTypeWellKnownGroup)
286 {
287 TCHAR szSid[256];
288
289 GetTextSid(membersInfo[i].lgrmi1_sid, szSid);
290
291 wsprintf(szGroupName,
292 TEXT("%s (%s)"),
293 membersInfo[i].lgrmi1_name,
294 szSid);
295
296 lvi.pszText = szGroupName;
297 }
298
299
300 (void)ListView_InsertItem(hwndLV, &lvi);
301 }
302
303 NetApiBufferFree(membersInfo);
304 }
305}
306
307
308static VOID
310 PGENERAL_GROUP_DATA pGroupData)
311{
312 TCHAR szUserName[UNLEN + 1];
313 TCHAR szText[256];
314 LOCALGROUP_MEMBERS_INFO_3 memberInfo;
315 HWND hwndLV;
316 INT nItem;
318
319 hwndLV = GetDlgItem(hwndDlg, IDC_GROUP_GENERAL_MEMBERS);
320 nItem = ListView_GetNextItem(hwndLV, -1, LVNI_SELECTED);
321 if (nItem == -1)
322 return;
323
324 /* Get the new user name */
326 nItem, 0,
327 szUserName,
328 UNLEN + 1);
329
330 /* Display a warning message because the remove operation cannot be reverted */
331 wsprintf(szText, TEXT("Do you really want to remove the user \"%s\" from the group \"%s\"?"),
332 szUserName, pGroupData->szGroupName);
333 if (MessageBox(NULL, szText, TEXT("User Accounts"), MB_ICONWARNING | MB_YESNO) == IDNO)
334 return;
335
336 memberInfo.lgrmi3_domainandname = szUserName;
337
339 3, (LPBYTE)&memberInfo, 1);
340 if (status != NERR_Success)
341 {
342 TCHAR szText[256];
343 wsprintf(szText, TEXT("Error: %u"), status);
344 MessageBox(NULL, szText, TEXT("NetLocalGroupDelMembers"), MB_ICONERROR | MB_OK);
345 return;
346 }
347
348 (void)ListView_DeleteItem(hwndLV, nItem);
349
350 if (ListView_GetItemCount(hwndLV) == 0)
352}
353
354
355static BOOL
357 PGENERAL_GROUP_DATA pGroupData,
359{
361
362 switch (((LPNMHDR)lParam)->idFrom)
363 {
365 switch (((LPNMHDR)lParam)->code)
366 {
367 case NM_CLICK:
368 EnableWindow(GetDlgItem(hwndDlg, IDC_GROUP_GENERAL_REMOVE), (lpnmlv->iItem != -1));
369 break;
370
371 case LVN_KEYDOWN:
372 if (((LPNMLVKEYDOWN)lParam)->wVKey == VK_DELETE)
373 {
374 RemoveUserFromGroup(hwndDlg, pGroupData);
375 }
376 break;
377
378 }
379 break;
380 }
381
382 return FALSE;
383}
384
385
386static VOID
388 PGENERAL_GROUP_DATA pGroupData)
389{
390 PLOCALGROUP_INFO_1 groupInfo = NULL;
391 PLOCALGROUP_MEMBERS_INFO_2 membersInfo = NULL;
392 DWORD dwRead;
393 DWORD dwTotal;
394 DWORD_PTR resumeHandle = 0;
395 DWORD i;
396 LV_ITEM lvi;
397 HWND hwndLV;
399 RECT rect;
400 HIMAGELIST hImgList;
401 HICON hIcon;
402 TCHAR szGroupName[256];
403
404
405 hwndLV = GetDlgItem(hwndDlg, IDC_GROUP_GENERAL_MEMBERS);
406
407 /* Create the image list */
408 hImgList = ImageList_Create(16, 16, ILC_COLOR32 | ILC_MASK, 5, 5);
410 ImageList_AddIcon(hImgList, hIcon);
413 ImageList_AddIcon(hImgList, hIcon);
415
416 (void)ListView_SetImageList(hwndLV, hImgList, LVSIL_SMALL);
417
418 /* Set the list column */
419 GetClientRect(hwndLV, &rect);
420
421 memset(&column, 0x00, sizeof(column));
423 column.fmt = LVCFMT_LEFT;
424 column.cx = (INT)(rect.right - rect.left);
425 column.iSubItem = 0;
426 (void)ListView_InsertColumn(hwndLV, 0, &column);
427
428 /* Set group name */
430
431 /* Set group description */
432 NetLocalGroupGetInfo(NULL, pGroupData->szGroupName, 1, (LPBYTE*)&groupInfo);
434 NetApiBufferFree(groupInfo);
435
436 /* Set group members */
437 NetLocalGroupGetMembers(NULL, pGroupData->szGroupName, 2, (LPBYTE*)&membersInfo,
438 MAX_PREFERRED_LENGTH, &dwRead, &dwTotal,
439 &resumeHandle);
440
441 for (i = 0; i < dwRead; i++)
442 {
443 ZeroMemory(&lvi, sizeof(lvi));
444 lvi.mask = LVIF_TEXT | LVIF_STATE | LVIF_IMAGE;
445 lvi.state = 0;
446 if (membersInfo[i].lgrmi2_sidusage == SidTypeGroup ||
447 membersInfo[i].lgrmi2_sidusage == SidTypeWellKnownGroup)
448 {
449 lvi.iImage = 0;
450 }
451 else if (membersInfo[i].lgrmi2_sidusage == SidTypeUser)
452 {
453 /* FIXME: handle locked user properly! */
454 lvi.iImage = 1;
455 }
456
457 if (membersInfo[i].lgrmi2_sidusage == SidTypeWellKnownGroup)
458 {
459 TCHAR szSid[256];
460
461 GetTextSid(membersInfo[i].lgrmi2_sid, szSid);
462
463 wsprintf(szGroupName,
464 TEXT("%s (%s)"),
465 membersInfo[i].lgrmi2_domainandname,
466 szSid);
467
468 lvi.pszText = szGroupName;
469 }
470 else
471 {
472 LPWSTR ptr;
473
474 ptr = wcschr(membersInfo[i].lgrmi2_domainandname, L'\\');
475 if (ptr != NULL)
476 {
477 lvi.pszText = ++ptr;
478 }
479 else
480 {
481 lvi.pszText = membersInfo[i].lgrmi2_domainandname;
482 }
483 }
484
485 (void)ListView_InsertItem(hwndLV, &lvi);
486 }
487
488 NetApiBufferFree(membersInfo);
489}
490
491
492static BOOL
494 PGENERAL_GROUP_DATA pGroupData)
495{
496 LOCALGROUP_INFO_1 groupInfo;
497 LPTSTR pszComment = NULL;
498 INT nLength;
500 DWORD dwIndex;
501
502 /* Get the group description */
504 if (nLength == 0)
505 {
506 groupInfo.lgrpi1_comment = NULL;
507 }
508 else
509 {
510 pszComment = HeapAlloc(GetProcessHeap(), 0, (nLength + 1) * sizeof(TCHAR));
511 GetDlgItemText(hwndDlg, IDC_GROUP_GENERAL_DESCRIPTION, pszComment, nLength + 1);
512 groupInfo.lgrpi1_comment = pszComment;
513 }
514
515 status = NetLocalGroupSetInfo(NULL, pGroupData->szGroupName, 1, (LPBYTE)&groupInfo, &dwIndex);
516 if (status != NERR_Success)
517 {
518 ERR("NetLocalGroupSetInfo failed. Status: %lu Index: %lu", status, dwIndex);
519 }
520
521 if (pszComment)
522 HeapFree(GetProcessHeap(), 0, pszComment);
523
524 return TRUE;
525}
526
527
530 UINT uMsg,
533{
534 PGENERAL_GROUP_DATA pGroupData;
535
538 UNREFERENCED_PARAMETER(hwndDlg);
539
540 pGroupData= (PGENERAL_GROUP_DATA)GetWindowLongPtr(hwndDlg, DWLP_USER);
541
542 switch (uMsg)
543 {
544 case WM_INITDIALOG:
547 sizeof(GENERAL_GROUP_DATA) +
548 lstrlen((LPTSTR)((PROPSHEETPAGE *)lParam)->lParam) * sizeof(TCHAR));
549 lstrcpy(pGroupData->szGroupName, (LPTSTR)((PROPSHEETPAGE *)lParam)->lParam);
550
551 SetWindowLongPtr(hwndDlg, DWLP_USER, (INT_PTR)pGroupData);
552
553 GetGeneralGroupData(hwndDlg,
554 pGroupData);
555 break;
556
557 case WM_COMMAND:
558 switch (LOWORD(wParam))
559 {
561 if (HIWORD(wParam) == EN_CHANGE)
562 PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
563 break;
564
566 AddUsersToGroup(hwndDlg, pGroupData);
567 break;
568
570 RemoveUserFromGroup(hwndDlg, pGroupData);
571 break;
572 }
573 break;
574
575 case WM_NOTIFY:
576 if (((LPPSHNOTIFY)lParam)->hdr.code == PSN_APPLY)
577 {
578 SetGeneralGroupData(hwndDlg, pGroupData);
579 return TRUE;
580 }
581 else
582 {
583 return OnGroupPropSheetNotify(hwndDlg, pGroupData, lParam);
584 }
585 break;
586
587 case WM_DESTROY:
588 HeapFree(GetProcessHeap(), 0, pGroupData);
589 break;
590 }
591
592 return FALSE;
593}
594
595
596static VOID
598{
599 ZeroMemory(psp, sizeof(PROPSHEETPAGE));
600 psp->dwSize = sizeof(PROPSHEETPAGE);
601 psp->dwFlags = PSP_DEFAULT;
602 psp->hInstance = hApplet;
603 psp->pszTemplate = MAKEINTRESOURCE(idDlg);
604 psp->pfnDlgProc = DlgProc;
605 psp->lParam = (LPARAM)pszGroup;
606}
607
608
609BOOL
611{
612 PROPSHEETPAGE psp[1];
613 PROPSHEETHEADER psh;
614 TCHAR szGroupName[UNLEN + 1];
615 INT nItem;
616 HWND hwndLV;
617
618 hwndLV = GetDlgItem(hwndDlg, IDC_GROUPS_LIST);
619 nItem = ListView_GetNextItem(hwndLV, -1, LVNI_SELECTED);
620 if (nItem == -1)
621 return FALSE;
622
623 /* Get the new user name */
625 nItem, 0,
626 szGroupName,
627 UNLEN + 1);
628
629 ZeroMemory(&psh, sizeof(PROPSHEETHEADER));
630 psh.dwSize = sizeof(PROPSHEETHEADER);
631 psh.dwFlags = PSH_PROPSHEETPAGE | PSH_PROPTITLE;
632 psh.hwndParent = hwndDlg;
633 psh.hInstance = hApplet;
634 psh.hIcon = NULL;
635 psh.pszCaption = szGroupName;
636 psh.nPages = sizeof(psp) / sizeof(PROPSHEETPAGE);
637 psh.nStartPage = 0;
638 psh.ppsp = psp;
639
641
642 return (PropertySheet(&psh) == IDOK);
643}
#define IDS_DESCRIPTION
Definition: resource.h:4
#define ERR(fmt,...)
Definition: debug.h:110
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define ERROR_MORE_DATA
Definition: dderror.h:13
#define DLGPROC
Definition: maze.c:62
WORD idDlg
Definition: desk.c:110
DLGPROC DlgProc
Definition: desk.c:111
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
HINSTANCE hApplet
Definition: access.c:17
#define IDD_USER_ADD_MEMBERSHIP
Definition: resource.h:82
#define IDC_GROUP_GENERAL_REMOVE
Definition: resource.h:47
#define IDC_USER_ADD_MEMBERSHIP_LIST
Definition: resource.h:83
#define IDD_GROUP_GENERAL
Definition: resource.h:42
#define IDC_GROUP_GENERAL_MEMBERS
Definition: resource.h:45
#define IDI_GROUP
Definition: resource.h:8
#define IDC_GROUP_GENERAL_NAME
Definition: resource.h:43
#define IDC_GROUP_GENERAL_ADD
Definition: resource.h:46
#define IDS_NAME
Definition: resource.h:90
#define IDI_USER
Definition: resource.h:6
#define IDC_GROUP_GENERAL_DESCRIPTION
Definition: resource.h:44
#define IDC_GROUPS_LIST
Definition: resource.h:16
#define IDI_LOCKED_USER
Definition: resource.h:7
PDWORD WINAPI GetSidSubAuthority(PSID pSid, DWORD nSubAuthority)
Definition: security.c:898
PUCHAR WINAPI GetSidSubAuthorityCount(PSID pSid)
Definition: security.c:910
PSID_IDENTIFIER_AUTHORITY WINAPI GetSidIdentifierAuthority(PSID pSid)
Definition: security.c:887
HIMAGELIST WINAPI ImageList_Create(INT cx, INT cy, UINT flags, INT cInitial, INT cGrow)
Definition: imagelist.c:804
#define wcschr
Definition: compat.h:17
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define CALLBACK
Definition: compat.h:35
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
NET_API_STATUS WINAPI NetApiBufferFree(LPVOID Buffer)
Definition: apibuf.c:43
NET_API_STATUS WINAPI NetUserEnum(LPCWSTR servername, DWORD level, DWORD filter, LPBYTE *bufptr, DWORD prefmaxlen, LPDWORD entriesread, LPDWORD totalentries, LPDWORD resume_handle)
Definition: user.c:2740
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
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
Definition: glfuncs.h:248
BOOL GroupProperties(HWND hwndDlg)
Definition: groupprops.c:610
static VOID AddUsersToGroup(HWND hwndDlg, PGENERAL_GROUP_DATA pGroupData)
Definition: groupprops.c:246
static VOID GetTextSid(PSID pSid, LPTSTR pTextSid)
Definition: groupprops.c:19
struct _GENERAL_GROUP_DATA * PGENERAL_GROUP_DATA
struct _GENERAL_GROUP_DATA GENERAL_GROUP_DATA
INT_PTR CALLBACK GroupGeneralPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: groupprops.c:529
static VOID InitGroupMembersList(HWND hwndDlg, PGENERAL_GROUP_DATA pGroupData)
Definition: groupprops.c:64
static VOID RemoveUserFromGroup(HWND hwndDlg, PGENERAL_GROUP_DATA pGroupData)
Definition: groupprops.c:309
static BOOL AddSelectedUsersToGroup(HWND hwndDlg, PGENERAL_GROUP_DATA pGroupData)
Definition: groupprops.c:152
static VOID InitGroupPropSheetPage(PROPSHEETPAGE *psp, WORD idDlg, DLGPROC DlgProc, LPTSTR pszGroup)
Definition: groupprops.c:597
static BOOL SetGeneralGroupData(HWND hwndDlg, PGENERAL_GROUP_DATA pGroupData)
Definition: groupprops.c:493
static VOID GetGeneralGroupData(HWND hwndDlg, PGENERAL_GROUP_DATA pGroupData)
Definition: groupprops.c:387
INT_PTR CALLBACK AddUsersToGroupDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: groupprops.c:202
static BOOL OnGroupPropSheetNotify(HWND hwndDlg, PGENERAL_GROUP_DATA pGroupData, LPARAM lParam)
Definition: groupprops.c:356
char hdr[14]
Definition: iptest.cpp:33
#define TEXT(s)
Definition: k32.h:26
#define UF_ACCOUNTDISABLE
Definition: lmaccess.h:24
#define FILTER_NORMAL_ACCOUNT
Definition: lmaccess.h:40
#define MAX_PREFERRED_LENGTH
Definition: lmcons.h:48
#define NERR_Success
Definition: lmerr.h:5
NET_API_STATUS WINAPI NetLocalGroupDelMembers(LPCWSTR servername, LPCWSTR groupname, DWORD level, LPBYTE buf, DWORD totalentries)
Definition: local_group.c:817
NET_API_STATUS WINAPI NetLocalGroupGetMembers(LPCWSTR servername, LPCWSTR localgroupname, DWORD level, LPBYTE *bufptr, DWORD prefmaxlen, LPDWORD entriesread, LPDWORD totalentries, PDWORD_PTR resumehandle)
Definition: local_group.c:1354
NET_API_STATUS WINAPI NetLocalGroupSetInfo(LPCWSTR servername, LPCWSTR groupname, DWORD level, LPBYTE buf, LPDWORD parm_err)
Definition: local_group.c:1732
NET_API_STATUS WINAPI NetLocalGroupGetInfo(LPCWSTR servername, LPCWSTR groupname, DWORD level, LPBYTE *bufptr)
Definition: local_group.c:1225
NET_API_STATUS WINAPI NetLocalGroupAddMembers(LPCWSTR servername, LPCWSTR groupname, DWORD level, LPBYTE buf, DWORD totalentries)
Definition: local_group.c:520
@ SidTypeGroup
Definition: lsa.idl:119
@ SidTypeUser
Definition: lsa.idl:118
@ SidTypeWellKnownGroup
Definition: lsa.idl:122
static PVOID ptr
Definition: dispmode.c:27
DWORD dwCounter
Definition: mutex.c:10
static PSID pSid
Definition: security.c:74
static HICON
Definition: imagelist.c:84
DWORD NET_API_STATUS
Definition: ms-dtyp.idl:91
HICON hIcon
Definition: msconfig.c:44
unsigned int UINT
Definition: ndis.h:50
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
#define L(x)
Definition: ntvdm.h:50
#define LOWORD(l)
Definition: pedump.c:82
unsigned short USHORT
Definition: pedump.c:61
#define INT
Definition: polytest.cpp:20
#define PROPSHEETHEADER
Definition: prsht.h:392
#define PSH_PROPTITLE
Definition: prsht.h:40
#define PropSheet_Changed(d, w)
Definition: prsht.h:344
#define PSP_DEFAULT
Definition: prsht.h:22
#define PSN_APPLY
Definition: prsht.h:117
#define PropertySheet
Definition: prsht.h:400
#define PSH_PROPSHEETPAGE
Definition: prsht.h:43
#define PROPSHEETPAGE
Definition: prsht.h:389
#define LVSIL_SMALL
Definition: commctrl.h:2299
#define ListView_InsertItem(hwnd, pitem)
Definition: commctrl.h:2408
#define ListView_InsertColumn(hwnd, iCol, pcol)
Definition: commctrl.h:2636
#define LVIF_STATE
Definition: commctrl.h:2312
#define ListView_SetImageList(hwnd, himl, iImageList)
Definition: commctrl.h:2304
#define LVNI_SELECTED
Definition: commctrl.h:2424
#define ListView_GetItemText(hwndLV, i, iSubItem_, pszText_, cchTextMax_)
Definition: commctrl.h:2684
#define LVCF_WIDTH
Definition: commctrl.h:2587
#define ILC_COLOR32
Definition: commctrl.h:358
#define ListView_GetNextItem(hwnd, i, flags)
Definition: commctrl.h:2434
#define NM_CLICK
Definition: commctrl.h:130
#define LVS_EX_FULLROWSELECT
Definition: commctrl.h:2734
#define ListView_GetItemCount(hwnd)
Definition: commctrl.h:2307
#define ListView_SetExtendedListViewStyle(hwndLV, dw)
Definition: commctrl.h:2725
#define ListView_GetSelectedCount(hwndLV)
Definition: commctrl.h:2709
#define LV_ITEM
Definition: commctrl.h:2337
struct tagNMLISTVIEW * LPNMLISTVIEW
#define ListView_DeleteAllItems(hwnd)
Definition: commctrl.h:2414
#define ListView_SetItemText(hwndLV, i, iSubItem_, pszText_)
Definition: commctrl.h:2691
#define LVIF_TEXT
Definition: commctrl.h:2309
#define LVCF_FMT
Definition: commctrl.h:2586
#define ImageList_AddIcon(himl, hicon)
Definition: commctrl.h:415
#define LVCF_SUBITEM
Definition: commctrl.h:2589
#define LVCFMT_LEFT
Definition: commctrl.h:2598
#define ILC_MASK
Definition: commctrl.h:351
#define ListView_DeleteItem(hwnd, i)
Definition: commctrl.h:2411
#define LVN_KEYDOWN
Definition: commctrl.h:3184
#define LVIF_IMAGE
Definition: commctrl.h:2310
#define LVCF_TEXT
Definition: commctrl.h:2588
#define LV_COLUMN
Definition: commctrl.h:2547
#define WM_NOTIFY
Definition: richedit.h:61
#define memset(x, y, z)
Definition: compat.h:39
#define TRACE(s)
Definition: solgame.cpp:4
#define UNLEN
Definition: sspi.c:28
& rect
Definition: startmenu.cpp:1413
TCHAR szGroupName[1]
Definition: groupprops.c:14
LPWSTR lgrpi1_comment
Definition: lmaccess.h:510
Definition: ps.c:97
#define GetWindowLongPtr
Definition: treelist.c:73
#define SetWindowLongPtr
Definition: treelist.c:70
int32_t INT_PTR
Definition: typedefs.h:64
uint32_t DWORD_PTR
Definition: typedefs.h:65
unsigned char * LPBYTE
Definition: typedefs.h:53
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG
Definition: typedefs.h:59
#define HIWORD(l)
Definition: typedefs.h:247
#define dbgstrx(x)
Definition: usrmgr.h:12
#define ZeroMemory
Definition: winbase.h:1670
#define lstrcpy
Definition: winbase.h:3745
#define lstrlen
Definition: winbase.h:3747
_In_ DWORD nLength
Definition: wincon.h:473
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
#define ERROR_MEMBER_IN_ALIAS
Definition: winerror.h:859
#define DWLP_USER
Definition: winuser.h:866
#define IDCANCEL
Definition: winuser.h:825
#define IMAGE_ICON
Definition: winuser.h:212
#define GetWindowTextLength
Definition: winuser.h:5789
#define GetDlgItemText
Definition: winuser.h:5775
#define WM_COMMAND
Definition: winuser.h:1730
#define DialogBoxParam
Definition: winuser.h:5754
#define WM_INITDIALOG
Definition: winuser.h:1729
#define MB_YESNO
Definition: winuser.h:811
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define IDOK
Definition: winuser.h:824
#define MB_ICONERROR
Definition: winuser.h:781
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define IDNO
Definition: winuser.h:830
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define MB_OK
Definition: winuser.h:784
#define wsprintf
Definition: winuser.h:5855
#define MB_ICONWARNING
Definition: winuser.h:780
HWND WINAPI GetParent(_In_ HWND)
#define LoadImage
Definition: winuser.h:5805
#define LoadString
Definition: winuser.h:5809
#define MessageBox
Definition: winuser.h:5812
#define LR_DEFAULTCOLOR
Definition: winuser.h:1081
#define VK_DELETE
Definition: winuser.h:2223
#define WM_DESTROY
Definition: winuser.h:1599
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define SetDlgItemText
Definition: winuser.h:5839
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2022
#define EN_CHANGE
Definition: winuser.h:2012
* PSID_IDENTIFIER_AUTHORITY
Definition: setypes.h:464
#define SID_REVISION
Definition: setypes.h:481
char TCHAR
Definition: xmlstorage.h:189
WCHAR * LPWSTR
Definition: xmlstorage.h:184
CHAR * LPTSTR
Definition: xmlstorage.h:192