From 2b9416f467c3fd45d65b32a1b3b60a3cd039692e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Wed, 22 Sep 2004 05:08:04 +0000 Subject: [PATCH] Robert Shearman - Share version information between DllGetVersion and resource file. svn path=/trunk/; revision=10968 --- reactos/lib/shell32/shell32_main.c | 14 +++++++++----- reactos/lib/shell32/version.h | 28 ++++++++++++++++++++++++++++ reactos/lib/shell32/version.rc | 5 +++-- 3 files changed, 40 insertions(+), 7 deletions(-) create mode 100644 reactos/lib/shell32/version.h diff --git a/reactos/lib/shell32/shell32_main.c b/reactos/lib/shell32/shell32_main.c index fd77efcea3b..32161e5f2f5 100644 --- a/reactos/lib/shell32/shell32_main.c +++ b/reactos/lib/shell32/shell32_main.c @@ -41,6 +41,7 @@ #include "undocshell.h" #include "pidl.h" #include "shell32_main.h" +#include "version.h" #include "wine/debug.h" #include "wine/unicode.h" @@ -897,16 +898,19 @@ HRESULT WINAPI SHELL32_DllGetVersion (DLLVERSIONINFO *pdvi) if (pdvi->cbSize == sizeof(DLLVERSIONINFO) || pdvi->cbSize == sizeof(DLLVERSIONINFO2)) { - pdvi->dwMajorVersion = 4; - pdvi->dwMinorVersion = 72; - pdvi->dwBuildNumber = 3110; - pdvi->dwPlatformID = DLLVER_PLATFORM_WINDOWS; + pdvi->dwMajorVersion = WINE_FILEVERSION_MAJOR; + pdvi->dwMinorVersion = WINE_FILEVERSION_MINOR; + pdvi->dwBuildNumber = WINE_FILEVERSION_BUILD; + pdvi->dwPlatformID = WINE_FILEVERSION_PLATFORMID; if (pdvi->cbSize == sizeof(DLLVERSIONINFO2)) { DLLVERSIONINFO2 *pdvi2 = (DLLVERSIONINFO2 *)pdvi; pdvi2->dwFlags = 0; - pdvi2->ullVersion = MAKEDLLVERULL(4, 72, 3110, 0); + pdvi2->ullVersion = MAKEDLLVERULL(WINE_FILEVERSION_MAJOR, + WINE_FILEVERSION_MINOR, + WINE_FILEVERSION_BUILD, + WINE_FILEVERSION_PLATFORMID); } TRACE("%lu.%lu.%lu.%lu\n", pdvi->dwMajorVersion, pdvi->dwMinorVersion, diff --git a/reactos/lib/shell32/version.h b/reactos/lib/shell32/version.h new file mode 100644 index 00000000000..6b58fe8b8e3 --- /dev/null +++ b/reactos/lib/shell32/version.h @@ -0,0 +1,28 @@ +/* + * Shared Resource/DllGetVersion version information + * + * Copyright (C) 2004 Robert Shearman + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#define WINE_FILEVERSION_MAJOR 4 +#define WINE_FILEVERSION_MINOR 72 +#define WINE_FILEVERSION_BUILD 3110 +#define WINE_FILEVERSION_PLATFORMID 1 + +/* FIXME: when libs/wpp gets fixed to support concatenation we can remove + * this and define it in version.rc */ +#define WINE_FILEVERSION "4.72.3110.1" diff --git a/reactos/lib/shell32/version.rc b/reactos/lib/shell32/version.rc index 748fd53a4f4..255ae21d034 100644 --- a/reactos/lib/shell32/version.rc +++ b/reactos/lib/shell32/version.rc @@ -18,9 +18,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "version.h" + #define WINE_OLESELFREGISTER -#define WINE_FILEVERSION 4,0,0,0 -#define WINE_FILEVERSION_STR "4.0" +#define WINE_FILEVERSION WINE_FILEVERSION_MAJOR,WINE_FILEVERSION_MINOR,WINE_FILEVERSION_BUILD,WINE_FILEVERSION_PLATFORMID #define WINE_FILENAME_STR "shell32.dll" #include