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
40cfe48b
Commit
40cfe48b
authored
Mar 27, 2003
by
Rolf Kalbermatter
Committed by
Alexandre Julliard
Mar 27, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented SHLWAPI_266 and SHLWAPI_271.
parent
77357a3f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
95 additions
and
18 deletions
+95
-18
ordinal.c
dlls/shlwapi/ordinal.c
+81
-15
ordinal.h
dlls/shlwapi/ordinal.h
+11
-0
shlwapi.spec
dlls/shlwapi/shlwapi.spec
+3
-3
No files found.
dlls/shlwapi/ordinal.c
View file @
40cfe48b
...
...
@@ -46,6 +46,7 @@
#include "winuser.h"
#include "wine/debug.h"
#include "shlwapi.h"
#include "ordinal.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
shell
);
...
...
@@ -1068,7 +1069,6 @@ HRESULT WINAPI SHLWAPI_168(IUnknown* lpUnkSink, REFIID riid, BOOL bAdviseOnly,
/*************************************************************************
* @ [SHLWAPI.169]
*
*
* Release an interface.
*
* PARAMS
...
...
@@ -1371,7 +1371,7 @@ DWORD WINAPI SHLWAPI_180(HMENU hMenu)
* bEnable [I] Whether to enable (TRUE) or disable (FALSE) the item.
*
* RETURNS
* The return code from
Check
MenuItem.
* The return code from
Enable
MenuItem.
*/
UINT
WINAPI
SHLWAPI_181
(
HMENU
hMenu
,
UINT
wItemID
,
BOOL
bEnable
)
{
...
...
@@ -1912,24 +1912,90 @@ DWORD WINAPI SHLWAPI_241 ()
return
/* 0xabba1243 */
0
;
}
/* default shell policy registry key */
static
WCHAR
strRegistryPolicyW
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
'\\'
,
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
'\\'
,
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
'\\'
,
'P'
,
'o'
,
'l'
,
'i'
,
'c'
,
'i'
,
'e'
,
's'
,
0
};
/*************************************************************************
* @ [SHLWAPI.271]
*
* Retrieve a policy value from the registry.
*
* PARAMS
* lpSubKey [I] registry key name
* lpSubName [I] subname of registry key
* lpValue [I] value name of registry value
*
* RETURNS
* the value associated with the registry key or 0 if not found
*/
DWORD
WINAPI
SHLWAPI_271
(
LPCWSTR
lpSubKey
,
LPCWSTR
lpSubName
,
LPCWSTR
lpValue
)
{
DWORD
retval
,
datsize
=
4
;
HKEY
hKey
;
if
(
!
lpSubKey
)
lpSubKey
=
(
LPCWSTR
)
strRegistryPolicyW
;
retval
=
RegOpenKeyW
(
HKEY_LOCAL_MACHINE
,
lpSubKey
,
&
hKey
);
if
(
retval
!=
ERROR_SUCCESS
)
retval
=
RegOpenKeyW
(
HKEY_CURRENT_USER
,
lpSubKey
,
&
hKey
);
if
(
retval
!=
ERROR_SUCCESS
)
return
0
;
SHGetValueW
(
hKey
,
lpSubName
,
lpValue
,
NULL
,
(
LPBYTE
)
&
retval
,
&
datsize
);
RegCloseKey
(
hKey
);
return
retval
;
}
/*************************************************************************
* @ [SHLWAPI.266]
* @ [SHLWAPI.266]
*
* Helper function to retrieve the possibly cached value for a specific policy
*
* PARAMS
* policy [I] The policy to look for
* initial [I] Main registry key to open, if NULL use default
* polTable [I] Table of known policies, 0 terminated
* polArr [I] Cache array of policy values
*
* native does at least approximately:
* strcpyW(newstr, x);
* strcatW(newstr, "\\Restrictions");
* if (RegOpenKeyExA(80000001, newstr, 00000000,00000001,40520b78))
* return 0;
* *unknown*
* RETURNS
* The retrieved policy value or 0 if not successful
*
* NOTES
* This function is used by the native SHRestricted function to search for the
* policy and cache it once retrieved. The current Wine implementation uses a
* different POLICYDATA structure and implements a similar algorithme adapted to
* that structure.
*/
DWORD
WINAPI
SHLWAPI_266
(
LPVOID
w
,
LP
VOID
x
,
/* [in] partial registry key */
LP
VOID
y
,
LP
VOID
z
)
DWORD
policy
,
LP
CWSTR
initial
,
/* [in] partial registry key */
LP
POLICYDATA
polTable
,
LP
DWORD
polArr
)
{
FIXME
(
"(%p %p %p %p)stub
\n
"
,
w
,
x
,
y
,
z
);
return
/* 0xabba1248 */
0
;
TRACE
(
"(0x%08lx %s %p %p)
\n
"
,
policy
,
debugstr_w
(
initial
),
polTable
,
polArr
);
if
(
!
polTable
||
!
polArr
)
return
0
;
for
(;
polTable
->
policy
;
polTable
++
,
polArr
++
)
{
if
(
policy
==
polTable
->
policy
)
{
/* we have a known policy */
/* check if this policy has been cached */
if
(
*
polArr
==
SHELL_NO_POLICY
)
*
polArr
=
SHLWAPI_271
(
initial
,
polTable
->
appstr
,
polTable
->
keystr
);
return
*
polArr
;
}
}
/* we don't know this policy, return 0 */
TRACE
(
"unknown policy: (%08lx)
\n
"
,
policy
);
return
0
;
}
/*************************************************************************
...
...
dlls/shlwapi/ordinal.h
View file @
40cfe48b
...
...
@@ -52,6 +52,17 @@ DWORD WINAPI SHLWAPI_2(LPCWSTR x, UNKNOWN_SHLWAPI_2 *y);
} \
} while (0)
/* SHLWAPI_266 definitions and structures */
#define SHELL_NO_POLICY -1
typedef
struct
tagPOLICYDATA
{
DWORD
policy
;
/* flags value passed to SHRestricted */
LPCWSTR
appstr
;
/* application str such as "Explorer" */
LPCWSTR
keystr
;
/* name of the actual registry key / policy */
}
POLICYDATA
,
*
LPPOLICYDATA
;
extern
HMODULE
SHLWAPI_hshell32
;
/* Shared internal functions */
...
...
dlls/shlwapi/shlwapi.spec
View file @
40cfe48b
...
...
@@ -212,7 +212,7 @@
212 stdcall @(ptr ptr long) SHLWAPI_212
213 stdcall @(ptr) SHLWAPI_213
214 stdcall @(ptr ptr) SHLWAPI_214
215 stdcall @(
long long
long) SHLWAPI_215
215 stdcall @(
str ptr
long) SHLWAPI_215
216 stub @
217 stdcall @(wstr ptr ptr) SHLWAPI_217
218 stdcall @(long wstr ptr ptr) SHLWAPI_218
...
...
@@ -263,12 +263,12 @@
263 stub @
264 stub @
265 stub @
266 stdcall @(long
long long long
) SHLWAPI_266
266 stdcall @(long
wstr ptr ptr
) SHLWAPI_266
267 stdcall @(long long long long) SHLWAPI_267
268 stdcall @(long long) SHLWAPI_268
269 stub @
270 stub @
271 st
ub @
271 st
dcall @(wstr wstr wstr) SHLWAPI_271
272 stub @
273 stub @
274 stub @
...
...
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