Commit in reactos/lib/aclui on MAIN
aclui_En.rc+11added 1.1
Makefile+2-21.1 -> 1.2
aclui.c+79-11.2 -> 1.3
aclui.rc+11.1 -> 1.2
internal.h+31.1 -> 1.2
resource.h+21.1 -> 1.2
stubs.c+1-111.2 -> 1.3
+99-14
1 added + 6 modified, total 7 files
implemented EditSecurity()

reactos/lib/aclui
aclui_En.rc added at 1.1
diff -N aclui_En.rc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ aclui_En.rc	10 Aug 2004 15:47:54 -0000	1.1
@@ -0,0 +1,11 @@
+#include <reactos/resource.h>
+#include <defines.h>
+#include "resource.h"
+
+LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
+
+STRINGTABLE DISCARDABLE
+{
+  IDS_PSP_TITLE "Permissions for %1"
+}
+

reactos/lib/aclui
Makefile 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- Makefile	10 Aug 2004 00:09:40 -0000	1.1
+++ Makefile	10 Aug 2004 15:47:54 -0000	1.2
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.1 2004/08/10 00:09:40 weiden Exp $
+# $Id: Makefile,v 1.2 2004/08/10 15:47:54 weiden Exp $
 
 PATH_TO_TOP = ../..
 
@@ -24,7 +24,7 @@
 
 TARGET_LFLAGS = -nostartfiles -nostdlib
 
-TARGET_SDKLIBS = ntdll.a kernel32.a advapi32.a user32.a
+TARGET_SDKLIBS = ntdll.a rosrtl.a kernel32.a comctl32.a user32.a
 
 TARGET_GCCLIBS = gcc
 

reactos/lib/aclui
aclui.c 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- aclui.c	10 Aug 2004 00:12:31 -0000	1.2
+++ aclui.c	10 Aug 2004 15:47:54 -0000	1.3
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: aclui.c,v 1.2 2004/08/10 00:12:31 weiden Exp $
+/* $Id: aclui.c,v 1.3 2004/08/10 15:47:54 weiden Exp $
  *
  * PROJECT:         ReactOS Access Control List Editor
  * FILE:            lib/aclui/aclui.c
@@ -28,7 +28,9 @@
  */
 #define INITGUID
 #include <windows.h>
+#include <prsht.h>
 #include <aclui.h>
+#include <rosrtl/resstr.h>
 #include "internal.h"
 #include "resource.h"
 
@@ -56,3 +58,79 @@
   return TRUE;
 }
 
+/*
+ * EditSecurity								EXPORTED
+ *
+ * @implemented
+ */
+BOOL
+WINAPI
+EditSecurity(HWND hwndOwner, LPSECURITYINFO psi)
+{
+  HRESULT hRet;
+  SI_OBJECT_INFO ObjectInfo;
+  PROPSHEETHEADER psh;
+  HPROPSHEETPAGE hPages[1];
+  LPWSTR lpCaption;
+  BOOL Ret;
+  
+  if(psi == NULL)
+  {
+    SetLastError(ERROR_INVALID_PARAMETER);
+    
+    DPRINT("No ISecurityInformation class passed!\n");
+    return FALSE;
+  }
+  
+  /* get the object information from the client interface */
+  hRet = psi->lpVtbl->GetObjectInformation(psi, &ObjectInfo);
+  
+  if(FAILED(hRet))
+  {
+    SetLastError(hRet);
+    
+    DPRINT("GetObjectInformation() failed!\n");
+    return FALSE;
+  }
+
+  /* create the page */
+  hPages[0] = CreateSecurityPage(psi);
+  if(hPages[0] == NULL)
+  {
+    DPRINT("CreateSecurityPage(), couldn't create property sheet!\n");
+    return FALSE;
+  }
+  
+  psh.dwSize = sizeof(PROPSHEETHEADER);
+  psh.dwFlags = PSH_DEFAULT;
+  psh.hwndParent = hwndOwner;
+  psh.hInstance = hDllInstance;
+  if((ObjectInfo.dwFlags & SI_PAGE_TITLE) != 0 &&
+     ObjectInfo.pszPageTitle != NULL && ObjectInfo.pszPageTitle[0] != L'\0')
+  {
+    /* Set the page title if the flag is present and the string isn't empty */
+    psh.pszCaption = ObjectInfo.pszPageTitle;
+    lpCaption = NULL;
+  }
+  else
+  {
+    /* Set the page title to the object name, make sure the format string
+       has "%1" NOT "%s" because it uses FormatMessage() to automatically
+       allocate the right amount of memory. */
+    RosLoadAndFormatStr(hDllInstance, IDS_PSP_TITLE, &lpCaption, ObjectInfo.pszObjectName);
+    psh.pszCaption = lpCaption;
+  }
+  psh.nPages = sizeof(hPages) / sizeof(HPROPSHEETPAGE);
+  psh.nStartPage = 0;
+  psh.phpage = hPages;
+  
+  Ret = (PropertySheet(&psh) != -1);
+  
+  if(lpCaption != NULL)
+  {
+    LocalFree((HLOCAL)lpCaption);
+  }
+  
+  return Ret;
+}
+

reactos/lib/aclui
aclui.rc 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- aclui.rc	10 Aug 2004 00:09:40 -0000	1.1
+++ aclui.rc	10 Aug 2004 15:47:54 -0000	1.2
@@ -37,4 +37,5 @@
     END
 END
 
+#include "aclui_En.rc"
 

reactos/lib/aclui
internal.h 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- internal.h	10 Aug 2004 00:09:40 -0000	1.1
+++ internal.h	10 Aug 2004 15:47:54 -0000	1.2
@@ -1,6 +1,9 @@
 #ifndef __ACLUI_INTERNAL_H
 #define __ACLUI_INTERNAL_H
 
+ULONG DbgPrint(PCH Format,...);
+#define DPRINT DbgPrint
+
 extern HINSTANCE hDllInstance;
 
 #endif /* __ACLUI_INTERNAL_H */

reactos/lib/aclui
resource.h 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- resource.h	10 Aug 2004 00:09:40 -0000	1.1
+++ resource.h	10 Aug 2004 15:47:54 -0000	1.2
@@ -3,6 +3,8 @@
 
 #define IDI_DEVMGR	100
 
+#define IDS_PSP_TITLE	1001
+
 #endif /* __ACLUI_RESOURCE_H */
 
 /* EOF */

reactos/lib/aclui
stubs.c 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- stubs.c	10 Aug 2004 00:12:31 -0000	1.2
+++ stubs.c	10 Aug 2004 15:47:54 -0000	1.3
@@ -1,4 +1,4 @@
-/* $Id: stubs.c,v 1.2 2004/08/10 00:12:31 weiden Exp $
+/* $Id: stubs.c,v 1.3 2004/08/10 15:47:54 weiden Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS Access Control List Editor
@@ -14,8 +14,6 @@
 #include <aclui.h>
 #include "internal.h"
 
-ULONG DbgPrint(PCH Format,...);
-
 #define UNIMPLEMENTED \
   DbgPrint("ACLUI:  %s at %s:%d is UNIMPLEMENTED!\n",__FUNCTION__,__FILE__,__LINE__)
 
@@ -28,12 +26,4 @@
   return NULL;
 }
 
-BOOL
-WINAPI
-EditSecurity(HWND hwndOwner, LPSECURITYINFO psi)
-{
-  UNIMPLEMENTED;
-  return FALSE;
-}
-
 /* EOF */
CVSspam 0.2.8