mirror of
https://github.com/reactos/reactos.git
synced 2025-01-02 12:32:47 +00:00
implemented EditSecurity()
svn path=/trunk/; revision=10478
This commit is contained in:
parent
87a27e883c
commit
8fa77f76c9
7 changed files with 99 additions and 14 deletions
|
@ -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 = ../..
|
PATH_TO_TOP = ../..
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ TARGET_CFLAGS = \
|
||||||
|
|
||||||
TARGET_LFLAGS = -nostartfiles -nostdlib
|
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
|
TARGET_GCCLIBS = gcc
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* 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
|
* PROJECT: ReactOS Access Control List Editor
|
||||||
* FILE: lib/aclui/aclui.c
|
* FILE: lib/aclui/aclui.c
|
||||||
|
@ -28,7 +28,9 @@
|
||||||
*/
|
*/
|
||||||
#define INITGUID
|
#define INITGUID
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#include <prsht.h>
|
||||||
#include <aclui.h>
|
#include <aclui.h>
|
||||||
|
#include <rosrtl/resstr.h>
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
|
||||||
|
@ -56,3 +58,79 @@ DllMain(HINSTANCE hinstDLL,
|
||||||
return TRUE;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,4 +37,5 @@ BEGIN
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|
||||||
|
#include "aclui_En.rc"
|
||||||
|
|
||||||
|
|
11
reactos/lib/aclui/aclui_En.rc
Normal file
11
reactos/lib/aclui/aclui_En.rc
Normal file
|
@ -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"
|
||||||
|
}
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#ifndef __ACLUI_INTERNAL_H
|
#ifndef __ACLUI_INTERNAL_H
|
||||||
#define __ACLUI_INTERNAL_H
|
#define __ACLUI_INTERNAL_H
|
||||||
|
|
||||||
|
ULONG DbgPrint(PCH Format,...);
|
||||||
|
#define DPRINT DbgPrint
|
||||||
|
|
||||||
extern HINSTANCE hDllInstance;
|
extern HINSTANCE hDllInstance;
|
||||||
|
|
||||||
#endif /* __ACLUI_INTERNAL_H */
|
#endif /* __ACLUI_INTERNAL_H */
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
|
|
||||||
#define IDI_DEVMGR 100
|
#define IDI_DEVMGR 100
|
||||||
|
|
||||||
|
#define IDS_PSP_TITLE 1001
|
||||||
|
|
||||||
#endif /* __ACLUI_RESOURCE_H */
|
#endif /* __ACLUI_RESOURCE_H */
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -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
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS Access Control List Editor
|
* PROJECT: ReactOS Access Control List Editor
|
||||||
|
@ -14,8 +14,6 @@
|
||||||
#include <aclui.h>
|
#include <aclui.h>
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
|
|
||||||
ULONG DbgPrint(PCH Format,...);
|
|
||||||
|
|
||||||
#define UNIMPLEMENTED \
|
#define UNIMPLEMENTED \
|
||||||
DbgPrint("ACLUI: %s at %s:%d is UNIMPLEMENTED!\n",__FUNCTION__,__FILE__,__LINE__)
|
DbgPrint("ACLUI: %s at %s:%d is UNIMPLEMENTED!\n",__FUNCTION__,__FILE__,__LINE__)
|
||||||
|
|
||||||
|
@ -28,12 +26,4 @@ CreateSecurityPage(LPSECURITYINFO psi)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL
|
|
||||||
WINAPI
|
|
||||||
EditSecurity(HWND hwndOwner, LPSECURITYINFO psi)
|
|
||||||
{
|
|
||||||
UNIMPLEMENTED;
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
Loading…
Reference in a new issue