mapi32: Remove DECLSPEC_HIDDEN usage.
[wine.git] / dlls / shell32 / shpolicy.c
blob21bb49c80cf94feb09191cdf6bec2b639ebb8b53
1 /*
2 * shpolicy.c - Data for shell/system policies.
4 * Copyright 1999 Ian Schmidt <ischmidt@cfl.rr.com>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 * NOTES:
22 * Some of these policies can be tweaked via the System Policy
23 * Editor which came with the Win95 Migration Guide, although
24 * there doesn't appear to be an updated Win98 version that
25 * would handle the many new policies introduced since then.
26 * You could easily write one with the information in
27 * this file...
29 * Up to date as of SHELL32 v5.00 (W2K)
32 #include <stdarg.h>
33 #include <stdlib.h>
34 #include <string.h>
36 #include "windef.h"
37 #include "winbase.h"
38 #include "winerror.h"
39 #include "winreg.h"
41 #include "shell32_main.h"
42 #include "shlobj.h"
44 #include "wine/debug.h"
46 WINE_DEFAULT_DEBUG_CHANNEL(shell);
48 #define SHELL_NO_POLICY 0xffffffff
50 typedef struct tagPOLICYDAT
52 DWORD policy; /* policy value passed to SHRestricted */
53 LPCSTR appstr; /* application str such as "Explorer" */
54 LPCSTR keystr; /* name of the actual registry key / policy */
55 DWORD cache; /* cached value or 0xffffffff for invalid */
56 } POLICYDATA, *LPPOLICYDATA;
58 /* application strings */
60 static const char strExplorer[] = {"Explorer"};
61 static const char strActiveDesk[] = {"ActiveDesktop"};
62 static const char strWinOldApp[] = {"WinOldApp"};
63 static const char strAddRemoveProgs[] = {"AddRemoveProgs"};
65 /* key strings */
67 static const char strNoFileURL[] = {"NoFileUrl"};
68 static const char strNoFolderOptions[] = {"NoFolderOptions"};
69 static const char strNoChangeStartMenu[] = {"NoChangeStartMenu"};
70 static const char strNoWindowsUpdate[] = {"NoWindowsUpdate"};
71 static const char strNoSetActiveDesktop[] = {"NoSetActiveDesktop"};
72 static const char strNoForgetSoftwareUpdate[] = {"NoForgetSoftwareUpdate"};
73 static const char strNoMSAppLogo[] = {"NoMSAppLogo5ChannelNotify"};
74 static const char strForceCopyACLW[] = {"ForceCopyACLWithFile"};
75 static const char strNoResolveTrk[] = {"NoResolveTrack"};
76 static const char strNoResolveSearch[] = {"NoResolveSearch"};
77 static const char strNoEditComponent[] = {"NoEditingComponents"};
78 static const char strNoMovingBand[] = {"NoMovingBands"};
79 static const char strNoCloseDragDrop[] = {"NoCloseDragDropBands"};
80 static const char strNoCloseComponent[] = {"NoClosingComponents"};
81 static const char strNoDelComponent[] = {"NoDeletingComponents"};
82 static const char strNoAddComponent[] = {"NoAddingComponents"};
83 static const char strNoComponent[] = {"NoComponents"};
84 static const char strNoChangeWallpaper[] = {"NoChangingWallpaper"};
85 static const char strNoHTMLWallpaper[] = {"NoHTMLWallpaper"};
86 static const char strNoCustomWebView[] = {"NoCustomizeWebView"};
87 static const char strClassicShell[] = {"ClassicShell"};
88 static const char strClearRecentDocs[] = {"ClearRecentDocsOnExit"};
89 static const char strNoFavoritesMenu[] = {"NoFavoritesMenu"};
90 static const char strNoActiveDesktopChanges[] = {"NoActiveDesktopChanges"};
91 static const char strNoActiveDesktop[] = {"NoActiveDesktop"};
92 static const char strNoRecentDocMenu[] = {"NoRecentDocsMenu"};
93 static const char strNoRecentDocHistory[] = {"NoRecentDocsHistory"};
94 static const char strNoInetIcon[] = {"NoInternetIcon"};
95 static const char strNoSettingsWizard[] = {"NoSettingsWizards"};
96 static const char strNoLogoff[] = {"NoLogoff"};
97 static const char strNoNetConDis[] = {"NoNetConnectDisconnect"};
98 static const char strNoViewContextMenu[] = {"NoViewContextMenu"};
99 static const char strNoTrayContextMenu[] = {"NoTrayContextMenu"};
100 static const char strNoWebMenu[] = {"NoWebMenu"};
101 static const char strLnkResolveIgnoreLnkInfo[] = {"LinkResolveIgnoreLinkInfo"};
102 static const char strNoCommonGroups[] = {"NoCommonGroups"};
103 static const char strEnforceShlExtSecurity[] = {"EnforceShellExtensionSecurity"};
104 static const char strNoRealMode[] = {"NoRealMode"};
105 static const char strMyDocsOnNet[] = {"MyDocsOnNet"};
106 static const char strNoStartMenuSubfolder[] = {"NoStartMenuSubFolders"};
107 static const char strNoAddPrinters[] = {"NoAddPrinter"};
108 static const char strNoDeletePrinters[] = {"NoDeletePrinter"};
109 static const char strNoPrintTab[] = {"NoPrinterTabs"};
110 static const char strRestrictRun[] = {"RestrictRun"};
111 static const char strNoStartBanner[] = {"NoStartBanner"};
112 static const char strNoNetworkNeighborhood[] = {"NoNetHood"};
113 static const char strNoDriveTypeAtRun[] = {"NoDriveTypeAutoRun"};
114 static const char strNoDrivesAutoRun[] = {"NoDriveAutoRun"};
115 static const char strSeparateProcess[] = {"SeparateProcess"};
116 static const char strNoDrives[] = {"NoDrives"};
117 static const char strNoFind[] = {"NoFind"};
118 static const char strNoDesktop[] = {"NoDesktop"};
119 static const char strNoSetTaskBar[] = {"NoSetTaskbar"};
120 static const char strNoSetFld[] = {"NoSetFolders"};
121 static const char strNoFileMenu[] = {"NoFileMenu"};
122 static const char strNoSaveSetting[] = {"NoSaveSettings"};
123 static const char strNoClose[] = {"NoClose"};
124 static const char strNoRun[] = {"NoRun"};
126 /* policy data array */
127 static POLICYDATA sh32_policy_table[] =
130 REST_NORUN,
131 strExplorer,
132 strNoRun,
133 SHELL_NO_POLICY
136 REST_NOCLOSE,
137 strExplorer,
138 strNoClose,
139 SHELL_NO_POLICY
142 REST_NOSAVESET,
143 strExplorer,
144 strNoSaveSetting,
145 SHELL_NO_POLICY
148 REST_NOFILEMENU,
149 strExplorer,
150 strNoFileMenu,
151 SHELL_NO_POLICY
154 REST_NOSETFOLDERS,
155 strExplorer,
156 strNoSetFld,
157 SHELL_NO_POLICY
160 REST_NOSETTASKBAR,
161 strExplorer,
162 strNoSetTaskBar,
163 SHELL_NO_POLICY
166 REST_NODESKTOP,
167 strExplorer,
168 strNoDesktop,
169 SHELL_NO_POLICY
172 REST_NOFIND,
173 strExplorer,
174 strNoFind,
175 SHELL_NO_POLICY
178 REST_NODRIVES,
179 strExplorer,
180 strNoDrives,
181 SHELL_NO_POLICY
184 REST_NODRIVEAUTORUN,
185 strExplorer,
186 strNoDrivesAutoRun,
187 SHELL_NO_POLICY
190 REST_NODRIVETYPEAUTORUN,
191 strExplorer,
192 strNoDriveTypeAtRun,
193 SHELL_NO_POLICY
196 REST_NONETHOOD,
197 strExplorer,
198 strNoNetworkNeighborhood,
199 SHELL_NO_POLICY
202 REST_STARTBANNER,
203 strExplorer,
204 strNoStartBanner,
205 SHELL_NO_POLICY
208 REST_RESTRICTRUN,
209 strExplorer,
210 strRestrictRun,
211 SHELL_NO_POLICY
214 REST_NOPRINTERTABS,
215 strExplorer,
216 strNoPrintTab,
217 SHELL_NO_POLICY
220 REST_NOPRINTERDELETE,
221 strExplorer,
222 strNoDeletePrinters,
223 SHELL_NO_POLICY
226 REST_NOPRINTERADD,
227 strExplorer,
228 strNoAddPrinters,
229 SHELL_NO_POLICY
232 REST_NOSTARTMENUSUBFOLDERS,
233 strExplorer,
234 strNoStartMenuSubfolder,
235 SHELL_NO_POLICY
238 REST_MYDOCSONNET,
239 strExplorer,
240 strMyDocsOnNet,
241 SHELL_NO_POLICY
244 REST_NOEXITTODOS,
245 strWinOldApp,
246 strNoRealMode,
247 SHELL_NO_POLICY
250 REST_ENFORCESHELLEXTSECURITY,
251 strExplorer,
252 strEnforceShlExtSecurity,
253 SHELL_NO_POLICY
256 REST_LINKRESOLVEIGNORELINKINFO,
257 strExplorer,
258 strLnkResolveIgnoreLnkInfo,
259 SHELL_NO_POLICY
262 REST_NOCOMMONGROUPS,
263 strExplorer,
264 strNoCommonGroups,
265 SHELL_NO_POLICY
268 REST_SEPARATEDESKTOPPROCESS,
269 strExplorer,
270 strSeparateProcess,
271 SHELL_NO_POLICY
274 REST_NOWEB,
275 strExplorer,
276 strNoWebMenu,
277 SHELL_NO_POLICY
280 REST_NOTRAYCONTEXTMENU,
281 strExplorer,
282 strNoTrayContextMenu,
283 SHELL_NO_POLICY
286 REST_NOVIEWCONTEXTMENU,
287 strExplorer,
288 strNoViewContextMenu,
289 SHELL_NO_POLICY
292 REST_NONETCONNECTDISCONNECT,
293 strExplorer,
294 strNoNetConDis,
295 SHELL_NO_POLICY
298 REST_STARTMENULOGOFF,
299 strExplorer,
300 strNoLogoff,
301 SHELL_NO_POLICY
304 REST_NOSETTINGSASSIST,
305 strExplorer,
306 strNoSettingsWizard,
307 SHELL_NO_POLICY
310 REST_NOINTERNETICON,
311 strExplorer,
312 strNoInetIcon,
313 SHELL_NO_POLICY
316 REST_NORECENTDOCSHISTORY,
317 strExplorer,
318 strNoRecentDocHistory,
319 SHELL_NO_POLICY
322 REST_NORECENTDOCSMENU,
323 strExplorer,
324 strNoRecentDocMenu,
325 SHELL_NO_POLICY
328 REST_NOACTIVEDESKTOP,
329 strExplorer,
330 strNoActiveDesktop,
331 SHELL_NO_POLICY
334 REST_NOACTIVEDESKTOPCHANGES,
335 strExplorer,
336 strNoActiveDesktopChanges,
337 SHELL_NO_POLICY
340 REST_NOFAVORITESMENU,
341 strExplorer,
342 strNoFavoritesMenu,
343 SHELL_NO_POLICY
346 REST_CLEARRECENTDOCSONEXIT,
347 strExplorer,
348 strClearRecentDocs,
349 SHELL_NO_POLICY
352 REST_CLASSICSHELL,
353 strExplorer,
354 strClassicShell,
355 SHELL_NO_POLICY
358 REST_NOCUSTOMIZEWEBVIEW,
359 strExplorer,
360 strNoCustomWebView,
361 SHELL_NO_POLICY
364 REST_NOHTMLWALLPAPER,
365 strActiveDesk,
366 strNoHTMLWallpaper,
367 SHELL_NO_POLICY
370 REST_NOCHANGINGWALLPAPER,
371 strActiveDesk,
372 strNoChangeWallpaper,
373 SHELL_NO_POLICY
376 REST_NODESKCOMP,
377 strActiveDesk,
378 strNoComponent,
379 SHELL_NO_POLICY
382 REST_NOADDDESKCOMP,
383 strActiveDesk,
384 strNoAddComponent,
385 SHELL_NO_POLICY
388 REST_NODELDESKCOMP,
389 strActiveDesk,
390 strNoDelComponent,
391 SHELL_NO_POLICY
394 REST_NOCLOSEDESKCOMP,
395 strActiveDesk,
396 strNoCloseComponent,
397 SHELL_NO_POLICY
400 REST_NOCLOSE_DRAGDROPBAND,
401 strActiveDesk,
402 strNoCloseDragDrop,
403 SHELL_NO_POLICY
406 REST_NOMOVINGBAND,
407 strActiveDesk,
408 strNoMovingBand,
409 SHELL_NO_POLICY
412 REST_NOEDITDESKCOMP,
413 strActiveDesk,
414 strNoEditComponent,
415 SHELL_NO_POLICY
418 REST_NORESOLVESEARCH,
419 strExplorer,
420 strNoResolveSearch,
421 SHELL_NO_POLICY
424 REST_NORESOLVETRACK,
425 strExplorer,
426 strNoResolveTrk,
427 SHELL_NO_POLICY
430 REST_FORCECOPYACLWITHFILE,
431 strExplorer,
432 strForceCopyACLW,
433 SHELL_NO_POLICY
436 REST_NOLOGO3CHANNELNOTIFY,
437 strExplorer,
438 strNoMSAppLogo,
439 SHELL_NO_POLICY
442 REST_NOFORGETSOFTWAREUPDATE,
443 strExplorer,
444 strNoForgetSoftwareUpdate,
445 SHELL_NO_POLICY
448 REST_NOSETACTIVEDESKTOP,
449 strExplorer,
450 strNoSetActiveDesktop,
451 SHELL_NO_POLICY
454 REST_NOUPDATEWINDOWS,
455 strExplorer,
456 strNoWindowsUpdate,
457 SHELL_NO_POLICY
460 REST_NOCHANGESTARMENU,
461 strExplorer,
462 strNoChangeStartMenu,
463 SHELL_NO_POLICY
466 REST_NOFOLDEROPTIONS,
467 strExplorer,
468 strNoFolderOptions,
469 SHELL_NO_POLICY
472 REST_HASFINDCOMPUTERS,
473 strExplorer,
474 "FindComputers",
475 SHELL_NO_POLICY
478 REST_INTELLIMENUS,
479 strExplorer,
480 "IntelliMenus",
481 SHELL_NO_POLICY
484 REST_RUNDLGMEMCHECKBOX,
485 strExplorer,
486 "MemCheckBoxInRunDlg",
487 SHELL_NO_POLICY
490 REST_ARP_ShowPostSetup,
491 strAddRemoveProgs,
492 "ShowPostSetup",
493 SHELL_NO_POLICY
496 REST_NOCSC,
497 strExplorer,
498 "NoSyncAll",
499 SHELL_NO_POLICY
502 REST_NOCONTROLPANEL,
503 strExplorer,
504 "NoControlPanel",
505 SHELL_NO_POLICY
508 REST_ENUMWORKGROUP,
509 strExplorer,
510 "EnumWorkgroup",
511 SHELL_NO_POLICY
514 REST_ARP_NOARP,
515 strAddRemoveProgs,
516 "NoAddRemovePrograms",
517 SHELL_NO_POLICY
520 REST_ARP_NOREMOVEPAGE,
521 strAddRemoveProgs,
522 "NoRemovePage",
523 SHELL_NO_POLICY
526 REST_ARP_NOADDPAGE,
527 strAddRemoveProgs,
528 "NoAddPage",
529 SHELL_NO_POLICY
532 REST_ARP_NOWINSETUPPAGE,
533 strAddRemoveProgs,
534 "NoWindowsSetupPage",
535 SHELL_NO_POLICY
538 REST_GREYMSIADS,
539 strExplorer,
541 SHELL_NO_POLICY
544 REST_NOCHANGEMAPPEDDRIVELABEL,
545 strExplorer,
546 "NoChangeMappedDriveLabel",
547 SHELL_NO_POLICY
550 REST_NOCHANGEMAPPEDDRIVECOMMENT,
551 strExplorer,
552 "NoChangeMappedDriveComment",
553 SHELL_NO_POLICY
556 REST_MaxRecentDocs,
557 strExplorer,
558 "MaxRecentDocs",
559 SHELL_NO_POLICY
562 REST_NONETWORKCONNECTIONS,
563 strExplorer,
564 "NoNetworkConnections",
565 SHELL_NO_POLICY
568 REST_FORCESTARTMENULOGOFF,
569 strExplorer,
570 "ForceStartMenuLogoff",
571 SHELL_NO_POLICY
574 REST_NOWEBVIEW,
575 strExplorer,
576 "NoWebView",
577 SHELL_NO_POLICY
580 REST_NOCUSTOMIZETHISFOLDER,
581 strExplorer,
582 "NoCustomizeThisFolder",
583 SHELL_NO_POLICY
586 REST_NOENCRYPTION,
587 strExplorer,
588 "NoEncryption",
589 SHELL_NO_POLICY
592 REST_ALLOWFRENCHENCRYPTION,
593 strExplorer,
594 "AllowFrenchEncryption",
595 SHELL_NO_POLICY
598 REST_DONTSHOWSUPERHIDDEN,
599 strExplorer,
600 "DontShowSuperHidden",
601 SHELL_NO_POLICY
604 REST_NOSHELLSEARCHBUTTON,
605 strExplorer,
606 "NoShellSearchButton",
607 SHELL_NO_POLICY
610 REST_NOHARDWARETAB,
611 strExplorer,
612 "NoHardwareTab",
613 SHELL_NO_POLICY
616 REST_NORUNASINSTALLPROMPT,
617 strExplorer,
618 "NoRunasInstallPrompt",
619 SHELL_NO_POLICY
622 REST_PROMPTRUNASINSTALLNETPATH,
623 strExplorer,
624 "PromptRunasInstallNetPath",
625 SHELL_NO_POLICY
628 REST_NOMANAGEMYCOMPUTERVERB,
629 strExplorer,
630 "NoManageMyComputerVerb",
631 SHELL_NO_POLICY
634 REST_NORECENTDOCSNETHOOD,
635 strExplorer,
636 "NoRecentDocsNetHood",
637 SHELL_NO_POLICY
640 REST_DISALLOWRUN,
641 strExplorer,
642 "DisallowRun",
643 SHELL_NO_POLICY
646 REST_NOWELCOMESCREEN,
647 strExplorer,
648 "NoWelcomeScreen",
649 SHELL_NO_POLICY
652 REST_RESTRICTCPL,
653 strExplorer,
654 "RestrictCpl",
655 SHELL_NO_POLICY
658 REST_DISALLOWCPL,
659 strExplorer,
660 "DisallowCpl",
661 SHELL_NO_POLICY
664 REST_NOSMBALLOONTIP,
665 strExplorer,
666 "NoSMBalloonTip",
667 SHELL_NO_POLICY
670 REST_NOSMHELP,
671 strExplorer,
672 "NoSMHelp",
673 SHELL_NO_POLICY
676 REST_NOWINKEYS,
677 strExplorer,
678 "NoWinKeys",
679 SHELL_NO_POLICY
682 REST_NOENCRYPTONMOVE,
683 strExplorer,
684 "NoEncryptOnMove",
685 SHELL_NO_POLICY
688 REST_NOLOCALMACHINERUN,
689 strExplorer,
690 "DisableLocalMachineRun",
691 SHELL_NO_POLICY
694 REST_NOCURRENTUSERRUN,
695 strExplorer,
696 "DisableCurrentUserRun",
697 SHELL_NO_POLICY
700 REST_NOLOCALMACHINERUNONCE,
701 strExplorer,
702 "DisableLocalMachineRunOnce",
703 SHELL_NO_POLICY
706 REST_NOCURRENTUSERRUNONCE,
707 strExplorer,
708 "DisableCurrentUserRunOnce",
709 SHELL_NO_POLICY
712 REST_FORCEACTIVEDESKTOPON,
713 strExplorer,
714 "ForceActiveDesktopOn",
715 SHELL_NO_POLICY
718 REST_NOCOMPUTERSNEARME,
719 strExplorer,
720 "NoComputersNearMe",
721 SHELL_NO_POLICY
724 REST_NOVIEWONDRIVE,
725 strExplorer,
726 "NoViewOnDrive",
727 SHELL_NO_POLICY
730 REST_NONETCRAWL,
731 strExplorer,
732 "NoNetCrawl",
733 SHELL_NO_POLICY
736 REST_NOSHAREDDOCUMENTS,
737 strExplorer,
738 "NoSharedDocs",
739 SHELL_NO_POLICY
742 REST_NOSMMYDOCS,
743 strExplorer,
744 "NoSMMyDocs",
745 SHELL_NO_POLICY
747 /* 0x4000050 - 0x4000060 */
749 REST_NONLEGACYSHELLMODE,
750 strExplorer,
751 "NoneLegacyShellMode",
752 SHELL_NO_POLICY
755 REST_STARTRUNNOHOMEPATH,
756 strExplorer,
757 "StartRunNoHOMEPATH",
758 SHELL_NO_POLICY
760 /* 0x4000061 - 0x4000086 */
762 REST_NODISCONNECT,
763 strExplorer,
764 "NoDisconnect",
765 SHELL_NO_POLICY
768 REST_NOSECURITY,
769 strExplorer,
770 "NoNTSecurity",
771 SHELL_NO_POLICY
774 REST_NOFILEASSOCIATE,
775 strExplorer,
776 "NoFileAssociate",
777 SHELL_NO_POLICY
780 0x50000024,
781 strExplorer,
782 strNoFileURL,
783 SHELL_NO_POLICY
789 SHELL_NO_POLICY
793 /*************************************************************************
794 * SHRestricted [SHELL32.100]
796 * Get the value associated with a policy Id.
798 * PARAMS
799 * pol [I] Policy Id
801 * RETURNS
802 * The queried value for the policy.
804 * NOTES
805 * Exported by ordinal.
806 * This function caches the retrieved values to prevent unnecessary registry access,
807 * if SHInitRestricted() was previously called.
809 * REFERENCES
810 * a: MS System Policy Editor.
811 * b: 98Lite 2.0 (which uses many of these policy keys) http://www.98lite.net/
812 * c: 'The Windows 95 Registry', by John Woram, 1996 MIS: Press
814 DWORD WINAPI SHRestricted (RESTRICTIONS policy)
816 char regstr[256];
817 HKEY xhkey;
818 DWORD retval, datsize = 4;
819 LPPOLICYDATA p;
821 TRACE("(%08x)\n", policy);
823 /* scan to see if we know this policy ID */
824 for (p = sh32_policy_table; p->policy; p++)
826 if (policy == p->policy)
828 break;
832 if (p->policy == 0)
834 /* we don't know this policy, return 0 */
835 TRACE("unknown policy: (%08x)\n", policy);
836 return 0;
839 /* we have a known policy */
841 /* first check if this policy has been cached, return it if so */
842 if (p->cache != SHELL_NO_POLICY)
844 return p->cache;
847 lstrcpyA(regstr, "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\");
848 lstrcatA(regstr, p->appstr);
850 /* return 0 and don't set the cache if any registry errors occur */
851 retval = 0;
852 if (RegOpenKeyA(HKEY_CURRENT_USER, regstr, &xhkey) == ERROR_SUCCESS)
854 if (RegQueryValueExA(xhkey, p->keystr, NULL, NULL, (LPBYTE)&retval, &datsize) == ERROR_SUCCESS)
856 p->cache = retval;
858 RegCloseKey(xhkey);
860 return retval;
863 /*************************************************************************
864 * SHInitRestricted [SHELL32.244]
866 * Initialise the policy cache to speed up calls to SHRestricted().
868 * PARAMS
869 * unused [I] Reserved.
870 * inpRegKey [I] Registry key to scan.
872 * RETURNS
873 * Success: -1. The policy cache is initialised.
874 * Failure: 0, if inpRegKey is any value other than NULL, "Policy", or
875 * "Software\Microsoft\Windows\CurrentVersion\Policies".
877 * NOTES
878 * Exported by ordinal. Introduced in Win98.
880 BOOL WINAPI SHInitRestricted(LPCVOID unused, LPCVOID inpRegKey)
882 TRACE("(%p, %p)\n", unused, inpRegKey);
884 /* first check - if input is non-NULL and points to the secret
885 key string, then pass. Otherwise return 0.
887 if (inpRegKey != NULL)
889 if (SHELL_OsIsUnicode())
891 if (lstrcmpiW(inpRegKey, L"Software\\Microsoft\\Windows\\CurrentVersion\\Policies") &&
892 lstrcmpiW(inpRegKey, L"Policy"))
893 /* doesn't match, fail */
894 return FALSE;
896 else
898 if (lstrcmpiA(inpRegKey, "Software\\Microsoft\\Windows\\CurrentVersion\\Policies") &&
899 lstrcmpiA(inpRegKey, "Policy"))
900 /* doesn't match, fail */
901 return FALSE;
905 return TRUE;