Zebediah Figura : stdole2: Avoid defining Automation typedefs as part of the public library.

Alexandre Julliard julliard at winehq.org
Mon Nov 19 15:59:37 CST 2018


Module: wine
Branch: master
Commit: 247ae9838ff4ef575d329c8f8f47db01f341d03e
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=247ae9838ff4ef575d329c8f8f47db01f341d03e

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Sun Nov 18 14:35:51 2018 -0600

stdole2: Avoid defining Automation typedefs as part of the public library.

This fixes a regression introduced by 70e5d5fd2e8501f36e4f3b2bccbdc55e25d31ee4.

If the VARIANT struct is defined inside the library block, widl generates
typeinfo for it at index 0. This confuses typelibs that import stdole2.tlb.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45949
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 include/stdole2.idl | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/include/stdole2.idl b/include/stdole2.idl
index d372384..b659070 100644
--- a/include/stdole2.idl
+++ b/include/stdole2.idl
@@ -25,6 +25,17 @@
 
 #include <olectl.h>
 
+/* These typedefs need to have the same size as their real counterparts. */
+typedef short VARIANT_BOOL;
+typedef void *BSTR;
+typedef double CURRENCY;
+typedef unsigned long HRESULT;
+typedef struct {
+    short word1, word2, word3, word4;
+    void *ptr1, *ptr2;
+} VARIANT;
+typedef unsigned long SCODE;
+
 [
   uuid(00020430-0000-0000-C000-000000000046),
   version(2.0),
@@ -32,17 +43,6 @@
 ]
 library stdole
 {
-    /* These typedefs need to have the same size as their real counterparts. */
-    typedef short VARIANT_BOOL;
-    typedef void *BSTR;
-    typedef double CURRENCY;
-    typedef unsigned long HRESULT;
-    typedef struct {
-        short word1, word2, word3, word4;
-        void *ptr1, *ptr2;
-    } VARIANT;
-    typedef unsigned long SCODE;
-
     typedef struct GUID {
         unsigned long  Data1;
         unsigned short Data2;




More information about the wine-cvs mailing list