Nikolay Sivov : ole2disp: Implement VariantInit().

Alexandre Julliard julliard at wine.codeweavers.com
Wed Feb 3 07:40:00 CST 2016


Module: wine
Branch: stable
Commit: 824b955568a2fda69dc13dbd653887e661c090d8
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=824b955568a2fda69dc13dbd653887e661c090d8

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Tue Jan  5 18:46:34 2016 +0300

ole2disp: Implement VariantInit().

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit de60ddb8132b421abe2abbe81ed449a3d1a5f63d)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>

---

 dlls/ole2disp.dll16/ole2disp.c          |  9 ++++++++
 dlls/ole2disp.dll16/ole2disp.dll16.spec |  2 +-
 dlls/ole2disp.dll16/ole2disp.h          | 39 +++++++++++++++++++++++++++++++++
 3 files changed, 49 insertions(+), 1 deletion(-)

diff --git a/dlls/ole2disp.dll16/ole2disp.c b/dlls/ole2disp.dll16/ole2disp.c
index 1850346..43336c4 100644
--- a/dlls/ole2disp.dll16/ole2disp.c
+++ b/dlls/ole2disp.dll16/ole2disp.c
@@ -276,3 +276,12 @@ HRESULT WINAPI SetErrorInfo16(ULONG dwReserved, IErrorInfo *perrinfo)
         FIXME("stub: (%d, %p)\n", dwReserved, perrinfo);
         return E_INVALIDARG;
 }
+
+/******************************************************************************
+ * VariantInit [OLE2DISP.8]
+ */
+void WINAPI VariantInit16(VARIANTARG16 *v)
+{
+    TRACE("(%p)\n", v);
+    v->vt = VT_EMPTY;
+}
diff --git a/dlls/ole2disp.dll16/ole2disp.dll16.spec b/dlls/ole2disp.dll16/ole2disp.dll16.spec
index 2cf6784..e4655f0 100644
--- a/dlls/ole2disp.dll16/ole2disp.dll16.spec
+++ b/dlls/ole2disp.dll16/ole2disp.dll16.spec
@@ -5,7 +5,7 @@
 5 pascal SysReAllocStringLen(ptr str word) SysReAllocStringLen16
 6 pascal SysFreeString(segstr)		SysFreeString16
 7 pascal SysStringLen(segstr)		SysStringLen16
-8 stub VARIANTINIT
+8 pascal VariantInit(ptr) VariantInit16
 9 stub VARIANTCLEAR
 10 stub VARIANTCOPY
 11 stub VARIANTCOPYIND
diff --git a/dlls/ole2disp.dll16/ole2disp.h b/dlls/ole2disp.dll16/ole2disp.h
index 7804c82..d8ad6d1 100644
--- a/dlls/ole2disp.dll16/ole2disp.h
+++ b/dlls/ole2disp.dll16/ole2disp.h
@@ -39,4 +39,43 @@ INT16  WINAPI SysReAllocString16(LPBSTR16,LPCOLESTR16);
 int    WINAPI SysReAllocStringLen16(BSTR16*, const char*,  int);
 int    WINAPI SysStringLen16(BSTR16);
 
+typedef struct tagVARIANT16 {
+    VARTYPE vt;
+    WORD wReserved1;
+    WORD wReserved2;
+    WORD wReserved3;
+    union {
+                    BYTE bVal;
+                    SHORT iVal;
+                    LONG lVal;
+                    FLOAT fltVal;
+                    DOUBLE dblVal;
+                    VARIANT_BOOL boolVal;
+                    SCODE scode;
+                    DATE date;
+/* BSTR16 */        SEGPTR bstrVal;
+                    CY cyVal;
+/* IUnknown* */     SEGPTR punkVal;
+/* IDispatch* */    SEGPTR pdispVal;
+/* SAFEARRAY* */    SEGPTR parray;
+/* BYTE* */         SEGPTR pbVal;
+/* SHORT* */        SEGPTR piVal;
+/* LONG* */         SEGPTR plVal;
+/* FLOAT* */        SEGPTR pfltVal;
+/* DOUBLE* */       SEGPTR pdblVal;
+/* VARIANT_BOOL* */ SEGPTR pboolVal;
+/* SCODE* */        SEGPTR pscode;
+/* DATE* */         SEGPTR pdate;
+/* BSTR16* */       SEGPTR pbstrVal;
+/* VARIANT16* */    SEGPTR pvarVal;
+/* void* */         SEGPTR byref;
+/* CY* */           SEGPTR pcyVal;
+/* IUnknown** */    SEGPTR ppunkVal;
+/* IDispatch** */   SEGPTR ppdispVal;
+/* SAFEARRAY** */   SEGPTR pparray;
+    } u;
+} VARIANT16;
+
+typedef VARIANT16 VARIANTARG16;
+
 #endif /* !defined(__WINE_OLEAUT32_OLE2DISP_H) */




More information about the wine-cvs mailing list