-
Notifications
You must be signed in to change notification settings - Fork 112
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
I'm trying to enumerate a TLB.
Actual behavior
ITypeInfo outputs incorrect pointer-indirection in method signatures:
void GetFuncDesc(uint index, out winmdroot.System.Com.FUNCDESC ppFuncDesc);
void GetVarDesc(uint index, out winmdroot.System.Com.VARDESC ppVarDesc);If FUNCDESC and VARDESC were interfaces, this would be fine. But they're structs. Curiously, GetTypeAttr is generated correctly:
unsafe void GetTypeAttr(winmdroot.System.Com.TYPEATTR** ppTypeAttr);Expected behavior
The correct level of indirection:
void GetFuncDesc(uint index, winmdroot.System.Com.FUNCDESC** ppFuncDesc);
void GetVarDesc(uint index, winmdroot.System.Com.VARDESC** ppVarDesc);With "friendlier" out T* extension methods.
Repro steps
NativeMethods.txtcontent:
ITypeInfo
Context
- CsWin32 version: 0.3.205
Metadata
The metadata is correct (63.0.31-preview):
namespace Windows.Win32.System.Com;
[global::Windows.Win32.Foundation.Metadata.Guid(132097U, 0, 0, 192, 0, 0, 0, 0, 0, 0, 70)]
[Documentation("https://learn.microsoft.com/windows/win32/api/oaidl/nn-oaidl-itypeinfo")]
public interface ITypeInfo : IUnknown
{
[Documentation("https://learn.microsoft.com/windows/win32/api/oaidl/nf-oaidl-itypeinfo-gettypeattr")]
unsafe HRESULT GetTypeAttr([Out] TYPEATTR** ppTypeAttr);
[Documentation("https://learn.microsoft.com/windows/win32/api/oaidl/nf-oaidl-itypeinfo-gettypecomp")]
unsafe HRESULT GetTypeComp([Out] ITypeComp* ppTComp);
[Documentation("https://learn.microsoft.com/windows/win32/api/oaidl/nf-oaidl-itypeinfo-getfuncdesc")]
unsafe HRESULT GetFuncDesc([In] uint index, [Out] FUNCDESC** ppFuncDesc);
[Documentation("https://learn.microsoft.com/windows/win32/api/oaidl/nf-oaidl-itypeinfo-getvardesc")]
unsafe HRESULT GetVarDesc([In] uint index, [Out] VARDESC** ppVarDesc);
...Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working