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
52838e68
Commit
52838e68
authored
Jul 08, 2011
by
Jay Yang
Committed by
Alexandre Julliard
Jul 09, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Implement SHQueryRecycleBin.
parent
a77d50b6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
22 deletions
+33
-22
recyclebin.c
dlls/shell32/recyclebin.c
+31
-0
shellord.c
dlls/shell32/shellord.c
+0
-20
recyclebin.c
dlls/shell32/tests/recyclebin.c
+2
-2
No files found.
dlls/shell32/recyclebin.c
View file @
52838e68
...
...
@@ -2,6 +2,7 @@
* Trash virtual folder support. The trashing engine is implemented in trash.c
*
* Copyright (C) 2006 Mikolaj Zalewski
* Copyright 2011 Jay Yang
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -34,6 +35,7 @@
#include "shlwapi.h"
#include "shlobj.h"
#include "shresdef.h"
#include "shellapi.h"
#include "wine/debug.h"
#include "shell32_main.h"
...
...
@@ -524,6 +526,35 @@ static const IPersistFolder2Vtbl recycleBinPersistVtbl =
RecycleBin_GetCurFolder
};
HRESULT
WINAPI
SHQueryRecycleBinA
(
LPCSTR
pszRootPath
,
LPSHQUERYRBINFO
pSHQueryRBInfo
)
{
WCHAR
wszRootPath
[
MAX_PATH
];
MultiByteToWideChar
(
CP_ACP
,
0
,
pszRootPath
,
-
1
,
wszRootPath
,
MAX_PATH
);
return
SHQueryRecycleBinW
(
wszRootPath
,
pSHQueryRBInfo
);
}
HRESULT
WINAPI
SHQueryRecycleBinW
(
LPCWSTR
pszRootPath
,
LPSHQUERYRBINFO
pSHQueryRBInfo
)
{
LPITEMIDLIST
*
apidl
;
INT
cidl
;
INT
i
=
0
;
TRACE
(
"(%s, %p)
\n
"
,
debugstr_w
(
pszRootPath
),
pSHQueryRBInfo
);
FIXME
(
"Ignoring pszRootPath=%s
\n
"
,
debugstr_w
(
pszRootPath
));
TRASH_EnumItems
(
&
apidl
,
&
cidl
);
pSHQueryRBInfo
->
i64NumItems
=
cidl
;
pSHQueryRBInfo
->
i64Size
=
0
;
for
(;
i
<
cidl
;
i
++
)
{
WIN32_FIND_DATAW
data
;
TRASH_UnpackItemID
(
&
((
apidl
[
i
])
->
mkid
),
&
data
);
pSHQueryRBInfo
->
i64Size
+=
((
DWORDLONG
)
data
.
nFileSizeHigh
<<
32
)
+
data
.
nFileSizeLow
;
ILFree
(
apidl
[
i
]);
}
SHFree
(
apidl
);
return
S_OK
;
}
/*************************************************************************
* SHUpdateRecycleBinIcon [SHELL32.@]
*
...
...
dlls/shell32/shellord.c
View file @
52838e68
...
...
@@ -2119,26 +2119,6 @@ DWORD WINAPI SHFormatDrive(HWND hwnd, UINT drive, UINT fmtID, UINT options)
return
SHFMT_NOFORMAT
;
}
HRESULT
WINAPI
SHQueryRecycleBinA
(
LPCSTR
pszRootPath
,
LPSHQUERYRBINFO
pSHQueryRBInfo
)
{
FIXME
(
"%s, %p - stub
\n
"
,
debugstr_a
(
pszRootPath
),
pSHQueryRBInfo
);
pSHQueryRBInfo
->
i64Size
=
0
;
pSHQueryRBInfo
->
i64NumItems
=
0
;
return
S_OK
;
}
HRESULT
WINAPI
SHQueryRecycleBinW
(
LPCWSTR
pszRootPath
,
LPSHQUERYRBINFO
pSHQueryRBInfo
)
{
FIXME
(
"%s, %p - stub
\n
"
,
debugstr_w
(
pszRootPath
),
pSHQueryRBInfo
);
pSHQueryRBInfo
->
i64Size
=
0
;
pSHQueryRBInfo
->
i64NumItems
=
0
;
return
S_OK
;
}
/*************************************************************************
* SHSetLocalizedName (SHELL32.@)
*/
...
...
dlls/shell32/tests/recyclebin.c
View file @
52838e68
...
...
@@ -90,8 +90,8 @@ static void test_query_recyclebin(void)
ok
(
!
pSHFileOperationA
(
&
shfo
),
"Deletion was not successful
\n
"
);
hr
=
pSHQueryRecycleBinA
(
buf
,
&
info2
);
ok
(
hr
==
S_OK
,
"SHQueryRecycleBinW failed with error 0x%x
\n
"
,
hr
);
todo_wine
ok
(
info2
.
i64Size
==
info1
.
i64Size
+
written
,
"Expected recycle bin to have 0x%s bytes
\n
"
,
str_from_int64
(
info1
.
i64Size
+
written
));
todo_wine
ok
(
info2
.
i64NumItems
==
info1
.
i64NumItems
+
1
,
"Expected recycle bin to have 0x%s items
\n
"
,
str_from_int64
(
info1
.
i64NumItems
+
1
));
ok
(
info2
.
i64Size
==
info1
.
i64Size
+
written
,
"Expected recycle bin to have 0x%s bytes
\n
"
,
str_from_int64
(
info1
.
i64Size
+
written
));
ok
(
info2
.
i64NumItems
==
info1
.
i64NumItems
+
1
,
"Expected recycle bin to have 0x%s items
\n
"
,
str_from_int64
(
info1
.
i64NumItems
+
1
));
}
...
...
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