-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
🪲 bugProduct bug (most likely)Product bug (most likely)
Description
This is a follow-up issue to PR #818 where it was noted (link to comment) that the definition of ELEMDESC that WinForms uses seems to be wrong.
Currently the definition is embedding the TYPEDESC by reference (it was a class before, so the interop rules should already have been embedding it as a pointer before PR #818)
public unsafe struct tagELEMDESC {
public NativeMethods.tagTYPEDESC* tdesc;
public NativeMethods.tagPARAMDESC paramdesc;
}while the definition of ELEMDESC and TYPEDESC on msdn is
typedef struct tagELEMDESC {
TYPEDESC tdesc;
PARAMDESC paramdesc;
} ELEMDESC, *LPELEMDESC;
typedef struct tagTYPEDESC {
union {
struct tagTYPEDESC *lptdesc;
struct tagARRAYDESC *lpadesc;
HREFTYPE hreftype;
} DUMMYUNIONNAME;
VARTYPE vt;
} TYPEDESC;Notes taken from the previous discussion in the PR
- @sharwell wants to have tests to make sure nothing breaks, because fixing this likely requires also correcting all usage of
ELEMDESCin WinForms - @zsd4yr suggests taking a look into the old source control system to see if there's any history to the definition explaining the way it is
- @JeremyKuhne suggests using the version in
System.Runtime.InteropServices.ComTypes- note that this still requires reviewing and adjusting callers in WinForms which previously used the broken version
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
🪲 bugProduct bug (most likely)Product bug (most likely)