Need help with oleaut32.dll code

All development related issues welcome

Moderator: Moderator Team

Post Reply
Pi_User5
Posts: 752
Joined: Thu May 01, 2014 4:18 am
Location: United States

Need help with oleaut32.dll code

Post by Pi_User5 »

So I was debugging a program and as I was reading the debug output, I saw this:

Code: Select all

fixme:(../../dll/win32/oleaut32/oleaut.c:628) Version value not known yet. Please investigate it !
So I opened up the file and I found this code:

Code: Select all

ULONG WINAPI OaBuildVersion(void)
{
    switch(GetVersion() & 0x8000ffff)  /* mask off build number */
    {
    case 0x80000a03:  /* WIN31 */
		return MAKELONG(0xffff, 20);
    case 0x00003303:  /* NT351 */
		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 */
    case 0x00000005:  /* W2K */
		return MAKELONG(0xffff, 40);
    case 0x00000105:  /* WinXP */
    case 0x00000006:  /* Vista */
    case 0x00000106:  /* Win7 */
		return MAKELONG(0xffff, 50);
    default:
		FIXME("Version value not known yet. Please investigate it !\n");
		return MAKELONG(0xffff, 40);  /* for now return the same value as for w2k */
    }
}
Am I correct in assuming that "case case 0x00000105" is something along the lines of the build number of XP? If so, what would the right case be for server 2003 SP1. Thanks! Then I can fix this, submit it to ReactOS and WINE as this DLL came from WINE.
I use ReactOS on real hardware. Will you? My Computers: https://www.reactos.org/wiki/PC_ROS_Rigs Go all the way to the bottom.

[ external image ]

Pi_User5
Posts: 752
Joined: Thu May 01, 2014 4:18 am
Location: United States

Re: Need help with oleaut32.dll code

Post by Pi_User5 »

I found this patch https://www.winehq.org/pipermail/wine-p ... 01096.html and some documentation in the patch.
"BuildVersion_OLEAUT32" = "X.YY.ZZZZ"
Overrides the build version of OLEAUT32.DLL that Wine is to
return. The OLEAUT32 version consists of a major, a minor and a
build number. Normally, Wine returns an appropriate build version
for the --winver that's currently used (i.e. 2.xx.0xffff).
If applications still don't like this version, even though
we're returning the very high build version of 0xffff (65535),
then you can specify your own custom version value here.
This setting can be specified on a per-app basis, too
(under [AppDefaults\\AppName.exe\\wine]).
I'm assuming that the first part (major build number) is being extracted dynamically. Then using this, I can assume that this new code is the proper way:

Code: Select all

/***********************************************************************
 *           OaBuildVersion           [OLEAUT32.170]
 *
 * Get the Ole Automation build version.
 *
 * PARAMS
 *  None
 *
 * RETURNS
 *  The build version.
 *
 * NOTES
 *  Known oleaut32.dll versions:
 *| OLE Ver.  Comments                   Date     Build Ver.
 *| --------  -------------------------  ----     ---------
 *| OLE 2.1   NT                         1993-95  10 3023
 *| OLE 2.1                                       10 3027
 *| Win32s    Ver 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
 *| OLE 5.1   WXP SP3 orig. file		 2001-XX  5.1.2600.5512
 *| OLE 6.0   WVista orig. file          XXXX-XX  6.0.6001.18000
 *| OLE 6.1	  W7 orig. file				 2009-XX  6.1.7600.16385
 *
 * Currently the versions returned are 2.20 for Win3.1, 2.30 for Win95 & NT 3.51,
 * and 2.40 for all later versions. The build number is maximum, i.e. 0xffff.
 */
ULONG WINAPI OaBuildVersion(void)
{
    switch(GetVersion() & 0x8000ffff)  /* mask off build number */
    {
    case 0x80000a03:  /* WIN31 */
		return MAKELONG(0xffff, 20);
    case 0x00003303:  /* NT351 */
		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 */
    case 0x00000005:  /* W2K */
		return MAKELONG(0xffff, 40);
    case 0x00000105:  /* WinXP */
		return MAKELONG(0xffff, 1);
    case 0x00000006:  /* Vista */
		return MAKELONG(0xffff, 0);
    case 0x00000106:  /* Win7 */
		return MAKELONG(0xffff, 1);
    default:
		FIXME("Version value not known yet. Please investigate it !\n");
		return MAKELONG(0xffff, 40);  /* for now return the same value as for w2k */
    }
}
However, it still remains what CASE should be used for Server 2003. Could someone also tell me what the ole32.dll and oleaut32.dll file versions from Server 2003 are? Thanks!
I use ReactOS on real hardware. Will you? My Computers: https://www.reactos.org/wiki/PC_ROS_Rigs Go all the way to the bottom.

[ external image ]

User avatar
Black_Fox
Posts: 1584
Joined: Fri Feb 15, 2008 9:44 pm
Location: Czechia

Re: Need help with oleaut32.dll code

Post by Black_Fox »

However, it still remains what CASE should be used for Server 2003.
I see a pattern in the code you pasted:

Code: Select all

    case 0x00000105:  /* WinXP */
    case 0x00000006:  /* Vista */
    case 0x00000106:  /* Win7 */
Let me show you which OS has which kernel version:

Code: Select all

- WinXP - 5.1
- Vista - 6.0
- Win7  - 6.1
Can you guess the probable "case 0x" value for Server 2003 that has kernel version 5.2? :)
Also, it would also be beneficial to actually print the hexadecimal value in that FIXME call.

Pi_User5
Posts: 752
Joined: Thu May 01, 2014 4:18 am
Location: United States

Re: Need help with oleaut32.dll code

Post by Pi_User5 »

Black_Fox wrote:
However, it still remains what CASE should be used for Server 2003.
I see a pattern in the code you pasted:

Code: Select all

    case 0x00000105:  /* WinXP */
    case 0x00000006:  /* Vista */
    case 0x00000106:  /* Win7 */
Let me show you which OS has which kernel version:

Code: Select all

- WinXP - 5.1
- Vista - 6.0
- Win7  - 6.1
Can you guess the probable "case 0x" value for Server 2003 that has kernel version 5.2? :)
Also, it would also be beneficial to actually print the hexadecimal value in that FIXME call.
This is what I have now:

Code: Select all

case 0x00000105:  /* WinXP */
		return MAKELONG(0xffff, 1);
	case 0x00000205:  /* Server 2003 */
		return MAKELONG(0xffff, 2);
    case 0x00000006:  /* Vista */
		return MAKELONG(0xffff, 0);
    case 0x00000106:  /* Win7 */
		return MAKELONG(0xffff, 1);
I use ReactOS on real hardware. Will you? My Computers: https://www.reactos.org/wiki/PC_ROS_Rigs Go all the way to the bottom.

[ external image ]

Pi_User5
Posts: 752
Joined: Thu May 01, 2014 4:18 am
Location: United States

Re: Need help with oleaut32.dll code

Post by Pi_User5 »

Now I get an error about how the version is too old. It's actually not using the Server 2003 case but instead the vista case since WINE set the file version to Vista SP1.
I use ReactOS on real hardware. Will you? My Computers: https://www.reactos.org/wiki/PC_ROS_Rigs Go all the way to the bottom.

[ external image ]

Post Reply

Who is online

Users browsing this forum: Ootu and 1 guest