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);
typedef
struct
tagPOLICYDAT
{
DWORD
polflags
;
/* flags value passed to SHRestricted */
LP
STR
appstr
;
/* application str such as "Explorer" */
LP
STR
keystr
;
/* name of the actual registry key / policy */
LP
CSTR
appstr
;
/* application str such as "Explorer" */
LP
CSTR
keystr
;
/* name of the actual registry key / policy */
DWORD
cache
;
/* cached value or 0xffffffff for invalid */
}
POLICYDATA
,
*
LPPOLICYDATA
;
...
...
@@ -61,69 +61,69 @@ extern POLICYDATA sh32_policy_table[SHELL_MAX_POLICIES];
/* application strings */
static
char
strExplorer
[]
=
{
"Explorer"
};
static
char
strActiveDesk
[]
=
{
"ActiveDesktop"
};
static
char
strWinOldApp
[]
=
{
"WinOldApp"
};
static
c
onst
c
har
strExplorer
[]
=
{
"Explorer"
};
static
c
onst
c
har
strActiveDesk
[]
=
{
"ActiveDesktop"
};
static
c
onst
c
har
strWinOldApp
[]
=
{
"WinOldApp"
};
/* key strings */
static
char
strNoFileURL
[]
=
{
"NoFileUrl"
};
static
char
strNoFolderOptions
[]
=
{
"NoFolderOptions"
};
static
char
strNoChangeStartMenu
[]
=
{
"NoChangeStartMenu"
};
static
char
strNoWindowsUpdate
[]
=
{
"NoWindowsUpdate"
};
static
char
strNoSetActiveDesktop
[]
=
{
"NoSetActiveDesktop"
};
static
char
strNoForgetSoftwareUpdate
[]
=
{
"NoForgetSoftwareUpdate"
};
static
char
strNoMSAppLogo
[]
=
{
"NoMSAppLogo5ChannelNotify"
};
static
char
strForceCopyACLW
[]
=
{
"ForceCopyACLWithFile"
};
static
char
strNoResolveTrk
[]
=
{
"NoResolveTrack"
};
static
char
strNoResolveSearch
[]
=
{
"NoResolveSearch"
};
static
char
strNoEditComponent
[]
=
{
"NoEditingComponents"
};
static
char
strNoMovingBand
[]
=
{
"NoMovingBands"
};
static
char
strNoCloseDragDrop
[]
=
{
"NoCloseDragDropBands"
};
static
char
strNoCloseComponent
[]
=
{
"NoClosingComponents"
};
static
char
strNoDelComponent
[]
=
{
"NoDeletingComponents"
};
static
char
strNoAddComponent
[]
=
{
"NoAddingComponents"
};
static
char
strNoComponent
[]
=
{
"NoComponents"
};
static
char
strNoChangeWallpaper
[]
=
{
"NoChangingWallpaper"
};
static
char
strNoHTMLWallpaper
[]
=
{
"NoHTMLWallpaper"
};
static
char
strNoCustomWebView
[]
=
{
"NoCustomizeWebView"
};
static
char
strClassicShell
[]
=
{
"ClassicShell"
};
static
char
strClearRecentDocs
[]
=
{
"ClearRecentDocsOnExit"
};
static
char
strNoFavoritesMenu
[]
=
{
"NoFavoritesMenu"
};
static
char
strNoActiveDesktopChanges
[]
=
{
"NoActiveDesktopChanges"
};
static
char
strNoActiveDesktop
[]
=
{
"NoActiveDesktop"
};
static
char
strNoRecentDocMenu
[]
=
{
"NoRecentDocsMenu"
};
static
char
strNoRecentDocHistory
[]
=
{
"NoRecentDocsHistory"
};
static
char
strNoInetIcon
[]
=
{
"NoInternetIcon"
};
static
char
strNoStngsWizard
[]
=
{
"NoSettingsWizards"
};
static
char
strNoLogoff
[]
=
{
"NoLogoff"
};
static
char
strNoNetConDis
[]
=
{
"NoNetConnectDisconnect"
};
static
char
strNoContextMenu
[]
=
{
"NoViewContextMenu"
};
static
char
strNoTryContextMenu
[]
=
{
"NoTrayContextMenu"
};
static
char
strNoWebMenu
[]
=
{
"NoWebMenu"
};
static
char
strLnkResolveIgnoreLnkInfo
[]
=
{
"LinkResolveIgnoreLinkInfo"
};
static
char
strNoCommonGroups
[]
=
{
"NoCommonGroups"
};
static
char
strEnforceShlExtSecurity
[]
=
{
"EnforceShellExtensionSecurity"
};
static
char
strNoRealMode
[]
=
{
"NoRealMode"
};
static
char
strMyDocsOnNet
[]
=
{
"MyDocsOnNet"
};
static
char
strNoStartMenuSubfolder
[]
=
{
"NoStartMenuSubFolders"
};
static
char
strNoAddPrinters
[]
=
{
"NoAddPrinter"
};
static
char
strNoDeletePrinters
[]
=
{
"NoDeletePrinter"
};
static
char
strNoPrintTab
[]
=
{
"NoPrinterTabs"
};
static
char
strRestrictRun
[]
=
{
"RestrictRun"
};
static
char
strNoStartBanner
[]
=
{
"NoStartBanner"
};
static
char
strNoNetworkNeighborhood
[]
=
{
"NoNetHood"
};
static
char
strNoDriveTypeAtRun
[]
=
{
"NoDriveTypeAutoRun"
};
static
char
strNoDrivesAutoRun
[]
=
{
"NoDriveAutoRun"
};
static
char
strNoDrives
[]
=
{
"NoDrives"
};
static
char
strNoFind
[]
=
{
"NoFind"
};
static
char
strNoDesktop
[]
=
{
"NoDesktop"
};
static
char
strNoSetTaskBar
[]
=
{
"NoSetTaskbar"
};
static
char
strNoSetFld
[]
=
{
"NoSetFolders"
};
static
char
strNoFileMenu
[]
=
{
"NoFileMenu"
};
static
char
strNoSavSetng
[]
=
{
"NoSaveSettings"
};
static
char
strNoClose
[]
=
{
"NoClose"
};
static
char
strNoRun
[]
=
{
"NoRun"
};
static
c
onst
c
har
strNoFileURL
[]
=
{
"NoFileUrl"
};
static
c
onst
c
har
strNoFolderOptions
[]
=
{
"NoFolderOptions"
};
static
c
onst
c
har
strNoChangeStartMenu
[]
=
{
"NoChangeStartMenu"
};
static
c
onst
c
har
strNoWindowsUpdate
[]
=
{
"NoWindowsUpdate"
};
static
c
onst
c
har
strNoSetActiveDesktop
[]
=
{
"NoSetActiveDesktop"
};
static
c
onst
c
har
strNoForgetSoftwareUpdate
[]
=
{
"NoForgetSoftwareUpdate"
};
static
c
onst
c
har
strNoMSAppLogo
[]
=
{
"NoMSAppLogo5ChannelNotify"
};
static
c
onst
c
har
strForceCopyACLW
[]
=
{
"ForceCopyACLWithFile"
};
static
c
onst
c
har
strNoResolveTrk
[]
=
{
"NoResolveTrack"
};
static
c
onst
c
har
strNoResolveSearch
[]
=
{
"NoResolveSearch"
};
static
c
onst
c
har
strNoEditComponent
[]
=
{
"NoEditingComponents"
};
static
c
onst
c
har
strNoMovingBand
[]
=
{
"NoMovingBands"
};
static
c
onst
c
har
strNoCloseDragDrop
[]
=
{
"NoCloseDragDropBands"
};
static
c
onst
c
har
strNoCloseComponent
[]
=
{
"NoClosingComponents"
};
static
c
onst
c
har
strNoDelComponent
[]
=
{
"NoDeletingComponents"
};
static
c
onst
c
har
strNoAddComponent
[]
=
{
"NoAddingComponents"
};
static
c
onst
c
har
strNoComponent
[]
=
{
"NoComponents"
};
static
c
onst
c
har
strNoChangeWallpaper
[]
=
{
"NoChangingWallpaper"
};
static
c
onst
c
har
strNoHTMLWallpaper
[]
=
{
"NoHTMLWallpaper"
};
static
c
onst
c
har
strNoCustomWebView
[]
=
{
"NoCustomizeWebView"
};
static
c
onst
c
har
strClassicShell
[]
=
{
"ClassicShell"
};
static
c
onst
c
har
strClearRecentDocs
[]
=
{
"ClearRecentDocsOnExit"
};
static
c
onst
c
har
strNoFavoritesMenu
[]
=
{
"NoFavoritesMenu"
};
static
c
onst
c
har
strNoActiveDesktopChanges
[]
=
{
"NoActiveDesktopChanges"
};
static
c
onst
c
har
strNoActiveDesktop
[]
=
{
"NoActiveDesktop"
};
static
c
onst
c
har
strNoRecentDocMenu
[]
=
{
"NoRecentDocsMenu"
};
static
c
onst
c
har
strNoRecentDocHistory
[]
=
{
"NoRecentDocsHistory"
};
static
c
onst
c
har
strNoInetIcon
[]
=
{
"NoInternetIcon"
};
static
c
onst
c
har
strNoStngsWizard
[]
=
{
"NoSettingsWizards"
};
static
c
onst
c
har
strNoLogoff
[]
=
{
"NoLogoff"
};
static
c
onst
c
har
strNoNetConDis
[]
=
{
"NoNetConnectDisconnect"
};
static
c
onst
c
har
strNoContextMenu
[]
=
{
"NoViewContextMenu"
};
static
c
onst
c
har
strNoTryContextMenu
[]
=
{
"NoTrayContextMenu"
};
static
c
onst
c
har
strNoWebMenu
[]
=
{
"NoWebMenu"
};
static
c
onst
c
har
strLnkResolveIgnoreLnkInfo
[]
=
{
"LinkResolveIgnoreLinkInfo"
};
static
c
onst
c
har
strNoCommonGroups
[]
=
{
"NoCommonGroups"
};
static
c
onst
c
har
strEnforceShlExtSecurity
[]
=
{
"EnforceShellExtensionSecurity"
};
static
c
onst
c
har
strNoRealMode
[]
=
{
"NoRealMode"
};
static
c
onst
c
har
strMyDocsOnNet
[]
=
{
"MyDocsOnNet"
};
static
c
onst
c
har
strNoStartMenuSubfolder
[]
=
{
"NoStartMenuSubFolders"
};
static
c
onst
c
har
strNoAddPrinters
[]
=
{
"NoAddPrinter"
};
static
c
onst
c
har
strNoDeletePrinters
[]
=
{
"NoDeletePrinter"
};
static
c
onst
c
har
strNoPrintTab
[]
=
{
"NoPrinterTabs"
};
static
c
onst
c
har
strRestrictRun
[]
=
{
"RestrictRun"
};
static
c
onst
c
har
strNoStartBanner
[]
=
{
"NoStartBanner"
};
static
c
onst
c
har
strNoNetworkNeighborhood
[]
=
{
"NoNetHood"
};
static
c
onst
c
har
strNoDriveTypeAtRun
[]
=
{
"NoDriveTypeAutoRun"
};
static
c
onst
c
har
strNoDrivesAutoRun
[]
=
{
"NoDriveAutoRun"
};
static
c
onst
c
har
strNoDrives
[]
=
{
"NoDrives"
};
static
c
onst
c
har
strNoFind
[]
=
{
"NoFind"
};
static
c
onst
c
har
strNoDesktop
[]
=
{
"NoDesktop"
};
static
c
onst
c
har
strNoSetTaskBar
[]
=
{
"NoSetTaskbar"
};
static
c
onst
c
har
strNoSetFld
[]
=
{
"NoSetFolders"
};
static
c
onst
c
har
strNoFileMenu
[]
=
{
"NoFileMenu"
};
static
c
onst
c
har
strNoSavSetng
[]
=
{
"NoSaveSettings"
};
static
c
onst
c
har
strNoClose
[]
=
{
"NoClose"
};
static
c
onst
c
har
strNoRun
[]
=
{
"NoRun"
};
/* policy data array */
...
...
@@ -476,17 +476,23 @@ POLICYDATA sh32_policy_table[] =
/*************************************************************************
* SHRestricted [SHELL32.100]
*
* walks through policy table, queries <app> key, <type> value, returns
* queried (DWORD) value, and caches it between called to SHInitRestricted
* to prevent unnecessary registry access.
* Get the value associated with a policy Id.
*
* PARAMS
* pol [I] Policy Id
*
* RETURNS
* The queried value for the policy.
*
* NOTES
* exported by ordinal
* Exported by ordinal.
* This function caches the retrieved values to prevent unnecessary registry access,
* if SHInitRestricted() was previously called.
*
* REFERENCES
:
*
MS System Policy Editor
* 98Lite 2.0 (which uses many of these policy keys) http://www.98lite.net/
*
"The Windows 95 Registry"
, by John Woram, 1996 MIS: Press
* REFERENCES
*
a: MS System Policy Editor.
*
b:
98Lite 2.0 (which uses many of these policy keys) http://www.98lite.net/
*
c: 'The Windows 95 Registry'
, by John Woram, 1996 MIS: Press
*/
DWORD
WINAPI
SHRestricted
(
DWORD
pol
)
{
char
regstr
[
256
];
...
...
@@ -542,28 +548,24 @@ DWORD WINAPI SHRestricted (DWORD pol) {
/*************************************************************************
* SHInitRestricted [SHELL32.244]
*
* Win98+ by-ordinal only routine called by Explorer and MSIE 4 and 5.
* Inits the policy cache used by SHRestricted to avoid excess
* registry access.
* Initialise the policy cache to speed up calls to SHRestricted().
*
* INPUTS
* Two inputs: one is a string or NULL. If non-NULL the pointer
* should point to a string containing the following exact text:
* "Software\Microsoft\Windows\CurrentVersion\Policies".
* The other input is unused.
* PARAMS
* inpRegKey [I] Registry key to scan.
* parm2 [I] Reserved.
*
* NOTES
* If the input is non-NULL and does not point to a string containing
* that exact text the routine will do nothing.
* RETURNS
* Success: -1. The policy cache is initialsed.
* 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
* will init SHRestricted()'s policy cache to all 0xffffffff and
* returns 0xffffffff as well.
* NOTES
* Exported by ordinal. Introduced in Win98.
*
* I haven't yet run into anything calling this with inputs other than
* (NULL, NULL), so I may have the inputs reversed.
* FIXME
* 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
)
{
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