Skip to content

IPortableDevice types being generated with in keywords #1635

@wadebader

Description

@wadebader

Actual behavior

Some PortableDevice related COM interfaces are generated with inaccurate method signatures. Everything still works, but I don't think this is correctly generated. For example:

internal interface IPortableDevicePropVariantCollection
{
    void GetCount(in uint pcElems);
    ...
    void GetAt(uint dwIndex, in winmdroot.System.Com.StructuredStorage.PROPVARIANT pValue);
}

I've found the same behavior on IPortableDevicePropVariantCollection, IPortableDeviceKeyCollection, IPortableDeviceValues, and IPortableDeviceValuesCollection.

Expected behavior

For all of those methods, I would expect the data to be returned to me to use an out parameter rather than an in parameter.

Repro steps

  1. NativeMethods.txt content:
IPortableDevice

Context

  • CsWin32 version: 0.3.269-beta
  • Target Framework: net9.0

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