oleaut32 patch

Andreas Mohr a.mohr at mailto.de
Mon Jul 23 18:59:50 CDT 2001


Hi all,

I finally got around to actually finishing and sending my patch.

This patch
- changes OaBuildVersion() to always return a very high version value
  (2.xx.0xffff), which can be overridden in the config file to deliver
  an exact value instead
- kind of implements VarCat() and VarBstrCat()
  it's not complete at all, though
- spelling

I'll probably do some more OLEAUT32 work soon.

-- 
Andreas Mohr                        Stauferstr. 6, D-71272 Renningen, Germany
-------------- next part --------------
Determining best CVS host...
Using CVSROOT :pserver:cvs at rhlx01.fht-esslingen.de:/home/wine
Index: dlls/oleaut32/ole2disp.c
===================================================================
RCS file: /home/wine/wine/dlls/oleaut32/ole2disp.c,v
retrieving revision 1.18
diff -u -r1.18 ole2disp.c
--- dlls/oleaut32/ole2disp.c	11 Jul 2001 18:56:42 -0000	1.18
+++ dlls/oleaut32/ole2disp.c	23 Jul 2001 21:53:28 -0000
@@ -58,7 +58,7 @@
 	if (!in) return 0;
     
 	out = BSTR_AllocBytes(strlen(in)+1);
-	if(!out)return 0;
+	if (!out) return 0;
 	strcpy(BSTR_GetAddr(out),in);
 	return out;
 }
@@ -265,7 +265,7 @@
     bufferPointer--;
 
     /*
-     * Free the memory from it's "real" origin.
+     * Free the memory from its "real" origin.
      */
     HeapFree(GetProcessHeap(), 0, bufferPointer);
 }
@@ -480,7 +480,7 @@
 
     /*
      * Allocate a new buffer to hold the string.
-     * dont't forget to keep an empty spot at the begining of the
+     * dont't forget to keep an empty spot at the beginning of the
      * buffer for the character count and an extra character at the
      * end for the NULL.
      */
Index: dlls/oleaut32/oleaut.c
===================================================================
RCS file: /home/wine/wine/dlls/oleaut32/oleaut.c,v
retrieving revision 1.17
diff -u -r1.17 oleaut.c
--- dlls/oleaut32/oleaut.c	11 Jul 2001 18:56:42 -0000	1.17
+++ dlls/oleaut32/oleaut.c	23 Jul 2001 21:53:28 -0000
@@ -3,12 +3,13 @@
  *
  */
 #include <string.h>
+#include <stdio.h>
 
-#include "windef.h"
 #include "winbase.h"
+#include "wine/winbase16.h"
 #include "wingdi.h"
-#include "winuser.h"
 #include "winerror.h"
+#include "winreg.h"
 
 #include "ole2.h"
 #include "heap.h"
@@ -86,34 +87,120 @@
 	return ret;
 }
 
+/*
+ * query for a certain key name
+ * first in the AppDefaults section, then in the global section
+ */
+BOOL OLEAUT32_GetAppKey(LPSTR KeyName, DWORD *version)
+{
+    char buffer[MAX_PATH+32], modname[MAX_PATH+32];
+    char *p = buffer, *appname;
+    DWORD type, count = sizeof(buffer);
+    HKEY hconfkey = 0, hkey = 0;
+    int major = 0, minor = 0, build = 0;
+    BOOL res = FALSE, found = FALSE;
+
+    *version = 0xffffffff;
+
+    if (RegOpenKeyA( HKEY_LOCAL_MACHINE, "Software\\Wine\\Wine\\Config", &hconfkey ))
+    return FALSE;
+
+    /* (try to) open the app-specific key */
+    if (!GetModuleFileName16( GetCurrentTask(), modname, MAX_PATH ) &&
+        !GetModuleFileNameA( 0, modname, MAX_PATH ))
+    {
+        WARN( "could not get module file name\n");
+        goto not_found;
+    }
+    appname = modname;
+    /* remove path part if given */
+    if ((p = strrchr( appname, '/' ))) appname = p + 1;
+    if ((p = strrchr( appname, '\\' ))) appname = p + 1;
+
+    /* open app-specific key */
+    strcpy(buffer, "AppDefaults\\");
+    strcat(buffer, appname);
+    strcat(buffer, "\\wine");
+    TRACE( "searching '%s' in %s\n", KeyName, buffer);
+    
+    count = sizeof(buffer);
+    if ( (!RegOpenKeyA( hconfkey, buffer, &hkey ))
+      && (!RegQueryValueExA(hkey, KeyName, 0, &type, buffer, &count))
+       )
+	found = TRUE;
+    RegCloseKey(hkey);
+
+    count = sizeof(buffer);
+    if ( (!found)
+      && (!RegOpenKeyA(hconfkey, "wine", &hkey))
+      && (!RegQueryValueExA(hkey, KeyName, 0, &type, buffer, &count))
+       )
+        found = TRUE;
+    RegCloseKey(hkey);
+
+    if ((found) && (type == REG_SZ))
+    {
+	sscanf(buffer, "%01d.%02d.%04d", &major, &minor, &build);
+	*version = MAKELONG(build, minor);
+	res = TRUE;
+    }
+
+not_found:
+    if (hconfkey)
+        RegCloseKey(hconfkey);
+    if (hkey)
+	RegCloseKey(hkey);
+    return res;
+}
+
 /***********************************************************************
  *           OaBuildVersion           [OLEAUT32.170]
  *
  * known OLEAUT32.DLL versions:
  * OLE 2.1  NT				1993-95	10     3023
  * OLE 2.1					10     3027
+ * Win32s 1.1e					20     4049
  * OLE 2.20 W95/NT			1993-96	20     4112
  * OLE 2.20 W95/NT			1993-96	20     4118
  * OLE 2.20 W95/NT			1993-96	20     4122
  * OLE 2.30 W95/NT			1993-98	30     4265
  * OLE 2.40 NT??			1993-98	40     4267
  * OLE 2.40 W98 SE orig. file		1993-98	40     4275
+ * OLE 2.40 W2K orig. file		1993-XX 40     4514
+ *
+ * I just decided to use version 2.20 for Win3.1, 2.30 for Win95 & NT 3.51,
+ * and 2.40 for all newer OSs. The build number is maximum, i.e. 0xffff.
+ * If this still causes version errors, the user can supply a global or a
+ * per app BuildVersion_OLEAUT32 value needed for the application.
  */
 UINT WINAPI OaBuildVersion()
 {
-    FIXME("Please report to a.mohr at mailto.de if you get version error messages !\n");
+    static DWORD version = 0;
+
+    /* check once for user-supplied key */
+    if (!version)
+    {
+	OLEAUT32_GetAppKey("BuildVersion_OLEAUT32", &version);
+    }
+    if ((version) && (version != 0xffffffff))
+	 return version;
+
     switch(GetVersion() & 0x8000ffff)  /* mask off build number */
     {
     case 0x80000a03:  /* WIN31 */
-		return MAKELONG(4049, 20); /* from Win32s 1.1e */
-    case 0x80000004:  /* WIN95 */
-		return MAKELONG(4265, 30);
-    case 0x80000a04:  /* WIN98 */
-		return MAKELONG(4275, 40); /* value of W98 SE; orig. W98 AFAIK has 4265, 30 just as W95 */
+		return MAKELONG(0xffff, 20);
     case 0x00003303:  /* NT351 */
-		return MAKELONG(4265, 30); /* value borrowed from Win95 */
+		return MAKELONG(0xffff, 30);
+    case 0x80000004:  /* WIN95; I'd like to use the "standard" w95 minor
+		         version here (30), but as we still use w95
+		         as default winver (which is good IMHO), I better
+		         play safe and use the latest value for w95 for now.
+		         Change this as soon as default winver gets changed
+		         to something more recent */
+    case 0x80000a04:  /* WIN98 */
     case 0x00000004:  /* NT40 */
-		return MAKELONG(4122, 20); /* ouch ! Quite old, I guess */
+    case 0x00000005:  /* W2K */
+		return MAKELONG(0xffff, 40);
     default:
 		ERR("Version value not known yet. Please investigate it !\n");
 		return 0x0;
Index: dlls/oleaut32/oleaut32.spec
===================================================================
RCS file: /home/wine/wine/dlls/oleaut32/oleaut32.spec,v
retrieving revision 1.26
diff -u -r1.26 oleaut32.spec
--- dlls/oleaut32/oleaut32.spec	10 Apr 2001 21:17:04 -0000	1.26
+++ dlls/oleaut32/oleaut32.spec	23 Jul 2001 21:53:28 -0000
@@ -317,9 +317,9 @@
 436 stub VarAbs # stdcall (ptr ptr)
 437 stub VarAdd # stdcall (ptr ptr ptr)
 438 stub VarAnd # stdcall (ptr ptr ptr)
-439 stub VarBstrCat # stdcall (ptr ptr ptr)
+439 stdcall VarBstrCat(wstr wstr ptr) VarBstrCat
 440 stub VarBstrCmp # stdcall (ptr ptr long long)
-441 stub VarCat # stdcall (ptr ptr ptr)
+441 stdcall VarCat(ptr ptr ptr) VarCat
 442 stub VarCmp # stdcall (ptr ptr long long)
 443 stub VarCyAbs
 444 stub VarCyAdd
Index: dlls/oleaut32/typelib.c
===================================================================
RCS file: /home/wine/wine/dlls/oleaut32/typelib.c,v
retrieving revision 1.39
diff -u -r1.39 typelib.c
--- dlls/oleaut32/typelib.c	2 Jul 2001 19:59:42 -0000	1.39
+++ dlls/oleaut32/typelib.c	23 Jul 2001 21:53:29 -0000
@@ -1372,7 +1372,7 @@
     ptiRet->pTypeLib = pLibInfo;
     ptiRet->index=count;
 /* fill in the typeattr fields */
-    FIXME("Assign constructor/destrutor memid\n");
+    FIXME("Assign constructor/destructor memid\n");
 
     TLB_ReadGuid(&ptiRet->TypeAttr.guid, tiBase.posguid, pcx);
     ptiRet->TypeAttr.lcid=pLibInfo->LibAttr.lcid;   /* FIXME: correct? */
@@ -1506,7 +1506,7 @@
     /* is there any thing after trailing back-slash  ? */
     if (pszTypeLibIndex && pszTypeLibIndex < pszFileName + nStrLen)
     {
-      /* yes -> it's a index! store DLL name, without the trailing back-slash */
+      /* yes -> it's an index! store DLL name, without the trailing back-slash */
       size_t nMemToAlloc = pszTypeLibIndex - pszFileName;
       
       pszDllName = HeapAlloc(GetProcessHeap(),
Index: dlls/oleaut32/variant.c
===================================================================
RCS file: /home/wine/wine/dlls/oleaut32/variant.c,v
retrieving revision 1.17
diff -u -r1.17 variant.c
--- dlls/oleaut32/variant.c	2 Jul 2001 19:59:42 -0000	1.17
+++ dlls/oleaut32/variant.c	23 Jul 2001 21:53:30 -0000
@@ -9,6 +9,10 @@
  *   The hi-level APIs are built on top of these low-level APIs and handle
  *   initialization, copying, destroying and changing the type of VARIANTs.
  *
+ *   According to +snoop, native OLEAUT32 seems to cache an IMalloc iface
+ *   to be used for many mallocs (does it *only* use IMalloc internally ?).
+ *   That's why we should do the same (see VARIANT_MyAlloc).
+ * 
  * TODO:
  *   - The Variant APIs do not support international languages, currency
  *     types, number formating and calendar.  They only support U.S. English format.
@@ -83,7 +87,7 @@
  * but not of a 100.  Except if it is a multiple of
  * 400 then it is a leap year.
  */
-/* According to postgeSQL date parsing functions there is
+/* According to postgreSQL date parsing functions there is
  * a leap year when this expression is true.
  * (((y % 4) == 0) && (((y % 100) != 0) || ((y % 400) == 0)))
  * So according to this there is 365.2515 days in one year.
@@ -99,6 +103,23 @@
 static const double DAYS_IN_ONE_YEAR = 365.2425;
 
 /******************************************************************************
+ *         VARIANT_Alloc        [INTERNAL]
+ *
+ * Hmm, maybe this is really some functionality
+ * in a certain exported OLEAUT32 function. Dunno...
+ */
+LPVOID VARIANT_MyAlloc(DWORD count)
+{
+    static LPMALLOC mllc = NULL;
+
+    if (mllc == NULL)
+	if (CoGetMalloc(0, &mllc))
+	    return NULL; /* failed */
+
+    return IMalloc_Alloc(mllc,count);
+}
+
+/******************************************************************************
  *	   DateTimeStringToTm	[INTERNAL]
  *
  * Converts a string representation of a date and/or time to a tm structure.
@@ -228,10 +249,9 @@
  */
 static BOOL TmToDATE( struct tm* pTm, DATE *pDateOut )
 {
+	int leapYear = 0;
 	if( (pTm->tm_year - 1900) >= 0 )
 	{
-		int leapYear = 0;
-		
 		/* Start at 1. This is the way DATE is defined.
 		 * January 1, 1900 at Midnight is 1.00.
 		 * January 1, 1900 at 6AM is 1.25.
@@ -332,14 +352,13 @@
  */
 static BOOL DateToTm( DATE dateIn, LCID lcid, struct tm* pTm )
 {
+	double decimalPart = 0.0;
+	double wholePart = 0.0;
 	/* Do not process dates smaller than January 1, 1900.
 	 * Which corresponds to 2.0 in the windows DATE format.
 	 */
 	if( dateIn >= 2.0 )
 	{
-		double decimalPart = 0.0;
-		double wholePart = 0.0;
-
 		memset(pTm,0,sizeof(*pTm));
 	
 		/* Because of the nature of DATE format which
@@ -609,7 +628,6 @@
 	LPSTR pNewString = NULL;
 	LPSTR strToken = NULL;
 
-
 	/* Check if we have a valid argument
 	 */
 	if( str != NULL )
@@ -1666,8 +1684,8 @@
 /******************************************************************************
  *		VariantInit	[OLEAUT32.8]
  *
- * Initializes the Variant.  Unlike VariantClear it does not interpret the current
- * contents of the Variant.
+ * Initializes the Variant.  Unlike VariantClear it does not interpret
+ * the current contents of the Variant.
  */
 void WINAPI VariantInit(VARIANTARG* pvarg)
 {
@@ -1783,9 +1801,9 @@
 	else
 	{
 	  /* In the case of by value we need to
-	   * copy the actuall value. In the case of
+	   * copy the actual value. In the case of
 	   * VT_BSTR a copy of the string is made,
-	   * if VT_DISPATCH or VT_IUNKNOWN AddReff is
+	   * if VT_DISPATCH or VT_IUNKNOWN AddRef is
 	   * called to increment the object's reference count.
 	   */
 	  switch( pvargSrc->vt & VT_TYPEMASK )
@@ -3237,7 +3255,7 @@
  *    VarBstrFromCy   [OLEAUT32.113]
  */
 HRESULT WINAPI VarBstrFromCy(CY cyIn, LCID lcid, ULONG dwFlags, BSTR *pbstrOut) {
-				/* FIXME */
+	FIXME("([cyIn], %08lx, %08lx, %p), stub.\n", lcid, dwFlags, pbstrOut);
 	return E_NOTIMPL;
 }
 
@@ -3279,20 +3297,18 @@
     TRACE("( %f, %ld, %ld, %p ), stub\n", dateIn, lcid, dwFlags, pbstrOut );
 
     if( DateToTm( dateIn, lcid, &TM ) == FALSE )
-			{
         return E_INVALIDARG;
-		}
 
     if( dwFlags & VAR_DATEVALUEONLY )
-			strftime( pBuffer, BUFFER_MAX, "%x", &TM );
+	strftime( pBuffer, BUFFER_MAX, "%x", &TM );
     else if( dwFlags & VAR_TIMEVALUEONLY )
-			strftime( pBuffer, BUFFER_MAX, "%X", &TM );
-		else
-        strftime( pBuffer, BUFFER_MAX, "%x %X", &TM );
+	strftime( pBuffer, BUFFER_MAX, "%X", &TM );
+    else
+	strftime( pBuffer, BUFFER_MAX, "%x %X", &TM );
 
-		*pbstrOut = StringDupAtoBstr( pBuffer );
+    *pbstrOut = StringDupAtoBstr( pBuffer );
 
-	return S_OK;
+    return S_OK;
 }
 
 /******************************************************************************
@@ -3302,14 +3318,7 @@
 {
 	TRACE("( %d, %ld, %ld, %p ), stub\n", boolIn, lcid, dwFlags, pbstrOut );
 
-	if( boolIn == VARIANT_FALSE )
-	{
-		sprintf( pBuffer, "False" );
-	}
-	else
-	{
-		sprintf( pBuffer, "True" );
-	}
+	sprintf( pBuffer, (boolIn == VARIANT_FALSE) ? "False" : "True" );
 
 	*pbstrOut = StringDupAtoBstr( pBuffer );
 
@@ -3353,6 +3362,94 @@
 }
 
 /******************************************************************************
+ *		VarBstrCat		[OLEAUT32.439]
+ */
+HRESULT WINAPI VarBstrCat(BSTR bstrLeft, BSTR bstrRight, BSTR* pbstrOut)
+{
+	DWORD lenLeft, lenRight;
+	BSTR pIn, pOut;
+	
+	TRACE("(%p, %p, %p)\n", bstrLeft, bstrRight, pbstrOut);
+
+	if (!pbstrOut)
+		return DISP_E_PARAMNOTOPTIONAL; /* correct ? */
+
+	/* DWORD preceding strings is length in bytes */
+	lenLeft  = *((DWORD *)bstrLeft-1);
+	lenRight = *((DWORD *)bstrRight-1);
+
+	/* add length DWORD + combinedlen + trailing '\0' */
+	pOut = (BSTR)VARIANT_MyAlloc(sizeof(DWORD) +
+				     lenLeft + lenRight +
+				     sizeof(WCHAR));
+
+	*((DWORD *)pOut)++ = lenLeft + lenRight;
+	*pbstrOut = pOut; /* ok, this is now where the real string starts */
+
+	/* copy left string over */
+	pIn = bstrLeft;
+	memcpy(pOut, pIn, lenLeft);
+
+	/* advance pOut to second part */
+	pOut += lenLeft/sizeof(WCHAR);
+
+	/* copy right string over */
+	pIn = bstrRight;
+	memcpy(pOut, pIn, lenRight);
+	
+	/* advance pOut to trailing '\0' */
+	pOut += lenRight/sizeof(WCHAR);
+	*pOut = L'\0';
+	
+	return S_OK;
+}
+
+/******************************************************************************
+ *		VarCat			[OLEAUT32.441]
+ *
+ * Not really implemented.
+ */
+HRESULT WINAPI VarCat(LPVARIANT pvarLeft, LPVARIANT pvarRight, LPVARIANT pvarResult)
+{
+	unsigned int n;
+	LPVARIANT pChk;
+	VARIANT varLeft, varRight;
+	BSTR bstrRes, bstrLeft, bstrRight;
+
+	FIXME("(%p, %p, %p), semi-stub.\n", pvarLeft, pvarRight, pvarResult);
+	TRACE("concatenating variant types: src %d, dest %d.\n", pvarLeft->vt, pvarRight->vt);
+	for (n=0; n < 2; n++)
+	{
+	    pChk = (n == 0) ? pvarLeft : pvarRight;
+	    /*Coerce(*/
+	    if (pChk->vt == VT_BSTR)
+		bstrRes = pChk->u.bstrVal;
+	    if (n == 0)
+		bstrLeft = bstrRes;
+	    else
+		bstrRight = bstrRes;
+	}
+	if ((pvarLeft->vt != VT_BSTR) || (pvarRight->vt != VT_BSTR))
+	{ /* need to convert non-BSTR data types to BSTR before processing them */
+#if 0
+		FIXME("non-BSTR data types unimplemented !\n");
+		return E_NOTIMPL;
+#endif
+	}	
+
+	pvarResult->vt = VT_BSTR;
+	VarBstrCat(bstrLeft, bstrRight, &pvarResult->u.bstrVal);
+
+	/* free strings if converted */
+	if (pvarLeft->vt != VT_BSTR)
+	    SysFreeString(bstrLeft);
+	if (pvarRight->vt != VT_BSTR)
+	    SysFreeString(bstrRight);
+
+	return S_OK;
+}
+
+/******************************************************************************
  *		VarBoolFromUI1		[OLEAUT32.118]
  */
 HRESULT WINAPI VarBoolFromUI1(BYTE bIn, VARIANT_BOOL* pboolOut)
@@ -3378,14 +3475,7 @@
 {
 	TRACE("( %d, %p ), stub\n", sIn, pboolOut );
 
-	if( sIn == 0 )
-	{
-		*pboolOut = VARIANT_FALSE;
-	}
-	else
-	{
-		*pboolOut = VARIANT_TRUE;
-	}
+	*pboolOut = (sIn) ? VARIANT_TRUE : VARIANT_FALSE;
 
 	return S_OK;
 }
@@ -3397,14 +3487,7 @@
 {
 	TRACE("( %ld, %p ), stub\n", lIn, pboolOut );
 
-	if( lIn == 0 )
-	{
-		*pboolOut = VARIANT_FALSE;
-	}
-	else
-	{
-		*pboolOut = VARIANT_TRUE;
-	}
+	*pboolOut = (lIn) ? VARIANT_TRUE : VARIANT_FALSE;
 
 	return S_OK;
 }
@@ -3416,14 +3499,7 @@
 {
 	TRACE("( %f, %p ), stub\n", fltIn, pboolOut );
 
-	if( fltIn == 0.0 )
-	{
-		*pboolOut = VARIANT_FALSE;
-	}
-	else
-	{
-		*pboolOut = VARIANT_TRUE;
-	}
+	*pboolOut = (fltIn == 0.0) ? VARIANT_FALSE : VARIANT_TRUE;
 
 	return S_OK;
 }
@@ -3435,14 +3511,7 @@
 {
 	TRACE("( %f, %p ), stub\n", dblIn, pboolOut );
 
-	if( dblIn == 0.0 )
-	{
-		*pboolOut = VARIANT_FALSE;
-	}
-	else
-	{
-		*pboolOut = VARIANT_TRUE;
-	}
+	*pboolOut = (dblIn == 0.0) ? VARIANT_FALSE : VARIANT_TRUE;
 
 	return S_OK;
 }
@@ -3454,14 +3523,7 @@
 {
 	TRACE("( %f, %p ), stub\n", dateIn, pboolOut );
 
-	if( dateIn == 0.0 )
-	{
-		*pboolOut = VARIANT_FALSE;
-	}
-	else
-	{
-		*pboolOut = VARIANT_TRUE;
-	}
+	*pboolOut = (dateIn == 0.0) ? VARIANT_FALSE : VARIANT_TRUE;
 
 	return S_OK;
 }
@@ -3503,14 +3565,9 @@
 			{
 				ret = DISP_E_TYPEMISMATCH;
 			}
-			else if( dValue == 0.0 )
-			{
-				*pboolOut = VARIANT_FALSE;
-			}
 			else
-			{
-				*pboolOut = VARIANT_TRUE;
-			}
+				*pboolOut = (dValue == 0.0) ?
+						VARIANT_FALSE : VARIANT_TRUE;
 		}
 	}
 
@@ -3526,14 +3583,7 @@
 {
 	TRACE("( %c, %p ), stub\n", cIn, pboolOut );
 
-	if( cIn == 0 )
-	{
-		*pboolOut = VARIANT_FALSE;
-	}
-	else
-	{
-		*pboolOut = VARIANT_TRUE;
-	}
+	*pboolOut = (cIn == 0) ? VARIANT_FALSE : VARIANT_TRUE;
 
 	return S_OK;
 }
@@ -3545,14 +3595,7 @@
 {
 	TRACE("( %d, %p ), stub\n", uiIn, pboolOut );
 
-	if( uiIn == 0 )
-	{
-		*pboolOut = VARIANT_FALSE;
-	}
-	else
-	{
-		*pboolOut = VARIANT_TRUE;
-	}
+	*pboolOut = (uiIn == 0) ? VARIANT_FALSE : VARIANT_TRUE;
 
 	return S_OK;
 }
@@ -3564,14 +3607,7 @@
 {
 	TRACE("( %ld, %p ), stub\n", ulIn, pboolOut );
 
-	if( ulIn == 0 )
-	{
-		*pboolOut = VARIANT_FALSE;
-	}
-	else
-	{
-		*pboolOut = VARIANT_TRUE;
-	}
+	*pboolOut = (ulIn == 0) ? VARIANT_FALSE : VARIANT_TRUE;
 
 	return S_OK;
 }
@@ -4097,11 +4133,11 @@
 {
 	TRACE("( %f, %p ), stub\n", dblIn, pulOut );
 
-    dblIn = round( dblIn );
+	dblIn = round( dblIn );
 	if( dblIn < UI4_MIN || dblIn > UI4_MAX )
 	{
 		return DISP_E_OVERFLOW;
-    }
+	}
 
 	*pulOut = (ULONG) dblIn;
 
@@ -4115,8 +4151,8 @@
 {
 	TRACE("( %f, %p ), stub\n", dateIn, pulOut );
 
-    dateIn = round( dateIn );
-    if( dateIn < UI4_MIN || dateIn > UI4_MAX )
+	dateIn = round( dateIn );
+	if( dateIn < UI4_MIN || dateIn > UI4_MAX )
 	{
 		return DISP_E_OVERFLOW;
 	}
@@ -4181,10 +4217,10 @@
  * Convert unsigned char to currency
  */
 HRESULT WINAPI VarCyFromUI1(BYTE bIn, CY* pcyOut) {
-   pcyOut->s.Hi = 0;
-   pcyOut->s.Lo = ((ULONG)bIn) * 10000;
-   
-   return S_OK;
+    pcyOut->s.Hi = 0;
+    pcyOut->s.Lo = ((ULONG)bIn) * 10000;
+
+    return S_OK;
 }
 
 /**********************************************************************
@@ -4192,11 +4228,11 @@
  * Convert signed short to currency
  */
 HRESULT WINAPI VarCyFromI2(short sIn, CY* pcyOut) {
-   if (sIn < 0) pcyOut->s.Hi = -1;
-   else pcyOut->s.Hi = 0;
-   pcyOut->s.Lo = ((ULONG)sIn) * 10000;
-   
-   return S_OK;
+    if (sIn < 0) pcyOut->s.Hi = -1;
+    else pcyOut->s.Hi = 0;
+    pcyOut->s.Lo = ((ULONG)sIn) * 10000;
+
+    return S_OK;
 }
 
 /**********************************************************************
@@ -4255,8 +4291,8 @@
  *              VarCyFromStr [OLEAUT32.104]
  */
 HRESULT WINAPI VarCyFromStr(OLECHAR *strIn, LCID lcid, ULONG dwFlags, CY *pcyOut) {
-				/* FIXME */
-		return E_NOTIMPL;
+	FIXME("(%p, %08lx, %08lx, %p), stub.\n", strIn, lcid, dwFlags, pcyOut);
+	return E_NOTIMPL;
 }
 
  
Index: documentation/samples/config
===================================================================
RCS file: /home/wine/wine/documentation/samples/config,v
retrieving revision 1.13
diff -u -r1.13 config
--- documentation/samples/config	26 Jun 2001 21:06:08 -0000	1.13
+++ documentation/samples/config	23 Jul 2001 21:53:30 -0000
@@ -64,6 +64,11 @@
 ; subdir tree in case of a symlink pointing back to itself.
 ;"ShowDirSymlinks" = "1"
 "ShellLinker" = "wineshelllink"
+; Overrides the builtin values of the build version of OLEAUT32.DLL.
+; Format X.YY.ZZZZ, where X = (2), YY = (20, 30, 40) and ZZZZ = build number.
+; Use this if you get strange OLE or OLEAUT32 "too old" or "version" errors.
+; Can also be given in the [AppDefaults\\AppName.exe\\DllSettings] section.
+;"BuildVersion_OLEAUT32" = "2.40.4515"
 
 # <wineconf>
 


More information about the wine-patches mailing list