Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SHQUERYRBINFO - Incorrect struct definition #127

Closed
gave92 opened this issue May 30, 2020 · 1 comment
Closed

SHQUERYRBINFO - Incorrect struct definition #127

gave92 opened this issue May 30, 2020 · 1 comment

Comments

@gave92
Copy link

gave92 commented May 30, 2020

Describe the bug
The function Vanara.PInvoke.Shell32.SHQueryRecycleBin returns garbage data.

Research
The definition of the SHQUERYRBINFO is missing the correct alignment attribute.
With the following definition the call to SHQueryRecycleBin return correct results:

[StructLayout(LayoutKind.Sequential, Pack = 4)]  -----> added Pack attribute
struct SHQUERYRBINFO
{
    public uint cbSize;
    public long i64Size;
    public long i64NumItems;
}

PS: when are you planning to release a new version on nuget?

dahall added a commit that referenced this issue Jun 1, 2020
@dahall
Copy link
Owner

dahall commented Jun 1, 2020

I have updated the structure per your research. Thank you. An interim build of the NuGet package will be available in about 10 minutes from AppVeyor. See the home page for info on that NuGet source. I'm likely about a week or more from publishing the next release to NuGet.org as I'm in the middle of a significant library addition and some major fixes to Vanara.Windows.Shell.

@dahall dahall closed this as completed Jun 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants