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
c13e106e
Commit
c13e106e
authored
Mar 25, 2014
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Mar 26, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: COM cleanup for IEnumIDList.
parent
0aff9977
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
24 deletions
+25
-24
shfldr_unixfs.c
dlls/shell32/shfldr_unixfs.c
+25
-24
No files found.
dlls/shell32/shfldr_unixfs.c
View file @
c13e106e
...
...
@@ -170,9 +170,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell);
#if !defined(__MINGW32__) && !defined(_MSC_VER)
#define ADJUST_THIS(c,m,p) ((c*)(((long)p)-(long)&(((c*)0)->lp##m##Vtbl)))
#define STATIC_CAST(i,p) ((i*)&p->lp##i##Vtbl)
#define LEN_SHITEMID_FIXED_PART ((USHORT) \
( sizeof(USHORT)
/* SHITEMID's cb field. */
\
+ sizeof(PIDLTYPE)
/* PIDLDATA's type field. */
\
...
...
@@ -2368,13 +2365,18 @@ HRESULT WINAPI MyDocuments_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID
/* UnixSubFolderIterator object layout and typedef.
*/
typedef
struct
_UnixSubFolderIterator
{
const
IEnumIDListVtbl
*
lpIEnumIDListVtbl
;
LONG
m_cR
ef
;
IEnumIDList
IEnumIDList_iface
;
LONG
r
ef
;
SHCONTF
m_fFilter
;
DIR
*
m_dirFolder
;
char
m_szFolder
[
FILENAME_MAX
];
}
UnixSubFolderIterator
;
static
inline
UnixSubFolderIterator
*
impl_from_IEnumIDList
(
IEnumIDList
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
UnixSubFolderIterator
,
IEnumIDList_iface
);
}
static
void
UnixSubFolderIterator_Destroy
(
UnixSubFolderIterator
*
iterator
)
{
TRACE
(
"(iterator=%p)
\n
"
,
iterator
);
...
...
@@ -2400,35 +2402,34 @@ static HRESULT WINAPI UnixSubFolderIterator_IEnumIDList_QueryInterface(IEnumIDLi
IEnumIDList_AddRef
(
iface
);
return
S_OK
;
}
static
ULONG
WINAPI
UnixSubFolderIterator_IEnumIDList_AddRef
(
IEnumIDList
*
iface
)
{
UnixSubFolderIterator
*
This
=
ADJUST_THIS
(
UnixSubFolderIterator
,
IEnumIDList
,
iface
);
UnixSubFolderIterator
*
This
=
impl_from_IEnumIDList
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(
iface=%p)
\n
"
,
iface
);
return
InterlockedIncrement
(
&
This
->
m_cRef
)
;
TRACE
(
"(
%p) ref=%d
\n
"
,
This
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
UnixSubFolderIterator_IEnumIDList_Release
(
IEnumIDList
*
iface
)
{
UnixSubFolderIterator
*
This
=
ADJUST_THIS
(
UnixSubFolderIterator
,
IEnumIDList
,
iface
);
ULONG
cRef
;
TRACE
(
"(iface=%p)
\n
"
,
iface
);
UnixSubFolderIterator
*
This
=
impl_from_IEnumIDList
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
cRef
=
InterlockedDecrement
(
&
This
->
m_cR
ef
);
if
(
!
cRef
)
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
r
ef
);
if
(
!
ref
)
UnixSubFolderIterator_Destroy
(
This
);
return
cR
ef
;
return
r
ef
;
}
static
HRESULT
WINAPI
UnixSubFolderIterator_IEnumIDList_Next
(
IEnumIDList
*
iface
,
ULONG
celt
,
LPITEMIDLIST
*
rgelt
,
ULONG
*
pceltFetched
)
{
UnixSubFolderIterator
*
This
=
ADJUST_THIS
(
UnixSubFolderIterator
,
IEnumIDList
,
iface
);
UnixSubFolderIterator
*
This
=
impl_from_IEnumIDList
(
iface
);
ULONG
i
=
0
;
/* This->m_dirFolder will be NULL if the user doesn't have access rights for the dir. */
...
...
@@ -2487,8 +2488,8 @@ static HRESULT WINAPI UnixSubFolderIterator_IEnumIDList_Skip(IEnumIDList* iface,
static
HRESULT
WINAPI
UnixSubFolderIterator_IEnumIDList_Reset
(
IEnumIDList
*
iface
)
{
UnixSubFolderIterator
*
This
=
ADJUST_THIS
(
UnixSubFolderIterator
,
IEnumIDList
,
iface
);
UnixSubFolderIterator
*
This
=
impl_from_IEnumIDList
(
iface
);
TRACE
(
"(iface=%p)
\n
"
,
iface
);
if
(
This
->
m_dirFolder
)
...
...
@@ -2523,13 +2524,13 @@ static IEnumIDList *UnixSubFolderIterator_Constructor(UnixFolder *pUnixFolder, S
TRACE
(
"(pUnixFolder=%p)
\n
"
,
pUnixFolder
);
iterator
=
SHAlloc
(
sizeof
(
*
iterator
));
iterator
->
lpIEnumIDList
Vtbl
=
&
UnixSubFolderIterator_IEnumIDList_Vtbl
;
iterator
->
m_cR
ef
=
1
;
iterator
->
IEnumIDList_iface
.
lp
Vtbl
=
&
UnixSubFolderIterator_IEnumIDList_Vtbl
;
iterator
->
r
ef
=
1
;
iterator
->
m_fFilter
=
fFilter
;
iterator
->
m_dirFolder
=
opendir
(
pUnixFolder
->
m_pszPath
);
lstrcpyA
(
iterator
->
m_szFolder
,
pUnixFolder
->
m_pszPath
);
return
(
IEnumIDList
*
)
iterator
;
return
&
iterator
->
IEnumIDList_iface
;
}
#else
/* __MINGW32__ || _MSC_VER */
...
...
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