[PATCH v2 5/5] aclui: Implement EditSecurity().

Zebediah Figura z.figura12 at gmail.com
Sun Feb 28 10:27:49 CST 2021


From: Michael Müller <michael at fds-team.de>

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
 dlls/aclui/aclui_main.c | 28 +++++++++++++++++++++++++---
 1 file changed, 25 insertions(+), 3 deletions(-)

diff --git a/dlls/aclui/aclui_main.c b/dlls/aclui/aclui_main.c
index 24fb32fdb8c..43171d70410 100644
--- a/dlls/aclui/aclui_main.c
+++ b/dlls/aclui/aclui_main.c
@@ -480,10 +480,32 @@ HPROPSHEETPAGE WINAPI CreateSecurityPage(ISecurityInformation *security)
     return ret;
 }
 
-BOOL WINAPI EditSecurity(HWND owner, LPSECURITYINFO psi)
+BOOL WINAPI EditSecurity(HWND owner, ISecurityInformation *security)
 {
-    FIXME("(%p, %p): stub\n", owner, psi);
-    return FALSE;
+    PROPSHEETHEADERW sheet = {0};
+    HPROPSHEETPAGE pages[1];
+    SI_OBJECT_INFO info;
+    BOOL ret;
+
+    TRACE("(%p, %p)\n", owner, security);
+
+    if (FAILED(ISecurityInformation_GetObjectInformation(security, &info)))
+        return FALSE;
+    if (!(pages[0] = CreateSecurityPage(security)))
+        return FALSE;
+
+    sheet.dwSize = sizeof(sheet);
+    sheet.dwFlags = PSH_DEFAULT;
+    sheet.hwndParent = owner;
+    sheet.hInstance = aclui_instance;
+    sheet.pszCaption = load_formatstr(IDS_PERMISSION_FOR, info.pszObjectName);
+    sheet.nPages = 1;
+    sheet.nStartPage = 0;
+    sheet.phpage = pages;
+
+    ret = PropertySheetW(&sheet) != -1;
+    LocalFree((void *)sheet.pszCaption);
+    return ret;
 }
 
 BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, void *reserved)
-- 
2.30.1




More information about the wine-devel mailing list