Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
147e2fa4
Commit
147e2fa4
authored
Mar 12, 2003
by
Jon Griffiths
Committed by
Alexandre Julliard
Mar 12, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Constify the strings in the policy cache.
Documentation updates.
parent
657ca8a8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
89 additions
and
87 deletions
+89
-87
shpolicy.c
dlls/shell32/shpolicy.c
+89
-87
No files found.
dlls/shell32/shpolicy.c
View file @
147e2fa4
...
@@ -50,8 +50,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell);
...
@@ -50,8 +50,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell);
typedef
struct
tagPOLICYDAT
typedef
struct
tagPOLICYDAT
{
{
DWORD
polflags
;
/* flags value passed to SHRestricted */
DWORD
polflags
;
/* flags value passed to SHRestricted */
LP
STR
appstr
;
/* application str such as "Explorer" */
LP
CSTR
appstr
;
/* application str such as "Explorer" */
LP
STR
keystr
;
/* name of the actual registry key / policy */
LP
CSTR
keystr
;
/* name of the actual registry key / policy */
DWORD
cache
;
/* cached value or 0xffffffff for invalid */
DWORD
cache
;
/* cached value or 0xffffffff for invalid */
}
POLICYDATA
,
*
LPPOLICYDATA
;
}
POLICYDATA
,
*
LPPOLICYDATA
;
...
@@ -61,69 +61,69 @@ extern POLICYDATA sh32_policy_table[SHELL_MAX_POLICIES];
...
@@ -61,69 +61,69 @@ extern POLICYDATA sh32_policy_table[SHELL_MAX_POLICIES];
/* application strings */
/* application strings */
static
char
strExplorer
[]
=
{
"Explorer"
};
static
c
onst
c
har
strExplorer
[]
=
{
"Explorer"
};
static
char
strActiveDesk
[]
=
{
"ActiveDesktop"
};
static
c
onst
c
har
strActiveDesk
[]
=
{
"ActiveDesktop"
};
static
char
strWinOldApp
[]
=
{
"WinOldApp"
};
static
c
onst
c
har
strWinOldApp
[]
=
{
"WinOldApp"
};
/* key strings */
/* key strings */
static
char
strNoFileURL
[]
=
{
"NoFileUrl"
};
static
c
onst
c
har
strNoFileURL
[]
=
{
"NoFileUrl"
};
static
char
strNoFolderOptions
[]
=
{
"NoFolderOptions"
};
static
c
onst
c
har
strNoFolderOptions
[]
=
{
"NoFolderOptions"
};
static
char
strNoChangeStartMenu
[]
=
{
"NoChangeStartMenu"
};
static
c
onst
c
har
strNoChangeStartMenu
[]
=
{
"NoChangeStartMenu"
};
static
char
strNoWindowsUpdate
[]
=
{
"NoWindowsUpdate"
};
static
c
onst
c
har
strNoWindowsUpdate
[]
=
{
"NoWindowsUpdate"
};
static
char
strNoSetActiveDesktop
[]
=
{
"NoSetActiveDesktop"
};
static
c
onst
c
har
strNoSetActiveDesktop
[]
=
{
"NoSetActiveDesktop"
};
static
char
strNoForgetSoftwareUpdate
[]
=
{
"NoForgetSoftwareUpdate"
};
static
c
onst
c
har
strNoForgetSoftwareUpdate
[]
=
{
"NoForgetSoftwareUpdate"
};
static
char
strNoMSAppLogo
[]
=
{
"NoMSAppLogo5ChannelNotify"
};
static
c
onst
c
har
strNoMSAppLogo
[]
=
{
"NoMSAppLogo5ChannelNotify"
};
static
char
strForceCopyACLW
[]
=
{
"ForceCopyACLWithFile"
};
static
c
onst
c
har
strForceCopyACLW
[]
=
{
"ForceCopyACLWithFile"
};
static
char
strNoResolveTrk
[]
=
{
"NoResolveTrack"
};
static
c
onst
c
har
strNoResolveTrk
[]
=
{
"NoResolveTrack"
};
static
char
strNoResolveSearch
[]
=
{
"NoResolveSearch"
};
static
c
onst
c
har
strNoResolveSearch
[]
=
{
"NoResolveSearch"
};
static
char
strNoEditComponent
[]
=
{
"NoEditingComponents"
};
static
c
onst
c
har
strNoEditComponent
[]
=
{
"NoEditingComponents"
};
static
char
strNoMovingBand
[]
=
{
"NoMovingBands"
};
static
c
onst
c
har
strNoMovingBand
[]
=
{
"NoMovingBands"
};
static
char
strNoCloseDragDrop
[]
=
{
"NoCloseDragDropBands"
};
static
c
onst
c
har
strNoCloseDragDrop
[]
=
{
"NoCloseDragDropBands"
};
static
char
strNoCloseComponent
[]
=
{
"NoClosingComponents"
};
static
c
onst
c
har
strNoCloseComponent
[]
=
{
"NoClosingComponents"
};
static
char
strNoDelComponent
[]
=
{
"NoDeletingComponents"
};
static
c
onst
c
har
strNoDelComponent
[]
=
{
"NoDeletingComponents"
};
static
char
strNoAddComponent
[]
=
{
"NoAddingComponents"
};
static
c
onst
c
har
strNoAddComponent
[]
=
{
"NoAddingComponents"
};
static
char
strNoComponent
[]
=
{
"NoComponents"
};
static
c
onst
c
har
strNoComponent
[]
=
{
"NoComponents"
};
static
char
strNoChangeWallpaper
[]
=
{
"NoChangingWallpaper"
};
static
c
onst
c
har
strNoChangeWallpaper
[]
=
{
"NoChangingWallpaper"
};
static
char
strNoHTMLWallpaper
[]
=
{
"NoHTMLWallpaper"
};
static
c
onst
c
har
strNoHTMLWallpaper
[]
=
{
"NoHTMLWallpaper"
};
static
char
strNoCustomWebView
[]
=
{
"NoCustomizeWebView"
};
static
c
onst
c
har
strNoCustomWebView
[]
=
{
"NoCustomizeWebView"
};
static
char
strClassicShell
[]
=
{
"ClassicShell"
};
static
c
onst
c
har
strClassicShell
[]
=
{
"ClassicShell"
};
static
char
strClearRecentDocs
[]
=
{
"ClearRecentDocsOnExit"
};
static
c
onst
c
har
strClearRecentDocs
[]
=
{
"ClearRecentDocsOnExit"
};
static
char
strNoFavoritesMenu
[]
=
{
"NoFavoritesMenu"
};
static
c
onst
c
har
strNoFavoritesMenu
[]
=
{
"NoFavoritesMenu"
};
static
char
strNoActiveDesktopChanges
[]
=
{
"NoActiveDesktopChanges"
};
static
c
onst
c
har
strNoActiveDesktopChanges
[]
=
{
"NoActiveDesktopChanges"
};
static
char
strNoActiveDesktop
[]
=
{
"NoActiveDesktop"
};
static
c
onst
c
har
strNoActiveDesktop
[]
=
{
"NoActiveDesktop"
};
static
char
strNoRecentDocMenu
[]
=
{
"NoRecentDocsMenu"
};
static
c
onst
c
har
strNoRecentDocMenu
[]
=
{
"NoRecentDocsMenu"
};
static
char
strNoRecentDocHistory
[]
=
{
"NoRecentDocsHistory"
};
static
c
onst
c
har
strNoRecentDocHistory
[]
=
{
"NoRecentDocsHistory"
};
static
char
strNoInetIcon
[]
=
{
"NoInternetIcon"
};
static
c
onst
c
har
strNoInetIcon
[]
=
{
"NoInternetIcon"
};
static
char
strNoStngsWizard
[]
=
{
"NoSettingsWizards"
};
static
c
onst
c
har
strNoStngsWizard
[]
=
{
"NoSettingsWizards"
};
static
char
strNoLogoff
[]
=
{
"NoLogoff"
};
static
c
onst
c
har
strNoLogoff
[]
=
{
"NoLogoff"
};
static
char
strNoNetConDis
[]
=
{
"NoNetConnectDisconnect"
};
static
c
onst
c
har
strNoNetConDis
[]
=
{
"NoNetConnectDisconnect"
};
static
char
strNoContextMenu
[]
=
{
"NoViewContextMenu"
};
static
c
onst
c
har
strNoContextMenu
[]
=
{
"NoViewContextMenu"
};
static
char
strNoTryContextMenu
[]
=
{
"NoTrayContextMenu"
};
static
c
onst
c
har
strNoTryContextMenu
[]
=
{
"NoTrayContextMenu"
};
static
char
strNoWebMenu
[]
=
{
"NoWebMenu"
};
static
c
onst
c
har
strNoWebMenu
[]
=
{
"NoWebMenu"
};
static
char
strLnkResolveIgnoreLnkInfo
[]
=
{
"LinkResolveIgnoreLinkInfo"
};
static
c
onst
c
har
strLnkResolveIgnoreLnkInfo
[]
=
{
"LinkResolveIgnoreLinkInfo"
};
static
char
strNoCommonGroups
[]
=
{
"NoCommonGroups"
};
static
c
onst
c
har
strNoCommonGroups
[]
=
{
"NoCommonGroups"
};
static
char
strEnforceShlExtSecurity
[]
=
{
"EnforceShellExtensionSecurity"
};
static
c
onst
c
har
strEnforceShlExtSecurity
[]
=
{
"EnforceShellExtensionSecurity"
};
static
char
strNoRealMode
[]
=
{
"NoRealMode"
};
static
c
onst
c
har
strNoRealMode
[]
=
{
"NoRealMode"
};
static
char
strMyDocsOnNet
[]
=
{
"MyDocsOnNet"
};
static
c
onst
c
har
strMyDocsOnNet
[]
=
{
"MyDocsOnNet"
};
static
char
strNoStartMenuSubfolder
[]
=
{
"NoStartMenuSubFolders"
};
static
c
onst
c
har
strNoStartMenuSubfolder
[]
=
{
"NoStartMenuSubFolders"
};
static
char
strNoAddPrinters
[]
=
{
"NoAddPrinter"
};
static
c
onst
c
har
strNoAddPrinters
[]
=
{
"NoAddPrinter"
};
static
char
strNoDeletePrinters
[]
=
{
"NoDeletePrinter"
};
static
c
onst
c
har
strNoDeletePrinters
[]
=
{
"NoDeletePrinter"
};
static
char
strNoPrintTab
[]
=
{
"NoPrinterTabs"
};
static
c
onst
c
har
strNoPrintTab
[]
=
{
"NoPrinterTabs"
};
static
char
strRestrictRun
[]
=
{
"RestrictRun"
};
static
c
onst
c
har
strRestrictRun
[]
=
{
"RestrictRun"
};
static
char
strNoStartBanner
[]
=
{
"NoStartBanner"
};
static
c
onst
c
har
strNoStartBanner
[]
=
{
"NoStartBanner"
};
static
char
strNoNetworkNeighborhood
[]
=
{
"NoNetHood"
};
static
c
onst
c
har
strNoNetworkNeighborhood
[]
=
{
"NoNetHood"
};
static
char
strNoDriveTypeAtRun
[]
=
{
"NoDriveTypeAutoRun"
};
static
c
onst
c
har
strNoDriveTypeAtRun
[]
=
{
"NoDriveTypeAutoRun"
};
static
char
strNoDrivesAutoRun
[]
=
{
"NoDriveAutoRun"
};
static
c
onst
c
har
strNoDrivesAutoRun
[]
=
{
"NoDriveAutoRun"
};
static
char
strNoDrives
[]
=
{
"NoDrives"
};
static
c
onst
c
har
strNoDrives
[]
=
{
"NoDrives"
};
static
char
strNoFind
[]
=
{
"NoFind"
};
static
c
onst
c
har
strNoFind
[]
=
{
"NoFind"
};
static
char
strNoDesktop
[]
=
{
"NoDesktop"
};
static
c
onst
c
har
strNoDesktop
[]
=
{
"NoDesktop"
};
static
char
strNoSetTaskBar
[]
=
{
"NoSetTaskbar"
};
static
c
onst
c
har
strNoSetTaskBar
[]
=
{
"NoSetTaskbar"
};
static
char
strNoSetFld
[]
=
{
"NoSetFolders"
};
static
c
onst
c
har
strNoSetFld
[]
=
{
"NoSetFolders"
};
static
char
strNoFileMenu
[]
=
{
"NoFileMenu"
};
static
c
onst
c
har
strNoFileMenu
[]
=
{
"NoFileMenu"
};
static
char
strNoSavSetng
[]
=
{
"NoSaveSettings"
};
static
c
onst
c
har
strNoSavSetng
[]
=
{
"NoSaveSettings"
};
static
char
strNoClose
[]
=
{
"NoClose"
};
static
c
onst
c
har
strNoClose
[]
=
{
"NoClose"
};
static
char
strNoRun
[]
=
{
"NoRun"
};
static
c
onst
c
har
strNoRun
[]
=
{
"NoRun"
};
/* policy data array */
/* policy data array */
...
@@ -476,17 +476,23 @@ POLICYDATA sh32_policy_table[] =
...
@@ -476,17 +476,23 @@ POLICYDATA sh32_policy_table[] =
/*************************************************************************
/*************************************************************************
* SHRestricted [SHELL32.100]
* SHRestricted [SHELL32.100]
*
*
* walks through policy table, queries <app> key, <type> value, returns
* Get the value associated with a policy Id.
* queried (DWORD) value, and caches it between called to SHInitRestricted
*
* to prevent unnecessary registry access.
* PARAMS
* pol [I] Policy Id
*
* RETURNS
* The queried value for the policy.
*
*
* NOTES
* NOTES
* exported by ordinal
* Exported by ordinal.
* This function caches the retrieved values to prevent unnecessary registry access,
* if SHInitRestricted() was previously called.
*
*
* REFERENCES
:
* REFERENCES
*
MS System Policy Editor
*
a: MS System Policy Editor.
* 98Lite 2.0 (which uses many of these policy keys) http://www.98lite.net/
*
b:
98Lite 2.0 (which uses many of these policy keys) http://www.98lite.net/
*
"The Windows 95 Registry"
, by John Woram, 1996 MIS: Press
*
c: 'The Windows 95 Registry'
, by John Woram, 1996 MIS: Press
*/
*/
DWORD
WINAPI
SHRestricted
(
DWORD
pol
)
{
DWORD
WINAPI
SHRestricted
(
DWORD
pol
)
{
char
regstr
[
256
];
char
regstr
[
256
];
...
@@ -542,28 +548,24 @@ DWORD WINAPI SHRestricted (DWORD pol) {
...
@@ -542,28 +548,24 @@ DWORD WINAPI SHRestricted (DWORD pol) {
/*************************************************************************
/*************************************************************************
* SHInitRestricted [SHELL32.244]
* SHInitRestricted [SHELL32.244]
*
*
* Win98+ by-ordinal only routine called by Explorer and MSIE 4 and 5.
* Initialise the policy cache to speed up calls to SHRestricted().
* Inits the policy cache used by SHRestricted to avoid excess
* registry access.
*
*
* INPUTS
* PARAMS
* Two inputs: one is a string or NULL. If non-NULL the pointer
* inpRegKey [I] Registry key to scan.
* should point to a string containing the following exact text:
* parm2 [I] Reserved.
* "Software\Microsoft\Windows\CurrentVersion\Policies".
* The other input is unused.
*
*
* NOTES
* RETURNS
* If the input is non-NULL and does not point to a string containing
* Success: -1. The policy cache is initialsed.
* that exact text the routine will do nothing.
* Failure: 0, if inpRegKey is any value other than NULL or
* "Software\Microsoft\Windows\CurrentVersion\Policies".
*
*
* If the text does match or the pointer is NULL, then the routine
* NOTES
* will init SHRestricted()'s policy cache to all 0xffffffff and
* Exported by ordinal. Introduced in Win98.
* returns 0xffffffff as well.
*
*
* I haven't yet run into anything calling this with inputs other than
* FIXME
* (NULL, NULL), so I may have the inputs reversed.
* I haven't yet run into anything calling this with inputs other than
* (NULL, NULL), so I may have the parameters reversed.
*/
*/
BOOL
WINAPI
SHInitRestricted
(
LPSTR
inpRegKey
,
LPSTR
parm2
)
BOOL
WINAPI
SHInitRestricted
(
LPSTR
inpRegKey
,
LPSTR
parm2
)
{
{
int
i
;
int
i
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment