Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
745bd4f2
Commit
745bd4f2
authored
17 years ago
by
Francois Gouget
Committed by
Alexandre Julliard
17 years ago
Browse files
Options
Downloads
Patches
Plain Diff
oleaut32/tests: Avoid SHDeleteKeyW() because shlwapi.dll is missing on Windows 95.
parent
ca3606f3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/oleaut32/tests/Makefile.in
+1
-1
1 addition, 1 deletion
dlls/oleaut32/tests/Makefile.in
dlls/oleaut32/tests/typelib.c
+65
-1
65 additions, 1 deletion
dlls/oleaut32/tests/typelib.c
with
66 additions
and
2 deletions
dlls/oleaut32/tests/Makefile.in
+
1
−
1
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
=
\
...
...
This diff is collapsed.
Click to expand it.
dlls/oleaut32/tests/typelib.c
+
65
−
1
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
(
SH
Delete
Key
W
(
HKEY_CLASSES_ROOT
,
buf
)
==
ERROR_SUCCESS
,
"SHDeleteKey failed
\n
"
);
ok
(
myReg
Delete
Tree
W
(
HKEY_CLASSES_ROOT
,
buf
)
==
ERROR_SUCCESS
,
"SHDeleteKey failed
\n
"
);
return
TRUE
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment