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
88ba9c32
Commit
88ba9c32
authored
Sep 21, 2011
by
Francois Gouget
Committed by
Alexandre Julliard
Sep 21, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32/tests: Skip some tests if not allowed to modify the Classes registry key.
parent
b883b557
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
marshal.c
dlls/ole32/tests/marshal.c
+13
-3
No files found.
dlls/ole32/tests/marshal.c
View file @
88ba9c32
...
@@ -2268,7 +2268,7 @@ static void test_freethreadedmarshaler(void)
...
@@ -2268,7 +2268,7 @@ static void test_freethreadedmarshaler(void)
IMarshal_Release
(
pFTMarshal
);
IMarshal_Release
(
pFTMarshal
);
}
}
static
void
reg_unreg_wine_test_class
(
BOOL
Register
)
static
HRESULT
reg_unreg_wine_test_class
(
BOOL
Register
)
{
{
HRESULT
hr
;
HRESULT
hr
;
char
buffer
[
256
];
char
buffer
[
256
];
...
@@ -2286,9 +2286,16 @@ static void reg_unreg_wine_test_class(BOOL Register)
...
@@ -2286,9 +2286,16 @@ static void reg_unreg_wine_test_class(BOOL Register)
if
(
Register
)
if
(
Register
)
{
{
error
=
RegCreateKeyEx
(
HKEY_CLASSES_ROOT
,
buffer
,
0
,
NULL
,
0
,
KEY_SET_VALUE
,
NULL
,
&
hkey
,
&
dwDisposition
);
error
=
RegCreateKeyEx
(
HKEY_CLASSES_ROOT
,
buffer
,
0
,
NULL
,
0
,
KEY_SET_VALUE
,
NULL
,
&
hkey
,
&
dwDisposition
);
if
(
error
==
ERROR_ACCESS_DENIED
)
{
skip
(
"Not authorized to modify the Classes key
\n
"
);
return
E_FAIL
;
}
ok
(
error
==
ERROR_SUCCESS
,
"RegCreateKeyEx failed with error %d
\n
"
,
error
);
ok
(
error
==
ERROR_SUCCESS
,
"RegCreateKeyEx failed with error %d
\n
"
,
error
);
if
(
error
!=
ERROR_SUCCESS
)
hr
=
E_FAIL
;
error
=
RegSetValueEx
(
hkey
,
NULL
,
0
,
REG_SZ
,
(
const
unsigned
char
*
)
"
\"
ole32.dll
\"
"
,
strlen
(
"
\"
ole32.dll
\"
"
)
+
1
);
error
=
RegSetValueEx
(
hkey
,
NULL
,
0
,
REG_SZ
,
(
const
unsigned
char
*
)
"
\"
ole32.dll
\"
"
,
strlen
(
"
\"
ole32.dll
\"
"
)
+
1
);
ok
(
error
==
ERROR_SUCCESS
,
"RegSetValueEx failed with error %d
\n
"
,
error
);
ok
(
error
==
ERROR_SUCCESS
,
"RegSetValueEx failed with error %d
\n
"
,
error
);
if
(
error
!=
ERROR_SUCCESS
)
hr
=
E_FAIL
;
RegCloseKey
(
hkey
);
RegCloseKey
(
hkey
);
}
}
else
else
...
@@ -2297,6 +2304,7 @@ static void reg_unreg_wine_test_class(BOOL Register)
...
@@ -2297,6 +2304,7 @@ static void reg_unreg_wine_test_class(BOOL Register)
*
strrchr
(
buffer
,
'\\'
)
=
'\0'
;
*
strrchr
(
buffer
,
'\\'
)
=
'\0'
;
RegDeleteKey
(
HKEY_CLASSES_ROOT
,
buffer
);
RegDeleteKey
(
HKEY_CLASSES_ROOT
,
buffer
);
}
}
return
hr
;
}
}
static
void
test_inproc_handler
(
void
)
static
void
test_inproc_handler
(
void
)
...
@@ -2305,7 +2313,8 @@ static void test_inproc_handler(void)
...
@@ -2305,7 +2313,8 @@ static void test_inproc_handler(void)
IUnknown
*
pObject
;
IUnknown
*
pObject
;
IUnknown
*
pObject2
;
IUnknown
*
pObject2
;
reg_unreg_wine_test_class
(
TRUE
);
if
(
FAILED
(
reg_unreg_wine_test_class
(
TRUE
)))
return
;
hr
=
CoCreateInstance
(
&
CLSID_WineTest
,
NULL
,
CLSCTX_INPROC_HANDLER
,
&
IID_IUnknown
,
(
void
**
)
&
pObject
);
hr
=
CoCreateInstance
(
&
CLSID_WineTest
,
NULL
,
CLSCTX_INPROC_HANDLER
,
&
IID_IUnknown
,
(
void
**
)
&
pObject
);
ok_ole_success
(
hr
,
"CoCreateInstance"
);
ok_ole_success
(
hr
,
"CoCreateInstance"
);
...
@@ -2386,7 +2395,8 @@ static void test_handler_marshaling(void)
...
@@ -2386,7 +2395,8 @@ static void test_handler_marshaling(void)
HANDLE
thread
;
HANDLE
thread
;
static
const
LARGE_INTEGER
ullZero
;
static
const
LARGE_INTEGER
ullZero
;
reg_unreg_wine_test_class
(
TRUE
);
if
(
FAILED
(
reg_unreg_wine_test_class
(
TRUE
)))
return
;
cLocks
=
0
;
cLocks
=
0
;
hr
=
CreateStreamOnHGlobal
(
NULL
,
TRUE
,
&
pStream
);
hr
=
CreateStreamOnHGlobal
(
NULL
,
TRUE
,
&
pStream
);
...
...
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