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
b22102df
Commit
b22102df
authored
Mar 17, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 18, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scrrun: Added stub IEnumVARIANT for dictionary.
parent
e0bbfb71
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
113 additions
and
3 deletions
+113
-3
dictionary.c
dlls/scrrun/dictionary.c
+113
-3
No files found.
dlls/scrrun/dictionary.c
View file @
b22102df
...
...
@@ -73,11 +73,23 @@ typedef struct
struct
list
buckets
[
BUCKET_COUNT
];
}
dictionary
;
struct
dictionary_enum
{
IEnumVARIANT
IEnumVARIANT_iface
;
LONG
ref
;
dictionary
*
dict
;
};
static
inline
dictionary
*
impl_from_IDictionary
(
IDictionary
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
dictionary
,
IDictionary_iface
);
}
static
inline
struct
dictionary_enum
*
impl_from_IEnumVARIANT
(
IEnumVARIANT
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
dictionary_enum
,
IEnumVARIANT_iface
);
}
static
inline
struct
list
*
get_bucket_head
(
dictionary
*
dict
,
DWORD
hash
)
{
return
&
dict
->
buckets
[
hash
%
BUCKET_COUNT
];
...
...
@@ -202,6 +214,104 @@ static void free_keyitem_pair(struct keyitem_pair *pair)
heap_free
(
pair
);
}
static
HRESULT
WINAPI
dict_enum_QueryInterface
(
IEnumVARIANT
*
iface
,
REFIID
riid
,
void
**
obj
)
{
struct
dictionary_enum
*
This
=
impl_from_IEnumVARIANT
(
iface
);
TRACE
(
"(%p)->(%s, %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
obj
);
if
(
IsEqualIID
(
riid
,
&
IID_IEnumVARIANT
)
||
IsEqualIID
(
riid
,
&
IID_IUnknown
))
{
*
obj
=
iface
;
IEnumVARIANT_AddRef
(
iface
);
return
S_OK
;
}
else
{
WARN
(
"interface not supported %s
\n
"
,
debugstr_guid
(
riid
));
*
obj
=
NULL
;
return
E_NOINTERFACE
;
}
}
static
ULONG
WINAPI
dict_enum_AddRef
(
IEnumVARIANT
*
iface
)
{
struct
dictionary_enum
*
This
=
impl_from_IEnumVARIANT
(
iface
);
TRACE
(
"(%p)
\n
"
,
This
);
return
InterlockedIncrement
(
&
This
->
ref
);
}
static
ULONG
WINAPI
dict_enum_Release
(
IEnumVARIANT
*
iface
)
{
struct
dictionary_enum
*
This
=
impl_from_IEnumVARIANT
(
iface
);
LONG
ref
;
TRACE
(
"(%p)
\n
"
,
This
);
ref
=
InterlockedDecrement
(
&
This
->
ref
);
if
(
ref
==
0
)
{
IDictionary_Release
(
&
This
->
dict
->
IDictionary_iface
);
heap_free
(
This
);
}
return
ref
;
}
static
HRESULT
WINAPI
dict_enum_Next
(
IEnumVARIANT
*
iface
,
ULONG
count
,
VARIANT
*
keys
,
ULONG
*
fetched
)
{
struct
dictionary_enum
*
This
=
impl_from_IEnumVARIANT
(
iface
);
FIXME
(
"(%p)->(%u %p %p): stub
\n
"
,
This
,
count
,
keys
,
fetched
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
dict_enum_Skip
(
IEnumVARIANT
*
iface
,
ULONG
count
)
{
struct
dictionary_enum
*
This
=
impl_from_IEnumVARIANT
(
iface
);
FIXME
(
"(%p)->(%u): stub
\n
"
,
This
,
count
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
dict_enum_Reset
(
IEnumVARIANT
*
iface
)
{
struct
dictionary_enum
*
This
=
impl_from_IEnumVARIANT
(
iface
);
FIXME
(
"(%p): stub
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
dict_enum_Clone
(
IEnumVARIANT
*
iface
,
IEnumVARIANT
**
cloned
)
{
struct
dictionary_enum
*
This
=
impl_from_IEnumVARIANT
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
cloned
);
return
E_NOTIMPL
;
}
static
const
IEnumVARIANTVtbl
dictenumvtbl
=
{
dict_enum_QueryInterface
,
dict_enum_AddRef
,
dict_enum_Release
,
dict_enum_Next
,
dict_enum_Skip
,
dict_enum_Reset
,
dict_enum_Clone
};
static
HRESULT
create_dict_enum
(
dictionary
*
dict
,
IUnknown
**
ret
)
{
struct
dictionary_enum
*
This
;
*
ret
=
NULL
;
This
=
heap_alloc
(
sizeof
(
*
This
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
IEnumVARIANT_iface
.
lpVtbl
=
&
dictenumvtbl
;
This
->
ref
=
1
;
This
->
dict
=
dict
;
IDictionary_AddRef
(
&
dict
->
IDictionary_iface
);
*
ret
=
(
IUnknown
*
)
&
This
->
IEnumVARIANT_iface
;
return
S_OK
;
}
static
HRESULT
WINAPI
dictionary_QueryInterface
(
IDictionary
*
iface
,
REFIID
riid
,
void
**
obj
)
{
dictionary
*
This
=
impl_from_IDictionary
(
iface
);
...
...
@@ -557,13 +667,13 @@ static HRESULT WINAPI dictionary_get_CompareMode(IDictionary *iface, CompareMeth
return
S_OK
;
}
static
HRESULT
WINAPI
dictionary__NewEnum
(
IDictionary
*
iface
,
IUnknown
**
ppunk
)
static
HRESULT
WINAPI
dictionary__NewEnum
(
IDictionary
*
iface
,
IUnknown
**
ret
)
{
dictionary
*
This
=
impl_from_IDictionary
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
ppunk
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
ret
);
return
E_NOTIMPL
;
return
create_dict_enum
(
This
,
ret
)
;
}
static
DWORD
get_str_hash
(
const
WCHAR
*
str
,
CompareMethod
method
)
...
...
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