diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index d5f2fcafc81..d0d352cddae 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -188,11 +188,11 @@ static void COM_RevokeAllClasses(); * CoBuildVersion [COMPOBJ.1] * * RETURNS - * Current built version, hiword is majornumber, loword is minornumber + * Current build version, hiword is majornumber, loword is minornumber */ DWORD WINAPI CoBuildVersion(void) { - TRACE("(void)\n"); + TRACE("Returning version %d, build %d.\n", rmm, rup); return (rmm<<16)+rup; } @@ -1213,7 +1213,7 @@ HRESULT WINAPI CoRegisterClassObject( *lpdwRegister = newClass->dwCookie; /* - * We're successfyl Yippee! + * We're successful Yippee! */ return S_OK; } diff --git a/dlls/ole32/ole2.c b/dlls/ole32/ole2.c index 8481b1aff4a..7fe9f423dc4 100644 --- a/dlls/ole32/ole2.c +++ b/dlls/ole32/ole2.c @@ -143,7 +143,7 @@ static DWORD OLEDD_GetButtonState(); */ DWORD WINAPI OleBuildVersion(void) { - TRACE("(void)\n"); + TRACE("Returning version %d, build %d.\n", rmm, rup); return (rmm<<16)+rup; } diff --git a/dlls/oleaut32/oleaut.c b/dlls/oleaut32/oleaut.c index 834f622c0d3..0d924ff2506 100644 --- a/dlls/oleaut32/oleaut.c +++ b/dlls/oleaut32/oleaut.c @@ -5,6 +5,7 @@ #include #include "winuser.h" #include "winerror.h" +#include "winversion.h" #include "oleauto.h" #include "wine/obj_base.h" #include "heap.h" @@ -43,3 +44,37 @@ HRESULT WINAPI GetActiveObject(REFCLSID rcid,LPVOID preserved,LPUNKNOWN *ppunk) FIXME("(%s,%p,%p),stub!\n",buf,preserved,ppunk); return E_FAIL; } + +/*********************************************************************** + * OaBuildVersion [OLEAUT32.170] + * + * known OLEAUT32.DLL versions: + * OLE 2.1 NT 1993-95 10 3023 + * OLE 2.1 10 3027 + * 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 + */ +UINT WINAPI OaBuildVersion() +{ + FIXME("Please report to a.mohr@mailto.de if you get version error messages !\n"); + switch(VERSION_GetVersion()) + { + case WIN31: + return MAKELONG(4049, 20); /* from Win32s 1.1e */ + case WIN95: + return MAKELONG(4265, 30); + case WIN98: + return MAKELONG(4275, 40); /* value of W98 SE; orig. W98 AFAIK has 4265, 30 just as W95 */ + case NT351: + return MAKELONG(4265, 30); /* value borrowed from Win95 */ + case NT40: + return MAKELONG(4122, 20); /* ouch ! Quite old, I guess */ + default: + ERR("Version value not known yet. Please investigate it !\n"); + return 0x0; + } +} diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index a040e4e062b..3e705a857f4 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -3,20 +3,20 @@ * * Copyright 1997 Marcus Meissner * 1999 Rein Klazes - * there is much left to do here before it can be usefull for real world + * there is much left to do here before it can be useful for real world * programs * know problems: * -. Only one format of typelibs is supported - * -. All testing until sofar is done using special written windows programs + * -. All testing so far is done using special written windows programs * -. Data structures are straightforward, but slow for look-ups. * -. (related) nothing is hashed - * -. a typelib is always read in its entirely into memory and never released. + * -. a typelib is always read in its entirety into memory and never released. * -. there are a number of stubs in ITypeLib and ITypeInfo interfaces. Most * of them I don't know yet how to implement them. * -. Most error return values are just guessed not checked with windows * behaviour. - * -. all locale stuf ignored - * -. move stuf to wine/dlls + * -. all locale stuff ignored + * -. move stuff to wine/dlls * -. didn't bother with a c++ interface * -. lousy fatal error handling * -. some methods just return pointers to internal data structures, this is @@ -267,22 +267,32 @@ HRESULT WINAPI UnRegisterTypeLib( } /**************************************************************************** - * OABuildVersion (TYPELIB.15) - * RETURNS - * path of typelib + * OaBuildVersion (TYPELIB.15) + * + * known TYPELIB.DLL versions: + * + * OLE 2.01 no OaBuildVersion() avail 1993 -- --- + * OLE 2.02 1993-94 02 3002 + * OLE 2.03 23 730 + * OLE 2.03 03 3025 + * OLE 2.03 W98 SE orig. file !! 1993-95 10 3024 + * OLE 2.1 NT 1993-95 ?? ??? + * OLE 2.3.1 W95 23 700 */ -DWORD WINAPI OABuildVersion16(void) +DWORD WINAPI OaBuildVersion16(void) { -WINDOWS_VERSION ver = VERSION_GetVersion(); - - switch (ver) { - case WIN95: - return MAKELONG(0xbd0, 0xa); /* Win95A */ + FIXME("Please report to a.mohr@mailto.de if you get version error messages !\n"); + switch(VERSION_GetVersion()) + { case WIN31: - return MAKELONG(0xbd3, 0x3); /* WfW 3.11 */ + return MAKELONG(3027, 3); /* WfW 3.11 */ + case WIN95: + return MAKELONG(700, 23); /* Win95A */ + case WIN98: + return MAKELONG(3024, 10); /* W98 SE */ default: FIXME_(ole)("Version value not known yet. Please investigate it !"); - return MAKELONG(0xbd0, 0xa); /* return Win95A for now */ + return 0; } } diff --git a/dlls/oleaut32/typelib.spec b/dlls/oleaut32/typelib.spec index 7784023b69a..d6bd90c8bbc 100644 --- a/dlls/oleaut32/typelib.spec +++ b/dlls/oleaut32/typelib.spec @@ -12,4 +12,4 @@ type win16 10 stub REGISTERTYPELIB 11 stub LOADREGTYPELIB 14 pascal QueryPathOfRegTypeLib(ptr word word word ptr) QueryPathOfRegTypeLib16 -15 pascal OABuildVersion() OABuildVersion16 +15 pascal OaBuildVersion() OaBuildVersion16 diff --git a/include/ole2ver.h b/include/ole2ver.h index a7b301c5bbe..6844ab52c7f 100644 --- a/include/ole2ver.h +++ b/include/ole2ver.h @@ -5,9 +5,24 @@ #ifndef __WINE_OLE2VER_H #define __WINE_OLE2VER_H - /* OLE version */ +/* + * other versions rmm/rup: + * 23/639 + * 23/700 + * 23/730 + * 23/824 + * + * Win98 SE original files: + * COMPOBJ: CoBuildVersion 23/700 + * OLE2: OleBuildVersion -> COMPOBJ.CoBuildVersion + * OLE32: CoBuildVersion and Ole~ 23/824 + * + * We probably should reorganize the OLE version stuff, i.e. + * use different values for every *BuildVersion function and Win version. + */ + +/* bad: we shouldn't make use of it that globally ! */ #define rmm 23 -#define rup 639 +#define rup 824 #endif /* __WINE_OLE2VER_H */ - diff --git a/misc/version.c b/misc/version.c index c1163b36bb9..82c0b7a52a8 100644 --- a/misc/version.c +++ b/misc/version.c @@ -553,30 +553,6 @@ void WINAPI DiagOutput16(LPCSTR str) DPRINTF("DIAGOUTPUT:%s\n", debugstr_a(str)); } -/*********************************************************************** - * OaBuildVersion [OLEAUT32.170] - */ -UINT WINAPI OaBuildVersion() -{ - WINDOWS_VERSION ver = VERSION_GetVersion(); - - FIXME("Please report to a.mohr@mailto.de if you get version error messages !\n"); - switch(VersionData[ver].getVersion32) - { - case 0x80000a03: /* Win 3.1 */ - return 0x140fd1; /* from Win32s 1.1e */ - case 0xc0000004: /* Win 95 */ - case 0xc0000a04: /* Win 98: verified same as Win95 */ - return 0x1e10a9; /* some older version: 0x0a0bd3 */ - case 0x04213303: /* NT 3.51 */ - FIXME("NT 3.51 version value unknown !\n"); - return 0x1e10a9; /* value borrowed from Win95 */ - case 0x05650004: /* NT 4.0 */ - return 0x141016; - default: - return 0x0; - } -} /*********************************************************************** * VERSION_OsIsUnicode [internal] *