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
f4d598ae
Commit
f4d598ae
authored
Nov 03, 2016
by
Huw Davies
Committed by
Alexandre Julliard
Nov 03, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4/tests: Extend the tests for NdrDllGetClassObject().
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
38b57b30
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
5 deletions
+24
-5
cstub.c
dlls/rpcrt4/tests/cstub.c
+24
-5
No files found.
dlls/rpcrt4/tests/cstub.c
View file @
f4d598ae
...
...
@@ -44,6 +44,7 @@ static GUID IID_if1 = {0x12345678, 1234, 5678, {12,34,56,78,90,0xab,0xcd,0xef}};
static
GUID
IID_if2
=
{
0x12345679
,
1234
,
5678
,
{
12
,
34
,
56
,
78
,
90
,
0xab
,
0xcd
,
0xef
}};
static
GUID
IID_if3
=
{
0x1234567a
,
1234
,
5678
,
{
12
,
34
,
56
,
78
,
90
,
0xab
,
0xcd
,
0xef
}};
static
GUID
IID_if4
=
{
0x1234567b
,
1234
,
5678
,
{
12
,
34
,
56
,
78
,
90
,
0xab
,
0xcd
,
0xef
}};
static
CLSID
CLSID_psfact
=
{
0x1234567c
,
1234
,
5678
,
{
12
,
34
,
56
,
78
,
90
,
0xab
,
0xcd
,
0xef
}};
static
int
my_alloc_called
;
static
int
my_free_called
;
...
...
@@ -458,7 +459,6 @@ static IPSFactoryBuffer *test_NdrDllGetClassObject(void)
IPSFactoryBuffer
*
ppsf
=
NULL
;
const
PCInterfaceProxyVtblList
*
proxy_vtbl
;
const
PCInterfaceStubVtblList
*
stub_vtbl
;
const
CLSID
PSDispatch
=
{
0x20420
,
0
,
0
,
{
0xc0
,
0
,
0
,
0
,
0
,
0
,
0
,
0x46
}};
const
CLSID
CLSID_Unknown
=
{
0x45678
,
0x1234
,
0x6666
,
{
0xff
,
0x67
,
0x45
,
0x98
,
0x76
,
0x12
,
0x34
,
0x56
}};
static
const
GUID
*
const
interfaces
[]
=
{
&
IID_if1
,
&
IID_if2
,
&
IID_if3
,
&
IID_if4
};
UINT
i
;
...
...
@@ -475,13 +475,13 @@ static IPSFactoryBuffer *test_NdrDllGetClassObject(void)
void
*
CStd_DebugServerQueryInterface
=
GetProcAddress
(
hmod
,
"CStdStubBuffer_DebugServerQueryInterface"
);
void
*
CStd_DebugServerRelease
=
GetProcAddress
(
hmod
,
"CStdStubBuffer_DebugServerRelease"
);
r
=
NdrDllGetClassObject
(
&
PSDispatch
,
&
IID_IPSFactoryBuffer
,
(
void
**
)
&
ppsf
,
proxy_file_list
,
&
CLSID_
Unknown
,
&
PSFactoryBuffer
);
r
=
NdrDllGetClassObject
(
&
CLSID_Unknown
,
&
IID_IPSFactoryBuffer
,
(
void
**
)
&
ppsf
,
proxy_file_list
,
&
CLSID_
psfact
,
&
PSFactoryBuffer
);
ok
(
r
==
CLASS_E_CLASSNOTAVAILABLE
,
"NdrDllGetClassObject with unknown clsid should have returned CLASS_E_CLASSNOTAVAILABLE instead of 0x%x
\n
"
,
r
);
ok
(
ppsf
==
NULL
,
"NdrDllGetClassObject should have set ppsf to NULL on failure
\n
"
);
r
=
NdrDllGetClassObject
(
&
PSDispatch
,
&
IID_IPSFactoryBuffer
,
(
void
**
)
&
ppsf
,
proxy_file_list
,
&
PSDispatch
,
&
PSFactoryBuffer
);
r
=
NdrDllGetClassObject
(
&
CLSID_psfact
,
&
IID_IPSFactoryBuffer
,
(
void
**
)
&
ppsf
,
proxy_file_list
,
&
CLSID_psfact
,
&
PSFactoryBuffer
);
ok
(
r
==
S_OK
,
"ret %08x
\n
"
,
r
);
ok
(
ppsf
!=
NULL
,
"ppsf == NULL
\n
"
);
...
...
@@ -603,10 +603,29 @@ static IPSFactoryBuffer *test_NdrDllGetClassObject(void)
ok
(
PSFactoryBuffer
.
RefCount
==
1
,
"ref count %d
\n
"
,
PSFactoryBuffer
.
RefCount
);
IPSFactoryBuffer_Release
(
ppsf
);
/* One can also search by IID */
r
=
NdrDllGetClassObject
(
&
IID_if3
,
&
IID_IPSFactoryBuffer
,
(
void
**
)
&
ppsf
,
proxy_file_list
,
&
CLSID_psfact
,
&
PSFactoryBuffer
);
ok
(
r
==
S_OK
,
"ret %08x
\n
"
,
r
);
ok
(
ppsf
!=
NULL
,
"ppsf == NULL
\n
"
);
IPSFactoryBuffer_Release
(
ppsf
);
r
=
NdrDllGetClassObject
(
&
IID_if3
,
&
IID_IPSFactoryBuffer
,
(
void
**
)
&
ppsf
,
proxy_file_list
,
NULL
,
&
PSFactoryBuffer
);
ok
(
r
==
S_OK
,
"ret %08x
\n
"
,
r
);
ok
(
ppsf
!=
NULL
,
"ppsf == NULL
\n
"
);
IPSFactoryBuffer_Release
(
ppsf
);
/* but only if the PS factory implements it */
r
=
NdrDllGetClassObject
(
&
IID_IDispatch
,
&
IID_IPSFactoryBuffer
,
(
void
**
)
&
ppsf
,
proxy_file_list
,
&
CLSID_psfact
,
&
PSFactoryBuffer
);
ok
(
r
==
CLASS_E_CLASSNOTAVAILABLE
,
"ret %08x
\n
"
,
r
);
/* Create it again to return */
r
=
NdrDllGetClassObject
(
&
CLSID_psfact
,
&
IID_IPSFactoryBuffer
,
(
void
**
)
&
ppsf
,
proxy_file_list
,
&
CLSID_psfact
,
&
PSFactoryBuffer
);
ok
(
r
==
S_OK
,
"ret %08x
\n
"
,
r
);
ok
(
ppsf
!=
NULL
,
"ppsf == NULL
\n
"
);
return
ppsf
;
}
...
...
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