Type library creation, take 3, part 6 of 6

Nyef nyef at softhome.net
Sat Feb 7 06:12:13 CST 2004


Hello all.

This is the sixth of six patches covering my changes to the
type library creation code over the past fortnight.

This patch contains:

    Support for a small handful more return value/argument/variable types.

--Alastair Bridgewater
-------------- next part --------------
--- typelib2.c.last	2004-02-07 06:53:38.000000000 -0500
+++ typelib2.c	2004-02-07 06:53:41.000000000 -0500
@@ -815,6 +815,17 @@
 	*alignment = 1;
 	break;
 
+    case VT_INT:
+	*encoded_tdesc = 0x80000000 | (VT_I4 << 16) | VT_INT;
+	if ((This->typelib_header.varflags & 0x0f) == SYS_WIN16) {
+	    *width = 2;
+	    *alignment = 2;
+	} else {
+	    *width = 4;
+	    *alignment = 4;
+	}
+	break;
+
     case VT_UINT:
 	*encoded_tdesc = 0x80000000 | (VT_UI4 << 16) | VT_UINT;
 	if ((This->typelib_header.varflags & 0x0f) == SYS_WIN16) {
@@ -827,6 +838,8 @@
 	break;
 
     case VT_UI2:
+    case VT_I2:
+    case VT_BOOL:
 	*encoded_tdesc = default_tdesc;
 	*width = 2;
 	*alignment = 2;
@@ -834,6 +847,7 @@
 
     case VT_I4:
     case VT_UI4:
+    case VT_R4:
     case VT_ERROR:
     case VT_BSTR:
     case VT_HRESULT:
@@ -842,6 +856,12 @@
 	*alignment = 4;
 	break;
 
+    case VT_CY:
+	*encoded_tdesc = default_tdesc;
+	*width = 8;
+	*alignment = 4; /* guess? */
+	break;
+
     case VT_VOID:
 	*encoded_tdesc = 0x80000000 | (VT_EMPTY << 16) | tdesc->vt;
 	*width = 0;


More information about the wine-patches mailing list