Skip to content

Possible issue with VS_FIXEDFILEINFO generation/projection. #1653

@mjr4077au

Description

@mjr4077au

Actual behavior

Take the below snippet of partial source code emitted for VS_FIXEDFILEINFO, why are dwFileType and dwFileSubtype set up with getter/setter properties and private backing fields?

internal partial struct VS_FIXEDFILEINFO
{
    private winmdroot.Storage.FileSystem.VS_FIXEDFILEINFO_FILE_TYPE _dwFileType;

    private winmdroot.Storage.FileSystem.VS_FIXEDFILEINFO_FILE_SUBTYPE _dwFileSubtype;

    internal VS_FIXEDFILEINFO_FILE_TYPE dwFileType
    {
        get => (VS_FIXEDFILEINFO_FILE_TYPE)this._dwFileType;
        set => this._dwFileType = (winmdroot.Storage.FileSystem.VS_FIXEDFILEINFO_FILE_TYPE)value;
    }

    internal VS_FIXEDFILEINFO_FILE_SUBTYPE dwFileSubtype
    {
        get => (VS_FIXEDFILEINFO_FILE_SUBTYPE)this._dwFileSubtype;
        set => this._dwFileSubtype = (winmdroot.Storage.FileSystem.VS_FIXEDFILEINFO_FILE_SUBTYPE)value;
    }
}

Expected behavior

The backing fields are the same type, so I'd expect these to just be internal fields.

Repro steps

  1. NativeMethods.txt content:
VS_FIXEDFILEINFO
  1. NativeMethods.json content (if present): N/A

  2. Any of your own code that should be shared? N/A

Context

  • CsWin32 version: 0.3.269
  • Win32Metadata version (if explicitly set by project): N/A
  • Target Framework: net472
  • LangVersion (if explicitly set by project): N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions