Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
745bd4f2
Commit
745bd4f2
authored
Dec 18, 2007
by
Francois Gouget
Committed by
Alexandre Julliard
Dec 18, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32/tests: Avoid SHDeleteKeyW() because shlwapi.dll is missing on Windows 95.
parent
ca3606f3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
2 deletions
+66
-2
Makefile.in
dlls/oleaut32/tests/Makefile.in
+1
-1
typelib.c
dlls/oleaut32/tests/typelib.c
+65
-1
No files found.
dlls/oleaut32/tests/Makefile.in
View file @
745bd4f2
...
...
@@ -3,7 +3,7 @@ TOPOBJDIR = ../../..
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
TESTDLL
=
oleaut32.dll
IMPORTS
=
oleaut32 ole32
shlwapi
rpcrt4 user32 gdi32 advapi32 kernel32
IMPORTS
=
oleaut32 ole32 rpcrt4 user32 gdi32 advapi32 kernel32
EXTRALIBS
=
-luuid
-luser32
CTESTS
=
\
...
...
dlls/oleaut32/tests/typelib.c
View file @
745bd4f2
...
...
@@ -513,6 +513,70 @@ static void test_TypeInfo(void)
ITypeLib_Release
(
pTypeLib
);
}
/* RegDeleteTreeW from dlls/advapi32/registry.c */
static
LSTATUS
myRegDeleteTreeW
(
HKEY
hKey
,
LPCWSTR
lpszSubKey
)
{
LONG
ret
;
DWORD
dwMaxSubkeyLen
,
dwMaxValueLen
;
DWORD
dwMaxLen
,
dwSize
;
WCHAR
szNameBuf
[
MAX_PATH
],
*
lpszName
=
szNameBuf
;
HKEY
hSubKey
=
hKey
;
if
(
lpszSubKey
)
{
ret
=
RegOpenKeyExW
(
hKey
,
lpszSubKey
,
0
,
KEY_READ
,
&
hSubKey
);
if
(
ret
)
return
ret
;
}
ret
=
RegQueryInfoKeyW
(
hSubKey
,
NULL
,
NULL
,
NULL
,
NULL
,
&
dwMaxSubkeyLen
,
NULL
,
NULL
,
&
dwMaxValueLen
,
NULL
,
NULL
,
NULL
);
if
(
ret
)
goto
cleanup
;
dwMaxSubkeyLen
++
;
dwMaxValueLen
++
;
dwMaxLen
=
max
(
dwMaxSubkeyLen
,
dwMaxValueLen
);
if
(
dwMaxLen
>
sizeof
(
szNameBuf
)
/
sizeof
(
WCHAR
))
{
/* Name too big: alloc a buffer for it */
if
(
!
(
lpszName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dwMaxLen
*
sizeof
(
WCHAR
))))
{
ret
=
ERROR_NOT_ENOUGH_MEMORY
;
goto
cleanup
;
}
}
/* Recursively delete all the subkeys */
while
(
TRUE
)
{
dwSize
=
dwMaxLen
;
if
(
RegEnumKeyExW
(
hSubKey
,
0
,
lpszName
,
&
dwSize
,
NULL
,
NULL
,
NULL
,
NULL
))
break
;
ret
=
myRegDeleteTreeW
(
hSubKey
,
lpszName
);
if
(
ret
)
goto
cleanup
;
}
if
(
lpszSubKey
)
ret
=
RegDeleteKeyW
(
hKey
,
lpszSubKey
);
else
while
(
TRUE
)
{
dwSize
=
dwMaxLen
;
if
(
RegEnumValueW
(
hKey
,
0
,
lpszName
,
&
dwSize
,
NULL
,
NULL
,
NULL
,
NULL
))
break
;
ret
=
RegDeleteValueW
(
hKey
,
lpszName
);
if
(
ret
)
goto
cleanup
;
}
cleanup:
if
(
lpszName
!=
szNameBuf
)
HeapFree
(
GetProcessHeap
(),
0
,
lpszName
);
if
(
lpszSubKey
)
RegCloseKey
(
hSubKey
);
return
ret
;
}
static
BOOL
do_typelib_reg_key
(
GUID
*
uid
,
WORD
maj
,
WORD
min
,
LPCWSTR
base
,
BOOL
remove
)
{
static
const
WCHAR
typelibW
[]
=
{
'T'
,
'y'
,
'p'
,
'e'
,
'l'
,
'i'
,
'b'
,
'\\'
,
0
};
...
...
@@ -527,7 +591,7 @@ static BOOL do_typelib_reg_key(GUID *uid, WORD maj, WORD min, LPCWSTR base, BOOL
if
(
remove
)
{
ok
(
SHDeleteKey
W
(
HKEY_CLASSES_ROOT
,
buf
)
==
ERROR_SUCCESS
,
"SHDeleteKey failed
\n
"
);
ok
(
myRegDeleteTree
W
(
HKEY_CLASSES_ROOT
,
buf
)
==
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