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
eb95ad07
Commit
eb95ad07
authored
Jul 15, 2014
by
Akihiro Sagawa
Committed by
Alexandre Julliard
Jul 15, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32/tests: Add registry view flag to myRegDeleteTreeW like RegDeleteKeyEx.
parent
efdaa4a1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
typelib.c
dlls/oleaut32/tests/typelib.c
+13
-6
No files found.
dlls/oleaut32/tests/typelib.c
View file @
eb95ad07
...
...
@@ -75,6 +75,7 @@ static HANDLE (WINAPI *pCreateActCtxW)(PCACTCTXW);
static
BOOL
(
WINAPI
*
pDeactivateActCtx
)(
DWORD
,
ULONG_PTR
);
static
VOID
(
WINAPI
*
pReleaseActCtx
)(
HANDLE
);
static
BOOL
(
WINAPI
*
pIsWow64Process
)(
HANDLE
,
LPBOOL
);
static
LONG
(
WINAPI
*
pRegDeleteKeyExW
)(
HKEY
,
LPCWSTR
,
REGSAM
,
DWORD
);
static
const
WCHAR
wszStdOle2
[]
=
{
's'
,
't'
,
'd'
,
'o'
,
'l'
,
'e'
,
'2'
,
'.'
,
't'
,
'l'
,
'b'
,
0
};
static
WCHAR
wszGUID
[]
=
{
'G'
,
'U'
,
'I'
,
'D'
,
0
};
...
...
@@ -166,6 +167,7 @@ static void init_function_pointers(void)
{
HMODULE
hmod
=
GetModuleHandleA
(
"oleaut32.dll"
);
HMODULE
hk32
=
GetModuleHandleA
(
"kernel32.dll"
);
HMODULE
hadv
=
GetModuleHandleA
(
"advapi32.dll"
);
pRegisterTypeLibForUser
=
(
void
*
)
GetProcAddress
(
hmod
,
"RegisterTypeLibForUser"
);
pUnRegisterTypeLibForUser
=
(
void
*
)
GetProcAddress
(
hmod
,
"UnRegisterTypeLibForUser"
);
...
...
@@ -174,6 +176,7 @@ static void init_function_pointers(void)
pDeactivateActCtx
=
(
void
*
)
GetProcAddress
(
hk32
,
"DeactivateActCtx"
);
pReleaseActCtx
=
(
void
*
)
GetProcAddress
(
hk32
,
"ReleaseActCtx"
);
pIsWow64Process
=
(
void
*
)
GetProcAddress
(
hk32
,
"IsWow64Process"
);
pRegDeleteKeyExW
=
(
void
*
)
GetProcAddress
(
hadv
,
"RegDeleteKeyExW"
);
}
static
void
ref_count_test
(
LPCWSTR
type_lib
)
...
...
@@ -1154,18 +1157,19 @@ static void test_DispCallFunc(void)
ok
(
V_VT
(
&
result
)
==
0xcccc
,
"V_VT(result) = %u
\n
"
,
V_VT
(
&
result
));
}
/* RegDeleteTreeW from dlls/advapi32/registry.c */
static
LSTATUS
myRegDeleteTreeW
(
HKEY
hKey
,
LPCWSTR
lpszSubKey
)
/* RegDeleteTreeW from dlls/advapi32/registry.c
, plus additional view flag
*/
static
LSTATUS
myRegDeleteTreeW
(
HKEY
hKey
,
LPCWSTR
lpszSubKey
,
REGSAM
view
)
{
LONG
ret
;
DWORD
dwMaxSubkeyLen
,
dwMaxValueLen
;
DWORD
dwMaxLen
,
dwSize
;
WCHAR
szNameBuf
[
MAX_PATH
],
*
lpszName
=
szNameBuf
;
HKEY
hSubKey
=
hKey
;
view
&=
(
KEY_WOW64_64KEY
|
KEY_WOW64_32KEY
);
if
(
lpszSubKey
)
{
ret
=
RegOpenKeyExW
(
hKey
,
lpszSubKey
,
0
,
KEY_READ
,
&
hSubKey
);
ret
=
RegOpenKeyExW
(
hKey
,
lpszSubKey
,
0
,
KEY_READ
|
view
,
&
hSubKey
);
if
(
ret
)
return
ret
;
}
...
...
@@ -1193,12 +1197,15 @@ static LSTATUS myRegDeleteTreeW(HKEY hKey, LPCWSTR lpszSubKey)
if
(
RegEnumKeyExW
(
hSubKey
,
0
,
lpszName
,
&
dwSize
,
NULL
,
NULL
,
NULL
,
NULL
))
break
;
ret
=
myRegDeleteTreeW
(
hSubKey
,
lpszName
);
ret
=
myRegDeleteTreeW
(
hSubKey
,
lpszName
,
view
);
if
(
ret
)
goto
cleanup
;
}
if
(
lpszSubKey
)
ret
=
RegDeleteKeyW
(
hKey
,
lpszSubKey
);
if
(
pRegDeleteKeyExW
&&
view
!=
0
)
ret
=
pRegDeleteKeyExW
(
hKey
,
lpszSubKey
,
view
,
0
);
else
ret
=
RegDeleteKeyW
(
hKey
,
lpszSubKey
);
else
while
(
TRUE
)
{
...
...
@@ -1233,7 +1240,7 @@ static BOOL do_typelib_reg_key(GUID *uid, WORD maj, WORD min, DWORD arch, LPCWST
if
(
remove
)
{
ok
(
myRegDeleteTreeW
(
HKEY_CLASSES_ROOT
,
buf
)
==
ERROR_SUCCESS
,
"SHDeleteKey failed
\n
"
);
ok
(
myRegDeleteTreeW
(
HKEY_CLASSES_ROOT
,
buf
,
0
)
==
ERROR_SUCCESS
,
"SHDeleteKey failed
\n
"
);
return
TRUE
;
}
...
...
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