Skip to content

Members in COM structs should be public #723

@JeremyKuhne

Description

@JeremyKuhne

Currently the COM structs generate members internal:

[Guid("00000000-0000-0000-C000-000000000046")]
[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.2.84-beta+43c3f6d060")]
internal unsafe partial struct IUnknown
{
	/// <inheritdoc cref="QueryInterface(global::System.Guid*, void**)"/>
	internal unsafe winmdroot.Foundation.HRESULT QueryInterface(in global::System.Guid riid, out void* ppvObject)
	{

If the members are public it allows applying interfaces (notably the nested interface definitions) to the struct, which can allow constraining generic helpers to things like IUnknown.Interface if we (or CsWin32) apply it to the COM structs.

[Guid("00000000-0000-0000-C000-000000000046")]
[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.2.84-beta+43c3f6d060")]
internal unsafe partial struct IUnknown : IUnkown.Interface
{
	/// <inheritdoc cref="QueryInterface(global::System.Guid*, void**)"/>

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions