Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
52838e68
Commit
52838e68
authored
13 years ago
by
Jay Yang
Committed by
Alexandre Julliard
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
shell32: Implement SHQueryRecycleBin.
parent
a77d50b6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dlls/shell32/recyclebin.c
+31
-0
31 additions, 0 deletions
dlls/shell32/recyclebin.c
dlls/shell32/shellord.c
+0
-20
0 additions, 20 deletions
dlls/shell32/shellord.c
dlls/shell32/tests/recyclebin.c
+2
-2
2 additions, 2 deletions
dlls/shell32/tests/recyclebin.c
with
33 additions
and
22 deletions
dlls/shell32/recyclebin.c
+
31
−
0
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.@]
*
...
...
This diff is collapsed.
Click to expand it.
dlls/shell32/shellord.c
+
0
−
20
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.@)
*/
...
...
This diff is collapsed.
Click to expand it.
dlls/shell32/tests/recyclebin.c
+
2
−
2
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
));
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment