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
7a69c2f1
Commit
7a69c2f1
authored
Jul 16, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 19, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32/tests: More tests that actually show CLSID/ProgId redirection in action.
parent
173b834b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
13 deletions
+31
-13
compobj.c
dlls/ole32/tests/compobj.c
+31
-13
No files found.
dlls/ole32/tests/compobj.c
View file @
7a69c2f1
...
@@ -64,19 +64,8 @@ static WCHAR wszCLSID_StdFont[] =
...
@@ -64,19 +64,8 @@ static WCHAR wszCLSID_StdFont[] =
};
};
static
const
WCHAR
progidW
[]
=
{
'P'
,
'r'
,
'o'
,
'g'
,
'I'
,
'd'
,
'.'
,
'P'
,
'r'
,
'o'
,
'g'
,
'I'
,
'd'
,
0
};
static
const
WCHAR
progidW
[]
=
{
'P'
,
'r'
,
'o'
,
'g'
,
'I'
,
'd'
,
'.'
,
'P'
,
'r'
,
'o'
,
'g'
,
'I'
,
'd'
,
0
};
static
const
IID
IID_IWineTest
=
DEFINE_GUID
(
IID_IWineTest
,
0x5201163f
,
0x8164
,
0x4fd0
,
0xa1
,
0xa2
,
0x5d
,
0x5a
,
0x36
,
0x54
,
0xd3
,
0xbd
);
{
DEFINE_GUID
(
CLSID_WineOOPTest
,
0x5201163f
,
0x8164
,
0x4fd0
,
0xa1
,
0xa2
,
0x5d
,
0x5a
,
0x36
,
0x54
,
0xd3
,
0xbd
);
0x5201163f
,
0x8164
,
0x4fd0
,
{
0xa1
,
0xa2
,
0x5d
,
0x5a
,
0x36
,
0x54
,
0xd3
,
0xbd
}
};
/* 5201163f-8164-4fd0-a1a2-5d5a3654d3bd */
static
const
CLSID
CLSID_WineOOPTest
=
{
0x5201163f
,
0x8164
,
0x4fd0
,
{
0xa1
,
0xa2
,
0x5d
,
0x5a
,
0x36
,
0x54
,
0xd3
,
0xbd
}
};
/* 5201163f-8164-4fd0-a1a2-5d5a3654d3bd */
static
const
char
*
debugstr_guid
(
REFIID
riid
)
static
const
char
*
debugstr_guid
(
REFIID
riid
)
{
{
...
@@ -232,6 +221,12 @@ static const char actctx_manifest[] =
...
@@ -232,6 +221,12 @@ static const char actctx_manifest[] =
" clsid=
\"
{12345678-1234-1234-1234-56789abcdef0}
\"
"
" clsid=
\"
{12345678-1234-1234-1234-56789abcdef0}
\"
"
" progid=
\"
ProgId.ProgId
\"
"
" progid=
\"
ProgId.ProgId
\"
"
" />"
" />"
" <comClass clsid=
\"
{0be35203-8f91-11ce-9de3-00aa004bb851}
\"
"
" progid=
\"
CustomFont
\"
"
" />"
" <comClass clsid=
\"
{0be35203-8f91-11ce-9de3-00aa004bb852}
\"
"
" progid=
\"
StdFont
\"
"
" />"
"</file>"
"</file>"
"</assembly>"
;
"</assembly>"
;
...
@@ -260,6 +255,8 @@ static void test_ProgIDFromCLSID(void)
...
@@ -260,6 +255,8 @@ static void test_ProgIDFromCLSID(void)
if
((
handle
=
activate_context
(
actctx_manifest
,
&
cookie
)))
if
((
handle
=
activate_context
(
actctx_manifest
,
&
cookie
)))
{
{
static
const
WCHAR
customfontW
[]
=
{
'C'
,
'u'
,
's'
,
't'
,
'o'
,
'm'
,
'F'
,
'o'
,
'n'
,
't'
,
0
};
hr
=
ProgIDFromCLSID
(
&
CLSID_non_existent
,
&
progid
);
hr
=
ProgIDFromCLSID
(
&
CLSID_non_existent
,
&
progid
);
todo_wine
todo_wine
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
...
@@ -269,6 +266,14 @@ todo_wine
...
@@ -269,6 +266,14 @@ todo_wine
CoTaskMemFree
(
progid
);
CoTaskMemFree
(
progid
);
}
}
/* try something registered and redirected */
progid
=
NULL
;
hr
=
ProgIDFromCLSID
(
&
CLSID_StdFont
,
&
progid
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
todo_wine
ok
(
!
lstrcmpiW
(
progid
,
customfontW
),
"got wrong progid %s
\n
"
,
wine_dbgstr_w
(
progid
));
CoTaskMemFree
(
progid
);
pDeactivateActCtx
(
0
,
cookie
);
pDeactivateActCtx
(
0
,
cookie
);
pReleaseActCtx
(
handle
);
pReleaseActCtx
(
handle
);
}
}
...
@@ -308,6 +313,8 @@ static void test_CLSIDFromProgID(void)
...
@@ -308,6 +313,8 @@ static void test_CLSIDFromProgID(void)
if
((
handle
=
activate_context
(
actctx_manifest
,
&
cookie
)))
if
((
handle
=
activate_context
(
actctx_manifest
,
&
cookie
)))
{
{
GUID
clsid1
;
clsid
=
CLSID_NULL
;
clsid
=
CLSID_NULL
;
hr
=
CLSIDFromProgID
(
progidW
,
&
clsid
);
hr
=
CLSIDFromProgID
(
progidW
,
&
clsid
);
todo_wine
todo_wine
...
@@ -317,6 +324,17 @@ todo_wine
...
@@ -317,6 +324,17 @@ todo_wine
ok
(
!
IsEqualCLSID
(
&
clsid
,
&
CLSID_non_existent
)
&&
!
IsEqualCLSID
(
&
clsid
,
&
CLSID_NULL
),
ok
(
!
IsEqualCLSID
(
&
clsid
,
&
CLSID_non_existent
)
&&
!
IsEqualCLSID
(
&
clsid
,
&
CLSID_NULL
),
"got wrong clsid %s
\n
"
,
debugstr_guid
(
&
clsid
));
"got wrong clsid %s
\n
"
,
debugstr_guid
(
&
clsid
));
/* duplicate progid present in context - returns generated guid here too */
clsid
=
CLSID_NULL
;
hr
=
CLSIDFromProgID
(
stdfont
,
&
clsid
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
clsid1
=
CLSID_StdFont
;
/* that's where it differs from StdFont */
clsid1
.
Data4
[
7
]
=
0x52
;
todo_wine
ok
(
!
IsEqualCLSID
(
&
clsid
,
&
CLSID_StdFont
)
&&
!
IsEqualCLSID
(
&
clsid
,
&
CLSID_NULL
)
&&
!
IsEqualCLSID
(
&
clsid
,
&
clsid1
),
"got %s
\n
"
,
debugstr_guid
(
&
clsid
));
pDeactivateActCtx
(
0
,
cookie
);
pDeactivateActCtx
(
0
,
cookie
);
pReleaseActCtx
(
handle
);
pReleaseActCtx
(
handle
);
}
}
...
...
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