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
ab958dcf
Commit
ab958dcf
authored
Jun 07, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 08, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
browseui: Added IEnumString stub for ACListISF.
parent
1de3aec3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
123 additions
and
30 deletions
+123
-30
aclsource.c
dlls/browseui/aclsource.c
+99
-30
autocomplete.c
dlls/browseui/tests/autocomplete.c
+24
-0
No files found.
dlls/browseui/aclsource.c
View file @
ab958dcf
...
...
@@ -42,7 +42,8 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
browseui
);
typedef
struct
tagACLMulti
{
typedef
struct
tagACLShellSource
{
IEnumString
IEnumString_iface
;
IACList2
IACList2_iface
;
LONG
refCount
;
DWORD
dwOptions
;
...
...
@@ -53,26 +54,37 @@ static inline ACLShellSource *impl_from_IACList2(IACList2 *iface)
return
CONTAINING_RECORD
(
iface
,
ACLShellSource
,
IACList2_iface
);
}
static
inline
ACLShellSource
*
impl_from_IEnumString
(
IEnumString
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
ACLShellSource
,
IEnumString_iface
);
}
static
void
ACLShellSource_Destructor
(
ACLShellSource
*
This
)
{
TRACE
(
"destroying %p
\n
"
,
This
);
heap_free
(
This
);
}
static
HRESULT
WINAPI
ACLShellSource_QueryInterface
(
I
ACList2
*
iface
,
REFIID
iid
,
LPVOID
*
ppvOut
)
static
HRESULT
WINAPI
ACLShellSource_QueryInterface
(
I
EnumString
*
iface
,
REFIID
iid
,
LPVOID
*
ppvOut
)
{
ACLShellSource
*
This
=
impl_from_IACList2
(
iface
);
ACLShellSource
*
This
=
impl_from_IEnumString
(
iface
);
TRACE
(
"(%p)->(%s, %p)
\n
"
,
This
,
debugstr_guid
(
iid
),
ppvOut
);
*
ppvOut
=
NULL
;
if
(
IsEqualIID
(
iid
,
&
IID_IUnknown
)
||
IsEqualIID
(
iid
,
&
IID_IACList2
)
||
IsEqualIID
(
iid
,
&
IID_IACList
))
if
(
IsEqualIID
(
iid
,
&
IID_IUnknown
)
||
IsEqualIID
(
iid
,
&
IID_IEnumString
))
{
*
ppvOut
=
&
This
->
IEnumString_iface
;
}
else
if
(
IsEqualIID
(
iid
,
&
IID_IACList2
)
||
IsEqualIID
(
iid
,
&
IID_IACList
))
{
*
ppvOut
=
&
This
->
IACList2_iface
;
}
if
(
*
ppvOut
)
{
I
ACList2
_AddRef
(
iface
);
I
EnumString
_AddRef
(
iface
);
return
S_OK
;
}
...
...
@@ -80,40 +92,98 @@ static HRESULT WINAPI ACLShellSource_QueryInterface(IACList2 *iface, REFIID iid,
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
ACLShellSource_AddRef
(
IACList2
*
iface
)
static
ULONG
WINAPI
ACLShellSource_AddRef
(
IEnumString
*
iface
)
{
ACLShellSource
*
This
=
impl_from_IEnumString
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
refCount
);
TRACE
(
"(%p)->(%u)
\n
"
,
This
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
ACLShellSource_Release
(
IEnumString
*
iface
)
{
ACLShellSource
*
This
=
impl_from_IEnumString
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
refCount
);
TRACE
(
"(%p)->(%u)
\n
"
,
This
,
ref
);
if
(
ref
==
0
)
ACLShellSource_Destructor
(
This
);
return
ref
;
}
static
HRESULT
WINAPI
ACLShellSource_Next
(
IEnumString
*
iface
,
ULONG
celt
,
LPOLESTR
*
rgelt
,
ULONG
*
fetched
)
{
ACLShellSource
*
This
=
impl_from_IEnumString
(
iface
);
FIXME
(
"(%p)->(%u %p %p): stub
\n
"
,
This
,
celt
,
rgelt
,
fetched
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ACLShellSource_Skip
(
IEnumString
*
iface
,
ULONG
celt
)
{
ACLShellSource
*
This
=
impl_from_IEnumString
(
iface
);
FIXME
(
"(%p)->(%u): stub
\n
"
,
This
,
celt
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ACLShellSource_Reset
(
IEnumString
*
iface
)
{
ACLShellSource
*
This
=
impl_from_IEnumString
(
iface
);
FIXME
(
"(%p): stub
\n
"
,
This
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ACLShellSource_Clone
(
IEnumString
*
iface
,
IEnumString
**
ppenum
)
{
ACLShellSource
*
This
=
impl_from_IEnumString
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
ppenum
);
return
E_NOTIMPL
;
}
static
const
IEnumStringVtbl
ACLShellSourceVtbl
=
{
ACLShellSource_QueryInterface
,
ACLShellSource_AddRef
,
ACLShellSource_Release
,
ACLShellSource_Next
,
ACLShellSource_Skip
,
ACLShellSource_Reset
,
ACLShellSource_Clone
};
static
HRESULT
WINAPI
ACList_QueryInterface
(
IACList2
*
iface
,
REFIID
iid
,
void
**
ppvOut
)
{
ACLShellSource
*
This
=
impl_from_IACList2
(
iface
);
return
I
nterlockedIncrement
(
&
This
->
refCoun
t
);
return
I
EnumString_QueryInterface
(
&
This
->
IEnumString_iface
,
iid
,
ppvOu
t
);
}
static
ULONG
WINAPI
ACL
ShellSource_Release
(
IACList2
*
iface
)
static
ULONG
WINAPI
ACL
ist_AddRef
(
IACList2
*
iface
)
{
ACLShellSource
*
This
=
impl_from_IACList2
(
iface
);
ULONG
ret
;
return
IEnumString_AddRef
(
&
This
->
IEnumString_iface
);
}
ret
=
InterlockedDecrement
(
&
This
->
refCount
);
if
(
ret
==
0
)
ACLShellSource_Destructor
(
This
);
return
ret
;
static
ULONG
WINAPI
ACList_Release
(
IACList2
*
iface
)
{
ACLShellSource
*
This
=
impl_from_IACList2
(
iface
);
return
IEnumString_Release
(
&
This
->
IEnumString_iface
)
;
}
static
HRESULT
WINAPI
ACL
ShellSource
_Expand
(
IACList2
*
iface
,
LPCWSTR
wstr
)
static
HRESULT
WINAPI
ACL
ist
_Expand
(
IACList2
*
iface
,
LPCWSTR
wstr
)
{
ACLShellSource
*
This
=
impl_from_IACList2
(
iface
);
FIXME
(
"STUB:(%p) %s
\n
"
,
This
,
debugstr_w
(
wstr
));
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
ACLShellSource_GetOptions
(
IACList2
*
iface
,
DWORD
*
pdwFlag
)
static
HRESULT
WINAPI
ACList_GetOptions
(
IACList2
*
iface
,
DWORD
*
pdwFlag
)
{
ACLShellSource
*
This
=
impl_from_IACList2
(
iface
);
*
pdwFlag
=
This
->
dwOptions
;
return
S_OK
;
}
static
HRESULT
WINAPI
ACL
ShellSource
_SetOptions
(
IACList2
*
iface
,
static
HRESULT
WINAPI
ACL
ist
_SetOptions
(
IACList2
*
iface
,
DWORD
dwFlag
)
{
ACLShellSource
*
This
=
impl_from_IACList2
(
iface
);
...
...
@@ -121,16 +191,14 @@ static HRESULT WINAPI ACLShellSource_SetOptions(IACList2 *iface,
return
S_OK
;
}
static
const
IACList2Vtbl
ACL
Multi_ACList2
Vtbl
=
static
const
IACList2Vtbl
ACL
ist
Vtbl
=
{
ACLShellSource_QueryInterface
,
ACLShellSource_AddRef
,
ACLShellSource_Release
,
ACLShellSource_Expand
,
ACLShellSource_SetOptions
,
ACLShellSource_GetOptions
ACList_QueryInterface
,
ACList_AddRef
,
ACList_Release
,
ACList_Expand
,
ACList_SetOptions
,
ACList_GetOptions
};
HRESULT
ACLShellSource_Constructor
(
IUnknown
*
pUnkOuter
,
IUnknown
**
ppOut
)
...
...
@@ -143,10 +211,11 @@ HRESULT ACLShellSource_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
if
(
This
==
NULL
)
return
E_OUTOFMEMORY
;
This
->
IACList2_iface
.
lpVtbl
=
&
ACLMulti_ACList2Vtbl
;
This
->
IEnumString_iface
.
lpVtbl
=
&
ACLShellSourceVtbl
;
This
->
IACList2_iface
.
lpVtbl
=
&
ACListVtbl
;
This
->
refCount
=
1
;
TRACE
(
"returning %p
\n
"
,
This
);
*
ppOut
=
(
IUnknown
*
)
&
This
->
I
ACList2
_iface
;
*
ppOut
=
(
IUnknown
*
)
&
This
->
I
EnumString
_iface
;
return
S_OK
;
}
dlls/browseui/tests/autocomplete.c
View file @
ab958dcf
...
...
@@ -364,9 +364,33 @@ static void test_ACLMulti(void)
CoTaskMemFree
(
acl2
);
}
static
void
test_ACListISF
(
void
)
{
IEnumString
*
enumstring
;
IACList
*
list
,
*
list2
;
HRESULT
hr
;
hr
=
CoCreateInstance
(
&
CLSID_ACListISF
,
NULL
,
CLSCTX_INPROC
,
&
IID_IACList
,
(
void
**
)
&
list
);
ok
(
hr
==
S_OK
,
"failed to create ACListISF instance, 0x%08x
\n
"
,
hr
);
hr
=
IACList_QueryInterface
(
list
,
&
IID_IEnumString
,
(
void
**
)
&
enumstring
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IEnumString_QueryInterface
(
enumstring
,
&
IID_IACList
,
(
void
**
)
&
list2
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
list
==
list2
,
"got %p, %p
\n
"
,
list
,
list2
);
IACList_Release
(
list2
);
IEnumString_Release
(
enumstring
);
IACList_Release
(
list
);
}
START_TEST
(
autocomplete
)
{
CoInitialize
(
NULL
);
test_ACLMulti
();
test_ACListISF
();
CoUninitialize
();
}
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