oleaut32: Fix MSVC generating _VtblGapPlaceholder methods for typelib headers

When compiling a C++ file containing a typelib import using MSVC, the typelib is loaded using the LOAD_TLB_AS_32BIT or LOAD_TLB_AS_64BIT flags added to the regkind argument.

Since those flags were not handled, single _VtblGapPlaceholderN methods were being inserted in between real methods in the generated typelibrary header when compiling for x86 on an x64 host due to methods' vtable offsets not being scaled for the requested pointer size.

cbSizeVft also needs to be scaled in a similar way to method vtable offsets, which partially fixes the multiple _VtblGapPlaceholderN methods being inserted at the beginning of an interface in the generated typelib header, filling the "gap" between the parent cbSizeVft and the first method.

Finally, the referenced types need be loaded with the same pointer size as the referencer, fixing the other half of the multiple _VtblGapPlaceholderN issue, and also solving the pointer size todos in the CreateTypeLib test.

Along with the conformance tests added, I tested that these changes solve the issue with MSVC (particularly when compiling an import to dte80a.olb of the Visual Studio IDE), and, given the referenced type loading change is similar in goal to 43e5f9e4, I also tested these patches with the test case of https://bugs.winehq.org/show_bug.cgi?id=55962.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=39101

Merge request reports

Loading