Implemented CreateSecurityPage() to create an empty property sheet.

svn path=/trunk/; revision=10492
This commit is contained in:
Thomas Bluemel
2004-08-11 01:21:53 +00:00
parent 446f5adc02
commit ca0c109cec
5 changed files with 91 additions and 32 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
# $Id: Makefile,v 1.2 2004/08/10 15:47:54 weiden Exp $
# $Id: Makefile,v 1.3 2004/08/11 01:21:52 weiden Exp $
PATH_TO_TOP = ../..
@@ -32,7 +32,7 @@ TARGET_PCH =
TARGET_CLEAN =
TARGET_OBJECTS = aclui.o stubs.o
TARGET_OBJECTS = aclui.o
DEP_OBJECTS = $(TARGET_OBJECTS)
+76 -1
View File
@@ -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.3 2004/08/10 15:47:54 weiden Exp $
/* $Id: aclui.c,v 1.4 2004/08/11 01:21:53 weiden Exp $
*
* PROJECT: ReactOS Access Control List Editor
* FILE: lib/aclui/aclui.c
@@ -58,6 +58,81 @@ DllMain(HINSTANCE hinstDLL,
return TRUE;
}
UINT CALLBACK
SecurityPageCallback(HWND hwnd, UINT uMsg, LPPROPSHEETPAGE ppsp)
{
switch(uMsg)
{
case PSPCB_CREATE:
return TRUE;
case PSPCB_RELEASE:
return FALSE;
}
return FALSE;
}
INT_PTR CALLBACK
SecurityPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
return 0;
}
/*
* CreateSecurityPage EXPORTED
*
* @implemented
*/
HPROPSHEETPAGE
WINAPI
CreateSecurityPage(LPSECURITYINFO psi)
{
PROPSHEETPAGE psp;
SI_OBJECT_INFO ObjectInfo;
HRESULT hRet;
if(psi == NULL)
{
SetLastError(ERROR_INVALID_PARAMETER);
DPRINT("No ISecurityInformation class passed!\n");
return NULL;
}
/* get the object information from the client interface */
hRet = psi->lpVtbl->GetObjectInformation(psi, &ObjectInfo);
if(FAILED(hRet))
{
SetLastError(hRet);
DPRINT("CreateSecurityPage() failed!\n");
return NULL;
}
psp.dwSize = sizeof(PROPSHEETPAGE);
psp.dwFlags = PSP_DEFAULT | PSP_USECALLBACK;
psp.hInstance = hDllInstance;
psp.pszTemplate = MAKEINTRESOURCE(IDD_SECPAGE);
psp.pfnDlgProc = SecurityPageProc;
psp.lParam = (LPARAM)psi;
psp.pfnCallback = SecurityPageCallback;
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 */
psp.pszTitle = ObjectInfo.pszPageTitle;
psp.dwFlags |= PSP_USETITLE;
}
return CreatePropertySheetPage(&psp);
}
/*
* EditSecurity EXPORTED
*
+9
View File
@@ -4,6 +4,15 @@
LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
IDD_SECPAGE DIALOGEX 0, 0, 227, 215
STYLE WS_CHILD | WS_VISIBLE | WS_CAPTION
CAPTION "Security"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
LTEXT "&Group or user names:", -1, 7, 7, 105, 8
CONTROL "", IDC_GRPUSRLIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP, 7, 17, 213, 66, WS_EX_NOPARENTNOTIFY | WS_EX_CLIENTEDGE
END
STRINGTABLE DISCARDABLE
{
IDS_PSP_TITLE "Permissions for %1"
+4
View File
@@ -1,6 +1,10 @@
#ifndef __ACLUI_RESOURCE_H
#define __ACLUI_RESOURCE_H
#define IDD_SECPAGE 101
#define IDC_GRPUSRLIST 1001
#define IDI_DEVMGR 100
#define IDS_PSP_TITLE 1001
-29
View File
@@ -1,29 +0,0 @@
/* $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
* FILE: lib/aclui/stubs.c
* PURPOSE: aclui.dll stubs
* PROGRAMMER: Thomas Weidenmueller <[email protected]>
* NOTES: If you implement a function, remove it from this file
*
* UPDATE HISTORY:
* 08/10/2004 Created
*/
#include <windows.h>
#include <aclui.h>
#include "internal.h"
#define UNIMPLEMENTED \
DbgPrint("ACLUI: %s at %s:%d is UNIMPLEMENTED!\n",__FUNCTION__,__FILE__,__LINE__)
HPROPSHEETPAGE
WINAPI
CreateSecurityPage(LPSECURITYINFO psi)
{
UNIMPLEMENTED;
return NULL;
}
/* EOF */