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
fbf01da4
Commit
fbf01da4
authored
Mar 25, 2013
by
Piotr Caban
Committed by
Alexandre Julliard
Mar 25, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Added IMatchCollection interface to MatchCollection2 object.
parent
a20d42de
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
93 additions
and
0 deletions
+93
-0
vbscript.c
dlls/vbscript/tests/vbscript.c
+4
-0
vbregexp.c
dlls/vbscript/vbregexp.c
+89
-0
No files found.
dlls/vbscript/tests/vbscript.c
View file @
fbf01da4
...
...
@@ -852,6 +852,10 @@ static void test_RegExp(void)
ok
(
hres
==
S_OK
,
"QueryInterface(IID_IMatchCollection2) returned %x
\n
"
,
hres
);
IDispatch_Release
(
disp
);
hres
=
IMatchCollection2_QueryInterface
(
mc
,
&
IID_IMatchCollection
,
(
void
**
)
&
unk
);
ok
(
hres
==
S_OK
,
"QueryInterface(IID_IMatchCollection) returned %x
\n
"
,
hres
);
IUnknown_Release
(
unk
);
hres
=
IMatchCollection2_get_Count
(
mc
,
NULL
);
ok
(
hres
==
E_POINTER
,
"get_Count returned %x, expected E_POINTER
\n
"
,
hres
);
...
...
dlls/vbscript/vbregexp.c
View file @
fbf01da4
...
...
@@ -110,6 +110,7 @@ typedef struct MatchCollectionEnum {
typedef
struct
MatchCollection2
{
IMatchCollection2
IMatchCollection2_iface
;
IMatchCollection
IMatchCollection_iface
;
LONG
ref
;
...
...
@@ -700,6 +701,9 @@ static HRESULT WINAPI MatchCollection2_QueryInterface(
}
else
if
(
IsEqualGUID
(
riid
,
&
IID_IMatchCollection2
))
{
TRACE
(
"(%p)->(IID_IMatchCollection2 %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
This
->
IMatchCollection2_iface
;
}
else
if
(
IsEqualGUID
(
riid
,
&
IID_IMatchCollection
))
{
TRACE
(
"(%p)->(IID_IMatchCollection %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
This
->
IMatchCollection_iface
;
}
else
if
(
IsEqualGUID
(
riid
,
&
IID_IDispatchEx
))
{
TRACE
(
"(%p)->(IID_IDispatchEx %p)
\n
"
,
This
,
ppv
);
*
ppv
=
NULL
;
...
...
@@ -842,6 +846,90 @@ static const IMatchCollection2Vtbl MatchCollection2Vtbl = {
MatchCollection2_get__NewEnum
};
static
inline
MatchCollection2
*
impl_from_IMatchCollection
(
IMatchCollection
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
MatchCollection2
,
IMatchCollection_iface
);
}
static
HRESULT
WINAPI
MatchCollection_QueryInterface
(
IMatchCollection
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
MatchCollection2
*
This
=
impl_from_IMatchCollection
(
iface
);
return
IMatchCollection2_QueryInterface
(
&
This
->
IMatchCollection2_iface
,
riid
,
ppv
);
}
static
ULONG
WINAPI
MatchCollection_AddRef
(
IMatchCollection
*
iface
)
{
MatchCollection2
*
This
=
impl_from_IMatchCollection
(
iface
);
return
IMatchCollection2_AddRef
(
&
This
->
IMatchCollection2_iface
);
}
static
ULONG
WINAPI
MatchCollection_Release
(
IMatchCollection
*
iface
)
{
MatchCollection2
*
This
=
impl_from_IMatchCollection
(
iface
);
return
IMatchCollection2_Release
(
&
This
->
IMatchCollection2_iface
);
}
static
HRESULT
WINAPI
MatchCollection_GetTypeInfoCount
(
IMatchCollection
*
iface
,
UINT
*
pctinfo
)
{
MatchCollection2
*
This
=
impl_from_IMatchCollection
(
iface
);
return
IMatchCollection2_GetTypeInfoCount
(
&
This
->
IMatchCollection2_iface
,
pctinfo
);
}
static
HRESULT
WINAPI
MatchCollection_GetTypeInfo
(
IMatchCollection
*
iface
,
UINT
iTInfo
,
LCID
lcid
,
ITypeInfo
**
ppTInfo
)
{
MatchCollection2
*
This
=
impl_from_IMatchCollection
(
iface
);
return
IMatchCollection2_GetTypeInfo
(
&
This
->
IMatchCollection2_iface
,
iTInfo
,
lcid
,
ppTInfo
);
}
static
HRESULT
WINAPI
MatchCollection_GetIDsOfNames
(
IMatchCollection
*
iface
,
REFIID
riid
,
LPOLESTR
*
rgszNames
,
UINT
cNames
,
LCID
lcid
,
DISPID
*
rgDispId
)
{
MatchCollection2
*
This
=
impl_from_IMatchCollection
(
iface
);
return
IMatchCollection2_GetIDsOfNames
(
&
This
->
IMatchCollection2_iface
,
riid
,
rgszNames
,
cNames
,
lcid
,
rgDispId
);
}
static
HRESULT
WINAPI
MatchCollection_Invoke
(
IMatchCollection
*
iface
,
DISPID
dispIdMember
,
REFIID
riid
,
LCID
lcid
,
WORD
wFlags
,
DISPPARAMS
*
pDispParams
,
VARIANT
*
pVarResult
,
EXCEPINFO
*
pExcepInfo
,
UINT
*
puArgErr
)
{
MatchCollection2
*
This
=
impl_from_IMatchCollection
(
iface
);
return
IMatchCollection2_Invoke
(
&
This
->
IMatchCollection2_iface
,
dispIdMember
,
riid
,
lcid
,
wFlags
,
pDispParams
,
pVarResult
,
pExcepInfo
,
puArgErr
);
}
static
HRESULT
WINAPI
MatchCollection_get_Item
(
IMatchCollection
*
iface
,
LONG
index
,
IDispatch
**
ppMatch
)
{
MatchCollection2
*
This
=
impl_from_IMatchCollection
(
iface
);
return
IMatchCollection2_get_Item
(
&
This
->
IMatchCollection2_iface
,
index
,
ppMatch
);
}
static
HRESULT
WINAPI
MatchCollection_get_Count
(
IMatchCollection
*
iface
,
LONG
*
pCount
)
{
MatchCollection2
*
This
=
impl_from_IMatchCollection
(
iface
);
return
IMatchCollection2_get_Count
(
&
This
->
IMatchCollection2_iface
,
pCount
);
}
static
HRESULT
WINAPI
MatchCollection_get__NewEnum
(
IMatchCollection
*
iface
,
IUnknown
**
ppEnum
)
{
MatchCollection2
*
This
=
impl_from_IMatchCollection
(
iface
);
return
IMatchCollection2_get__NewEnum
(
&
This
->
IMatchCollection2_iface
,
ppEnum
);
}
static
const
IMatchCollectionVtbl
MatchCollectionVtbl
=
{
MatchCollection_QueryInterface
,
MatchCollection_AddRef
,
MatchCollection_Release
,
MatchCollection_GetTypeInfoCount
,
MatchCollection_GetTypeInfo
,
MatchCollection_GetIDsOfNames
,
MatchCollection_Invoke
,
MatchCollection_get_Item
,
MatchCollection_get_Count
,
MatchCollection_get__NewEnum
};
static
HRESULT
add_match
(
IMatchCollection2
*
iface
,
IMatch2
*
add
)
{
MatchCollection2
*
This
=
impl_from_IMatchCollection2
(
iface
);
...
...
@@ -881,6 +969,7 @@ static HRESULT create_match_collection2(IMatchCollection2 **match_collection)
return
E_OUTOFMEMORY
;
ret
->
IMatchCollection2_iface
.
lpVtbl
=
&
MatchCollection2Vtbl
;
ret
->
IMatchCollection_iface
.
lpVtbl
=
&
MatchCollectionVtbl
;
ret
->
ref
=
1
;
*
match_collection
=
&
ret
->
IMatchCollection2_iface
;
...
...
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