ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
March 2018
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
25 participants
436 discussions
Start a n
N
ew thread
01/01: [DBGHELPHOST] Fix the *nix build.
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=bd5d12710413e8e78638c…
commit bd5d12710413e8e78638c1ea94cc91c5f6fa111c Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Mon Mar 5 00:07:53 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Mon Mar 5 00:07:53 2018 +0100 [DBGHELPHOST] Fix the *nix build. --- dll/win32/dbghelp/cpu_i386.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dll/win32/dbghelp/cpu_i386.c b/dll/win32/dbghelp/cpu_i386.c index 592f56edde..86e8fdbdbe 100644 --- a/dll/win32/dbghelp/cpu_i386.c +++ b/dll/win32/dbghelp/cpu_i386.c @@ -20,13 +20,15 @@ #include <assert.h> +#ifndef DBGHELP_STATIC_LIB #include "ntstatus.h" #define WIN32_NO_STATUS #include "dbghelp_private.h" -#ifndef DBGHELP_STATIC_LIB #include "wine/winbase16.h" #include "winternl.h" #include "wine/debug.h" +#else +#include "dbghelp_private.h" #endif WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
6 years, 9 months
1
0
0
0
01/01: [DBGHELP] Sync with Wine Staging 3.3. CORE-14434
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8d51a38cbcd0d1ed738a0…
commit 8d51a38cbcd0d1ed738a09170007f2fd628bd06a Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sun Mar 4 23:54:20 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sun Mar 4 23:54:20 2018 +0100 [DBGHELP] Sync with Wine Staging 3.3. CORE-14434 --- dll/win32/dbghelp/CMakeLists.txt | 4 +-- dll/win32/dbghelp/coff.c | 19 ++++++++++++ dll/win32/dbghelp/cpu_arm.c | 6 ++++ dll/win32/dbghelp/cpu_arm64.c | 8 +++++ dll/win32/dbghelp/cpu_i386.c | 15 ++++++---- dll/win32/dbghelp/cpu_ppc.c | 6 ++++ dll/win32/dbghelp/cpu_x86_64.c | 9 ++++++ dll/win32/dbghelp/crc32.c | 5 ++++ dll/win32/dbghelp/dbghelp.c | 14 +++++++-- dll/win32/dbghelp/dbghelp_private.h | 59 ++++++++++--------------------------- dll/win32/dbghelp/dwarf.c | 41 +++++++++++++++++++++++++- dll/win32/dbghelp/elf_module.c | 30 +++++++++++++++---- dll/win32/dbghelp/image.c | 7 +++++ dll/win32/dbghelp/macho_module.c | 34 ++++++++++++++++++--- dll/win32/dbghelp/minidump.c | 12 ++++++-- dll/win32/dbghelp/module.c | 55 ++++++++++++++++++++-------------- dll/win32/dbghelp/msc.c | 24 +++++++++++++-- dll/win32/dbghelp/path.c | 8 +++++ dll/win32/dbghelp/pe_module.c | 13 ++++++++ dll/win32/dbghelp/precomp.h | 39 ++++++++++++++++++++++++ dll/win32/dbghelp/rosstubs.c | 4 +++ dll/win32/dbghelp/rsym.c | 1 + dll/win32/dbghelp/source.c | 8 +++++ dll/win32/dbghelp/stabs.c | 33 ++++++++++++++++++++- dll/win32/dbghelp/stack.c | 7 +++++ dll/win32/dbghelp/storage.c | 9 +++++- dll/win32/dbghelp/symbol.c | 16 ++++++++++ dll/win32/dbghelp/type.c | 13 ++++++++ media/doc/README.WINE | 2 +- sdk/include/reactos/wine/mscvpdb.h | 2 ++ 30 files changed, 411 insertions(+), 92 deletions(-) diff --git a/dll/win32/dbghelp/CMakeLists.txt b/dll/win32/dbghelp/CMakeLists.txt index 7b0c3843ac..66229f410a 100644 --- a/dll/win32/dbghelp/CMakeLists.txt +++ b/dll/win32/dbghelp/CMakeLists.txt @@ -70,7 +70,7 @@ else() storage.c symbol.c type.c - dbghelp_private.h + precomp.h ${CMAKE_CURRENT_BINARY_DIR}/dbghelp_stubs.c) add_library(dbghelp SHARED @@ -82,7 +82,7 @@ else() target_link_libraries(dbghelp wine ${PSEH_LIB} oldnames zlib) add_delay_importlibs(dbghelp version) add_importlibs(dbghelp psapi msvcrt kernel32 ntdll) - add_pch(dbghelp dbghelp_private.h SOURCE) + add_pch(dbghelp precomp.h SOURCE) add_cd_file(TARGET dbghelp DESTINATION reactos/system32 FOR all) endif() diff --git a/dll/win32/dbghelp/coff.c b/dll/win32/dbghelp/coff.c index a9d983eb92..01c5826c7f 100644 --- a/dll/win32/dbghelp/coff.c +++ b/dll/win32/dbghelp/coff.c @@ -32,7 +32,26 @@ * Add symbol size to internal symbol table. */ +#include "config.h" +#include "wine/port.h" + +#include <assert.h> +#include <stdlib.h> + +#include <string.h> +#ifdef HAVE_UNISTD_H +# include <unistd.h> +#endif + +#include <stdarg.h> +#include "windef.h" +#include "winbase.h" +#include "winternl.h" + +#include "wine/exception.h" +#include "wine/debug.h" #include "dbghelp_private.h" +#include "wine/mscvpdb.h" WINE_DEFAULT_DEBUG_CHANNEL(dbghelp_coff); diff --git a/dll/win32/dbghelp/cpu_arm.c b/dll/win32/dbghelp/cpu_arm.c index 5aae67d34c..52461606a8 100644 --- a/dll/win32/dbghelp/cpu_arm.c +++ b/dll/win32/dbghelp/cpu_arm.c @@ -19,7 +19,13 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include <assert.h> + +#include "ntstatus.h" +#define WIN32_NO_STATUS #include "dbghelp_private.h" +#include "winternl.h" +#include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); diff --git a/dll/win32/dbghelp/cpu_arm64.c b/dll/win32/dbghelp/cpu_arm64.c index a2a0bb4df9..dd2ccfb883 100644 --- a/dll/win32/dbghelp/cpu_arm64.c +++ b/dll/win32/dbghelp/cpu_arm64.c @@ -19,7 +19,15 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include <assert.h> + +#define NONAMELESSUNION +#define NONAMELESSSTRUCT +#include "ntstatus.h" +#define WIN32_NO_STATUS #include "dbghelp_private.h" +#include "winternl.h" +#include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); diff --git a/dll/win32/dbghelp/cpu_i386.c b/dll/win32/dbghelp/cpu_i386.c index c713049cf2..592f56edde 100644 --- a/dll/win32/dbghelp/cpu_i386.c +++ b/dll/win32/dbghelp/cpu_i386.c @@ -18,10 +18,15 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "dbghelp_private.h" +#include <assert.h> +#include "ntstatus.h" +#define WIN32_NO_STATUS +#include "dbghelp_private.h" #ifndef DBGHELP_STATIC_LIB -#include <wine/winbase16.h> +#include "wine/winbase16.h" +#include "winternl.h" +#include "wine/debug.h" #endif WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); @@ -215,16 +220,16 @@ static BOOL i386_stack_walk(struct cpu_stack_walk* csw, LPSTACKFRAME64 frame, CO /* Init done */ set_curr_mode((frame->AddrPC.Mode == AddrModeFlat) ? stm_32bit : stm_16bit); - /* cur_switch holds address of WOW32Reserved field in TEB in debuggee + /* cur_switch holds address of SystemReserved1[0] field in TEB in debuggee * address space */ if (NtQueryInformationThread(csw->hThread, ThreadBasicInformation, &info, sizeof(info), NULL) == STATUS_SUCCESS) { - curr_switch = (DWORD_PTR)info.TebBaseAddress + FIELD_OFFSET(TEB, WOW32Reserved); + curr_switch = (DWORD_PTR)info.TebBaseAddress + FIELD_OFFSET(TEB, SystemReserved1[0]); if (!sw_read_mem(csw, curr_switch, &p, sizeof(p))) { - WARN("Can't read TEB:WOW32Reserved\n"); + WARN("Can't read TEB:SystemReserved1[0]\n"); goto done_err; } next_switch = p; diff --git a/dll/win32/dbghelp/cpu_ppc.c b/dll/win32/dbghelp/cpu_ppc.c index 6c382451a9..a48168594e 100644 --- a/dll/win32/dbghelp/cpu_ppc.c +++ b/dll/win32/dbghelp/cpu_ppc.c @@ -18,7 +18,13 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include <assert.h> + +#include "ntstatus.h" +#define WIN32_NO_STATUS #include "dbghelp_private.h" +#include "winternl.h" +#include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); diff --git a/dll/win32/dbghelp/cpu_x86_64.c b/dll/win32/dbghelp/cpu_x86_64.c index 5beb6dfab8..aa659fafe0 100644 --- a/dll/win32/dbghelp/cpu_x86_64.c +++ b/dll/win32/dbghelp/cpu_x86_64.c @@ -19,7 +19,15 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include <assert.h> + +#define NONAMELESSUNION +#define NONAMELESSSTRUCT +#include "ntstatus.h" +#define WIN32_NO_STATUS #include "dbghelp_private.h" +#include "winternl.h" +#include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); @@ -702,6 +710,7 @@ static void* x86_64_find_runtime_function(struct module* module, DWORD64 addr while (rtf->UnwindData & 1) /* follow chained entry */ { FIXME("RunTime_Function outside IMAGE_DIRECTORY_ENTRY_EXCEPTION unimplemented yet!\n"); + return NULL; /* we need to read into the other process */ /* rtf = (RUNTIME_FUNCTION*)(module->module.BaseOfImage + (rtf->UnwindData & ~1)); */ } diff --git a/dll/win32/dbghelp/crc32.c b/dll/win32/dbghelp/crc32.c index 64901338bc..73042fefbc 100644 --- a/dll/win32/dbghelp/crc32.c +++ b/dll/win32/dbghelp/crc32.c @@ -19,6 +19,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "config.h" +#include "wine/port.h" + +#include <stdio.h> + #include "dbghelp_private.h" /* Copyright (C) 1986 Gary S. Brown diff --git a/dll/win32/dbghelp/dbghelp.c b/dll/win32/dbghelp/dbghelp.c index 3fa5765a32..6779e9ae98 100644 --- a/dll/win32/dbghelp/dbghelp.c +++ b/dll/win32/dbghelp/dbghelp.c @@ -18,9 +18,19 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "dbghelp_private.h" +#ifndef DBGHELP_STATIC_LIB +#include "config.h" +#include "dbghelp_private.h" +#include "winerror.h" +#include "psapi.h" +#include "wine/debug.h" +#include "wdbgexts.h" +#include "winnls.h" +#else +#include "dbghelp_private.h" #include "wdbgexts.h" +#endif WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); @@ -355,7 +365,7 @@ BOOL WINAPI SymInitializeW(HANDLE hProcess, PCWSTR UserSearchPath, BOOL fInvadeP pcs->dbg_hdr_addr = 0; pcs->next = process_first; process_first = pcs; - + #ifndef DBGHELP_STATIC_LIB if (check_live_target(pcs)) { diff --git a/dll/win32/dbghelp/dbghelp_private.h b/dll/win32/dbghelp/dbghelp_private.h index d6b2bbe075..9848acb110 100644 --- a/dll/win32/dbghelp/dbghelp_private.h +++ b/dll/win32/dbghelp/dbghelp_private.h @@ -21,58 +21,32 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#ifndef _DBGHELP_PRIVATE_H_ -#define _DBGHELP_PRIVATE_H_ +#pragma once -#include <config.h> - -#include <assert.h> -#include <stdio.h> - -#ifdef HAVE_SYS_MMAN_H -# include <sys/mman.h> -#endif -#ifdef HAVE_SYS_STAT_H -# include <sys/stat.h> -#endif -#ifdef HAVE_UNISTD_H -# include <unistd.h> -#endif - -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define NONAMELESSUNION -#define NONAMELESSSTRUCT +#include <stdarg.h> #ifndef DBGHELP_STATIC_LIB -#include <wine/port.h> +#include "windef.h" +#include "winbase.h" +#include "winver.h" +#include "dbghelp.h" +#include "objbase.h" +#include "oaidl.h" +#include "winnls.h" +#include "wine/list.h" +#include "wine/unicode.h" +#include "wine/rbtree.h" -#include <ntstatus.h> -#define WIN32_NO_STATUS -#include <windef.h> -#include <winbase.h> -#include <winver.h> -#include <winternl.h> -#include <dbghelp.h> -#include <objbase.h> -#include <cvconst.h> -#include <psapi.h> - -#include <wine/debug.h> -#include <wine/mscvpdb.h> -#include <wine/unicode.h> +#include "cvconst.h" #else /* DBGHELP_STATIC_LIB */ #include <string.h> #include "compat.h" - -#endif /* DBGHELP_STATIC_LIB */ - #include <wine/list.h> #include <wine/rbtree.h> +#endif /* DBGHELP_STATIC_LIB */ /* #define USE_STATS */ @@ -401,6 +375,7 @@ struct module { struct process* process; IMAGEHLP_MODULEW64 module; + WCHAR modulename[64]; /* used for enumeration */ struct module* next; enum module_type type : 16; unsigned short is_virtual : 1; @@ -844,7 +819,3 @@ extern struct symt_pointer* extern struct symt_typedef* symt_new_typedef(struct module* module, struct symt* ref, const char* name) DECLSPEC_HIDDEN; - -#include "image_private.h" - -#endif /* _DBGHELP_PRIVATE_H_ */ diff --git a/dll/win32/dbghelp/dwarf.c b/dll/win32/dbghelp/dwarf.c index 7b338d1750..0d51792918 100644 --- a/dll/win32/dbghelp/dwarf.c +++ b/dll/win32/dbghelp/dwarf.c @@ -20,12 +20,51 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "dbghelp_private.h" +#ifndef DBGHELP_STATIC_LIB + +#define NONAMELESSUNION + +#include "config.h" + +#include <sys/types.h> +#include <fcntl.h> +#ifdef HAVE_SYS_STAT_H +# include <sys/stat.h> +#endif +#ifdef HAVE_SYS_MMAN_H +#include <sys/mman.h> +#endif +#include <limits.h> +#include <stdlib.h> +#include <string.h> +#ifdef HAVE_UNISTD_H +# include <unistd.h> +#endif +#include <stdio.h> +#include <assert.h> +#include <stdarg.h> #ifdef HAVE_ZLIB #include <zlib.h> #endif +#include "windef.h" +#include "winternl.h" +#include "winbase.h" +#include "winuser.h" +#include "ole2.h" +#include "oleauto.h" + +#include "dbghelp_private.h" +#include "image_private.h" + +#include "wine/debug.h" + +#else +#include "dbghelp_private.h" +#include "image_private.h" +#endif /* !DBGHELP_STATIC_LIB */ + WINE_DEFAULT_DEBUG_CHANNEL(dbghelp_dwarf); /* FIXME: diff --git a/dll/win32/dbghelp/elf_module.c b/dll/win32/dbghelp/elf_module.c index 2edab86b70..066c2f5166 100644 --- a/dll/win32/dbghelp/elf_module.c +++ b/dll/win32/dbghelp/elf_module.c @@ -19,7 +19,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "dbghelp_private.h" +#include "config.h" +#include "wine/port.h" #if defined(__svr4__) || defined(__sun) #define __ELF__ 1 @@ -28,10 +29,27 @@ #define _FILE_OFFSET_BITS 32 #endif +#include <assert.h> +#include <stdio.h> #include <stdlib.h> +#ifdef HAVE_SYS_STAT_H +# include <sys/stat.h> +#endif #include <fcntl.h> +#ifdef HAVE_SYS_MMAN_H +#include <sys/mman.h> +#endif +#ifdef HAVE_UNISTD_H +# include <unistd.h> +#endif + +#include "dbghelp_private.h" +#include "winternl.h" + +#include "image_private.h" -#include <wine/library.h> +#include "wine/library.h" +#include "wine/debug.h" #ifdef __ELF__ @@ -1471,9 +1489,11 @@ static BOOL elf_search_and_load_file(struct process* pcs, const WCHAR* filename, if (!ret && !strchrW(filename, '/')) { ret = elf_load_file_from_path(pcs, filename, load_offset, dyn_addr, - getenv("PATH"), elf_info) || - elf_load_file_from_path(pcs, filename, load_offset, dyn_addr, - getenv("LD_LIBRARY_PATH"), elf_info); + getenv("PATH"), elf_info); + if (!ret) ret = elf_load_file_from_path(pcs, filename, load_offset, dyn_addr, + getenv("LD_LIBRARY_PATH"), elf_info); + if (!ret) ret = elf_load_file_from_path(pcs, filename, load_offset, dyn_addr, + BINDIR, elf_info); if (!ret) ret = elf_load_file_from_dll_path(pcs, filename, load_offset, dyn_addr, elf_info); } diff --git a/dll/win32/dbghelp/image.c b/dll/win32/dbghelp/image.c index 3420caa961..ef94ef6638 100644 --- a/dll/win32/dbghelp/image.c +++ b/dll/win32/dbghelp/image.c @@ -18,7 +18,14 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "config.h" +#include <stdlib.h> +#include <stdio.h> +#include <string.h> + #include "dbghelp_private.h" +#include "winternl.h" +#include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); diff --git a/dll/win32/dbghelp/macho_module.c b/dll/win32/dbghelp/macho_module.c index cc991a7610..01fa300eff 100644 --- a/dll/win32/dbghelp/macho_module.c +++ b/dll/win32/dbghelp/macho_module.c @@ -21,7 +21,37 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "config.h" +#include "wine/port.h" + +#ifdef HAVE_MACH_O_LOADER_H +#include <CoreFoundation/CFString.h> +#define LoadResource mac_LoadResource +#define GetCurrentThread mac_GetCurrentThread +#include <CoreServices/CoreServices.h> +#undef LoadResource +#undef GetCurrentThread +#undef DPRINTF +#endif + +#include <stdio.h> +#include <assert.h> +#include <stdarg.h> +#include <errno.h> +#ifdef HAVE_SYS_STAT_H +# include <sys/stat.h> +#endif +#ifdef HAVE_SYS_MMAN_H +# include <sys/mman.h> +#endif + +#include "ntstatus.h" +#define WIN32_NO_STATUS #include "dbghelp_private.h" +#include "winternl.h" +#include "wine/library.h" +#include "wine/debug.h" +#include "image_private.h" #ifdef HAVE_MACH_O_LOADER_H @@ -48,10 +78,6 @@ struct dyld_all_image_infos { }; #endif -#include "winternl.h" -#include "wine/library.h" -#include "wine/debug.h" - #ifdef WORDS_BIGENDIAN #define swap_ulong_be_to_host(n) (n) #else diff --git a/dll/win32/dbghelp/minidump.c b/dll/win32/dbghelp/minidump.c index e861ccabda..4dead52b92 100644 --- a/dll/win32/dbghelp/minidump.c +++ b/dll/win32/dbghelp/minidump.c @@ -18,10 +18,18 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "dbghelp_private.h" - #include <time.h> +#define NONAMELESSUNION +#define NONAMELESSSTRUCT + +#include "ntstatus.h" +#define WIN32_NO_STATUS +#include "dbghelp_private.h" +#include "winternl.h" +#include "psapi.h" +#include "wine/debug.h" + WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); /****************************************************************** diff --git a/dll/win32/dbghelp/module.c b/dll/win32/dbghelp/module.c index c0084ec1c0..0173469bd6 100644 --- a/dll/win32/dbghelp/module.c +++ b/dll/win32/dbghelp/module.c @@ -19,7 +19,18 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "config.h" +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <assert.h> + #include "dbghelp_private.h" +#ifndef DBGHELP_STATIC_LIB +#include "psapi.h" +#include "winternl.h" +#include "wine/debug.h" +#endif WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); @@ -91,7 +102,9 @@ static void module_fill_module(const WCHAR* in, WCHAR* out, size_t size) void module_set_module(struct module* module, const WCHAR* name) { - module_fill_module(name, module->module.ModuleName, sizeof(module->module.ModuleName)); + module_fill_module(name, module->module.ModuleName, + sizeof(module->module.ModuleName) / sizeof(module->module.ModuleName[0])); + module_fill_module(name, module->modulename, sizeof(module->modulename) / sizeof(module->modulename[0])); } const WCHAR *get_wine_loader_name(void) @@ -815,7 +828,7 @@ BOOL WINAPI SymEnumerateModulesW64(HANDLE hProcess, if (!(dbghelp_options & SYMOPT_WINE_WITH_NATIVE_MODULES) && (module->type == DMT_ELF || module->type == DMT_MACHO)) continue; - if (!EnumModulesCallback(module->module.ModuleName, + if (!EnumModulesCallback(module->modulename, module->module.BaseOfImage, UserContext)) break; } @@ -915,7 +928,7 @@ BOOL WINAPI EnumerateLoadedModulesW64(HANDLE hProcess, if (!GetModuleInformation(hProcess, hMods[i], &mi, sizeof(mi)) || !GetModuleBaseNameW(hProcess, hMods[i], baseW, sizeof(baseW) / sizeof(WCHAR))) continue; - module_fill_module(baseW, modW, sizeof(modW) / sizeof(CHAR)); + module_fill_module(baseW, modW, sizeof(modW) / sizeof(modW[0])); EnumLoadedModulesCallback(modW, (DWORD_PTR)mi.lpBaseOfDll, mi.SizeOfImage, UserContext); } @@ -926,6 +939,12 @@ BOOL WINAPI EnumerateLoadedModulesW64(HANDLE hProcess, #endif /* DBGHELP_STATIC_LIB */ +static void dbghelp_str_WtoA(const WCHAR *src, char *dst, int dst_len) +{ + WideCharToMultiByte(CP_ACP, 0, src, -1, dst, dst_len - 1, NULL, NULL); + dst[dst_len - 1] = 0; +} + /****************************************************************** * SymGetModuleInfo (DBGHELP.@) * @@ -941,19 +960,16 @@ BOOL WINAPI SymGetModuleInfo(HANDLE hProcess, DWORD dwAddr, miw64.SizeOfStruct = sizeof(miw64); if (!SymGetModuleInfoW64(hProcess, dwAddr, &miw64)) return FALSE; - mi.SizeOfStruct = miw64.SizeOfStruct; + mi.SizeOfStruct = ModuleInfo->SizeOfStruct; mi.BaseOfImage = miw64.BaseOfImage; mi.ImageSize = miw64.ImageSize; mi.TimeDateStamp = miw64.TimeDateStamp; mi.CheckSum = miw64.CheckSum; mi.NumSyms = miw64.NumSyms; mi.SymType = miw64.SymType; - WideCharToMultiByte(CP_ACP, 0, miw64.ModuleName, -1, - mi.ModuleName, sizeof(mi.ModuleName), NULL, NULL); - WideCharToMultiByte(CP_ACP, 0, miw64.ImageName, -1, - mi.ImageName, sizeof(mi.ImageName), NULL, NULL); - WideCharToMultiByte(CP_ACP, 0, miw64.LoadedImageName, -1, - mi.LoadedImageName, sizeof(mi.LoadedImageName), NULL, NULL); + dbghelp_str_WtoA(miw64.ModuleName, mi.ModuleName, sizeof(mi.ModuleName)); + dbghelp_str_WtoA(miw64.ImageName, mi.ImageName, sizeof(mi.ImageName)); + dbghelp_str_WtoA(miw64.LoadedImageName, mi.LoadedImageName, sizeof(mi.LoadedImageName)); memcpy(ModuleInfo, &mi, ModuleInfo->SizeOfStruct); @@ -975,7 +991,7 @@ BOOL WINAPI SymGetModuleInfoW(HANDLE hProcess, DWORD dwAddr, miw64.SizeOfStruct = sizeof(miw64); if (!SymGetModuleInfoW64(hProcess, dwAddr, &miw64)) return FALSE; - miw.SizeOfStruct = miw64.SizeOfStruct; + miw.SizeOfStruct = ModuleInfo->SizeOfStruct; miw.BaseOfImage = miw64.BaseOfImage; miw.ImageSize = miw64.ImageSize; miw.TimeDateStamp = miw64.TimeDateStamp; @@ -1010,25 +1026,20 @@ BOOL WINAPI SymGetModuleInfo64(HANDLE hProcess, DWORD64 dwAddr, miw64.SizeOfStruct = sizeof(miw64); if (!SymGetModuleInfoW64(hProcess, dwAddr, &miw64)) return FALSE; - mi64.SizeOfStruct = miw64.SizeOfStruct; + mi64.SizeOfStruct = ModuleInfo->SizeOfStruct; mi64.BaseOfImage = miw64.BaseOfImage; mi64.ImageSize = miw64.ImageSize; mi64.TimeDateStamp = miw64.TimeDateStamp; mi64.CheckSum = miw64.CheckSum; mi64.NumSyms = miw64.NumSyms; mi64.SymType = miw64.SymType; - WideCharToMultiByte(CP_ACP, 0, miw64.ModuleName, -1, - mi64.ModuleName, sizeof(mi64.ModuleName), NULL, NULL); - WideCharToMultiByte(CP_ACP, 0, miw64.ImageName, -1, - mi64.ImageName, sizeof(mi64.ImageName), NULL, NULL); - WideCharToMultiByte(CP_ACP, 0, miw64.LoadedImageName, -1, - mi64.LoadedImageName, sizeof(mi64.LoadedImageName), NULL, NULL); - WideCharToMultiByte(CP_ACP, 0, miw64.LoadedPdbName, -1, - mi64.LoadedPdbName, sizeof(mi64.LoadedPdbName), NULL, NULL); + dbghelp_str_WtoA(miw64.ModuleName, mi64.ModuleName, sizeof(mi64.ModuleName)); + dbghelp_str_WtoA(miw64.ImageName, mi64.ImageName, sizeof(mi64.ImageName)); + dbghelp_str_WtoA(miw64.LoadedImageName, mi64.LoadedImageName, sizeof(mi64.LoadedImageName)); + dbghelp_str_WtoA(miw64.LoadedPdbName, mi64.LoadedPdbName, sizeof(mi64.LoadedPdbName)); mi64.CVSig = miw64.CVSig; - WideCharToMultiByte(CP_ACP, 0, miw64.CVData, -1, - mi64.CVData, sizeof(mi64.CVData), NULL, NULL); + dbghelp_str_WtoA(miw64.CVData, mi64.CVData, sizeof(mi64.CVData)); mi64.PdbSig = miw64.PdbSig; mi64.PdbSig70 = miw64.PdbSig70; mi64.PdbAge = miw64.PdbAge; diff --git a/dll/win32/dbghelp/msc.c b/dll/win32/dbghelp/msc.c index 8fe509b59a..eba26498cb 100644 --- a/dll/win32/dbghelp/msc.c +++ b/dll/win32/dbghelp/msc.c @@ -32,9 +32,29 @@ * Add symbol size to internal symbol table. */ -#include "dbghelp_private.h" +#define NONAMELESSUNION + +#include "config.h" +#include "wine/port.h" -#include <wine/exception.h> +#include <assert.h> +#include <stdio.h> +#include <stdlib.h> + +#include <string.h> +#ifdef HAVE_UNISTD_H +# include <unistd.h> +#endif + +#include <stdarg.h> +#include "windef.h" +#include "winbase.h" +#include "winternl.h" + +#include "wine/exception.h" +#include "wine/debug.h" +#include "dbghelp_private.h" +#include "wine/mscvpdb.h" WINE_DEFAULT_DEBUG_CHANNEL(dbghelp_msc); diff --git a/dll/win32/dbghelp/path.c b/dll/win32/dbghelp/path.c index bd4893b6d3..8c74426eec 100644 --- a/dll/win32/dbghelp/path.c +++ b/dll/win32/dbghelp/path.c @@ -18,7 +18,15 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "config.h" +#include <stdlib.h> +#include <stdio.h> +#include <string.h> + #include "dbghelp_private.h" +#include "winnls.h" +#include "winternl.h" +#include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); diff --git a/dll/win32/dbghelp/pe_module.c b/dll/win32/dbghelp/pe_module.c index dac94bb907..b629213d76 100644 --- a/dll/win32/dbghelp/pe_module.c +++ b/dll/win32/dbghelp/pe_module.c @@ -21,7 +21,20 @@ * */ +#include "config.h" +#include "wine/port.h" + +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <assert.h> + #include "dbghelp_private.h" +#include "image_private.h" +#ifndef DBGHELP_STATIC_LIB +#include "winternl.h" +#include "wine/debug.h" +#endif WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); diff --git a/dll/win32/dbghelp/precomp.h b/dll/win32/dbghelp/precomp.h new file mode 100644 index 0000000000..e359f21aca --- /dev/null +++ b/dll/win32/dbghelp/precomp.h @@ -0,0 +1,39 @@ + +#ifndef _DBGHELP_PRECOMP_H_ +#define _DBGHELP_PRECOMP_H_ + +#include <wine/config.h> +#include <wine/port.h> + +#include <assert.h> +#include <stdio.h> + +#ifdef HAVE_SYS_MMAN_H +# include <sys/mman.h> +#endif +#ifdef HAVE_SYS_STAT_H +# include <sys/stat.h> +#endif +#ifdef HAVE_UNISTD_H +# include <unistd.h> +#endif + +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H + +#define NONAMELESSUNION +#define NONAMELESSSTRUCT + +#include <ntstatus.h> +#define WIN32_NO_STATUS + +#include "dbghelp_private.h" + +#include <winternl.h> +#include <psapi.h> +#include <wine/debug.h> +#include <wine/mscvpdb.h> + +#include "image_private.h" + +#endif /* !_DBGHELP_PRECOMP_H_ */ diff --git a/dll/win32/dbghelp/rosstubs.c b/dll/win32/dbghelp/rosstubs.c index 85bd67ff73..7ac6026aea 100644 --- a/dll/win32/dbghelp/rosstubs.c +++ b/dll/win32/dbghelp/rosstubs.c @@ -18,8 +18,12 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include <assert.h> + #include "dbghelp_private.h" +#include "image_private.h" +#include <wine/debug.h> WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); #define PDBGHELP_CREATE_USER_DUMP_CALLBACK PVOID diff --git a/dll/win32/dbghelp/rsym.c b/dll/win32/dbghelp/rsym.c index 05c27250e0..9b7bf4ee1d 100644 --- a/dll/win32/dbghelp/rsym.c +++ b/dll/win32/dbghelp/rsym.c @@ -8,6 +8,7 @@ #include "dbghelp_private.h" #include <reactos/rossym.h> +#include <wine/debug.h> WINE_DEFAULT_DEBUG_CHANNEL(dbghelp_rsym); diff --git a/dll/win32/dbghelp/source.c b/dll/win32/dbghelp/source.c index 29123e1280..e98f780b16 100644 --- a/dll/win32/dbghelp/source.c +++ b/dll/win32/dbghelp/source.c @@ -18,8 +18,16 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * */ +#include "config.h" +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <assert.h> #include "dbghelp_private.h" +#ifndef DBGHELP_STATIC_LIB +#include "wine/debug.h" +#endif WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); diff --git a/dll/win32/dbghelp/stabs.c b/dll/win32/dbghelp/stabs.c index faa9f47985..1ec0065bb7 100644 --- a/dll/win32/dbghelp/stabs.c +++ b/dll/win32/dbghelp/stabs.c @@ -29,12 +29,43 @@ * available (hopefully) from
http://sources.redhat.com/gdb/onlinedocs
*/ -#include "dbghelp_private.h" +#include "config.h" +#include "wine/port.h" + +#include <sys/types.h> +#include <fcntl.h> +#ifdef HAVE_SYS_STAT_H +# include <sys/stat.h> +#endif +#ifdef HAVE_SYS_MMAN_H +#include <sys/mman.h> +#endif +#include <limits.h> +#include <stdlib.h> +#include <string.h> +#ifdef HAVE_UNISTD_H +# include <unistd.h> +#endif +#include <stdio.h> +#include <assert.h> +#include <stdarg.h> #ifdef HAVE_MACH_O_NLIST_H # include <mach-o/nlist.h> #endif +#ifndef DBGHELP_STATIC_LIB +#include "windef.h" +#include "winbase.h" +#include "winnls.h" +#endif + +#include "dbghelp_private.h" + +#ifndef DBGHELP_STATIC_LIB +#include "wine/debug.h" +#endif + WINE_DEFAULT_DEBUG_CHANNEL(dbghelp_stabs); #ifndef DBGHELP_STATIC_LIB diff --git a/dll/win32/dbghelp/stack.c b/dll/win32/dbghelp/stack.c index ffb4b31858..21412f6051 100644 --- a/dll/win32/dbghelp/stack.c +++ b/dll/win32/dbghelp/stack.c @@ -21,7 +21,14 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "config.h" +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <assert.h> + #include "dbghelp_private.h" +#include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); diff --git a/dll/win32/dbghelp/storage.c b/dll/win32/dbghelp/storage.c index 32e80d46ef..7750ce6467 100644 --- a/dll/win32/dbghelp/storage.c +++ b/dll/win32/dbghelp/storage.c @@ -19,8 +19,15 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "dbghelp_private.h" +#include "config.h" +#include <assert.h> +#include <stdlib.h> +#ifndef DBGHELP_STATIC_LIB +#include "wine/debug.h" +#endif + +#include "dbghelp_private.h" #ifdef USE_STATS #include <math.h> #endif diff --git a/dll/win32/dbghelp/symbol.c b/dll/win32/dbghelp/symbol.c index 9efb474e42..633aa45d31 100644 --- a/dll/win32/dbghelp/symbol.c +++ b/dll/win32/dbghelp/symbol.c @@ -19,7 +19,23 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#define NONAMELESSUNION + +#include "config.h" + +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <limits.h> +#include <sys/types.h> +#include <assert.h> +#ifndef DBGHELP_STATIC_LIB +#include "wine/debug.h" +#endif #include "dbghelp_private.h" +#ifndef DBGHELP_STATIC_LIB +#include "winnls.h" +#endif WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); WINE_DECLARE_DEBUG_CHANNEL(dbghelp_symt); diff --git a/dll/win32/dbghelp/type.c b/dll/win32/dbghelp/type.c index d55332ebf2..e069231b28 100644 --- a/dll/win32/dbghelp/type.c +++ b/dll/win32/dbghelp/type.c @@ -22,6 +22,19 @@ * upon which full support for datatype handling will eventually be built. */ +#define NONAMELESSUNION + +#include "config.h" +#include <stdlib.h> +#include <stdarg.h> +#include <assert.h> + +#ifndef DBGHELP_STATIC_LIB +#include "windef.h" +#include "winbase.h" +#include "winnls.h" +#include "wine/debug.h" +#endif #include "dbghelp_private.h" WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); diff --git a/media/doc/README.WINE b/media/doc/README.WINE index ef3c0456d4..24c72fb703 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -63,7 +63,7 @@ reactos/dll/win32/cryptdlg # Synced to WineStaging-2.9 reactos/dll/win32/cryptdll # Synced to WineStaging-2.9 reactos/dll/win32/cryptnet # Synced to WineStaging-2.9 reactos/dll/win32/cryptui # Synced to WineStaging-2.16 -reactos/dll/win32/dbghelp # Synced to Wine-3.0 +reactos/dll/win32/dbghelp # Synced to WineStaging-3.3 reactos/dll/win32/dciman32 # Synced to WineStaging-2.9 reactos/dll/win32/faultrep # Synced to WineStaging-2.9 reactos/dll/win32/fontsub # Synced to WineStaging-2.9 diff --git a/sdk/include/reactos/wine/mscvpdb.h b/sdk/include/reactos/wine/mscvpdb.h index 2f0b47998f..744c17faba 100644 --- a/sdk/include/reactos/wine/mscvpdb.h +++ b/sdk/include/reactos/wine/mscvpdb.h @@ -96,6 +96,8 @@ * types, they are not completely linked together. */ +#pragma once + #include "pshpack1.h" /* ======================================== *
6 years, 9 months
1
0
0
0
01/01: [RPCRT4_WINETEST] Sync with Wine Staging 3.3. CORE-14434
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a9068cc8d3989365d6df4…
commit a9068cc8d3989365d6df48068740f1f163e96c9c Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sun Mar 4 23:52:30 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sun Mar 4 23:52:30 2018 +0100 [RPCRT4_WINETEST] Sync with Wine Staging 3.3. CORE-14434 --- modules/rostests/winetests/rpcrt4/cstub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/rostests/winetests/rpcrt4/cstub.c b/modules/rostests/winetests/rpcrt4/cstub.c index e49a4c0a7a..606107fcfd 100644 --- a/modules/rostests/winetests/rpcrt4/cstub.c +++ b/modules/rostests/winetests/rpcrt4/cstub.c @@ -29,8 +29,8 @@ #include <winnt.h> #include <winerror.h> - #include "initguid.h" +#include <ole2.h> #include "rpc.h" #include "rpcdce.h" #include "rpcproxy.h"
6 years, 9 months
1
0
0
0
01/01: [RPCRT4] Sync with Wine Staging 3.3. CORE-14434
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=87a48c832a48c128a7fae…
commit 87a48c832a48c128a7fae6565407f0d56204da69 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sun Mar 4 23:48:59 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sun Mar 4 23:49:21 2018 +0100 [RPCRT4] Sync with Wine Staging 3.3. CORE-14434 --- dll/win32/rpcrt4/cproxy.c | 21 +++++++++++++++++++-- dll/win32/rpcrt4/cpsf.c | 27 ++++++++++++++++++++------- dll/win32/rpcrt4/cstub.c | 22 ++++++++++++++++++++-- dll/win32/rpcrt4/ndr_clientserver.c | 17 ++++++++++++++++- dll/win32/rpcrt4/ndr_contexthandle.c | 9 ++++++++- dll/win32/rpcrt4/ndr_es.c | 16 ++++++++++++++-- dll/win32/rpcrt4/ndr_fullpointer.c | 9 ++++++++- dll/win32/rpcrt4/ndr_marshall.c | 20 +++++++++++++++++++- dll/win32/rpcrt4/ndr_misc.h | 7 +++++++ dll/win32/rpcrt4/ndr_ole.c | 21 ++++++++++++++++++++- dll/win32/rpcrt4/ndr_stubless.c | 23 ++++++++++++++++++++++- dll/win32/rpcrt4/ndr_stubless.h | 6 +++--- dll/win32/rpcrt4/precomp.h | 3 ++- dll/win32/rpcrt4/rpc_assoc.c | 14 +++++++++++++- dll/win32/rpcrt4/rpc_assoc.h | 3 +++ dll/win32/rpcrt4/rpc_async.c | 12 +++++++++++- dll/win32/rpcrt4/rpc_binding.c | 20 +++++++++++++++++++- dll/win32/rpcrt4/rpc_binding.h | 4 ++++ dll/win32/rpcrt4/rpc_defs.h | 4 ++-- dll/win32/rpcrt4/rpc_epmap.c | 14 ++++++++++++-- dll/win32/rpcrt4/rpc_message.c | 20 ++++++++++++++++++-- dll/win32/rpcrt4/rpc_message.h | 2 ++ dll/win32/rpcrt4/rpc_server.c | 28 ++++++++++++++++++++++++++-- dll/win32/rpcrt4/rpc_server.h | 1 + dll/win32/rpcrt4/rpc_transport.c | 33 ++++++++++++++++++++++++++++----- dll/win32/rpcrt4/rpcrt4_main.c | 33 +++++++++++++++++++++++++++++---- media/doc/README.WINE | 2 +- 27 files changed, 347 insertions(+), 44 deletions(-) diff --git a/dll/win32/rpcrt4/cproxy.c b/dll/win32/rpcrt4/cproxy.c index 9a5e4af131..4f5b4f2b1c 100644 --- a/dll/win32/rpcrt4/cproxy.c +++ b/dll/win32/rpcrt4/cproxy.c @@ -17,11 +17,28 @@ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - * + * * TODO: Handle non-i386 architectures */ -#include "precomp.h" +#include "config.h" +#include "wine/port.h" + +#include <stdarg.h> + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "winerror.h" + +#include "objbase.h" +#include "rpcproxy.h" + +#include "cpsf.h" +#include "ndr_misc.h" +#include "ndr_stubless.h" +#include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(ole); diff --git a/dll/win32/rpcrt4/cpsf.c b/dll/win32/rpcrt4/cpsf.c index d4e3f9965a..9375c40fa4 100644 --- a/dll/win32/rpcrt4/cpsf.c +++ b/dll/win32/rpcrt4/cpsf.c @@ -18,15 +18,28 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" +#include "config.h" +#include "wine/port.h" -#include <winreg.h> +#include <stdarg.h> +#include <stdio.h> +#include <string.h> -#define NO_SHLWAPI_PATH -#define NO_SHLWAPI_STRFCNS -#define NO_SHLWAPI_GDI -#define NO_SHLWAPI_STREAM -#include <shlwapi.h> +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "winerror.h" +#include "winreg.h" + +#include "objbase.h" + +#include "rpcproxy.h" + +#include "wine/unicode.h" +#include "wine/debug.h" + +#include "cpsf.h" WINE_DEFAULT_DEBUG_CHANNEL(ole); diff --git a/dll/win32/rpcrt4/cstub.c b/dll/win32/rpcrt4/cstub.c index 7c78f1c82e..dc279b7534 100644 --- a/dll/win32/rpcrt4/cstub.c +++ b/dll/win32/rpcrt4/cstub.c @@ -19,7 +19,25 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" +#include "config.h" +#include "wine/port.h" + +#include <stdarg.h> + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "winerror.h" +#include "excpt.h" + +#include "objbase.h" +#include "rpcproxy.h" + +#include "wine/debug.h" +#include "wine/exception.h" + +#include "cpsf.h" WINE_DEFAULT_DEBUG_CHANNEL(ole); @@ -41,7 +59,7 @@ typedef struct static inline cstdstubbuffer_delegating_t *impl_from_delegating( IRpcStubBuffer *iface ) { - return CONTAINING_RECORD(iface, cstdstubbuffer_delegating_t, stub_buffer); + return CONTAINING_RECORD((void *)iface, cstdstubbuffer_delegating_t, stub_buffer); } HRESULT CStdStubBuffer_Construct(REFIID riid, diff --git a/dll/win32/rpcrt4/ndr_clientserver.c b/dll/win32/rpcrt4/ndr_clientserver.c index d0920412d8..66fe33b283 100644 --- a/dll/win32/rpcrt4/ndr_clientserver.c +++ b/dll/win32/rpcrt4/ndr_clientserver.c @@ -22,7 +22,22 @@ * - check for errors and throw exceptions */ -#include "precomp.h" +#include <stdarg.h> + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "winerror.h" + +#include "objbase.h" + +#include "rpcproxy.h" + +#include "wine/debug.h" + +#include "ndr_misc.h" +#include "rpcndr.h" WINE_DEFAULT_DEBUG_CHANNEL(rpc); diff --git a/dll/win32/rpcrt4/ndr_contexthandle.c b/dll/win32/rpcrt4/ndr_contexthandle.c index eedd4a7f70..3b262854b7 100644 --- a/dll/win32/rpcrt4/ndr_contexthandle.c +++ b/dll/win32/rpcrt4/ndr_contexthandle.c @@ -19,7 +19,14 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" +#include "ndr_misc.h" +#include "rpc_assoc.h" +#include "rpcndr.h" + +#include "wine/rpcfc.h" + +#include "wine/debug.h" +#include "wine/list.h" WINE_DEFAULT_DEBUG_CHANNEL(ole); diff --git a/dll/win32/rpcrt4/ndr_es.c b/dll/win32/rpcrt4/ndr_es.c index b487f60ad7..59ea8166f0 100644 --- a/dll/win32/rpcrt4/ndr_es.c +++ b/dll/win32/rpcrt4/ndr_es.c @@ -18,9 +18,21 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" +#include <stdarg.h> +#include <stdio.h> -#include <midles.h> +#include "windef.h" +#include "winbase.h" +#include "winerror.h" +#include "rpc.h" +#include "midles.h" +#include "ndrtypes.h" + +#include "ndr_misc.h" +#include "ndr_stubless.h" + +#include "wine/debug.h" +#include "wine/rpcfc.h" WINE_DEFAULT_DEBUG_CHANNEL(ole); diff --git a/dll/win32/rpcrt4/ndr_fullpointer.c b/dll/win32/rpcrt4/ndr_fullpointer.c index 941cb29dc9..2bbd2b2b1a 100644 --- a/dll/win32/rpcrt4/ndr_fullpointer.c +++ b/dll/win32/rpcrt4/ndr_fullpointer.c @@ -18,7 +18,14 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" +#include <stdarg.h> + +#include "windef.h" +#include "winbase.h" +#include "rpc.h" +#include "rpcndr.h" + +#include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(rpc); diff --git a/dll/win32/rpcrt4/ndr_marshall.c b/dll/win32/rpcrt4/ndr_marshall.c index 229b9d5f75..ee58b60a55 100644 --- a/dll/win32/rpcrt4/ndr_marshall.c +++ b/dll/win32/rpcrt4/ndr_marshall.c @@ -27,7 +27,25 @@ * - Checks for integer addition overflow in user marshall functions */ -#include "precomp.h" +#include <assert.h> +#include <stdarg.h> +#include <stdio.h> +#include <string.h> +#include <limits.h> + +#define NONAMELESSUNION +#include "windef.h" +#include "winbase.h" +#include "winerror.h" + +#include "ndr_misc.h" +#include "rpcndr.h" +#include "ndrtypes.h" + +#include "wine/unicode.h" +#include "wine/rpcfc.h" + +#include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(ole); diff --git a/dll/win32/rpcrt4/ndr_misc.h b/dll/win32/rpcrt4/ndr_misc.h index c80afc29f0..2ca89b1744 100644 --- a/dll/win32/rpcrt4/ndr_misc.h +++ b/dll/win32/rpcrt4/ndr_misc.h @@ -21,6 +21,13 @@ #ifndef __WINE_NDR_MISC_H #define __WINE_NDR_MISC_H +#include <stdarg.h> + +#include "windef.h" +#include "winbase.h" +#include "rpc.h" +#include "rpcndr.h" + struct IPSFactoryBuffer; PFORMAT_STRING ComputeConformanceOrVariance( diff --git a/dll/win32/rpcrt4/ndr_ole.c b/dll/win32/rpcrt4/ndr_ole.c index 3d940afb7d..0f0b7e7df2 100644 --- a/dll/win32/rpcrt4/ndr_ole.c +++ b/dll/win32/rpcrt4/ndr_ole.c @@ -21,7 +21,26 @@ * - fix the wire-protocol to match MS/RPC */ -#include "precomp.h" +#include <stdarg.h> +#include <stdio.h> +#include <string.h> + +#define COBJMACROS +#define NONAMELESSUNION + +#include "windef.h" +#include "winbase.h" +#include "winerror.h" + +#include "objbase.h" + +#include "ndr_misc.h" +#include "rpcndr.h" +#include "rpcproxy.h" +#include "wine/rpcfc.h" +#include "cpsf.h" + +#include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(ole); diff --git a/dll/win32/rpcrt4/ndr_stubless.c b/dll/win32/rpcrt4/ndr_stubless.c index f3e0399ef3..f84c61751a 100644 --- a/dll/win32/rpcrt4/ndr_stubless.c +++ b/dll/win32/rpcrt4/ndr_stubless.c @@ -23,7 +23,28 @@ * - Some types of binding handles */ -#include "precomp.h" +#include "config.h" +#include "wine/port.h" + +#include <stdarg.h> +#include <stdio.h> +#include <string.h> + +#include "windef.h" +#include "winbase.h" +#include "winerror.h" + +#include "objbase.h" +#include "rpc.h" +#include "rpcproxy.h" + +#include "wine/exception.h" +#include "wine/debug.h" +#include "wine/rpcfc.h" + +#include "cpsf.h" +#include "ndr_misc.h" +#include "ndr_stubless.h" WINE_DEFAULT_DEBUG_CHANNEL(rpc); diff --git a/dll/win32/rpcrt4/ndr_stubless.h b/dll/win32/rpcrt4/ndr_stubless.h index de78d8eed2..f8c3c5aba9 100644 --- a/dll/win32/rpcrt4/ndr_stubless.h +++ b/dll/win32/rpcrt4/ndr_stubless.h @@ -20,10 +20,10 @@ #pragma once -#include <ndrtypes.h> +#include "ndrtypes.h" /* there can't be any alignment with the structures in this file */ -#include <pshpack1.h> +#include "pshpack1.h" typedef struct _NDR_PROC_HEADER { @@ -226,7 +226,7 @@ typedef struct _NDR_EHD_CONTEXT unsigned char param_num; } NDR_EHD_CONTEXT; -#include <poppack.h> +#include "poppack.h" enum stubless_phase { diff --git a/dll/win32/rpcrt4/precomp.h b/dll/win32/rpcrt4/precomp.h index e67f2e44be..cb90de9d38 100644 --- a/dll/win32/rpcrt4/precomp.h +++ b/dll/win32/rpcrt4/precomp.h @@ -1,3 +1,4 @@ + #ifndef _RPCRT4_PCH_ #define _RPCRT4_PCH_ @@ -37,4 +38,4 @@ #include "rpc_message.h" #include "rpc_server.h" -#endif /* _RPCRT4_PCH_ */ +#endif /* !_RPCRT4_PCH_ */ diff --git a/dll/win32/rpcrt4/rpc_assoc.c b/dll/win32/rpcrt4/rpc_assoc.c index cf61cf64fd..ccf17b9c07 100644 --- a/dll/win32/rpcrt4/rpc_assoc.c +++ b/dll/win32/rpcrt4/rpc_assoc.c @@ -19,7 +19,19 @@ * */ -#include "precomp.h" +#include <stdarg.h> +#include <assert.h> + +#include "rpc.h" +#include "rpcndr.h" +#include "wine/winternl.h" + +#include "wine/unicode.h" +#include "wine/debug.h" + +#include "rpc_binding.h" +#include "rpc_assoc.h" +#include "rpc_message.h" WINE_DEFAULT_DEBUG_CHANNEL(rpc); diff --git a/dll/win32/rpcrt4/rpc_assoc.h b/dll/win32/rpcrt4/rpc_assoc.h index ddbc27428b..31cbd8ba55 100644 --- a/dll/win32/rpcrt4/rpc_assoc.h +++ b/dll/win32/rpcrt4/rpc_assoc.h @@ -19,7 +19,10 @@ * */ +#pragma once + #include "rpc_binding.h" +#include "wine/list.h" typedef struct _RpcAssoc { diff --git a/dll/win32/rpcrt4/rpc_async.c b/dll/win32/rpcrt4/rpc_async.c index d4dbf163dc..891fc5ad72 100644 --- a/dll/win32/rpcrt4/rpc_async.c +++ b/dll/win32/rpcrt4/rpc_async.c @@ -19,7 +19,17 @@ * */ -#include "precomp.h" +#include <stdarg.h> + +#include "rpc.h" +#include "rpcndr.h" +#include "rpcasync.h" + +#include "wine/debug.h" + +#include "rpc_binding.h" +#include "rpc_message.h" +#include "ndr_stubless.h" WINE_DEFAULT_DEBUG_CHANNEL(rpc); diff --git a/dll/win32/rpcrt4/rpc_binding.c b/dll/win32/rpcrt4/rpc_binding.c index 4f7b5f0044..829110f662 100644 --- a/dll/win32/rpcrt4/rpc_binding.c +++ b/dll/win32/rpcrt4/rpc_binding.c @@ -21,7 +21,25 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" +#include <stdarg.h> +#include <stdio.h> +#include <string.h> +#include <assert.h> + +#include "windef.h" +#include "winbase.h" +#include "winnls.h" +#include "winerror.h" +#include "wine/winternl.h" +#include "wine/unicode.h" + +#include "rpc.h" +#include "rpcndr.h" + +#include "wine/debug.h" + +#include "rpc_binding.h" +#include "rpc_assoc.h" WINE_DEFAULT_DEBUG_CHANNEL(rpc); diff --git a/dll/win32/rpcrt4/rpc_binding.h b/dll/win32/rpcrt4/rpc_binding.h index 991a0ff5a8..ca5388789f 100644 --- a/dll/win32/rpcrt4/rpc_binding.h +++ b/dll/win32/rpcrt4/rpc_binding.h @@ -21,8 +21,12 @@ #ifndef __WINE_RPC_BINDING_H #define __WINE_RPC_BINDING_H +#include "rpcndr.h" +#include "security.h" +#include "wine/list.h" #include "rpc_defs.h" + enum secure_packet_direction { SECURE_PACKET_SEND, diff --git a/dll/win32/rpcrt4/rpc_defs.h b/dll/win32/rpcrt4/rpc_defs.h index f0d922f44b..434d39699e 100644 --- a/dll/win32/rpcrt4/rpc_defs.h +++ b/dll/win32/rpcrt4/rpc_defs.h @@ -22,7 +22,7 @@ #ifndef __WINE_RPC_DEFS_H #define __WINE_RPC_DEFS_H -#include <pshpack1.h> +#include "pshpack1.h" typedef struct { unsigned char rpc_ver; /* RPC major version (5) */ @@ -168,7 +168,7 @@ typedef struct unsigned char auth_reserved; /* reserved, must be zero */ unsigned int auth_context_id; /* unique value for the authenticated connection */ } RpcAuthVerifier; -#include <poppack.h> +#include "poppack.h" #define RPC_AUTH_VERIFIER_LEN(common_hdr) \ ((common_hdr)->auth_len ? (common_hdr)->auth_len + sizeof(RpcAuthVerifier) : 0) diff --git a/dll/win32/rpcrt4/rpc_epmap.c b/dll/win32/rpcrt4/rpc_epmap.c index b299643346..c2ba446a66 100644 --- a/dll/win32/rpcrt4/rpc_epmap.c +++ b/dll/win32/rpcrt4/rpc_epmap.c @@ -20,10 +20,20 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" +#include <stdarg.h> -#include <winsvc.h> +#include "windef.h" +#include "winbase.h" +#include "winerror.h" +#include "winsvc.h" +#include "rpc.h" + +#include "wine/debug.h" +#include "wine/exception.h" + +#include "rpc_binding.h" +#include "epm_c.h" #include "epm_towers.h" WINE_DEFAULT_DEBUG_CHANNEL(ole); diff --git a/dll/win32/rpcrt4/rpc_message.c b/dll/win32/rpcrt4/rpc_message.c index a7c1c54aa1..96422138c4 100644 --- a/dll/win32/rpcrt4/rpc_message.c +++ b/dll/win32/rpcrt4/rpc_message.c @@ -20,9 +20,25 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" +#include <stdarg.h> +#include <stdio.h> +#include <string.h> -#include <winuser.h> +#include "windef.h" +#include "winbase.h" +#include "winerror.h" +#include "winuser.h" + +#include "rpc.h" +#include "rpcndr.h" +#include "rpcdcep.h" + +#include "wine/debug.h" + +#include "rpc_binding.h" +#include "rpc_defs.h" +#include "rpc_message.h" +#include "ncastatus.h" WINE_DEFAULT_DEBUG_CHANNEL(rpc); diff --git a/dll/win32/rpcrt4/rpc_message.h b/dll/win32/rpcrt4/rpc_message.h index 30065ddd02..a3729cc784 100644 --- a/dll/win32/rpcrt4/rpc_message.h +++ b/dll/win32/rpcrt4/rpc_message.h @@ -21,6 +21,8 @@ #ifndef __WINE_RPC_MESSAGE_H #define __WINE_RPC_MESSAGE_H +#include "rpc_defs.h" + typedef unsigned int NCA_STATUS; RpcPktHdr *RPCRT4_BuildFaultHeader(ULONG DataRepresentation, RPC_STATUS Status) DECLSPEC_HIDDEN; diff --git a/dll/win32/rpcrt4/rpc_server.c b/dll/win32/rpcrt4/rpc_server.c index 57d64ff0fc..d1b5d64ece 100644 --- a/dll/win32/rpcrt4/rpc_server.c +++ b/dll/win32/rpcrt4/rpc_server.c @@ -20,9 +20,31 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" +#include "config.h" +#include "wine/port.h" -#include <secext.h> +#include <stdarg.h> +#include <stdio.h> +#include <string.h> +#include <assert.h> + +#include "windef.h" +#include "winbase.h" +#include "winerror.h" + +#include "rpc.h" +#include "rpcndr.h" +#include "excpt.h" + +#include "wine/debug.h" +#include "wine/exception.h" + +#include "rpc_server.h" +#include "rpc_assoc.h" +#include "rpc_message.h" +#include "rpc_defs.h" +#include "ncastatus.h" +#include "secext.h" WINE_DEFAULT_DEBUG_CHANNEL(rpc); @@ -784,8 +806,10 @@ static RPC_STATUS RPCRT4_stop_listen(BOOL auto_listen) if (stop_listen) { RpcServerProtseq *cps; + EnterCriticalSection(&server_cs); LIST_FOR_EACH_ENTRY(cps, &protseqs, RpcServerProtseq, entry) RPCRT4_sync_with_server_thread(cps); + LeaveCriticalSection(&server_cs); } if (!auto_listen) diff --git a/dll/win32/rpcrt4/rpc_server.h b/dll/win32/rpcrt4/rpc_server.h index adaa47133e..5e043651e5 100644 --- a/dll/win32/rpcrt4/rpc_server.h +++ b/dll/win32/rpcrt4/rpc_server.h @@ -22,6 +22,7 @@ #define __WINE_RPC_SERVER_H #include "rpc_binding.h" +#include "wine/list.h" struct protseq_ops; diff --git a/dll/win32/rpcrt4/rpc_transport.c b/dll/win32/rpcrt4/rpc_transport.c index 0a2c9a5fb0..8d8a7be3af 100644 --- a/dll/win32/rpcrt4/rpc_transport.c +++ b/dll/win32/rpcrt4/rpc_transport.c @@ -23,15 +23,38 @@ * */ -#include "precomp.h" - #include "ntstatus.h" #define WIN32_NO_STATUS -#include <ws2tcpip.h> +#ifdef __REACTOS__ +#define NONAMELESSUNION +#endif +#include "ws2tcpip.h" + +#include <stdarg.h> +#include <stdio.h> +#include <string.h> +#include <assert.h> + + + +#include "windef.h" +#include "winbase.h" +#include "winnls.h" +#include "winerror.h" +#include "wininet.h" +#include "wine/winternl.h" +#include "winioctl.h" +#include "wine/unicode.h" + +#include "rpc.h" +#include "rpcndr.h" -#include <wininet.h> -#include <winioctl.h> +#include "wine/debug.h" +#include "rpc_binding.h" +#include "rpc_assoc.h" +#include "rpc_message.h" +#include "rpc_server.h" #include "epm_towers.h" #define DEFAULT_NCACN_HTTP_TIMEOUT (60 * 1000) diff --git a/dll/win32/rpcrt4/rpcrt4_main.c b/dll/win32/rpcrt4/rpcrt4_main.c index 562732e850..15bba493ab 100644 --- a/dll/win32/rpcrt4/rpcrt4_main.c +++ b/dll/win32/rpcrt4/rpcrt4_main.c @@ -28,10 +28,35 @@ * NT-based native rpcrt4's. Commonly-used transport for self-to-self RPC's. */ -#include "precomp.h" - -#include <ntsecapi.h> -#include <iphlpapi.h> +#include "config.h" + +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "ntstatus.h" +#define WIN32_NO_STATUS +#include "windef.h" +#include "winerror.h" +#include "winbase.h" +#include "winuser.h" +#include "winnt.h" +#include "wine/winternl.h" +#include "ntsecapi.h" +#include "iptypes.h" +#include "iphlpapi.h" +#include "wine/unicode.h" +#include "rpc.h" + +#include "ole2.h" +#include "rpcndr.h" +#include "rpcproxy.h" + +#include "rpc_binding.h" +#include "rpc_server.h" + +#include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(rpc); diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 3c8bf8dd87..ef3c0456d4 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -160,7 +160,7 @@ reactos/dll/win32/rasapi32 # Synced to WineStaging-2.9 reactos/dll/win32/resutils # Synced to WineStaging-2.9 reactos/dll/win32/riched20 # Synced to Wine-3.0 reactos/dll/win32/riched32 # Synced to WineStaging-2.9 -reactos/dll/win32/rpcrt4 # Synced to Wine-3.0 +reactos/dll/win32/rpcrt4 # Synced to WineStaging-3.3 reactos/dll/win32/rsabase # Synced to WineStaging-2.9 reactos/dll/win32/rsaenh # Synced to WineStaging-2.9 reactos/dll/win32/sccbase # Synced to WineStaging-2.9
6 years, 9 months
1
0
0
0
02/02: [VFDLIB] More 64 bit fixes
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=643e6bf382c7aa12a6a94…
commit 643e6bf382c7aa12a6a947ee5653e29d6528ffca Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Wed Feb 28 07:05:59 2018 +0100 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Sun Mar 4 16:27:07 2018 +0100 [VFDLIB] More 64 bit fixes --- modules/rosapps/lib/vfdlib/vfdguiopen.c | 8 ++++++++ modules/rosapps/lib/vfdlib/vfdguisave.c | 8 ++++++++ modules/rosapps/lib/vfdlib/vfdshext.h | 4 ++++ modules/rosapps/lib/vfdlib/vfdshmenu.cpp | 4 ++++ modules/rosapps/lib/vfdlib/vfdshprop.cpp | 9 +++++++++ 5 files changed, 33 insertions(+) diff --git a/modules/rosapps/lib/vfdlib/vfdguiopen.c b/modules/rosapps/lib/vfdlib/vfdguiopen.c index d67281c2f4..11d7bab315 100644 --- a/modules/rosapps/lib/vfdlib/vfdguiopen.c +++ b/modules/rosapps/lib/vfdlib/vfdguiopen.c @@ -47,7 +47,11 @@ // // local functions // +#ifndef __REACTOS__ static INT CALLBACK OpenDialogProc( +#else +static INT_PTR CALLBACK OpenDialogProc( +#endif HWND hDlg, UINT uMsg, WPARAM wParam, @@ -89,7 +93,11 @@ DWORD WINAPI VfdGuiOpen( // // Open image dialog procedure // +#ifndef __REACTOS__ INT CALLBACK OpenDialogProc( +#else +INT_PTR CALLBACK OpenDialogProc( +#endif HWND hDlg, UINT uMsg, WPARAM wParam, diff --git a/modules/rosapps/lib/vfdlib/vfdguisave.c b/modules/rosapps/lib/vfdlib/vfdguisave.c index 0a9aa3ae02..ff1d39566f 100644 --- a/modules/rosapps/lib/vfdlib/vfdguisave.c +++ b/modules/rosapps/lib/vfdlib/vfdguisave.c @@ -35,7 +35,11 @@ // // local functions // +#ifndef __REACTOS__ static INT CALLBACK SaveDialogProc( +#else +static INT_PTR CALLBACK SaveDialogProc( +#endif HWND hDlg, UINT uMsg, WPARAM wParam, @@ -119,7 +123,11 @@ DWORD GuiSaveParam( // // The dialog procedure // +#ifndef __REACTOS__ INT CALLBACK SaveDialogProc( +#else +INT_PTR CALLBACK SaveDialogProc( +#endif HWND hDlg, UINT uMsg, WPARAM wParam, diff --git a/modules/rosapps/lib/vfdlib/vfdshext.h b/modules/rosapps/lib/vfdlib/vfdshext.h index 7379cb50cd..728aaec6dc 100644 --- a/modules/rosapps/lib/vfdlib/vfdshext.h +++ b/modules/rosapps/lib/vfdlib/vfdshext.h @@ -67,7 +67,11 @@ public: LPCMINVOKECOMMANDINFO lpcmi); STDMETHODIMP GetCommandString( +#ifndef __REACTOS__ UINT idCmd, +#else + UINT_PTR idCmd, +#endif UINT uFlags, UINT *reserved, LPSTR pszName, diff --git a/modules/rosapps/lib/vfdlib/vfdshmenu.cpp b/modules/rosapps/lib/vfdlib/vfdshmenu.cpp index 3bce66a907..005a6e352d 100644 --- a/modules/rosapps/lib/vfdlib/vfdshmenu.cpp +++ b/modules/rosapps/lib/vfdlib/vfdshmenu.cpp @@ -267,7 +267,11 @@ STDMETHODIMP CVfdShExt::QueryContextMenu( // STDMETHODIMP CVfdShExt::GetCommandString( +#ifndef __REACTOS__ UINT idCmd, +#else + UINT_PTR idCmd, +#endif UINT uFlags, UINT *reserved, LPSTR pszName, diff --git a/modules/rosapps/lib/vfdlib/vfdshprop.cpp b/modules/rosapps/lib/vfdlib/vfdshprop.cpp index acb9d0cebe..0fada652b8 100644 --- a/modules/rosapps/lib/vfdlib/vfdshprop.cpp +++ b/modules/rosapps/lib/vfdlib/vfdshprop.cpp @@ -237,7 +237,11 @@ void OnControl( CHAR module_path[MAX_PATH]; CHAR full_path[MAX_PATH]; PSTR file_name; +#ifndef __REACTOS__ DWORD ret; +#else + DWORD_PTR ret; +#endif ret = GetModuleFileName( g_hDllModule, module_path, sizeof(module_path)); @@ -258,8 +262,13 @@ void OnControl( VFDTRACE(0, ("Starting %s\n", full_path)); +#ifndef __REACTOS__ ret = (DWORD)ShellExecute( hDlg, NULL, full_path, NULL, NULL, SW_SHOW); +#else + ret = (DWORD_PTR)ShellExecute( + hDlg, NULL, full_path, NULL, NULL, SW_SHOW); +#endif if (ret > 32) { PropSheet_PressButton(GetParent(hDlg), PSBTN_CANCEL);
6 years, 9 months
1
0
0
0
01/02: [PSDK][REACTOS] Fix definitions and usage of DWLP_MSGRESULT, DWLP_DLGPROC, and DWLP_USER - Make sure the DWLP_* values are correct on _WIN64 - Don't use the DWL_* constants, they are not portable. Enforce this by removing them entirely from winuser.h - Make sure Get/SetWindowLong*Ptr* is used and pointers are not truncated to LONG
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0182dcd71b9015fdfb998…
commit 0182dcd71b9015fdfb9983d72aa992f6f8379159 Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Tue Feb 27 22:48:32 2018 +0100 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Sun Mar 4 16:27:07 2018 +0100 [PSDK][REACTOS] Fix definitions and usage of DWLP_MSGRESULT, DWLP_DLGPROC, and DWLP_USER - Make sure the DWLP_* values are correct on _WIN64 - Don't use the DWL_* constants, they are not portable. Enforce this by removing them entirely from winuser.h - Make sure Get/SetWindowLong*Ptr* is used and pointers are not truncated to LONG --- base/applications/msconfig_new/systempage.cpp | 4 ++-- .../mscutils/servman/propsheet_logon.c | 2 +- base/setup/reactos/drivepage.c | 2 +- base/setup/reactos/reactos.c | 8 +++---- dll/cpl/appwiz/createlink.c | 2 +- dll/cpl/hdwwiz/hdwwiz.c | 20 ++++++++-------- dll/cpl/intl/advanced.c | 6 ++--- dll/cpl/mmsys/sounds.c | 2 +- dll/cpl/timedate/dateandtime.c | 2 +- dll/cpl/timedate/timezone.c | 2 +- dll/shellext/deskadp/deskadp.c | 16 ++++--------- dll/shellext/deskmon/deskmon.c | 9 +++---- dll/shellext/netshell/lanstatusui.cpp | 2 +- dll/shellext/netshell/setup.cpp | 12 +++++----- dll/win32/aclui/aclui.c | 7 ++---- dll/win32/devmgr/properties/advprop.cpp | 28 +++++++--------------- dll/win32/devmgr/properties/hwpage.cpp | 9 +++---- dll/win32/devmgr/properties/hwresource.cpp | 11 ++------- dll/win32/netcfgx/tcpipconf_notify.c | 12 +++++----- dll/win32/newdev/wizard.c | 4 ++-- dll/win32/serialui/serialui.c | 4 ++-- dll/win32/shell32/CShellLink.cpp | 6 ++--- dll/win32/shell32/dialogs/drvdefext.cpp | 2 +- dll/win32/shell32/dialogs/filedefext.cpp | 4 ++-- dll/win32/shell32/dialogs/folder_options.cpp | 2 +- dll/win32/shell32/dialogs/recycler_prop.cpp | 2 +- dll/win32/syssetup/wizard.c | 28 +++++++++++----------- .../applications/explorer-old/dialogs/settings.cpp | 2 +- .../applications/screensavers/matrix/matrix.c | 4 ++-- modules/rosapps/lib/vfdlib/vfdlib.h | 4 ++++ modules/rosapps/lib/vfdlib/vfdshprop.cpp | 20 ++++++++++++++++ modules/rosapps/templates/dialog/dialog.c | 4 ++-- sdk/include/psdk/windowsx.h | 16 ++++++++++++- sdk/include/psdk/winuser.h | 13 ++++++---- sdk/lib/atl/atlwin.h | 2 ++ 35 files changed, 142 insertions(+), 131 deletions(-) diff --git a/base/applications/msconfig_new/systempage.cpp b/base/applications/msconfig_new/systempage.cpp index 26be3b8c32..232a378846 100644 --- a/base/applications/msconfig_new/systempage.cpp +++ b/base/applications/msconfig_new/systempage.cpp @@ -728,9 +728,9 @@ CommonWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) * to the message. * * If the dialog box procedure processes a message that requires a specific return value, the dialog box procedure - * should set the desired return value by calling SetWindowLong(hwndDlg, DWL_MSGRESULT, lResult) immediately before + * should set the desired return value by calling SetWindowLong(hwndDlg, DWLP_MSGRESULT, lResult) immediately before * returning TRUE. Note that you must call SetWindowLong immediately before returning TRUE; doing so earlier may result - * in the DWL_MSGRESULT value being overwritten by a nested dialog box message. + * in the DWLP_MSGRESULT value being overwritten by a nested dialog box message. * * [...] * diff --git a/base/applications/mscutils/servman/propsheet_logon.c b/base/applications/mscutils/servman/propsheet_logon.c index 293b6a83e8..ca758f7f8f 100644 --- a/base/applications/mscutils/servman/propsheet_logon.c +++ b/base/applications/mscutils/servman/propsheet_logon.c @@ -137,7 +137,7 @@ OnQueryInitialFocus( { HWND hwnd = GetDlgItem(hwndDlg, pLogonData->bLocalSystem ? IDC_LOGON_SYSTEMACCOUNT : IDC_LOGON_THISACCOUNT); - SetWindowLong(hwndDlg, DWL_MSGRESULT, (LPARAM)hwnd); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, (LPARAM)hwnd); return TRUE; } diff --git a/base/setup/reactos/drivepage.c b/base/setup/reactos/drivepage.c index c1213f97e0..d117ae8144 100644 --- a/base/setup/reactos/drivepage.c +++ b/base/setup/reactos/drivepage.c @@ -245,7 +245,7 @@ DriveDlgProc( case PSN_QUERYCANCEL: SetWindowLongPtr(hwndDlg, - DWL_MSGRESULT, + DWLP_MSGRESULT, MessageBox(GetParent(hwndDlg), pSetupData->szAbortMessage, pSetupData->szAbortTitle, diff --git a/base/setup/reactos/reactos.c b/base/setup/reactos/reactos.c index 14eb3dc7f7..051071ad12 100644 --- a/base/setup/reactos/reactos.c +++ b/base/setup/reactos/reactos.c @@ -174,7 +174,7 @@ TypeDlgProc(HWND hwndDlg, case PSN_QUERYCANCEL: SetWindowLongPtr(hwndDlg, - DWL_MSGRESULT, + DWLP_MSGRESULT, MessageBox(GetParent(hwndDlg), pSetupData->szAbortMessage, pSetupData->szAbortTitle, @@ -262,7 +262,7 @@ DeviceDlgProc(HWND hwndDlg, case PSN_QUERYCANCEL: SetWindowLongPtr(hwndDlg, - DWL_MSGRESULT, + DWLP_MSGRESULT, MessageBox(GetParent(hwndDlg), pSetupData->szAbortMessage, pSetupData->szAbortTitle, @@ -350,7 +350,7 @@ SummaryDlgProc(HWND hwndDlg, case PSN_QUERYCANCEL: SetWindowLongPtr(hwndDlg, - DWL_MSGRESULT, + DWLP_MSGRESULT, MessageBox(GetParent(hwndDlg), pSetupData->szAbortMessage, pSetupData->szAbortTitle, @@ -401,7 +401,7 @@ ProcessDlgProc(HWND hwndDlg, break; case PSN_QUERYCANCEL: SetWindowLongPtr(hwndDlg, - DWL_MSGRESULT, + DWLP_MSGRESULT, MessageBox(GetParent(hwndDlg), pSetupData->szAbortMessage, pSetupData->szAbortTitle, diff --git a/dll/cpl/appwiz/createlink.c b/dll/cpl/appwiz/createlink.c index 947f695d5a..ba83643f34 100644 --- a/dll/cpl/appwiz/createlink.c +++ b/dll/cpl/appwiz/createlink.c @@ -231,7 +231,7 @@ WelcomeDlgProc(HWND hwndDlg, } SendDlgItemMessage(hwndDlg, IDC_SHORTCUT_LOCATION, EM_SETSEL, 0, -1); SetFocus(GetDlgItem(hwndDlg, IDC_SHORTCUT_LOCATION)); - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, PSNRET_INVALID_NOCHANGEPAGE); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, PSNRET_INVALID_NOCHANGEPAGE); return -1; } else diff --git a/dll/cpl/hdwwiz/hdwwiz.c b/dll/cpl/hdwwiz/hdwwiz.c index eeb1bd9d68..5038b1c57e 100644 --- a/dll/cpl/hdwwiz/hdwwiz.c +++ b/dll/cpl/hdwwiz/hdwwiz.c @@ -172,9 +172,9 @@ IsConnectedPageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) case PSN_WIZNEXT: { if (SendDlgItemMessage(hwndDlg, IDC_NOTCONNECTED, BM_GETCHECK, 0, 0) == BST_CHECKED) - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_NOTCONNECTEDPAGE); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, IDD_NOTCONNECTEDPAGE); else - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_PROBELISTPAGE); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, IDD_PROBELISTPAGE); return TRUE; } @@ -244,7 +244,7 @@ NotConnectedPageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) case PSN_WIZBACK: { - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_ISCONNECTEDPAGE); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, IDD_ISCONNECTEDPAGE); return TRUE; } } @@ -429,7 +429,7 @@ ProbeListPageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) if (Index == 0) { - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_SELECTWAYPAGE); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, IDD_SELECTWAYPAGE); } else { @@ -443,7 +443,7 @@ ProbeListPageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) pts = (PWSTR) Item.lParam; wcscpy(pDeviceStatusText, pts); - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_HWSTATUSPAGE); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, IDD_HWSTATUSPAGE); } return TRUE; } @@ -499,9 +499,9 @@ SelectWayPageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) case PSN_WIZNEXT: { if (SendDlgItemMessage(hwndDlg, IDC_AUTOINSTALL, BM_GETCHECK, 0, 0) == BST_CHECKED) - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_PROGRESSPAGE); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, IDD_PROGRESSPAGE); else - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_HWTYPESPAGE); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, IDD_HWTYPESPAGE); return TRUE; } @@ -542,7 +542,7 @@ DevStatusPageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) case PSN_WIZBACK: { - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_PROBELISTPAGE); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, IDD_PROBELISTPAGE); return TRUE; } } @@ -735,7 +735,7 @@ HdTypesPageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) case PSN_WIZBACK: { - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_SELECTWAYPAGE); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, IDD_SELECTWAYPAGE); return TRUE; } } @@ -765,7 +765,7 @@ ProgressPageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) case PSN_WIZBACK: { - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_SELECTWAYPAGE); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, IDD_SELECTWAYPAGE); return TRUE; } } diff --git a/dll/cpl/intl/advanced.c b/dll/cpl/intl/advanced.c index 0fddc82b5a..dd42d3fc70 100644 --- a/dll/cpl/intl/advanced.c +++ b/dll/cpl/intl/advanced.c @@ -496,9 +496,9 @@ AdvancedPageProc(HWND hwndDlg, else if (((LPNMHDR)lParam)->idFrom == IDC_CONV_TABLES && ((LPNMHDR)lParam)->code == NM_CUSTOMDRAW) { - SetWindowLong(hwndDlg, - DWL_MSGRESULT, - (LONG)ListViewCustomDraw(lParam)); + SetWindowLongPtr(hwndDlg, + DWLP_MSGRESULT, + (LONG_PTR)ListViewCustomDraw(lParam)); return TRUE; } break; diff --git a/dll/cpl/mmsys/sounds.c b/dll/cpl/mmsys/sounds.c index c993366f14..a4e6feadf5 100644 --- a/dll/cpl/mmsys/sounds.c +++ b/dll/cpl/mmsys/sounds.c @@ -929,7 +929,7 @@ ApplyChanges(HWND hwndDlg) } RegCloseKey(hKey); - SetWindowLong(hwndDlg, DWL_MSGRESULT, (LONG)PSNRET_NOERROR); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, (LONG_PTR)PSNRET_NOERROR); return TRUE; } diff --git a/dll/cpl/timedate/dateandtime.c b/dll/cpl/timedate/dateandtime.c index 237f916f7a..8470db32bc 100644 --- a/dll/cpl/timedate/dateandtime.c +++ b/dll/cpl/timedate/dateandtime.c @@ -100,7 +100,7 @@ SetLocalSystemTime(HWND hwnd) SystemSetTime(&Time, FALSE); SetWindowLongPtrW(hwnd, - DWL_MSGRESULT, + DWLP_MSGRESULT, PSNRET_NOERROR); SendMessageW(GetDlgItem(hwnd, diff --git a/dll/cpl/timedate/timezone.c b/dll/cpl/timedate/timezone.c index 06a2d1a4db..d3061bbd08 100644 --- a/dll/cpl/timedate/timezone.c +++ b/dll/cpl/timedate/timezone.c @@ -453,7 +453,7 @@ TimeZonePageProc(HWND hwndDlg, { SetAutoDaylightInfo(GetDlgItem(hwndDlg, IDC_AUTODAYLIGHT)); SetLocalTimeZone(GetDlgItem(hwndDlg, IDC_TIMEZONELIST)); - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, PSNRET_NOERROR); return TRUE; } diff --git a/dll/shellext/deskadp/deskadp.c b/dll/shellext/deskadp/deskadp.c index ec035a577f..3ec5460255 100644 --- a/dll/shellext/deskadp/deskadp.c +++ b/dll/shellext/deskadp/deskadp.c @@ -198,17 +198,14 @@ ListAllModesDlgProc(HWND hwndDlg, if (uMsg != WM_INITDIALOG) { - This = (PDESKDISPLAYADAPTER)GetWindowLongPtr(hwndDlg, - DWL_USER); + This = (PDESKDISPLAYADAPTER)GetWindowLongPtr(hwndDlg, DWLP_USER); } switch (uMsg) { case WM_INITDIALOG: This = (PDESKDISPLAYADAPTER)lParam; - SetWindowLongPtr(hwndDlg, - DWL_USER, - (LONG_PTR)This); + SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)This); InitListAllModesDialog(This, hwndDlg); @@ -386,8 +383,7 @@ DisplayAdapterDlgProc(HWND hwndDlg, if (uMsg != WM_INITDIALOG) { - This = (PDESKDISPLAYADAPTER)GetWindowLongPtr(hwndDlg, - DWL_USER); + This = (PDESKDISPLAYADAPTER)GetWindowLongPtr(hwndDlg, DWLP_USER); } switch (uMsg) @@ -395,9 +391,7 @@ DisplayAdapterDlgProc(HWND hwndDlg, case WM_INITDIALOG: This = (PDESKDISPLAYADAPTER)((LPCPROPSHEETPAGE)lParam)->lParam; This->hwndDlg = hwndDlg; - SetWindowLongPtr(hwndDlg, - DWL_USER, - (LONG_PTR)This); + SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)This); InitDisplayAdapterDialog(This); Ret = TRUE; @@ -426,7 +420,7 @@ DisplayAdapterDlgProc(HWND hwndDlg, case PSN_APPLY: { SetWindowLongPtr(hwndDlg, - DWL_MSGRESULT, + DWLP_MSGRESULT, ApplyDisplayAdapterChanges(This)); break; } diff --git a/dll/shellext/deskmon/deskmon.c b/dll/shellext/deskmon/deskmon.c index 3ab92551d5..16bdd2372e 100644 --- a/dll/shellext/deskmon/deskmon.c +++ b/dll/shellext/deskmon/deskmon.c @@ -485,8 +485,7 @@ MonitorDlgProc(HWND hwndDlg, if (uMsg != WM_INITDIALOG) { - This = (PDESKMONITOR)GetWindowLongPtr(hwndDlg, - DWL_USER); + This = (PDESKMONITOR)GetWindowLongPtr(hwndDlg, DWLP_USER); } switch (uMsg) @@ -494,9 +493,7 @@ MonitorDlgProc(HWND hwndDlg, case WM_INITDIALOG: This = (PDESKMONITOR)((LPCPROPSHEETPAGE)lParam)->lParam; This->hwndDlg = hwndDlg; - SetWindowLongPtr(hwndDlg, - DWL_USER, - (LONG_PTR)This); + SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)This); InitMonitorDialog(This); Ret = TRUE; @@ -535,7 +532,7 @@ MonitorDlgProc(HWND hwndDlg, case PSN_APPLY: { SetWindowLongPtr(hwndDlg, - DWL_MSGRESULT, + DWLP_MSGRESULT, ApplyMonitorChanges(This)); break; } diff --git a/dll/shellext/netshell/lanstatusui.cpp b/dll/shellext/netshell/lanstatusui.cpp index 6cfd065b46..7c366444ea 100644 --- a/dll/shellext/netshell/lanstatusui.cpp +++ b/dll/shellext/netshell/lanstatusui.cpp @@ -784,7 +784,7 @@ LANStatusUiDlg( if (lppsn->hdr.code == PSN_APPLY || lppsn->hdr.code == PSN_RESET) { pContext = (LANSTATUSUI_CONTEXT*)GetWindowLongPtr(hwndDlg, DWLP_USER); - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, PSNRET_NOERROR); pContext->hwndDlg = NULL; return TRUE; } diff --git a/dll/shellext/netshell/setup.cpp b/dll/shellext/netshell/setup.cpp index b5730fc092..dc1264ac37 100644 --- a/dll/shellext/netshell/setup.cpp +++ b/dll/shellext/netshell/setup.cpp @@ -83,7 +83,7 @@ NetworkSettingsPageDlgProc( PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_BACK | PSWIZB_NEXT); if (pSetupData->UnattendSetup) { - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_NETWORKCOMPONENTPAGE); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, IDD_NETWORKCOMPONENTPAGE); return TRUE; } break; @@ -95,7 +95,7 @@ NetworkSettingsPageDlgProc( if (IsDlgButtonChecked(hwndDlg, IDC_NETWORK_TYPICAL) == BST_CHECKED) { pNetworkSetupData->bTypicalNetworkSetup = TRUE; - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_NETWORKDOMAINPAGE); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, IDD_NETWORKDOMAINPAGE); return TRUE; } break; @@ -163,7 +163,7 @@ NetworkComponentPageDlgProc( PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_BACK | PSWIZB_NEXT); if (pSetupData->UnattendSetup) { - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_NETWORKDOMAINPAGE); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, IDD_NETWORKDOMAINPAGE); return TRUE; } break; @@ -251,7 +251,7 @@ NetworkDomainPageDlgProc( PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_BACK | PSWIZB_NEXT); if (pSetupData->UnattendSetup) { - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, pSetupData->uPostNetworkWizardPage); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, pSetupData->uPostNetworkWizardPage); return TRUE; } break; @@ -271,7 +271,7 @@ NetworkDomainPageDlgProc( MessageBoxW(hwndDlg, ErrorName, Title, MB_ICONERROR | MB_OK); SetFocus(GetDlgItem(hwndDlg, IDC_DOMAIN_NAME)); - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, -1); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, -1); //TODO: Implement setting the Domain/Workgroup @@ -285,7 +285,7 @@ NetworkDomainPageDlgProc( /* If the Typical setup chosen, then skip back to the Settings Page */ if (pNetworkSetupData->bTypicalNetworkSetup == TRUE) { - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_NETWORKSETTINGSPAGE); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, IDD_NETWORKSETTINGSPAGE); return TRUE; } break; diff --git a/dll/win32/aclui/aclui.c b/dll/win32/aclui/aclui.c index 591b3347a2..5a3f7b6d09 100644 --- a/dll/win32/aclui/aclui.c +++ b/dll/win32/aclui/aclui.c @@ -1242,8 +1242,7 @@ SecurityPageProc(IN HWND hwndDlg, PSECURITY_PAGE sp; INT_PTR Ret = FALSE; - sp = (PSECURITY_PAGE)GetWindowLongPtr(hwndDlg, - DWL_USER); + sp = (PSECURITY_PAGE)GetWindowLongPtr(hwndDlg, DWLP_USER); if (sp != NULL || uMsg == WM_INITDIALOG) { switch (uMsg) @@ -1382,9 +1381,7 @@ SecurityPageProc(IN HWND hwndDlg, sp->SpecialPermCheckIndex = -1; /* save the pointer to the structure */ - SetWindowLongPtr(hwndDlg, - DWL_USER, - (DWORD_PTR)sp); + SetWindowLongPtr(hwndDlg, DWLP_USER, (DWORD_PTR)sp); (void)ListView_SetExtendedListViewStyleEx(sp->hWndPrincipalsList, LVS_EX_FULLROWSELECT, diff --git a/dll/win32/devmgr/properties/advprop.cpp b/dll/win32/devmgr/properties/advprop.cpp index 44d8d0fa21..993dd6b9bc 100644 --- a/dll/win32/devmgr/properties/advprop.cpp +++ b/dll/win32/devmgr/properties/advprop.cpp @@ -310,8 +310,7 @@ DriverDetailsDlgProc(IN HWND hwndDlg, PDEVADVPROP_INFO dap; INT_PTR Ret = FALSE; - dap = (PDEVADVPROP_INFO)GetWindowLongPtr(hwndDlg, - DWL_USER); + dap = (PDEVADVPROP_INFO)GetWindowLongPtr(hwndDlg, DWLP_USER); if (dap != NULL || uMsg == WM_INITDIALOG) { @@ -348,9 +347,7 @@ DriverDetailsDlgProc(IN HWND hwndDlg, dap = (PDEVADVPROP_INFO)lParam; if (dap != NULL) { - SetWindowLongPtr(hwndDlg, - DWL_USER, - (DWORD_PTR)dap); + SetWindowLongPtr(hwndDlg, DWLP_USER, (DWORD_PTR)dap); hDriversListView = GetDlgItem(hwndDlg, IDC_DRIVERFILES); @@ -572,8 +569,7 @@ AdvProcDriverDlgProc(IN HWND hwndDlg, PDEVADVPROP_INFO dap; INT_PTR Ret = FALSE; - dap = (PDEVADVPROP_INFO)GetWindowLongPtr(hwndDlg, - DWL_USER); + dap = (PDEVADVPROP_INFO)GetWindowLongPtr(hwndDlg, DWLP_USER); if (dap != NULL || uMsg == WM_INITDIALOG) { @@ -614,9 +610,7 @@ AdvProcDriverDlgProc(IN HWND hwndDlg, dap = (PDEVADVPROP_INFO)((LPPROPSHEETPAGE)lParam)->lParam; if (dap != NULL) { - SetWindowLongPtr(hwndDlg, - DWL_USER, - (DWORD_PTR)dap); + SetWindowLongPtr(hwndDlg, DWLP_USER, (DWORD_PTR)dap); UpdateDriverDlg(hwndDlg, dap); @@ -1768,8 +1762,7 @@ AdvProcDetailsDlgProc(IN HWND hwndDlg, PDEVADVPROP_INFO dap; INT_PTR Ret = FALSE; - dap = (PDEVADVPROP_INFO)GetWindowLongPtr(hwndDlg, - DWL_USER); + dap = (PDEVADVPROP_INFO)GetWindowLongPtr(hwndDlg, DWLP_USER); if (dap != NULL || uMsg == WM_INITDIALOG) { @@ -1807,9 +1800,7 @@ AdvProcDetailsDlgProc(IN HWND hwndDlg, dap = (PDEVADVPROP_INFO)((LPPROPSHEETPAGE)lParam)->lParam; if (dap != NULL) { - SetWindowLongPtr(hwndDlg, - DWL_USER, - (DWORD_PTR)dap); + SetWindowLongPtr(hwndDlg, DWLP_USER, (DWORD_PTR)dap); UpdateDetailsDlg(hwndDlg, dap); @@ -2609,8 +2600,7 @@ AdvPropGeneralDlgProc(IN HWND hwndDlg, PDEVADVPROP_INFO dap; INT_PTR Ret = FALSE; - dap = (PDEVADVPROP_INFO)GetWindowLongPtr(hwndDlg, - DWL_USER); + dap = (PDEVADVPROP_INFO)GetWindowLongPtr(hwndDlg, DWLP_USER); if (dap != NULL || uMsg == WM_INITDIALOG) { @@ -2669,9 +2659,7 @@ AdvPropGeneralDlgProc(IN HWND hwndDlg, dap->hWndGeneralPage = hwndDlg; - SetWindowLongPtr(hwndDlg, - DWL_USER, - (DWORD_PTR)dap); + SetWindowLongPtr(hwndDlg, DWLP_USER, (DWORD_PTR)dap); /* subclass the parent window to always receive WM_DEVICECHANGE messages */ diff --git a/dll/win32/devmgr/properties/hwpage.cpp b/dll/win32/devmgr/properties/hwpage.cpp index 7346d99cd5..b313c62e72 100644 --- a/dll/win32/devmgr/properties/hwpage.cpp +++ b/dll/win32/devmgr/properties/hwpage.cpp @@ -803,8 +803,7 @@ HardwareDlgProc(IN HWND hwndDlg, PHARDWARE_PAGE_DATA hpd; INT_PTR Ret = FALSE; - hpd = (PHARDWARE_PAGE_DATA)GetWindowLongPtr(hwndDlg, - DWL_USER); + hpd = (PHARDWARE_PAGE_DATA)GetWindowLongPtr(hwndDlg, DWLP_USER); if (hpd != NULL || uMsg == WM_INITDIALOG) { @@ -889,9 +888,7 @@ HardwareDlgProc(IN HWND hwndDlg, HWND hWndParent; hpd->hWnd = hwndDlg; - SetWindowLongPtr(hwndDlg, - DWL_USER, - (DWORD_PTR)hpd); + SetWindowLongPtr(hwndDlg, DWLP_USER, (DWORD_PTR)hpd); hpd->ClassImageListData.cbSize = sizeof(SP_CLASSIMAGELIST_DATA); @@ -965,7 +962,7 @@ HardwareDlgProc(IN HWND hwndDlg, case WM_DESTROY: { /* zero hpd pointer in window data, because it can be used later (WM_DESTROY has not to be last message) */ - SetWindowLongPtr(hwndDlg, DWL_USER, (DWORD_PTR)NULL); + SetWindowLongPtr(hwndDlg, DWLP_USER, (DWORD_PTR)NULL); /* free devices list */ FreeDevicesList(hpd); diff --git a/dll/win32/devmgr/properties/hwresource.cpp b/dll/win32/devmgr/properties/hwresource.cpp index 7fbf8589ff..2455544f48 100644 --- a/dll/win32/devmgr/properties/hwresource.cpp +++ b/dll/win32/devmgr/properties/hwresource.cpp @@ -344,8 +344,7 @@ ResourcesProcDriverDlgProc(IN HWND hwndDlg, HWND hWndDevList; INT_PTR Ret = FALSE; - hpd = (PDEVADVPROP_INFO)GetWindowLongPtr(hwndDlg, - DWL_USER); + hpd = (PDEVADVPROP_INFO)GetWindowLongPtr(hwndDlg, DWLP_USER); if (hpd != NULL || uMsg == WM_INITDIALOG) { @@ -360,13 +359,7 @@ ResourcesProcDriverDlgProc(IN HWND hwndDlg, hpd = (PDEVADVPROP_INFO)((LPPROPSHEETPAGE)lParam)->lParam; if (hpd != NULL) { - SetWindowLongPtr(hwndDlg, - DWL_USER, - (DWORD_PTR)hpd); - - SetWindowLongPtr(hwndDlg, - DWL_USER, - (DWORD_PTR)hpd); + SetWindowLongPtr(hwndDlg, DWLP_USER, (DWORD_PTR)hpd); UpdateDriverResourceDlg(hwndDlg, hpd); AddResourceItems(hpd, hWndDevList); diff --git a/dll/win32/netcfgx/tcpipconf_notify.c b/dll/win32/netcfgx/tcpipconf_notify.c index 21cb4c78ca..3d8f2fdd11 100644 --- a/dll/win32/netcfgx/tcpipconf_notify.c +++ b/dll/win32/netcfgx/tcpipconf_notify.c @@ -1319,7 +1319,7 @@ TcpipAdvancedIpDlg( if (!This->pCurrentConfig->DhcpEnabled && ListView_GetItemCount(GetDlgItem(hwndDlg, IDC_IPLIST)) == 0) { DisplayError(IDS_NO_IPADDR_SET, IDS_TCPIP, MB_ICONWARNING); - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, TRUE); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, TRUE); return TRUE; } } @@ -1332,7 +1332,7 @@ TcpipAdvancedIpDlg( This->pCurrentConfig->Ip = NULL; StoreIPSettings(GetDlgItem(hwndDlg, IDC_IPLIST), This, TRUE); StoreIPSettings(GetDlgItem(hwndDlg, IDC_GWLIST), This, FALSE); - SetWindowLong(hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, PSNRET_NOERROR); return TRUE; } break; @@ -1848,7 +1848,7 @@ TcpipAdvancedDnsDlg( SendDlgItemMessageW(hwndDlg, IDC_DNSSUFFIXLIST, LB_GETCOUNT, 0, 0) == 0) { DisplayError(IDS_NO_SUFFIX, IDS_TCPIP, MB_ICONWARNING); - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, TRUE); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, TRUE); return TRUE; } if (SendDlgItemMessageW(hwndDlg, IDC_SUFFIX, WM_GETTEXT, sizeof(szSuffix)/sizeof(WCHAR), (LPARAM)szSuffix)) @@ -1866,7 +1866,7 @@ TcpipAdvancedDnsDlg( szFormat[0] = L'\0'; MessageBoxW(hwndDlg, szBuffer, szFormat, MB_ICONWARNING); - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, TRUE); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, TRUE); SetFocus(GetDlgItem(hwndDlg, IDC_SUFFIX)); return TRUE; } @@ -2502,9 +2502,9 @@ TcpipBasicDlg( { This = (TcpipConfNotifyImpl*)GetWindowLongPtr(hwndDlg, DWLP_USER); if (SUCCEEDED(StoreTcpipBasicSettings(hwndDlg, This, TRUE))) - SetWindowLong(hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, PSNRET_NOERROR); else - SetWindowLong(hwndDlg, DWL_MSGRESULT, PSNRET_INVALID); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, PSNRET_INVALID); return TRUE; } diff --git a/dll/win32/newdev/wizard.c b/dll/win32/newdev/wizard.c index 1fc943bede..a592456808 100644 --- a/dll/win32/newdev/wizard.c +++ b/dll/win32/newdev/wizard.c @@ -778,7 +778,7 @@ SearchDrvDlgProc( case PSN_KILLACTIVE: if (hThread != 0) { - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, TRUE); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, TRUE); return TRUE; } break; @@ -889,7 +889,7 @@ InstallDrvDlgProc( case PSN_KILLACTIVE: if (hThread != 0) { - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, TRUE); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, TRUE); return TRUE; } break; diff --git a/dll/win32/serialui/serialui.c b/dll/win32/serialui/serialui.c index 1e85310440..1ad655e06d 100644 --- a/dll/win32/serialui/serialui.c +++ b/dll/win32/serialui/serialui.c @@ -204,7 +204,7 @@ CommDlgProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam) INT i; lpDlgInfo = (LPDIALOG_INFO)lParam; - SetWindowLongPtrW(hDlg, DWL_USER, (LONG_PTR)lpDlgInfo); + SetWindowLongPtrW(hDlg, DWLP_USER, (LONG_PTR)lpDlgInfo); /* Set title */ if(LoadStringW(hDllInstance, IDS_TITLE, wstr, sizeof(wstr) / sizeof(wstr[0]))) @@ -364,7 +364,7 @@ VOID OkButton(HWND hDlg) LPDIALOG_INFO lpDlgInfo; UINT Index; - lpDlgInfo = (LPDIALOG_INFO) GetWindowLongPtrW(hDlg, DWL_USER); + lpDlgInfo = (LPDIALOG_INFO) GetWindowLongPtrW(hDlg, DWLP_USER); /* Baud rate */ Index = SendMessageW(GetDlgItem(hDlg, IDC_BAUDRATE), CB_GETCURSEL, 0, 0); diff --git a/dll/win32/shell32/CShellLink.cpp b/dll/win32/shell32/CShellLink.cpp index 5b7b84dc41..dfbd05792f 100644 --- a/dll/win32/shell32/CShellLink.cpp +++ b/dll/win32/shell32/CShellLink.cpp @@ -2846,7 +2846,7 @@ INT_PTR CALLBACK CShellLink::SH_ShellLinkDlgProc(HWND hwndDlg, UINT uMsg, WPARAM { // FIXME load localized error msg MessageBoxW(hwndDlg, L"You cannot create a link to a shortcut", L"Error", MB_ICONERROR); - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, PSNRET_INVALID_NOCHANGEPAGE); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, PSNRET_INVALID_NOCHANGEPAGE); return TRUE; } @@ -2854,7 +2854,7 @@ INT_PTR CALLBACK CShellLink::SH_ShellLinkDlgProc(HWND hwndDlg, UINT uMsg, WPARAM { // FIXME load localized error msg MessageBoxW(hwndDlg, L"The specified file name in the target box is invalid", L"Error", MB_ICONERROR); - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, PSNRET_INVALID_NOCHANGEPAGE); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, PSNRET_INVALID_NOCHANGEPAGE); return TRUE; } @@ -2868,7 +2868,7 @@ INT_PTR CALLBACK CShellLink::SH_ShellLinkDlgProc(HWND hwndDlg, UINT uMsg, WPARAM TRACE("This %p m_sLinkPath %S\n", pThis, pThis->m_sLinkPath); pThis->Save(pThis->m_sLinkPath, TRUE); - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, PSNRET_NOERROR); return TRUE; } break; diff --git a/dll/win32/shell32/dialogs/drvdefext.cpp b/dll/win32/shell32/dialogs/drvdefext.cpp index cff6a3e21b..ef4c2c6b7c 100644 --- a/dll/win32/shell32/dialogs/drvdefext.cpp +++ b/dll/win32/shell32/dialogs/drvdefext.cpp @@ -460,7 +460,7 @@ CDrvDefExt::GeneralPageProc( if (GetDlgItemTextW(hwndDlg, 14000, wszBuf, _countof(wszBuf))) SetVolumeLabelW(pDrvDefExt->m_wszDrive, wszBuf); - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, PSNRET_NOERROR); return TRUE; } } diff --git a/dll/win32/shell32/dialogs/filedefext.cpp b/dll/win32/shell32/dialogs/filedefext.cpp index 042faa38c3..8ac8c62998 100644 --- a/dll/win32/shell32/dialogs/filedefext.cpp +++ b/dll/win32/shell32/dialogs/filedefext.cpp @@ -712,7 +712,7 @@ CFileDefExt::GeneralPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar ERR("MoveFileW failed\n"); } - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, PSNRET_NOERROR); return TRUE; } break; @@ -767,7 +767,7 @@ CFileDefExt::InitVersionPage(HWND hwndDlg) AddVersionString(hwndDlg, L"ProductVersion"); /* Attach file version to dialog window */ - SetWindowLongPtr(hwndDlg, DWL_USER, (LONG_PTR)this); + SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)this); /* Select first item */ HWND hDlgCtrl = GetDlgItem(hwndDlg, 14009); diff --git a/dll/win32/shell32/dialogs/folder_options.cpp b/dll/win32/shell32/dialogs/folder_options.cpp index 3bb39977ad..cab61908b5 100644 --- a/dll/win32/shell32/dialogs/folder_options.cpp +++ b/dll/win32/shell32/dialogs/folder_options.cpp @@ -1240,7 +1240,7 @@ FolderOptionsViewDlg( case NM_CUSTOMDRAW: // custom draw (for graying) Draw = (NMTVCUSTOMDRAW *)lParam; Result = ViewDlg_OnTreeCustomDraw(hwndDlg, Draw); - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, Result); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, Result); return Result; case TVN_KEYDOWN: // key is down ViewDlg_OnTreeViewKeyDown(hwndDlg, (TV_KEYDOWN *)lParam); diff --git a/dll/win32/shell32/dialogs/recycler_prop.cpp b/dll/win32/shell32/dialogs/recycler_prop.cpp index 330f241803..d249e05f39 100644 --- a/dll/win32/shell32/dialogs/recycler_prop.cpp +++ b/dll/win32/shell32/dialogs/recycler_prop.cpp @@ -334,7 +334,7 @@ RecycleBinDlg( } if (StoreDriveSettings(hwndDlg)) { - SetWindowLongPtr( hwndDlg, DWL_MSGRESULT, PSNRET_NOERROR ); + SetWindowLongPtr( hwndDlg, DWLP_MSGRESULT, PSNRET_NOERROR ); return TRUE; } } diff --git a/dll/win32/syssetup/wizard.c b/dll/win32/syssetup/wizard.c index a4af15c792..9c57f6b2da 100644 --- a/dll/win32/syssetup/wizard.c +++ b/dll/win32/syssetup/wizard.c @@ -246,7 +246,7 @@ WelcomeDlgProc(HWND hwndDlg, PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_NEXT); if (pSetupData->UnattendSetup) { - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_ACKPAGE); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, IDD_ACKPAGE); return TRUE; } break; @@ -358,7 +358,7 @@ AckPageDlgProc(HWND hwndDlg, PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_BACK | PSWIZB_NEXT); if (pSetupData->UnattendSetup) { - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_LOCALEPAGE); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, IDD_LOCALEPAGE); return TRUE; } break; @@ -480,7 +480,7 @@ OwnerPageDlgProc(HWND hwndDlg, SendMessage(GetDlgItem(hwndDlg, IDC_OWNERORGANIZATION), WM_SETTEXT, 0, (LPARAM)pSetupData->OwnerOrganization); if (WriteOwnerSettings(pSetupData->OwnerName, pSetupData->OwnerOrganization)) { - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_COMPUTERPAGE); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, IDD_COMPUTERPAGE); return TRUE; } } @@ -501,7 +501,7 @@ OwnerPageDlgProc(HWND hwndDlg, MessageBoxW(hwndDlg, ErrorName, Title, MB_ICONERROR | MB_OK); SetFocus(GetDlgItem(hwndDlg, IDC_OWNERNAME)); - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, -1); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, -1); return TRUE; } @@ -512,7 +512,7 @@ OwnerPageDlgProc(HWND hwndDlg, if (!WriteOwnerSettings(OwnerName, OwnerOrganization)) { SetFocus(GetDlgItem(hwndDlg, IDC_OWNERNAME)); - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, -1); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, -1); return TRUE; } @@ -706,7 +706,7 @@ ComputerPageDlgProc(HWND hwndDlg, PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_BACK | PSWIZB_NEXT); if (pSetupData->UnattendSetup && WriteComputerSettings(pSetupData->ComputerName, hwndDlg)) { - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_THEMEPAGE); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, IDD_THEMEPAGE); return TRUE; } break; @@ -721,7 +721,7 @@ ComputerPageDlgProc(HWND hwndDlg, } MessageBoxW(hwndDlg, EmptyComputerName, Title, MB_ICONERROR | MB_OK); SetFocus(GetDlgItem(hwndDlg, IDC_COMPUTERNAME)); - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, -1); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, -1); return TRUE; } @@ -731,7 +731,7 @@ ComputerPageDlgProc(HWND hwndDlg, if (!WriteComputerSettings(ComputerName, hwndDlg)) { SetFocus(GetDlgItem(hwndDlg, IDC_COMPUTERNAME)); - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, -1); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, -1); return TRUE; } @@ -746,7 +746,7 @@ ComputerPageDlgProc(HWND hwndDlg, wcscpy(EmptyPassword, L"You must enter a password !"); } MessageBoxW(hwndDlg, EmptyPassword, Title, MB_ICONERROR | MB_OK); - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, -1); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, -1); return TRUE; } #else @@ -762,7 +762,7 @@ ComputerPageDlgProc(HWND hwndDlg, wcscpy(NotMatchPassword, L"The passwords you entered do not match. Please enter the desired password again."); } MessageBoxW(hwndDlg, NotMatchPassword, Title, MB_ICONERROR | MB_OK); - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, -1); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, -1); return TRUE; } @@ -778,7 +778,7 @@ ComputerPageDlgProc(HWND hwndDlg, wcscpy(WrongPassword, L"The password you entered contains invalid characters. Please enter a cleaned password."); } MessageBoxW(hwndDlg, WrongPassword, Title, MB_ICONERROR | MB_OK); - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, -1); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, -1); return TRUE; } Password++; @@ -998,7 +998,7 @@ LocalePageDlgProc(HWND hwndDlg, RunControlPanelApplet(hwndDlg, L"intl.cpl,,/f:\"unattend.inf\""); } - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, IDD_OWNERPAGE); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, IDD_OWNERPAGE); return TRUE; } break; @@ -1571,7 +1571,7 @@ DateTimePageDlgProc(HWND hwndDlg, PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_BACK | PSWIZB_NEXT); if (SetupData->UnattendSetup && WriteDateTimeSettings(hwndDlg, SetupData)) { - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, SetupData->uFirstNetworkWizardPage); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, SetupData->uFirstNetworkWizardPage); return TRUE; } SetTimer(hwndDlg, 1, 1000, NULL); @@ -1666,7 +1666,7 @@ ThemePageDlgProc(HWND hwndDlg, PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_BACK | PSWIZB_NEXT); if (SetupData->UnattendSetup) { - SetWindowLongPtr(hwndDlg, DWL_MSGRESULT, SetupData->uFirstNetworkWizardPage); + SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, SetupData->uFirstNetworkWizardPage); return TRUE; } break; diff --git a/modules/rosapps/applications/explorer-old/dialogs/settings.cpp b/modules/rosapps/applications/explorer-old/dialogs/settings.cpp index 3e449b8228..ad0e8ba3ca 100644 --- a/modules/rosapps/applications/explorer-old/dialogs/settings.cpp +++ b/modules/rosapps/applications/explorer-old/dialogs/settings.cpp @@ -102,7 +102,7 @@ int DesktopSettingsDlg::Notify(int id, NMHDR* pnmh) { switch(pnmh->code) { case PSN_QUERYINITIALFOCUS: - SetWindowLongPtr(_hwnd, DWL_MSGRESULT, (LPARAM)GetDlgItem(_hwnd, IDC_ICON_ALIGN_0+_alignment_cur)); + SetWindowLongPtr(_hwnd, DWLP_MSGRESULT, (LPARAM)GetDlgItem(_hwnd, IDC_ICON_ALIGN_0+_alignment_cur)); break; case PSN_APPLY: diff --git a/modules/rosapps/applications/screensavers/matrix/matrix.c b/modules/rosapps/applications/screensavers/matrix/matrix.c index 4cb385b8b3..eff739288f 100644 --- a/modules/rosapps/applications/screensavers/matrix/matrix.c +++ b/modules/rosapps/applications/screensavers/matrix/matrix.c @@ -288,12 +288,12 @@ void DestroyMatrix(MATRIX *matrix) MATRIX *GetMatrix(HWND hwnd) { - return (MATRIX *)GetWindowLong(hwnd, 0); + return (MATRIX *)GetWindowLongPtr(hwnd, GWLP_USERDATA); } void SetMatrix(HWND hwnd, MATRIX *matrix) { - SetWindowLong(hwnd, 0, (LONG)matrix); + SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)matrix); } // diff --git a/modules/rosapps/lib/vfdlib/vfdlib.h b/modules/rosapps/lib/vfdlib/vfdlib.h index 22b59584b8..b107139f54 100644 --- a/modules/rosapps/lib/vfdlib/vfdlib.h +++ b/modules/rosapps/lib/vfdlib/vfdlib.h @@ -10,6 +10,10 @@ #ifndef _VFDLIB_H_ #define _VFDLIB_H_ +#ifdef __REACTOS__ +#define DWL_USER DWLP_USER +#endif + #define VFD_LIBRARY_FILENAME "vfd.dll" #ifdef VFD_EMBED_DRIVER diff --git a/modules/rosapps/lib/vfdlib/vfdshprop.cpp b/modules/rosapps/lib/vfdlib/vfdshprop.cpp index 54cd37f95e..acb9d0cebe 100644 --- a/modules/rosapps/lib/vfdlib/vfdshprop.cpp +++ b/modules/rosapps/lib/vfdlib/vfdshprop.cpp @@ -35,7 +35,11 @@ // // local functions // +#ifndef __REACTOS__ static BOOL CALLBACK VfdPageDlgProc( +#else +static INT_PTR CALLBACK VfdPageDlgProc( +#endif HWND hDlg, UINT uMessage, WPARAM wParam, @@ -76,7 +80,11 @@ UINT CALLBACK VfdPageCallback( // // property page dialog procedure // +#ifndef __REACTOS__ BOOL CALLBACK VfdPageDlgProc( +#else +INT_PTR CALLBACK VfdPageDlgProc( +#endif HWND hDlg, UINT uMessage, WPARAM wParam, @@ -87,7 +95,11 @@ BOOL CALLBACK VfdPageDlgProc( switch (uMessage) { case WM_INITDIALOG: +#ifndef __REACTOS__ SetWindowLong(hDlg, DWL_USER, lParam); +#else + SetWindowLongPtr(hDlg, DWLP_USER, lParam); +#endif if (lParam) { lpcs = (LPCVFDSHEXT)((LPPROPSHEETPAGE)lParam)->lParam; @@ -98,7 +110,11 @@ BOOL CALLBACK VfdPageDlgProc( return TRUE; case WM_COMMAND: +#ifndef __REACTOS__ psp = (LPPROPSHEETPAGE)GetWindowLong(hDlg, DWL_USER); +#else + psp = (LPPROPSHEETPAGE)GetWindowLongPtr(hDlg, DWLP_USER); +#endif if (!psp) { break; @@ -165,7 +181,11 @@ BOOL CALLBACK VfdPageDlgProc( default: if (uMessage == g_nNotifyMsg) { +#ifndef __REACTOS__ psp = (LPPROPSHEETPAGE)GetWindowLong(hDlg, DWL_USER); +#else + psp = (LPPROPSHEETPAGE)GetWindowLongPtr(hDlg, DWLP_USER); +#endif if (!psp) { break; diff --git a/modules/rosapps/templates/dialog/dialog.c b/modules/rosapps/templates/dialog/dialog.c index b17413e962..0484e1854b 100644 --- a/modules/rosapps/templates/dialog/dialog.c +++ b/modules/rosapps/templates/dialog/dialog.c @@ -123,7 +123,7 @@ LRESULT CALLBACK DlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) LPNMHDR pnmh; LPCREATESTRUCT lpCS; LONG nThisApp = 0; - DialogData* pData = (DialogData*)GetWindowLong(hDlg, DWL_USER); + DialogData* pData = (DialogData*)GetWindowLongPtr(hDlg, DWLP_USER); if (pData) nThisApp = pData->lData; switch (message) { @@ -136,7 +136,7 @@ LRESULT CALLBACK DlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) case WM_INITDIALOG: pData = (DialogData*)lParam; - SetWindowLong(hDlg, DWL_USER, (LONG)pData); + SetWindowLongPtr(hDlg, DWLP_USER, (LONG_PTR)pData); if (pData) nThisApp = pData->lData; return OnCreate(hDlg, nThisApp); diff --git a/sdk/include/psdk/windowsx.h b/sdk/include/psdk/windowsx.h index 530da54970..7a879e67de 100644 --- a/sdk/include/psdk/windowsx.h +++ b/sdk/include/psdk/windowsx.h @@ -485,7 +485,21 @@ #define SelectBrush(hdc,hbr) ((HBRUSH)SelectObject((hdc),(HGDIOBJ)(HBRUSH)(hbr))) #define SelectFont(hdc,hfont) ((HFONT)SelectObject((hdc),(HGDIOBJ)(HFONT)(hfont))) #define SelectPen(hdc,hpen) ((HPEN)SelectObject((hdc),(HGDIOBJ)(HPEN)(hpen))) -#define SetDlgMsgResult(hwnd,msg,result) (( (msg) == WM_CTLCOLORMSGBOX || (msg) == WM_CTLCOLOREDIT || (msg) == WM_CTLCOLORLISTBOX || (msg) == WM_CTLCOLORBTN || (msg) == WM_CTLCOLORDLG || (msg) == WM_CTLCOLORSCROLLBAR || (msg) == WM_CTLCOLORSTATIC || (msg) == WM_COMPAREITEM || (msg) == WM_VKEYTOITEM || (msg) == WM_CHARTOITEM || (msg) == WM_QUERYDRAGICON || (msg) == WM_INITDIALOG ) ? (BOOL)(result) : (SetWindowLong((hwnd),DWL_MSGRESULT,(LPARAM)(LRESULT)(result)),TRUE)) +#define SetDlgMsgResult(hwnd,msg,result) \ + (( ((msg) == WM_CTLCOLORMSGBOX) || \ + ((msg) == WM_CTLCOLOREDIT) || \ + ((msg) == WM_CTLCOLORLISTBOX) || \ + ((msg) == WM_CTLCOLORBTN) || \ + ((msg) == WM_CTLCOLORDLG) || \ + ((msg) == WM_CTLCOLORSCROLLBAR) || \ + ((msg) == WM_CTLCOLORSTATIC) || \ + ((msg) == WM_COMPAREITEM) || \ + ((msg) == WM_VKEYTOITEM) || \ + ((msg) == WM_CHARTOITEM) || \ + ((msg) == WM_QUERYDRAGICON) || \ + ((msg) == WM_INITDIALOG) ) ? \ + (BOOL)(result) : \ + (SetWindowLongPtr((hwnd), DWLP_MSGRESULT, (LPARAM)(LRESULT)(result)), TRUE) ) #define SetWindowFont(hwnd,hfont,fRedraw) FORWARD_WM_SETFONT((hwnd),(hfont),(fRedraw),SendMessage) #define SetWindowRedraw(hwnd,fRedraw) ((void)SendMessage(hwnd,WM_SETREDRAW,(WPARAM)(BOOL)(fRedraw),0)) #define Static_Enable(hwndCtl,fEnable) EnableWindow((hwndCtl),(fEnable)) diff --git a/sdk/include/psdk/winuser.h b/sdk/include/psdk/winuser.h index 4f77a9c973..ec52b1d5d7 100644 --- a/sdk/include/psdk/winuser.h +++ b/sdk/include/psdk/winuser.h @@ -849,12 +849,17 @@ extern "C" { #define GWLP_ID (-12) #define GWL_USERDATA (-21) #define GWLP_USERDATA (-21) -#define DWL_DLGPROC 4 -#define DWLP_DLGPROC 4 + +#ifndef __REACTOS__ // NEVER USE THESE! #define DWL_MSGRESULT 0 -#define DWLP_MSGRESULT 0 +#define DWL_DLGPROC 4 #define DWL_USER 8 -#define DWLP_USER 8 +#endif + +#define DWLP_MSGRESULT 0 +#define DWLP_DLGPROC (DWLP_MSGRESULT + sizeof(LRESULT)) +#define DWLP_USER (DWLP_DLGPROC + sizeof(DLGPROC)) + #if (_WIN32_WINNT >= 0x0501) #define QS_ALLEVENTS 1215 #define QS_ALLINPUT 1279 diff --git a/sdk/lib/atl/atlwin.h b/sdk/lib/atl/atlwin.h index b21087012f..02b078ee55 100644 --- a/sdk/lib/atl/atlwin.h +++ b/sdk/lib/atl/atlwin.h @@ -28,6 +28,7 @@ #define Unused(x) (x); #endif // __GNUC__ +#if !defined(_WIN64) #ifdef SetWindowLongPtr #undef SetWindowLongPtr inline LONG_PTR SetWindowLongPtr(HWND hWnd, int nIndex, LONG_PTR dwNewLong) @@ -43,6 +44,7 @@ inline LONG_PTR GetWindowLongPtr(HWND hWnd, int nIndex) return (LONG_PTR)GetWindowLong(hWnd, nIndex); } #endif +#endif // !_WIN64 #pragma push_macro("SubclassWindow") #undef SubclassWindow
6 years, 9 months
1
0
0
0
01/01: [SHLWAPI_WINETEST] Sync with Wine Staging 3.3. CORE-14434
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6cdd1357d68552346e4d3…
commit 6cdd1357d68552346e4d3cb0210b377abcaa8dd6 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sun Mar 4 13:26:14 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sun Mar 4 13:26:14 2018 +0100 [SHLWAPI_WINETEST] Sync with Wine Staging 3.3. CORE-14434 --- modules/rostests/winetests/shlwapi/CMakeLists.txt | 2 +- modules/rostests/winetests/shlwapi/assoc.c | 290 +++++++++++++++++++++- modules/rostests/winetests/shlwapi/clist.c | 29 ++- modules/rostests/winetests/shlwapi/clsid.c | 15 +- modules/rostests/winetests/shlwapi/generated.c | 17 +- modules/rostests/winetests/shlwapi/istream.c | 11 +- modules/rostests/winetests/shlwapi/ordinal.c | 223 +++-------------- modules/rostests/winetests/shlwapi/path.c | 10 +- modules/rostests/winetests/shlwapi/precomp.h | 1 + modules/rostests/winetests/shlwapi/shreg.c | 11 +- modules/rostests/winetests/shlwapi/string.c | 13 +- modules/rostests/winetests/shlwapi/thread.c | 14 +- modules/rostests/winetests/shlwapi/url.c | 57 ++++- 13 files changed, 462 insertions(+), 231 deletions(-) diff --git a/modules/rostests/winetests/shlwapi/CMakeLists.txt b/modules/rostests/winetests/shlwapi/CMakeLists.txt index f46f22d70e..276e202d6f 100644 --- a/modules/rostests/winetests/shlwapi/CMakeLists.txt +++ b/modules/rostests/winetests/shlwapi/CMakeLists.txt @@ -20,7 +20,7 @@ list(APPEND SOURCE add_executable(shlwapi_winetest ${SOURCE} testlist.c) target_link_libraries(shlwapi_winetest uuid) set_module_type(shlwapi_winetest win32cui) -add_importlibs(shlwapi_winetest shlwapi ole32 oleaut32 user32 advapi32 msvcrt kernel32) +add_importlibs(shlwapi_winetest shlwapi shell32 mlang oleaut32 ole32 user32 advapi32 msvcrt kernel32) if(MSVC) add_importlibs(shlwapi_winetest ntdll) diff --git a/modules/rostests/winetests/shlwapi/assoc.c b/modules/rostests/winetests/shlwapi/assoc.c index 90e44fb84b..080e352a59 100644 --- a/modules/rostests/winetests/shlwapi/assoc.c +++ b/modules/rostests/winetests/shlwapi/assoc.c @@ -17,14 +17,19 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" +#include <stdarg.h> -#define expect(expected, got) ok ( expected == got, "Expected %d, got %d\n", expected, got) -#define expect_hr(expected, got) ok ( expected == got, "Expected %08x, got %08x\n", expected, got) +#include "wine/test.h" +#include "shlwapi.h" +#include "shlguid.h" + +#define expect(expected, got) ok( (expected) == (got), "Expected %d, got %d\n", (expected), (got)) +#define expect_hr(expected, got) ok( (expected) == (got), "Expected %08x, got %08x\n", (expected), (got)) static HRESULT (WINAPI *pAssocQueryStringA)(ASSOCF,ASSOCSTR,LPCSTR,LPCSTR,LPSTR,LPDWORD) = NULL; static HRESULT (WINAPI *pAssocQueryStringW)(ASSOCF,ASSOCSTR,LPCWSTR,LPCWSTR,LPWSTR,LPDWORD) = NULL; static HRESULT (WINAPI *pAssocCreate)(CLSID, REFIID, void **) = NULL; +static HRESULT (WINAPI *pAssocGetPerceivedType)(LPCWSTR, PERCEIVED *, INT *, LPWSTR *) = NULL; /* Every version of Windows with IE should have this association? */ static const WCHAR dotHtml[] = { '.','h','t','m','l',0 }; @@ -302,6 +307,283 @@ static void test_assoc_create(void) } } +/* Based on
http://www.geoffchappell.com/studies/windows/shell/shlwapi/api/assocapi/get…
*/ +struct assoc_test_struct +{ + PCSTR extension; + PERCEIVED perceived; + INT flags; + PCSTR type; + DWORD minversion; + HRESULT hr; +}; + +#define HARDCODED_NATIVE_WMSDK (PERCEIVEDFLAG_HARDCODED | PERCEIVEDFLAG_NATIVESUPPORT | PERCEIVEDFLAG_WMSDK) +#define HARDCODED_NATIVE_GDIPLUS (PERCEIVEDFLAG_HARDCODED | PERCEIVEDFLAG_NATIVESUPPORT | PERCEIVEDFLAG_GDIPLUS) +#define HARDCODED_NATIVE_ZIPFLDR (PERCEIVEDFLAG_HARDCODED | PERCEIVEDFLAG_NATIVESUPPORT | PERCEIVEDFLAG_ZIPFOLDER) +#define SOFTCODED_NATIVESUPPORT (PERCEIVEDFLAG_SOFTCODED | PERCEIVEDFLAG_NATIVESUPPORT) + +static const struct assoc_test_struct assoc_perceived_types[] = +{ + /* builtins */ + { ".aif", PERCEIVED_TYPE_AUDIO, HARDCODED_NATIVE_WMSDK, "audio" }, + { ".aifc", PERCEIVED_TYPE_AUDIO, HARDCODED_NATIVE_WMSDK, "audio" }, + { ".aiff", PERCEIVED_TYPE_AUDIO, HARDCODED_NATIVE_WMSDK, "audio" }, + { ".asf", PERCEIVED_TYPE_VIDEO, HARDCODED_NATIVE_WMSDK, "video" }, + { ".asx", PERCEIVED_TYPE_VIDEO, HARDCODED_NATIVE_WMSDK, "video" }, + { ".au", PERCEIVED_TYPE_AUDIO, HARDCODED_NATIVE_WMSDK, "audio" }, + { ".avi", PERCEIVED_TYPE_VIDEO, HARDCODED_NATIVE_WMSDK, "video" }, + { ".bas", PERCEIVED_TYPE_APPLICATION, PERCEIVEDFLAG_HARDCODED, "application" }, + { ".bat", PERCEIVED_TYPE_APPLICATION, PERCEIVEDFLAG_HARDCODED, "application" }, + { ".bmp", PERCEIVED_TYPE_IMAGE, HARDCODED_NATIVE_GDIPLUS, "image" }, + { ".cmd", PERCEIVED_TYPE_APPLICATION, PERCEIVEDFLAG_HARDCODED, "application" }, + { ".com", PERCEIVED_TYPE_APPLICATION, PERCEIVEDFLAG_HARDCODED, "application" }, + { ".cpl", PERCEIVED_TYPE_SYSTEM, PERCEIVEDFLAG_HARDCODED, "system", 0x600 }, + { ".dib", PERCEIVED_TYPE_IMAGE, HARDCODED_NATIVE_GDIPLUS, "image" }, + { ".dvr-ms", PERCEIVED_TYPE_VIDEO, HARDCODED_NATIVE_WMSDK, "video" }, + { ".emf", PERCEIVED_TYPE_IMAGE, HARDCODED_NATIVE_GDIPLUS, "image" }, + { ".exe", PERCEIVED_TYPE_APPLICATION, PERCEIVEDFLAG_HARDCODED, "application" }, + { ".gif", PERCEIVED_TYPE_IMAGE, HARDCODED_NATIVE_GDIPLUS, "image" }, + { ".hta", PERCEIVED_TYPE_APPLICATION, PERCEIVEDFLAG_HARDCODED, "application" }, + /* htm & html are PERCEIVED_TYPE_TEXT, PERCEIVEDFLAG_NATIVESUPPORT | PERCEIVEDFLAG_SOFTCODED in w2k3 */ + { ".htm", PERCEIVED_TYPE_DOCUMENT, PERCEIVEDFLAG_HARDCODED, "document", 0x600 }, + { ".html", PERCEIVED_TYPE_DOCUMENT, PERCEIVEDFLAG_HARDCODED, "document", 0x600 }, + { ".ico", PERCEIVED_TYPE_IMAGE, HARDCODED_NATIVE_GDIPLUS, "image" }, + { ".IVF", PERCEIVED_TYPE_VIDEO, HARDCODED_NATIVE_WMSDK, "video" }, + { ".jfif", PERCEIVED_TYPE_IMAGE, HARDCODED_NATIVE_GDIPLUS, "image" }, + { ".jpe", PERCEIVED_TYPE_IMAGE, HARDCODED_NATIVE_GDIPLUS, "image" }, + { ".jpeg", PERCEIVED_TYPE_IMAGE, HARDCODED_NATIVE_GDIPLUS, "image" }, + { ".jpg", PERCEIVED_TYPE_IMAGE, HARDCODED_NATIVE_GDIPLUS, "image" }, + { ".lnk", PERCEIVED_TYPE_UNSPECIFIED, PERCEIVEDFLAG_HARDCODED, NULL, 0x600, E_FAIL }, + { ".m1v", PERCEIVED_TYPE_VIDEO, HARDCODED_NATIVE_WMSDK, "video" }, + { ".m3u", PERCEIVED_TYPE_AUDIO, HARDCODED_NATIVE_WMSDK, "audio" }, + { ".mht", PERCEIVED_TYPE_DOCUMENT, PERCEIVEDFLAG_HARDCODED, "document", 0x600 }, + { ".mid", PERCEIVED_TYPE_AUDIO, HARDCODED_NATIVE_WMSDK, "audio" }, + { ".midi", PERCEIVED_TYPE_AUDIO, HARDCODED_NATIVE_WMSDK, "audio" }, + { ".msi", PERCEIVED_TYPE_APPLICATION, PERCEIVEDFLAG_HARDCODED, "application" }, + /* below win8 this is defined to be video */ + { ".mp2", PERCEIVED_TYPE_AUDIO, HARDCODED_NATIVE_WMSDK, "audio", 0x602 }, + { ".mp2v", PERCEIVED_TYPE_VIDEO, HARDCODED_NATIVE_WMSDK, "video" }, + { ".mp3", PERCEIVED_TYPE_AUDIO, HARDCODED_NATIVE_WMSDK, "audio" }, + { ".mpa", PERCEIVED_TYPE_VIDEO, HARDCODED_NATIVE_WMSDK, "video" }, + { ".mpe", PERCEIVED_TYPE_VIDEO, HARDCODED_NATIVE_WMSDK, "video" }, + { ".mpeg", PERCEIVED_TYPE_VIDEO, HARDCODED_NATIVE_WMSDK, "video" }, + { ".mpg", PERCEIVED_TYPE_VIDEO, HARDCODED_NATIVE_WMSDK, "video" }, + { ".mpv2", PERCEIVED_TYPE_VIDEO, HARDCODED_NATIVE_WMSDK, "video" }, + { ".pif", PERCEIVED_TYPE_APPLICATION, PERCEIVEDFLAG_HARDCODED, "application" }, + { ".png", PERCEIVED_TYPE_IMAGE, HARDCODED_NATIVE_GDIPLUS, "image" }, + { ".reg", PERCEIVED_TYPE_APPLICATION, PERCEIVEDFLAG_HARDCODED, "application" }, + { ".rle", PERCEIVED_TYPE_IMAGE, HARDCODED_NATIVE_GDIPLUS, "image" }, + { ".rmi", PERCEIVED_TYPE_AUDIO, HARDCODED_NATIVE_WMSDK, "audio" }, + { ".scr", PERCEIVED_TYPE_APPLICATION, PERCEIVEDFLAG_HARDCODED, "application" }, + { ".search-ms", PERCEIVED_TYPE_UNSPECIFIED, PERCEIVEDFLAG_HARDCODED, NULL, 0x600, E_FAIL }, + { ".snd", PERCEIVED_TYPE_AUDIO, HARDCODED_NATIVE_WMSDK, "audio" }, + { ".tif", PERCEIVED_TYPE_IMAGE, HARDCODED_NATIVE_GDIPLUS, "image" }, + { ".tiff", PERCEIVED_TYPE_IMAGE, HARDCODED_NATIVE_GDIPLUS, "image" }, + { ".vb", PERCEIVED_TYPE_APPLICATION, PERCEIVEDFLAG_HARDCODED, "application" }, + { ".wav", PERCEIVED_TYPE_AUDIO, HARDCODED_NATIVE_WMSDK, "audio" }, + { ".wax", PERCEIVED_TYPE_AUDIO, HARDCODED_NATIVE_WMSDK, "audio" }, + { ".wm", PERCEIVED_TYPE_VIDEO, HARDCODED_NATIVE_WMSDK, "video" }, + { ".wma", PERCEIVED_TYPE_AUDIO, HARDCODED_NATIVE_WMSDK, "audio" }, + { ".wmf", PERCEIVED_TYPE_IMAGE, HARDCODED_NATIVE_GDIPLUS, "image" }, + { ".wmv", PERCEIVED_TYPE_VIDEO, HARDCODED_NATIVE_WMSDK, "video" }, + { ".wmx", PERCEIVED_TYPE_VIDEO, HARDCODED_NATIVE_WMSDK, "video" }, + { ".wvx", PERCEIVED_TYPE_VIDEO, HARDCODED_NATIVE_WMSDK, "video" }, + { ".zip", PERCEIVED_TYPE_COMPRESSED, HARDCODED_NATIVE_ZIPFLDR, "compressed" }, + /* found in the registry under HKEY_CLASSES_ROOT on a new Win7 VM */ + { ".386", PERCEIVED_TYPE_SYSTEM, PERCEIVEDFLAG_SOFTCODED, "system" }, + { ".3g2", PERCEIVED_TYPE_VIDEO, PERCEIVEDFLAG_SOFTCODED, "video", 0x601 }, + { ".3gp", PERCEIVED_TYPE_VIDEO, PERCEIVEDFLAG_SOFTCODED, "video", 0x601 }, + { ".3gp2", PERCEIVED_TYPE_VIDEO, PERCEIVEDFLAG_SOFTCODED, "video", 0x601 }, + { ".3gpp", PERCEIVED_TYPE_VIDEO, PERCEIVEDFLAG_SOFTCODED, "video", 0x601 }, + { ".AAC", PERCEIVED_TYPE_AUDIO, PERCEIVEDFLAG_SOFTCODED, "audio", 0x601 }, + { ".ADT", PERCEIVED_TYPE_AUDIO, PERCEIVEDFLAG_SOFTCODED, "audio", 0x601 }, + { ".ADTS", PERCEIVED_TYPE_AUDIO, PERCEIVEDFLAG_SOFTCODED, "audio", 0x601 }, + { ".asm", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, + { ".asmx", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, + { ".aspx", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, + { ".c", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, + { ".cab", PERCEIVED_TYPE_COMPRESSED, PERCEIVEDFLAG_SOFTCODED, "compressed", 0x600 }, + { ".chk", PERCEIVED_TYPE_SYSTEM, PERCEIVEDFLAG_SOFTCODED, "system" }, + { ".cpp", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, + { ".css", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, + { ".cxx", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, + { ".def", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, + { ".diz", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, + { ".docx", PERCEIVED_TYPE_DOCUMENT, PERCEIVEDFLAG_SOFTCODED, "document", 0x601 }, + { ".drv", PERCEIVED_TYPE_SYSTEM, PERCEIVEDFLAG_SOFTCODED, "system", 0x600 }, + { ".gz", PERCEIVED_TYPE_COMPRESSED, PERCEIVEDFLAG_SOFTCODED, "compressed" }, + { ".h", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, + { ".hpp", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, + { ".hxx", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, + { ".inc", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, + { ".ini", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text", 0x600 }, + { ".java", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, + { ".local", PERCEIVED_TYPE_SYSTEM, PERCEIVEDFLAG_SOFTCODED, "system" }, + { ".M2T", PERCEIVED_TYPE_VIDEO, PERCEIVEDFLAG_SOFTCODED, "video", 0x601 }, + { ".M2TS", PERCEIVED_TYPE_VIDEO, PERCEIVEDFLAG_SOFTCODED, "video", 0x601 }, + { ".M2V", PERCEIVED_TYPE_VIDEO, PERCEIVEDFLAG_SOFTCODED, "video", 0x601 }, + { ".m4a", PERCEIVED_TYPE_AUDIO, PERCEIVEDFLAG_SOFTCODED, "audio", 0x601 }, + { ".m4b", PERCEIVED_TYPE_AUDIO, PERCEIVEDFLAG_SOFTCODED, "audio", 0x601 }, + { ".m4p", PERCEIVED_TYPE_AUDIO, PERCEIVEDFLAG_SOFTCODED, "audio", 0x601 }, + { ".m4v", PERCEIVED_TYPE_VIDEO, PERCEIVEDFLAG_SOFTCODED, "video", 0x601 }, + { ".manifest", PERCEIVED_TYPE_SYSTEM, PERCEIVEDFLAG_SOFTCODED, "system" }, + { ".MOD", PERCEIVED_TYPE_VIDEO, PERCEIVEDFLAG_SOFTCODED, "video", 0x601 }, + { ".mov", PERCEIVED_TYPE_VIDEO, PERCEIVEDFLAG_SOFTCODED, "video", 0x601 }, + { ".mp4", PERCEIVED_TYPE_VIDEO, PERCEIVEDFLAG_SOFTCODED, "video", 0x601 }, + { ".mp4v", PERCEIVED_TYPE_VIDEO, PERCEIVEDFLAG_SOFTCODED, "video", 0x601 }, + { ".MTS", PERCEIVED_TYPE_VIDEO, PERCEIVEDFLAG_SOFTCODED, "video", 0x601 }, + { ".nvr", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, + { ".ocx", PERCEIVED_TYPE_SYSTEM, PERCEIVEDFLAG_SOFTCODED, "system" }, + { ".odt", PERCEIVED_TYPE_DOCUMENT, PERCEIVEDFLAG_SOFTCODED, "document", 0x601 }, + { ".php3", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, + { ".pl", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, + { ".plg", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, + { ".ps1xml", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "Text" }, + { ".rtf", PERCEIVED_TYPE_DOCUMENT, PERCEIVEDFLAG_SOFTCODED, "document", 0x600 }, + { ".sed", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, + { ".shtml", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, + { ".sql", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, + { ".sys", PERCEIVED_TYPE_SYSTEM, PERCEIVEDFLAG_SOFTCODED, "system", 0x600 }, + { ".tar", PERCEIVED_TYPE_COMPRESSED, PERCEIVEDFLAG_SOFTCODED, "compressed" }, + { ".text", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, + { ".tgz", PERCEIVED_TYPE_COMPRESSED, PERCEIVEDFLAG_SOFTCODED, "compressed" }, + { ".TS", PERCEIVED_TYPE_VIDEO, PERCEIVEDFLAG_SOFTCODED, "video", 0x601 }, + { ".tsv", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, + { ".TTS", PERCEIVED_TYPE_VIDEO, PERCEIVEDFLAG_SOFTCODED, "video", 0x601 }, + { ".txt", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, + { ".vob", PERCEIVED_TYPE_VIDEO, PERCEIVEDFLAG_SOFTCODED, "video", 0x601 }, + { ".vxd", PERCEIVED_TYPE_SYSTEM, PERCEIVEDFLAG_SOFTCODED, "system" }, + { ".wdp", PERCEIVED_TYPE_IMAGE, PERCEIVEDFLAG_SOFTCODED, "image" }, + { ".wmz", PERCEIVED_TYPE_COMPRESSED, PERCEIVEDFLAG_SOFTCODED, "compressed" }, + { ".wpl", PERCEIVED_TYPE_AUDIO, PERCEIVEDFLAG_SOFTCODED, "audio", 0x601 }, + { ".wsz", PERCEIVED_TYPE_COMPRESSED, PERCEIVEDFLAG_SOFTCODED, "compressed" }, + { ".x", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text" }, + { ".xml", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text", 0x601 }, + { ".xsl", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text", 0x601 }, + { ".z", PERCEIVED_TYPE_COMPRESSED, PERCEIVEDFLAG_SOFTCODED, "compressed" }, + /* found in the registry under HKEY_CLASSES_ROOT\PerceivedType */ + { ".doc", PERCEIVED_TYPE_DOCUMENT, PERCEIVEDFLAG_SOFTCODED, "document", 0x600 }, + { ".dot", PERCEIVED_TYPE_DOCUMENT, PERCEIVEDFLAG_SOFTCODED, "document", 0x600 }, + { ".mhtml", PERCEIVED_TYPE_DOCUMENT, PERCEIVEDFLAG_SOFTCODED, "document", 0x600 }, + { ".pot", PERCEIVED_TYPE_DOCUMENT, PERCEIVEDFLAG_SOFTCODED, "document", 0x600 }, + { ".ppt", PERCEIVED_TYPE_DOCUMENT, PERCEIVEDFLAG_SOFTCODED, "document", 0x600 }, + { ".rtf", PERCEIVED_TYPE_DOCUMENT, PERCEIVEDFLAG_SOFTCODED, "document", 0x600 }, + { ".wri", PERCEIVED_TYPE_DOCUMENT, PERCEIVEDFLAG_SOFTCODED, "document", 0x600 }, + { ".xls", PERCEIVED_TYPE_DOCUMENT, PERCEIVEDFLAG_SOFTCODED, "document", 0x600 }, + { ".xlt", PERCEIVED_TYPE_DOCUMENT, PERCEIVEDFLAG_SOFTCODED, "document", 0x600 }, + +}; + +static void test_assoc_one(const struct assoc_test_struct* test) +{ + LPWSTR extension, type_expected, type_returned; + PERCEIVED perceived; + HRESULT hr; + INT flags; + + /* if SHStrDupA receives a nullptr as input, it will null the output */ + SHStrDupA(test->extension, &extension); + SHStrDupA(test->type, &type_expected); + + perceived = 0xdeadbeef; + flags = 0xdeadbeef; + + hr = pAssocGetPerceivedType(extension, &perceived, &flags, NULL); + expect_hr(type_expected ? S_OK : test->hr, hr); + ok(perceived == test->perceived, "%s: got perceived 0x%x, expected 0x%x\n", + test->extension, perceived, test->perceived); + ok(flags == test->flags, "%s: got flags 0x%x, expected 0x%x\n", + test->extension, flags, test->flags); + + type_returned = (void *)0xdeadbeef; + perceived = 0xdeadbeef; + flags = 0xdeadbeef; + + hr = pAssocGetPerceivedType(extension, &perceived, &flags, &type_returned); + expect_hr(type_expected ? S_OK : test->hr, hr); + ok(perceived == test->perceived, "%s: got perceived 0x%x, expected 0x%x\n", + test->extension, perceived, test->perceived); + ok(flags == test->flags, "%s: got flags 0x%x, expected 0x%x\n", + test->extension, flags, test->flags); + + if (!type_expected) + { + ok(type_returned == (void *)0xdeadbeef || broken(type_returned == NULL) /* Win 8 */, + "%s: got type %p, expected 0xdeadbeef\n", test->extension, type_returned); + } + else if (type_returned == (void *)0xdeadbeef) + { + ok(type_returned != (void *)0xdeadbeef, "%s: got type %p, expected '%s'\n", + test->extension, type_returned, test->type); + } + else + { + ok(StrCmpIW(type_expected, type_returned) == 0, "%s: got type %s, expected '%s'\n", + test->extension, wine_dbgstr_w(type_returned), test->type); + } + + CoTaskMemFree(type_returned); + CoTaskMemFree(extension); + CoTaskMemFree(type_expected); +} + +static void test_assoc_perceived(void) +{ + static const struct assoc_test_struct should_not_exist = + { ".should_not_exist", PERCEIVED_TYPE_UNSPECIFIED, PERCEIVEDFLAG_UNDEFINED, NULL, 0, 0x80070002 }; + static const struct assoc_test_struct htm[] = + { + { ".htm", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text", 0x600 }, + { ".html", PERCEIVED_TYPE_TEXT, SOFTCODED_NATIVESUPPORT, "text", 0x600 }, + }; + static const struct assoc_test_struct mp2 = + { ".mp2", PERCEIVED_TYPE_VIDEO, HARDCODED_NATIVE_WMSDK, "video" }; + + OSVERSIONINFOEXW osvi; + DWORD version; + size_t i; + + if (!pAssocGetPerceivedType) + { + win_skip("AssocGetPerceivedType() is missing\n"); + return; + } + + memset(&osvi, 0, sizeof(osvi)); + osvi.dwOSVersionInfoSize = sizeof(osvi); + GetVersionExW((LPOSVERSIONINFOW)&osvi); + version = (osvi.dwMajorVersion << 8) | osvi.dwMinorVersion; + + /* invalid entry results in HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) */ + test_assoc_one(&should_not_exist); + + for (i = 0; i < sizeof(assoc_perceived_types) / sizeof(assoc_perceived_types[0]); ++i) + { + if (assoc_perceived_types[i].minversion && assoc_perceived_types[i].minversion > version) + continue; + if (!(assoc_perceived_types[i].flags & PERCEIVEDFLAG_HARDCODED)) + todo_wine test_assoc_one(&assoc_perceived_types[i]); + else + test_assoc_one(&assoc_perceived_types[i]); + } + + /* below Vista */ + if (version < 0x600) + { + todo_wine + test_assoc_one(&htm[0]); + todo_wine + test_assoc_one(&htm[1]); + } + + /* below Win8 */ + if (version < 0x602) + { + test_assoc_one(&mp2); + } +} + START_TEST(assoc) { HMODULE hshlwapi; @@ -309,9 +591,11 @@ START_TEST(assoc) pAssocQueryStringA = (void*)GetProcAddress(hshlwapi, "AssocQueryStringA"); pAssocQueryStringW = (void*)GetProcAddress(hshlwapi, "AssocQueryStringW"); pAssocCreate = (void*)GetProcAddress(hshlwapi, "AssocCreate"); + pAssocGetPerceivedType = (void*)GetProcAddress(hshlwapi, "AssocGetPerceivedType"); test_getstring_bad(); test_getstring_basic(); test_getstring_no_extra(); test_assoc_create(); + test_assoc_perceived(); } diff --git a/modules/rostests/winetests/shlwapi/clist.c b/modules/rostests/winetests/shlwapi/clist.c index 8aee3956b4..309b3335ec 100755 --- a/modules/rostests/winetests/shlwapi/clist.c +++ b/modules/rostests/winetests/shlwapi/clist.c @@ -17,7 +17,13 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" +#define COBJMACROS +#include <stdarg.h> + +#include "wine/test.h" +#include "windef.h" +#include "winbase.h" +#include "objbase.h" typedef struct tagSHLWAPI_CLIST { @@ -212,7 +218,7 @@ static IStreamVtbl iclvt = static HMODULE SHLWAPI_hshlwapi = 0; static VOID (WINAPI *pSHLWAPI_19)(LPSHLWAPI_CLIST); -static HRESULT (WINAPI *pSHLWAPI_20)(LPSHLWAPI_CLIST*,LPCSHLWAPI_CLIST); +static BOOL (WINAPI *pSHLWAPI_20)(LPSHLWAPI_CLIST*,LPCSHLWAPI_CLIST); static BOOL (WINAPI *pSHLWAPI_21)(LPSHLWAPI_CLIST*,ULONG); static LPSHLWAPI_CLIST (WINAPI *pSHLWAPI_22)(LPSHLWAPI_CLIST,ULONG); static HRESULT (WINAPI *pSHLWAPI_17)(IStream*, SHLWAPI_CLIST*); @@ -286,6 +292,7 @@ static void test_CList(void) struct dummystream streamobj; LPSHLWAPI_CLIST list = NULL; LPCSHLWAPI_CLIST item = SHLWAPI_CLIST_items; + BOOL bRet; HRESULT hRet; LPSHLWAPI_CLIST inserted; BYTE buff[64]; @@ -306,10 +313,10 @@ static void test_CList(void) buff[sizeof(SHLWAPI_CLIST)+i] = i*2; /* Add it */ - hRet = pSHLWAPI_20(&list, inserted); - ok(hRet > S_OK, "failed list add\n"); + bRet = pSHLWAPI_20(&list, inserted); + ok(bRet == TRUE, "failed list add\n"); - if (hRet > S_OK) + if (bRet == TRUE) { ok(list && list->ulSize, "item not added\n"); @@ -384,11 +391,8 @@ static void test_CList(void) inserted = (LPSHLWAPI_CLIST)buff; inserted->ulSize = sizeof(SHLWAPI_CLIST) -1; inserted->ulId = 33; - - /* The call succeeds but the item is not inserted, except on some early - * versions which return failure. Wine behaves like later versions. - */ - pSHLWAPI_20(&list, inserted); + bRet = pSHLWAPI_20(&list, inserted); + ok(bRet == FALSE, "Expected failure\n"); inserted = pSHLWAPI_22(list, 33); ok(inserted == NULL, "inserted bad element size\n"); @@ -396,9 +400,8 @@ static void test_CList(void) inserted = (LPSHLWAPI_CLIST)buff; inserted->ulSize = 44; inserted->ulId = ~0U; - - /* See comment above, some early versions fail this call */ - pSHLWAPI_20(&list, inserted); + bRet = pSHLWAPI_20(&list, inserted); + ok(bRet == FALSE, "Expected failure\n"); item = SHLWAPI_CLIST_items; diff --git a/modules/rostests/winetests/shlwapi/clsid.c b/modules/rostests/winetests/shlwapi/clsid.c index c86407cab1..e664f63cf7 100755 --- a/modules/rostests/winetests/shlwapi/clsid.c +++ b/modules/rostests/winetests/shlwapi/clsid.c @@ -17,10 +17,17 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" - -#include <olectl.h> -#include <initguid.h> +#include <stdio.h> + +#include "wine/test.h" +#include "winbase.h" +#include "winerror.h" +#include "winnls.h" +#include "winuser.h" +#include "initguid.h" +#include "shlguid.h" +#include "shobjidl.h" +#include "olectl.h" DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); diff --git a/modules/rostests/winetests/shlwapi/generated.c b/modules/rostests/winetests/shlwapi/generated.c index 59fdd9fb26..e509e5c49b 100755 --- a/modules/rostests/winetests/shlwapi/generated.c +++ b/modules/rostests/winetests/shlwapi/generated.c @@ -5,7 +5,22 @@ * Unit tests for data structure packing */ -#include "precomp.h" +#ifndef __REACTOS__ +#define WINVER 0x0501 +#define _WIN32_IE 0x0501 +#define _WIN32_WINNT 0x0501 +#endif + +#define WINE_NOWINSOCK + +#include <stdarg.h> +#include "windef.h" +#include "winbase.h" +#include "wtypes.h" +#include "winreg.h" +#include "shlwapi.h" + +#include "wine/test.h" /*********************************************************************** * Compatibility macros diff --git a/modules/rostests/winetests/shlwapi/istream.c b/modules/rostests/winetests/shlwapi/istream.c index ce7c7c57db..926f2f8157 100644 --- a/modules/rostests/winetests/shlwapi/istream.c +++ b/modules/rostests/winetests/shlwapi/istream.c @@ -17,7 +17,16 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" +#define COBJMACROS + +#include <stdarg.h> +#include <stdio.h> + +#include "wine/test.h" +#include "windef.h" +#include "winbase.h" +#include "objbase.h" +#include "shlwapi.h" static void test_IStream_invalid_operations(IStream * stream, DWORD mode) { diff --git a/modules/rostests/winetests/shlwapi/ordinal.c b/modules/rostests/winetests/shlwapi/ordinal.c index 5cb9ce05fe..8d42608130 100755 --- a/modules/rostests/winetests/shlwapi/ordinal.c +++ b/modules/rostests/winetests/shlwapi/ordinal.c @@ -17,12 +17,25 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" +#include <stdio.h> + +#define COBJMACROS +#define CONST_VTABLE +#include "wine/test.h" +#include "winbase.h" +#include "winerror.h" +#include "winuser.h" +#include "ole2.h" +#include "oaidl.h" +#include "ocidl.h" +#include "mlang.h" +#include "shlwapi.h" +#include "docobj.h" +#include "shobjidl.h" +#include "shlobj.h" /* Function ptrs for ordinal calls */ static HMODULE hShlwapi; -static BOOL is_win2k_and_lower; -static BOOL is_win9x; static int (WINAPI *pSHSearchMapInt)(const int*,const int*,int,int); static HRESULT (WINAPI *pGetAcceptLanguagesA)(LPSTR,LPDWORD); @@ -74,12 +87,6 @@ typedef struct SHELL_USER_PERMISSION { static SECURITY_DESCRIPTOR* (WINAPI *pGetShellSecurityDescriptor)(const SHELL_USER_PERMISSION**,int); -static HMODULE hmlang; -static HRESULT (WINAPI *pLcidToRfc1766A)(LCID, LPSTR, INT); - -static HMODULE hshell32; -static HRESULT (WINAPI *pSHGetDesktopFolder)(IShellFolder**); - static const CHAR ie_international[] = { 'S','o','f','t','w','a','r','e','\\', 'M','i','c','r','o','s','o','f','t','\\', @@ -192,11 +199,6 @@ static void test_GetAcceptLanguagesA(void) LPCSTR entry; INT i = 0; - if (!pGetAcceptLanguagesA) { - win_skip("GetAcceptLanguagesA is not available\n"); - return; - } - lcid = GetUserDefaultLCID(); /* Get the original Value */ @@ -242,10 +244,8 @@ static void test_GetAcceptLanguagesA(void) if (lstrcmpA(buffer, language)) { /* some windows versions use "lang" or "lang-country" as default */ language[0] = 0; - if (pLcidToRfc1766A) { - hr = pLcidToRfc1766A(lcid, language, sizeof(language)); - ok(hr == S_OK, "LcidToRfc1766A returned 0x%x and %s\n", hr, language); - } + hr = LcidToRfc1766A(lcid, language, sizeof(language)); + ok(hr == S_OK, "LcidToRfc1766A returned 0x%x and %s\n", hr, language); } ok(!lstrcmpA(buffer, language), @@ -556,7 +556,6 @@ static void test_alloc_shared_remote(DWORD procid, HANDLE hmem) SetLastError(0xdeadbeef); hmem2 = pSHMapHandle(NULL, procid, GetCurrentProcessId(), 0, 0); ok(hmem2 == NULL, "expected NULL, got new handle\n"); -todo_wine ok(GetLastError() == 0xdeadbeef, "last error should not have changed, got %u\n", GetLastError()); hmem2 = pSHMapHandle(hmem, procid, GetCurrentProcessId(), 0, 0); @@ -699,40 +698,20 @@ static void test_GetShellSecurityDescriptor(void) &supCurrentUserFull, &supEveryoneDenied, }; SECURITY_DESCRIPTOR* psd; - void *pChrCmpIW = GetProcAddress(hShlwapi, "ChrCmpIW"); - if(!pGetShellSecurityDescriptor) + if(!pGetShellSecurityDescriptor) /* vista and later */ { win_skip("GetShellSecurityDescriptor not available\n"); return; } - if(pChrCmpIW && pChrCmpIW == pGetShellSecurityDescriptor) /* win2k */ - { - win_skip("Skipping for GetShellSecurityDescriptor, same ordinal used for ChrCmpIW\n"); - return; - } - psd = pGetShellSecurityDescriptor(NULL, 2); - ok(psd==NULL || - broken(psd==INVALID_HANDLE_VALUE), /* IE5 */ - "GetShellSecurityDescriptor should fail\n"); + ok(psd==NULL, "GetShellSecurityDescriptor should fail\n"); psd = pGetShellSecurityDescriptor(rgsup, 0); ok(psd==NULL, "GetShellSecurityDescriptor should fail, got %p\n", psd); SetLastError(0xdeadbeef); psd = pGetShellSecurityDescriptor(rgsup, 2); - if (psd == NULL && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - /* The previous calls to GetShellSecurityDescriptor don't set the last error */ - win_skip("GetShellSecurityDescriptor is not implemented\n"); - return; - } - if (psd == INVALID_HANDLE_VALUE) - { - win_skip("GetShellSecurityDescriptor is broken on IE5\n"); - return; - } ok(psd!=NULL, "GetShellSecurityDescriptor failed\n"); if (psd!=NULL) { @@ -807,9 +786,6 @@ static void test_SHPackDispParams(void) VARIANT vars[10]; HRESULT hres; - if(!pSHPackDispParams) - win_skip("SHPackSidpParams not available\n"); - memset(¶ms, 0xc0, sizeof(params)); memset(vars, 0xc0, sizeof(vars)); hres = pSHPackDispParams(¶ms, vars, 1, VT_I4, 0xdeadbeef); @@ -1480,12 +1456,6 @@ static void test_IConnectionPoint(void) DISPPARAMS params; VARIANT vars[10]; - if (!pIConnectionPoint_SimpleInvoke || !pConnectToConnectionPoint) - { - win_skip("IConnectionPoint Apis not present\n"); - return; - } - container = HeapAlloc(GetProcessHeap(),0,sizeof(Contain)); container->IConnectionPointContainer_iface.lpVtbl = &contain_vtbl; container->refCount = 1; @@ -1504,18 +1474,13 @@ static void test_IConnectionPoint(void) rc = pIConnectionPoint_SimpleInvoke(point,0xa0,NULL); ok(rc == S_OK, "pConnectToConnectionPoint failed with %x\n",rc); - if (pSHPackDispParams) - { - memset(¶ms, 0xc0, sizeof(params)); - memset(vars, 0xc0, sizeof(vars)); - rc = pSHPackDispParams(¶ms, vars, 2, VT_I4, 0xdeadbeef, VT_BSTR, 0xdeadcafe); - ok(rc == S_OK, "SHPackDispParams failed: %08x\n", rc); + memset(¶ms, 0xc0, sizeof(params)); + memset(vars, 0xc0, sizeof(vars)); + rc = pSHPackDispParams(¶ms, vars, 2, VT_I4, 0xdeadbeef, VT_BSTR, 0xdeadcafe); + ok(rc == S_OK, "SHPackDispParams failed: %08x\n", rc); - rc = pIConnectionPoint_SimpleInvoke(point,0xa1,¶ms); - ok(rc == S_OK, "pConnectToConnectionPoint failed with %x\n",rc); - } - else - win_skip("pSHPackDispParams not present\n"); + rc = pIConnectionPoint_SimpleInvoke(point,0xa1,¶ms); + ok(rc == S_OK, "pConnectToConnectionPoint failed with %x\n",rc); rc = pConnectToConnectionPoint(NULL, &IID_NULL, FALSE, (IUnknown*)container, &cookie, NULL); ok(rc == S_OK, "pConnectToConnectionPoint failed with %x\n",rc); @@ -1619,12 +1584,6 @@ static void test_SHPropertyBag_ReadLONG(void) LONG out; static const WCHAR szName1[] = {'n','a','m','e','1',0}; - if (!pSHPropertyBag_ReadLONG) - { - win_skip("SHPropertyBag_ReadLONG not present\n"); - return; - } - pb = HeapAlloc(GetProcessHeap(),0,sizeof(PropBag)); pb->refCount = 1; pb->IPropertyBag_iface.lpVtbl = &prop_vtbl; @@ -1650,12 +1609,6 @@ static void test_SHSetWindowBits(void) DWORD style, styleold; WNDCLASSA clsA; - if(!pSHSetWindowBits) - { - win_skip("SHSetWindowBits is not available\n"); - return; - } - clsA.style = 0; clsA.lpfnWndProc = DefWindowProcA; clsA.cbClsExtra = 0; @@ -1676,8 +1629,7 @@ static void test_SHSetWindowBits(void) SetLastError(0xdeadbeef); style = pSHSetWindowBits(NULL, GWL_STYLE, 0, 0); ok(style == 0, "expected 0 retval, got %d\n", style); - ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE || - broken(GetLastError() == 0xdeadbeef), /* Win9x/WinMe */ + ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "expected ERROR_INVALID_WINDOW_HANDLE, got %d\n", GetLastError()); /* zero mask, zero flags */ @@ -1727,12 +1679,6 @@ static void test_SHFormatDateTimeA(void) DWORD flags; INT ret; - if(!pSHFormatDateTimeA) - { - win_skip("pSHFormatDateTimeA isn't available\n"); - return; - } - if (0) { /* crashes on native */ @@ -1777,8 +1723,7 @@ if (0) SetLastError(0xdeadbeef); ret = pSHFormatDateTimeA(&filetime, &flags, buff, sizeof(buff)); ok(ret == lstrlenA(buff)+1, "got %d\n", ret); - ok(GetLastError() == 0xdeadbeef || - broken(GetLastError() == ERROR_INVALID_FLAGS), /* Win9x/WinMe */ + ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); /* now check returned strings */ @@ -1889,12 +1834,6 @@ static void test_SHFormatDateTimeW(void) #define UNICODE_LTR_MARK 0x200e #define UNICODE_RTL_MARK 0x200f - if(!pSHFormatDateTimeW) - { - win_skip("pSHFormatDateTimeW isn't available\n"); - return; - } - if (0) { /* crashes on native */ @@ -1940,8 +1879,7 @@ if (0) ret = pSHFormatDateTimeW(&filetime, &flags, buff, sizeof(buff)/sizeof(WCHAR)); ok(ret == lstrlenW(buff)+1 || ret == lstrlenW(buff), "expected %d or %d, got %d\n", lstrlenW(buff)+1, lstrlenW(buff), ret); - ok(GetLastError() == 0xdeadbeef || - broken(GetLastError() == ERROR_INVALID_FLAGS), /* Win9x/WinMe/NT4 */ + ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); /* now check returned strings */ @@ -1951,11 +1889,6 @@ if (0) "expected %d or %d, got %d\n", lstrlenW(buff)+1, lstrlenW(buff), ret); SetLastError(0xdeadbeef); ret = GetTimeFormatW(LOCALE_USER_DEFAULT, TIME_NOSECONDS, &st, NULL, buff2, sizeof(buff2)/sizeof(WCHAR)); - if (ret == 0 && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) - { - win_skip("Needed W-functions are not implemented\n"); - return; - } ok(ret == lstrlenW(buff2)+1, "expected %d, got %d\n", lstrlenW(buff2)+1, ret); ok(lstrcmpW(buff, buff2) == 0, "expected equal strings\n"); @@ -2103,24 +2036,11 @@ static void test_SHGetObjectCompatFlags(void) }; static const char compat_path[] = "Software\\Microsoft\\Windows\\CurrentVersion\\ShellCompatibility\\Objects"; - void *pColorAdjustLuma = GetProcAddress(hShlwapi, "ColorAdjustLuma"); CHAR keyA[39]; /* {CLSID} */ HKEY root; DWORD ret; int i; - if (!pSHGetObjectCompatFlags) - { - win_skip("SHGetObjectCompatFlags isn't available\n"); - return; - } - - if (pColorAdjustLuma && pColorAdjustLuma == pSHGetObjectCompatFlags) /* win2k */ - { - win_skip("Skipping SHGetObjectCompatFlags, same ordinal used for ColorAdjustLuma\n"); - return; - } - /* null args */ ret = pSHGetObjectCompatFlags(NULL, NULL); ok(ret == 0, "got %d\n", ret); @@ -2377,14 +2297,6 @@ static void test_IUnknown_QueryServiceExec(void) call_trace_t trace_expected; HRESULT hr; - /* on <=W2K platforms same ordinal used for another export with different - prototype, so skipping using this indirect condition */ - if (is_win2k_and_lower) - { - win_skip("IUnknown_QueryServiceExec is not available\n"); - return; - } - provider = IServiceProviderImpl_Construct(); /* null source pointer */ @@ -2494,14 +2406,6 @@ static void test_IUnknown_ProfferService(void) HRESULT hr; DWORD cookie; - /* on <=W2K platforms same ordinal used for another export with different - prototype, so skipping using this indirect condition */ - if (is_win2k_and_lower) - { - win_skip("IUnknown_ProfferService is not available\n"); - return; - } - provider = IServiceProviderImpl_Construct(); proff = IProfferServiceImpl_Construct(); @@ -2565,12 +2469,6 @@ static void test_SHCreateWorkerWindowA(void) LONG_PTR ret; BOOL res; - if (is_win2k_and_lower) - { - win_skip("SHCreateWorkerWindowA not available\n"); - return; - } - hwnd = pSHCreateWorkerWindowA(0, NULL, 0, 0, 0, 0); ok(hwnd != 0, "expected window\n"); @@ -2739,7 +2637,7 @@ static void test_SHIShellFolder_EnumObjects(void) HRESULT hres; IShellFolder *folder; - if(!pSHIShellFolder_EnumObjects || is_win2k_and_lower){ + if(!pSHIShellFolder_EnumObjects){ /* win7 and later */ win_skip("SHIShellFolder_EnumObjects not available\n"); return; } @@ -2756,7 +2654,7 @@ static void test_SHIShellFolder_EnumObjects(void) ok(enm == (IEnumIDList*)0xcafebabe, "Didn't get expected enumerator location, instead: %p\n", enm); /* SHIShellFolder_EnumObjects isn't strict about the IShellFolder object */ - hres = pSHGetDesktopFolder(&folder); + hres = SHGetDesktopFolder(&folder); ok(hres == S_OK, "SHGetDesktopFolder failed: 0x%08x\n", hres); enm = NULL; @@ -2825,11 +2723,6 @@ static void test_SHGetIniString(void) static const WCHAR testpathW[] = {'C',':','\\','t','e','s','t','.','i','n','i',0}; WCHAR pathW[MAX_PATH]; - if(!pSHGetIniStringW || is_win2k_and_lower){ - win_skip("SHGetIniStringW is not available\n"); - return; - } - lstrcpyW(pathW, testpathW); if (!write_inifile(pathW)) @@ -2880,11 +2773,6 @@ static void test_SHSetIniString(void) static const WCHAR NewKeyW[] = {'N','e','w','K','e','y',0}; static const WCHAR AValueW[] = {'A','V','a','l','u','e',0}; - if(!pSHSetIniStringW || is_win2k_and_lower){ - win_skip("SHSetIniStringW is not available\n"); - return; - } - if (!write_inifile(TestIniW)) return; @@ -2929,30 +2817,10 @@ static void test_SHGetShellKey(void) static const WCHAR ShellFoldersW[] = { 'S','h','e','l','l',' ','F','o','l','d','e','r','s',0 }; static const WCHAR WineTestW[] = { 'W','i','n','e','T','e','s','t',0 }; - void *pPathBuildRootW = GetProcAddress(hShlwapi, "PathBuildRootW"); DWORD *alloc_data, data, size; HKEY hkey; HRESULT hres; - if (!pSHGetShellKey) - { - win_skip("SHGetShellKey(ordinal 491) isn't available\n"); - return; - } - - /* some win2k */ - if (pPathBuildRootW && pPathBuildRootW == pSHGetShellKey) - { - win_skip("SHGetShellKey(ordinal 491) used for PathBuildRootW\n"); - return; - } - - if (is_win9x || is_win2k_and_lower) - { - win_skip("Ordinal 491 used for another call, skipping SHGetShellKey tests\n"); - return; - } - /* Vista+ limits SHKEY enumeration values */ SetLastError(0xdeadbeef); hkey = pSHGetShellKey(SHKEY_Key_Explorer, ShellFoldersW, FALSE); @@ -2991,12 +2859,6 @@ static void test_SHGetShellKey(void) ok(hkey != NULL, "Can't create key\n"); RegCloseKey(hkey); - if (!pSKGetValueW || !pSKSetValueW || !pSKDeleteValueW || !pSKAllocValueW) - { - win_skip("SKGetValueW, SKSetValueW, SKDeleteValueW or SKAllocValueW not available\n"); - return; - } - size = sizeof(data); hres = pSKGetValueW(SHKEY_Root_HKLM, WineTestW, NULL, NULL, &data, &size); ok(hres == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "hres = %x\n", hres); @@ -3084,12 +2946,6 @@ static void test_SHSetParentHwnd(void) HWND hwnd, hwnd2, ret; DWORD style; - if (!pSHSetParentHwnd) - { - win_skip("SHSetParentHwnd not available\n"); - return; - } - hwnd = CreateWindowA("Button", "", WS_VISIBLE, 0, 0, 10, 10, NULL, NULL, NULL, NULL); ok(hwnd != NULL, "got %p\n", hwnd); @@ -3264,14 +3120,6 @@ START_TEST(ordinal) int argc; hShlwapi = GetModuleHandleA("shlwapi.dll"); - is_win2k_and_lower = GetProcAddress(hShlwapi, "StrChrNW") == 0; - is_win9x = GetProcAddress(hShlwapi, (LPSTR)99) == 0; /* StrCpyNXA */ - - /* SHCreateStreamOnFileEx was introduced in shlwapi v6.0 */ - if(!GetProcAddress(hShlwapi, "SHCreateStreamOnFileEx")){ - win_skip("Too old shlwapi version\n"); - return; - } init_pointers(); @@ -3286,12 +3134,6 @@ START_TEST(ordinal) return; } - hmlang = LoadLibraryA("mlang.dll"); - pLcidToRfc1766A = (void *)GetProcAddress(hmlang, "LcidToRfc1766A"); - - hshell32 = LoadLibraryA("shell32.dll"); - pSHGetDesktopFolder = (void *)GetProcAddress(hshell32, "SHGetDesktopFolder"); - test_GetAcceptLanguagesA(); test_SHSearchMapInt(); test_alloc_shared(argc, argv); @@ -3314,7 +3156,4 @@ START_TEST(ordinal) test_SHSetParentHwnd(); test_IUnknown_GetClassID(); test_DllGetVersion(); - - FreeLibrary(hshell32); - FreeLibrary(hmlang); } diff --git a/modules/rostests/winetests/shlwapi/path.c b/modules/rostests/winetests/shlwapi/path.c index 78f9090069..91c66b7ef3 100755 --- a/modules/rostests/winetests/shlwapi/path.c +++ b/modules/rostests/winetests/shlwapi/path.c @@ -17,7 +17,15 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" +#include <stdarg.h> +#include <stdio.h> + +#include "wine/test.h" +#include "windef.h" +#include "winbase.h" +#include "winreg.h" +#include "shlwapi.h" +#include "wininet.h" static BOOL (WINAPI *pPathIsValidCharA)(char,DWORD); static BOOL (WINAPI *pPathIsValidCharW)(WCHAR,DWORD); diff --git a/modules/rostests/winetests/shlwapi/precomp.h b/modules/rostests/winetests/shlwapi/precomp.h index 0d6f5ba1ca..38f5fca82e 100644 --- a/modules/rostests/winetests/shlwapi/precomp.h +++ b/modules/rostests/winetests/shlwapi/precomp.h @@ -1,3 +1,4 @@ + #ifndef _SHLWAPI_WINETEST_PRECOMP_H_ #define _SHLWAPI_WINETEST_PRECOMP_H_ diff --git a/modules/rostests/winetests/shlwapi/shreg.c b/modules/rostests/winetests/shlwapi/shreg.c index 50c62b64d9..ca7fbad289 100755 --- a/modules/rostests/winetests/shlwapi/shreg.c +++ b/modules/rostests/winetests/shlwapi/shreg.c @@ -17,7 +17,16 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" +#include <stdarg.h> +#include <stdio.h> + +#include "wine/test.h" +#include "windef.h" +#include "winbase.h" +#include "winerror.h" +#include "winreg.h" +#include "winuser.h" +#include "shlwapi.h" /* Keys used for testing */ #define REG_TEST_KEY "Software\\Wine\\Test" diff --git a/modules/rostests/winetests/shlwapi/string.c b/modules/rostests/winetests/shlwapi/string.c index d12d82055b..7f069a4849 100755 --- a/modules/rostests/winetests/shlwapi/string.c +++ b/modules/rostests/winetests/shlwapi/string.c @@ -17,7 +17,18 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" +#include <stdio.h> + +#include "wine/test.h" +#include "winbase.h" +#include "winerror.h" +#include "winnls.h" +#define NO_SHLWAPI_REG +#define NO_SHLWAPI_PATH +#define NO_SHLWAPI_GDI +#define NO_SHLWAPI_STREAM +#include "shlwapi.h" +#include "shtypes.h" #define expect_eq(expr, val, type, fmt) do { \ type ret = expr; \ diff --git a/modules/rostests/winetests/shlwapi/thread.c b/modules/rostests/winetests/shlwapi/thread.c index 17ff7a73ed..34eb98ca60 100644 --- a/modules/rostests/winetests/shlwapi/thread.c +++ b/modules/rostests/winetests/shlwapi/thread.c @@ -17,7 +17,19 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" +#include <stdio.h> +#include <stdarg.h> + +#define COBJMACROS +#define CONST_VTABLE + +#include "windef.h" +#include "winbase.h" +#include "winerror.h" +#include "ole2.h" +#include "shlwapi.h" + +#include "wine/test.h" static HRESULT (WINAPI *pSHCreateThreadRef)(LONG*, IUnknown**); static HRESULT (WINAPI *pSHGetThreadRef)(IUnknown**); diff --git a/modules/rostests/winetests/shlwapi/url.c b/modules/rostests/winetests/shlwapi/url.c index 44d70ff410..7b275a9f20 100644 --- a/modules/rostests/winetests/shlwapi/url.c +++ b/modules/rostests/winetests/shlwapi/url.c @@ -18,9 +18,16 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" +#include <stdarg.h> +#include <stdio.h> -#include <intshcut.h> +#include "wine/test.h" +#include "windef.h" +#include "winbase.h" +#include "winreg.h" +#include "shlwapi.h" +#include "wininet.h" +#include "intshcut.h" /* ################ */ static HMODULE hShlwapi; @@ -197,7 +204,15 @@ static const TEST_URL_CANONICALIZE TEST_CANONICALIZE[] = { {"///A/../B", URL_WININET_COMPATIBILITY, S_OK, "///B", FALSE}, {"A", 0, S_OK, "A", FALSE}, {"../A", 0, S_OK, "../A", FALSE}, + {".\\A", 0, S_OK, ".\\A", FALSE}, + {"A\\.\\B", 0, S_OK, "A\\.\\B", FALSE}, {"A/../B", 0, S_OK, "B", TRUE}, + {"A/../B/./../C", 0, S_OK, "C", TRUE}, + {"A/../B/./../C", URL_DONT_SIMPLIFY, S_OK, "A/../B/./../C", FALSE}, + {".", 0, S_OK, "/", TRUE}, + {"./A", 0, S_OK, "A", TRUE}, + {"A/./B", 0, S_OK, "A/B", TRUE}, + {"/:test\\", 0, S_OK, "/:test\\", TRUE}, {"/uri-res/N2R?urn:sha1:B3K", URL_DONT_ESCAPE_EXTRA_INFO | URL_WININET_COMPATIBILITY /*0x82000000*/, S_OK, "/uri-res/N2R?urn:sha1:B3K", FALSE} /*LimeWire online installer calls this*/, {"http:www.winehq.org/dir/../index.html", 0, S_OK, "http:www.winehq.org/index.html"}, {"
http://localhost/test.html
", URL_FILE_USE_PATHURL, S_OK, "
http://localhost/test.html
"}, @@ -351,6 +366,7 @@ typedef struct _TEST_URL_COMBINE { DWORD flags; HRESULT expectret; const char *expecturl; + BOOL todo; } TEST_URL_COMBINE; static const TEST_URL_COMBINE TEST_COMBINE[] = { @@ -372,6 +388,15 @@ static const TEST_URL_COMBINE TEST_COMBINE[] = { {"
http://www.winehq.org/test14#aaa/bbb#ccc
", "#", 0, S_OK, "
http://www.winehq.org/test14#
"}, {"
http://www.winehq.org/tests/?query=x/y/z
", "tests15", 0, S_OK, "
http://www.winehq.org/tests/tests15
"}, {"
http://www.winehq.org/tests/?query=x/y/z#example
", "tests16", 0, S_OK, "
http://www.winehq.org/tests/tests16
"}, + {"
http://www.winehq.org/tests17
", ".", 0, S_OK, "
http://www.winehq.org/
"}, + {"
http://www.winehq.org/tests18/test
", ".", 0, S_OK, "
http://www.winehq.org/tests18/
"}, + {"
http://www.winehq.org/tests19/test
", "./", 0, S_OK, "
http://www.winehq.org/tests19/
", FALSE}, + {"
http://www.winehq.org/tests20/test
", "/", 0, S_OK, "
http://www.winehq.org/
", FALSE}, + {"
http://www.winehq.org/tests/test
", "./test21", 0, S_OK, "
http://www.winehq.org/tests/test21
", FALSE}, + {"
http://www.winehq.org/tests/test
", "./test22/../test", 0, S_OK, "
http://www.winehq.org/tests/test
", FALSE}, + {"
http://www.winehq.org/tests/
", "
http://www.winehq.org:80/tests23
", 0, S_OK, "
http://www.winehq.org/tests23
", TRUE}, + {"
http://www.winehq.org/tests/
", "tests24/./test/../test", 0, S_OK, "
http://www.winehq.org/tests/tests24/test
", FALSE}, + {"
http://www.winehq.org/tests/./tests25
", "./", 0, S_OK, "
http://www.winehq.org/tests/
", FALSE}, {"file:///C:\\dir\\file.txt", "test.txt", 0, S_OK, "file:///C:/dir/test.txt"}, {"file:///C:\\dir\\file.txt#hash\\hash", "test.txt", 0, S_OK, "file:///C:/dir/file.txt#hash/test.txt"}, {"file:///C:\\dir\\file.html#hash\\hash", "test.html", 0, S_OK, "file:///C:/dir/test.html"}, @@ -1190,7 +1215,7 @@ static void test_UrlCanonicalizeW(void) /* ########################### */ -static void test_url_combine(const char *szUrl1, const char *szUrl2, DWORD dwFlags, HRESULT dwExpectReturn, const char *szExpectUrl) +static void test_url_combine(const char *szUrl1, const char *szUrl2, DWORD dwFlags, HRESULT dwExpectReturn, const char *szExpectUrl, BOOL todo) { HRESULT hr; CHAR szReturnUrl[INTERNET_MAX_URL_LENGTH]; @@ -1215,34 +1240,42 @@ static void test_url_combine(const char *szUrl1, const char *szUrl2, DWORD dwFla dwSize = 0; hr = pUrlCombineA(szUrl1, szUrl2, NULL, &dwSize, dwFlags); ok(hr == E_POINTER, "Checking length of string, return was 0x%08x, expected 0x%08x\n", hr, E_POINTER); - ok(dwSize == dwExpectLen+1, "Got length %d, expected %d\n", dwSize, dwExpectLen+1); + ok(todo || dwSize == dwExpectLen+1, "Got length %d, expected %d\n", dwSize, dwExpectLen+1); dwSize--; hr = pUrlCombineA(szUrl1, szUrl2, szReturnUrl, &dwSize, dwFlags); ok(hr == E_POINTER, "UrlCombineA returned 0x%08x, expected 0x%08x\n", hr, E_POINTER); - ok(dwSize == dwExpectLen+1, "Got length %d, expected %d\n", dwSize, dwExpectLen+1); + ok(todo || dwSize == dwExpectLen+1, "Got length %d, expected %d\n", dwSize, dwExpectLen+1); hr = pUrlCombineA(szUrl1, szUrl2, szReturnUrl, &dwSize, dwFlags); ok(hr == dwExpectReturn, "UrlCombineA returned 0x%08x, expected 0x%08x\n", hr, dwExpectReturn); - ok(dwSize == dwExpectLen, "Got length %d, expected %d\n", dwSize, dwExpectLen); - if(SUCCEEDED(hr)) { - ok(strcmp(szReturnUrl,szExpectUrl)==0, "Expected %s, but got %s\n", szExpectUrl, szReturnUrl); + + if (todo) + { + todo_wine ok(dwSize == dwExpectLen && (FAILED(hr) || strcmp(szReturnUrl, szExpectUrl)==0), + "Expected %s (len=%d), but got %s (len=%d)\n", szExpectUrl, dwExpectLen, SUCCEEDED(hr) ? szReturnUrl : "(null)", dwSize); + } + else + { + ok(dwSize == dwExpectLen, "Got length %d, expected %d\n", dwSize, dwExpectLen); + if (SUCCEEDED(hr)) + ok(strcmp(szReturnUrl, szExpectUrl)==0, "Expected %s, but got %s\n", szExpectUrl, szReturnUrl); } if (pUrlCombineW) { dwSize = 0; hr = pUrlCombineW(wszUrl1, wszUrl2, NULL, &dwSize, dwFlags); ok(hr == E_POINTER, "Checking length of string, return was 0x%08x, expected 0x%08x\n", hr, E_POINTER); - ok(dwSize == dwExpectLen+1, "Got length %d, expected %d\n", dwSize, dwExpectLen+1); + ok(todo || dwSize == dwExpectLen+1, "Got length %d, expected %d\n", dwSize, dwExpectLen+1); dwSize--; hr = pUrlCombineW(wszUrl1, wszUrl2, wszReturnUrl, &dwSize, dwFlags); ok(hr == E_POINTER, "UrlCombineW returned 0x%08x, expected 0x%08x\n", hr, E_POINTER); - ok(dwSize == dwExpectLen+1, "Got length %d, expected %d\n", dwSize, dwExpectLen+1); + ok(todo || dwSize == dwExpectLen+1, "Got length %d, expected %d\n", dwSize, dwExpectLen+1); hr = pUrlCombineW(wszUrl1, wszUrl2, wszReturnUrl, &dwSize, dwFlags); ok(hr == dwExpectReturn, "UrlCombineW returned 0x%08x, expected 0x%08x\n", hr, dwExpectReturn); - ok(dwSize == dwExpectLen, "Got length %d, expected %d\n", dwSize, dwExpectLen); + ok(todo || dwSize == dwExpectLen, "Got length %d, expected %d\n", dwSize, dwExpectLen); if(SUCCEEDED(hr)) { wszConvertedUrl = GetWideString(szReturnUrl); ok(lstrcmpW(wszReturnUrl, wszConvertedUrl)==0, "Strings didn't match between ascii and unicode UrlCombine!\n"); @@ -1262,7 +1295,7 @@ static void test_UrlCombine(void) unsigned int i; for(i=0; i<sizeof(TEST_COMBINE)/sizeof(TEST_COMBINE[0]); i++) { test_url_combine(TEST_COMBINE[i].url1, TEST_COMBINE[i].url2, TEST_COMBINE[i].flags, - TEST_COMBINE[i].expectret, TEST_COMBINE[i].expecturl); + TEST_COMBINE[i].expectret, TEST_COMBINE[i].expecturl, TEST_COMBINE[i].todo); } }
6 years, 9 months
1
0
0
0
01/01: [OLEAUT32_WINETEST] Fix non-PCH build.
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e2e63ede6858f83effa0b…
commit e2e63ede6858f83effa0baaade28b5604a5c5de7 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sun Mar 4 13:25:28 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sun Mar 4 13:25:28 2018 +0100 [OLEAUT32_WINETEST] Fix non-PCH build. --- modules/rostests/winetests/oleaut32/olepicture.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/rostests/winetests/oleaut32/olepicture.c b/modules/rostests/winetests/oleaut32/olepicture.c index 0b5db1d923..80a49d7416 100644 --- a/modules/rostests/winetests/oleaut32/olepicture.c +++ b/modules/rostests/winetests/oleaut32/olepicture.c @@ -26,7 +26,9 @@ #define COBJMACROS #define CONST_VTABLE +#ifndef __REACTOS__ #define NONAMELESSUNION +#endif #include "wine/test.h" #include <windef.h>
6 years, 9 months
1
0
0
0
01/01: [SHLWAPI] Sync with Wine Staging 3.3. CORE-14434
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d3fd5bdd974ba222aa373…
commit d3fd5bdd974ba222aa37324e35861e2059f7cc9d Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sun Mar 4 13:17:11 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sun Mar 4 13:17:11 2018 +0100 [SHLWAPI] Sync with Wine Staging 3.3. CORE-14434 --- dll/win32/shlwapi/assoc.c | 38 +++++++++++++------------------- dll/win32/shlwapi/clist.c | 47 ++++++++++++---------------------------- dll/win32/shlwapi/istream.c | 18 +++++++++++++-- dll/win32/shlwapi/msgbox.c | 18 ++++++++++++++- dll/win32/shlwapi/ordinal.c | 46 ++++++++++++++++++++++++++++++--------- dll/win32/shlwapi/path.c | 20 ++++++++++++++++- dll/win32/shlwapi/precomp.h | 5 ++--- dll/win32/shlwapi/reg.c | 13 ++++++++++- dll/win32/shlwapi/regstream.c | 16 +++++++++++++- dll/win32/shlwapi/resource.h | 4 +++- dll/win32/shlwapi/shlwapi_main.c | 11 +++++++++- dll/win32/shlwapi/stopwatch.c | 17 ++++++++++++++- dll/win32/shlwapi/string.c | 27 ++++++++++++++++++++--- dll/win32/shlwapi/thread.c | 21 ++++++++++++++++-- dll/win32/shlwapi/url.c | 28 +++++++++++++++++++----- dll/win32/shlwapi/wsprintf.c | 12 ++++++++-- media/doc/README.WINE | 2 +- 17 files changed, 252 insertions(+), 91 deletions(-) diff --git a/dll/win32/shlwapi/assoc.c b/dll/win32/shlwapi/assoc.c index a6d03a1a4b..a5cb4b1129 100644 --- a/dll/win32/shlwapi/assoc.c +++ b/dll/win32/shlwapi/assoc.c @@ -17,8 +17,21 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ - -#include "precomp.h" +#include <stdarg.h> +#include <assert.h> + +#include "windef.h" +#include "winbase.h" +#include "winnls.h" +#include "winreg.h" +#include "objbase.h" +#include "shlguid.h" +#include "shlobj.h" +#include "shlwapi.h" +#include "wine/unicode.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); /* Default IQueryAssociations::Init() flags */ #define SHLWAPI_DEF_ASSOCF (ASSOCF_INIT_BYEXENAME|ASSOCF_INIT_DEFAULTTOSTAR| \ @@ -89,7 +102,6 @@ HRESULT WINAPI AssocCreate(CLSID clsid, REFIID refiid, void **lpInterface) return SHCoCreateInstance( NULL, &clsid, NULL, refiid, lpInterface ); } -#ifdef __REACTOS__ struct AssocPerceivedInfo { @@ -257,8 +269,6 @@ static const struct AssocPerceivedInfo* AssocFindByType(LPCWSTR pszType) return NULL; } -#endif - /************************************************************************* * AssocGetPerceivedType [SHLWAPI.@] @@ -281,26 +291,10 @@ static const struct AssocPerceivedInfo* AssocFindByType(LPCWSTR pszType) * lppszType is optional and it can be NULL. * if lpType or lpFlag are NULL, the function will crash. * if lpszExt is NULL, an error is returned. - * -#ifndef __REACTOS__ - * BUGS - * Unimplemented. -#endif */ HRESULT WINAPI AssocGetPerceivedType(LPCWSTR lpszExt, PERCEIVED *lpType, INT *lpFlag, LPWSTR *lppszType) { -#ifndef __REACTOS__ - - FIXME("(%s, %p, %p, %p) not supported\n", debugstr_w(lpszExt), lpType, lpFlag, lppszType); - - if (lpszExt == NULL) - return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); - - return E_NOTIMPL; - -#else - static const WCHAR PerceivedTypeKey[] = {'P','e','r','c','e','i','v','e','d','T','y','p','e',0}; static const WCHAR SystemFileAssociationsKey[] = {'S','y','s','t','e','m','F','i','l','e', 'A','s','s','o','c','i','a','t','i','o','n','s','\\','%','s',0}; @@ -355,8 +349,6 @@ HRESULT WINAPI AssocGetPerceivedType(LPCWSTR lpszExt, PERCEIVED *lpType, *lpFlag = 0; } return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND); - -#endif } /************************************************************************* diff --git a/dll/win32/shlwapi/clist.c b/dll/win32/shlwapi/clist.c index 52c5f6107f..77917b3546 100644 --- a/dll/win32/shlwapi/clist.c +++ b/dll/win32/shlwapi/clist.c @@ -17,8 +17,19 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include <stdarg.h> +#include <string.h> -#include "precomp.h" +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "objbase.h" +#include "shlobj.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); /* dwSignature for contained DATABLOCK_HEADER items */ #define CLIST_ID_CONTAINER (~0U) @@ -45,13 +56,8 @@ static inline LPDATABLOCK_HEADER NextItem(LPDBLIST lpList) * lpNewItem [I] The new item to add to the list * * RETURNS -#ifndef __REACTOS__ * Success: S_OK. The item is added to the list. * Failure: An HRESULT error code. -#else - * Success: TRUE. The item is added to the list. - * Failure: FALSE. -#endif * * NOTES * If the size of the element to be inserted is less than the size of a @@ -59,32 +65,19 @@ static inline LPDATABLOCK_HEADER NextItem(LPDBLIST lpList) * the call returns S_OK but does not actually add the element. * See SHWriteDataBlockList. */ -#ifndef __REACTOS__ -HRESULT -#else -BOOL -#endif -WINAPI SHAddDataBlock(LPDBLIST* lppList, const DATABLOCK_HEADER *lpNewItem) +BOOL WINAPI SHAddDataBlock(LPDBLIST* lppList, const DATABLOCK_HEADER *lpNewItem) { LPDATABLOCK_HEADER lpInsertAt = NULL; ULONG ulSize; TRACE("(%p,%p)\n", lppList, lpNewItem); - if(!lppList || !lpNewItem ) -#ifndef __REACTOS__ - return E_INVALIDARG; -#else + if(!lppList || !lpNewItem) return FALSE; -#endif if (lpNewItem->cbSize < sizeof(DATABLOCK_HEADER) || lpNewItem->dwSignature == CLIST_ID_CONTAINER) -#ifndef __REACTOS__ - return S_OK; -#else return FALSE; -#endif ulSize = lpNewItem->cbSize; @@ -141,17 +134,9 @@ WINAPI SHAddDataBlock(LPDBLIST* lppList, const DATABLOCK_HEADER *lpNewItem) lpInsertAt = NextItem(lpInsertAt); lpInsertAt->cbSize = 0; -#ifndef __REACTOS__ - return lpNewItem->cbSize; -#else return TRUE; -#endif } -#ifndef __REACTOS__ - return S_OK; -#else return FALSE; -#endif } /************************************************************************* @@ -369,11 +354,7 @@ VOID WINAPI SHFreeDataBlockList(LPDBLIST lpList) */ BOOL WINAPI SHRemoveDataBlock(LPDBLIST* lppList, DWORD dwSignature) { -#ifndef __REACTOS__ - LPDATABLOCK_HEADER lpList = 0; -#else LPDATABLOCK_HEADER lpList = NULL; -#endif LPDATABLOCK_HEADER lpItem = NULL; LPDATABLOCK_HEADER lpNext; ULONG ulNewSize; diff --git a/dll/win32/shlwapi/istream.c b/dll/win32/shlwapi/istream.c index d11a5f12d7..946d2c84b6 100644 --- a/dll/win32/shlwapi/istream.c +++ b/dll/win32/shlwapi/istream.c @@ -17,8 +17,22 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ - -#include "precomp.h" +#include <stdarg.h> +#include <string.h> + +#define COBJMACROS +#define NONAMELESSUNION + +#include "windef.h" +#include "winbase.h" +#include "winerror.h" +#include "winnls.h" +#define NO_SHLWAPI_REG +#define NO_SHLWAPI_PATH +#include "shlwapi.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); #define STGM_ACCESS_MODE(stgm) ((stgm)&0x0000f) #define STGM_SHARE_MODE(stgm) ((stgm)&0x000f0) diff --git a/dll/win32/shlwapi/msgbox.c b/dll/win32/shlwapi/msgbox.c index 31f53f9479..90bbb592bf 100644 --- a/dll/win32/shlwapi/msgbox.c +++ b/dll/win32/shlwapi/msgbox.c @@ -18,7 +18,23 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" +#include "config.h" +#include "wine/port.h" + +#include <stdarg.h> +#include <string.h> + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "winreg.h" +#include "shlwapi.h" +#include "wine/unicode.h" +#include "wine/debug.h" +#include "resource.h" + + +WINE_DEFAULT_DEBUG_CHANNEL(shell); extern HINSTANCE shlwapi_hInstance; /* in shlwapi_main.c */ diff --git a/dll/win32/shlwapi/ordinal.c b/dll/win32/shlwapi/ordinal.c index 61e8804d50..9adf962ed2 100644 --- a/dll/win32/shlwapi/ordinal.c +++ b/dll/win32/shlwapi/ordinal.c @@ -20,18 +20,38 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" +#include "config.h" +#include "wine/port.h" +#include <stdarg.h> #include <stdio.h> - -#include <winver.h> -#include <winnetwk.h> -#include <mmsystem.h> -#include <shdeprecated.h> -#include <shellapi.h> -#include <commdlg.h> -#include <mlang.h> -#include <mshtmhst.h> +#include <string.h> + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "winnls.h" +#include "winreg.h" +#include "wingdi.h" +#include "winuser.h" +#include "winver.h" +#include "winnetwk.h" +#include "mmsystem.h" +#include "objbase.h" +#include "exdisp.h" +#include "shdeprecated.h" +#include "shlobj.h" +#include "shlwapi.h" +#include "shellapi.h" +#include "commdlg.h" +#include "mlang.h" +#include "mshtmhst.h" +#include "wine/unicode.h" +#include "wine/debug.h" + + +WINE_DEFAULT_DEBUG_CHANNEL(shell); /* DLL handles for late bound calls */ extern HINSTANCE shlwapi_hInstance; @@ -78,6 +98,12 @@ HANDLE WINAPI SHMapHandle(HANDLE hShared, DWORD dwSrcProcId, DWORD dwDstProcId, TRACE("(%p,%d,%d,%08x,%08x)\n", hShared, dwDstProcId, dwSrcProcId, dwAccess, dwOptions); + if (!hShared) + { + TRACE("Returning handle NULL\n"); + return NULL; + } + /* Get dest process handle */ if (dwDstProcId == dwMyProcId) hDst = GetCurrentProcess(); diff --git a/dll/win32/shlwapi/path.c b/dll/win32/shlwapi/path.c index 94472580d9..f3149f35e5 100644 --- a/dll/win32/shlwapi/path.c +++ b/dll/win32/shlwapi/path.c @@ -19,7 +19,25 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" +#include "config.h" +#include "wine/port.h" + +#include <stdarg.h> +#include <string.h> +#include <stdlib.h> + +#include "wine/unicode.h" +#include "windef.h" +#include "winbase.h" +#include "wingdi.h" +#include "winuser.h" +#include "winreg.h" +#include "winternl.h" +#define NO_SHLWAPI_STREAM +#include "shlwapi.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); #ifdef __REACTOS__ int WINAPI IsNetDrive(int drive); diff --git a/dll/win32/shlwapi/precomp.h b/dll/win32/shlwapi/precomp.h index 90d50f72a6..eff450aa86 100644 --- a/dll/win32/shlwapi/precomp.h +++ b/dll/win32/shlwapi/precomp.h @@ -1,3 +1,4 @@ + #ifndef _SHLWAPI_PCH_ #define _SHLWAPI_PCH_ @@ -29,6 +30,4 @@ #include "resource.h" -WINE_DEFAULT_DEBUG_CHANNEL(shell); - -#endif /* _SHLWAPI_PCH_ */ +#endif /* !_SHLWAPI_PCH_ */ diff --git a/dll/win32/shlwapi/reg.c b/dll/win32/shlwapi/reg.c index 74c1ab8c3c..a72f4c24e4 100644 --- a/dll/win32/shlwapi/reg.c +++ b/dll/win32/shlwapi/reg.c @@ -19,7 +19,18 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" +#include <stdarg.h> +#include <string.h> +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "winreg.h" +#include "wine/debug.h" +#define NO_SHLWAPI_STREAM +#include "shlwapi.h" +#include "wine/unicode.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); /* Key/Value names for MIME content types */ static const char lpszContentTypeA[] = "Content Type"; diff --git a/dll/win32/shlwapi/regstream.c b/dll/win32/shlwapi/regstream.c index 4aebab7480..63615d3d9c 100644 --- a/dll/win32/shlwapi/regstream.c +++ b/dll/win32/shlwapi/regstream.c @@ -19,7 +19,21 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" +#include <stdarg.h> +#include <string.h> + +#define COBJMACROS + +#include "winerror.h" +#include "windef.h" +#include "winbase.h" +#include "objbase.h" +#include "winreg.h" +#include "shlwapi.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); typedef struct { diff --git a/dll/win32/shlwapi/resource.h b/dll/win32/shlwapi/resource.h index 2cc17a886e..a9af2bad62 100644 --- a/dll/win32/shlwapi/resource.h +++ b/dll/win32/shlwapi/resource.h @@ -17,10 +17,12 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ - #ifndef WINE_SHLWAPI_RESOURCE_H #define WINE_SHLWAPI_RESOURCE_H +#include <windef.h> +#include <winuser.h> + #define IDS_BYTES_FORMAT 64 #define IDS_TIME_INTERVAL_HOURS 65 #define IDS_TIME_INTERVAL_MINUTES 66 diff --git a/dll/win32/shlwapi/shlwapi_main.c b/dll/win32/shlwapi/shlwapi_main.c index bf4cf72e30..f466bb485a 100644 --- a/dll/win32/shlwapi/shlwapi_main.c +++ b/dll/win32/shlwapi/shlwapi_main.c @@ -19,7 +19,16 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" +#include <stdarg.h> + +#include "windef.h" +#include "winbase.h" +#define NO_SHLWAPI_REG +#define NO_SHLWAPI_STREAM +#include "shlwapi.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); DECLSPEC_HIDDEN HINSTANCE shlwapi_hInstance = 0; DECLSPEC_HIDDEN DWORD SHLWAPI_ThreadRef_index = TLS_OUT_OF_INDEXES; diff --git a/dll/win32/shlwapi/stopwatch.c b/dll/win32/shlwapi/stopwatch.c index 60dc1a6688..fcee075fca 100644 --- a/dll/win32/shlwapi/stopwatch.c +++ b/dll/win32/shlwapi/stopwatch.c @@ -23,7 +23,22 @@ * B) Want to use a substandard API to tune its performance. */ -#include "precomp.h" +#include "config.h" +#include "wine/port.h" + +#include <stdarg.h> +#include <string.h> +#include <stdlib.h> + +#define NONAMELESSUNION + +#include "windef.h" +#include "winbase.h" +#include "winreg.h" +#include "winternl.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); /************************************************************************* * @ [SHLWAPI.241] diff --git a/dll/win32/shlwapi/string.c b/dll/win32/shlwapi/string.c index 64a7571961..0b34d43624 100644 --- a/dll/win32/shlwapi/string.c +++ b/dll/win32/shlwapi/string.c @@ -19,11 +19,32 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" +#include "config.h" +#include "wine/port.h" #include <math.h> -#include <mlang.h> -#include <ddeml.h> +#include <stdarg.h> +#include <stdio.h> +#include <string.h> + +#define NONAMELESSUNION + +#include "windef.h" +#include "winbase.h" +#define NO_SHLWAPI_REG +#define NO_SHLWAPI_STREAM +#include "shlwapi.h" +#include "wingdi.h" +#include "winuser.h" +#include "shlobj.h" +#include "mlang.h" +#include "ddeml.h" +#include "wine/unicode.h" +#include "wine/debug.h" + +#include "resource.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); extern HINSTANCE shlwapi_hInstance; diff --git a/dll/win32/shlwapi/thread.c b/dll/win32/shlwapi/thread.c index 4fd0d46cd9..eb2c35d6dc 100644 --- a/dll/win32/shlwapi/thread.c +++ b/dll/win32/shlwapi/thread.c @@ -18,8 +18,25 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ - -#include "precomp.h" +#include <stdarg.h> +#include <string.h> + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "winnls.h" +#include "winuser.h" +#define NO_SHLWAPI_REG +#define NO_SHLWAPI_PATH +#define NO_SHLWAPI_GDI +#define NO_SHLWAPI_STREAM +#define NO_SHLWAPI_USER +#include "shlwapi.h" +#include "shlobj.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shell); extern DWORD SHLWAPI_ThreadRef_index; /* Initialised in shlwapi_main.c */ diff --git a/dll/win32/shlwapi/url.c b/dll/win32/shlwapi/url.c index ed34aa73a5..c858ebde69 100644 --- a/dll/win32/shlwapi/url.c +++ b/dll/win32/shlwapi/url.c @@ -18,15 +18,30 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" - -#include <wininet.h> -#include <intshcut.h> +#include "config.h" +#include "wine/port.h" +#include <stdarg.h> +#include <string.h> +#include <stdlib.h> +#include "windef.h" +#include "winbase.h" +#include "winnls.h" +#include "winerror.h" +#include "wine/unicode.h" +#include "wininet.h" +#include "winreg.h" +#include "winternl.h" +#define NO_SHLWAPI_STREAM +#include "shlwapi.h" +#include "intshcut.h" +#include "wine/debug.h" HMODULE WINAPI MLLoadLibraryW(LPCWSTR,HMODULE,DWORD); BOOL WINAPI MLFreeLibrary(HMODULE); HRESULT WINAPI MLBuildResURLW(LPCWSTR,HMODULE,DWORD,LPCWSTR,LPWSTR,DWORD); +WINE_DEFAULT_DEBUG_CHANNEL(shell); + static inline WCHAR *heap_strdupAtoW(const char *str) { LPWSTR ret = NULL; @@ -902,7 +917,10 @@ HRESULT WINAPI UrlCombineW(LPCWSTR pszBase, LPCWSTR pszRelative, work = preliminary + base.cchProtocol+1+base.cchSuffix - 1; if (*work++ != '/') *(work++) = '/'; - strcpyW(work, relative.pszSuffix); + if (relative.pszSuffix[0] == '.' && relative.pszSuffix[1] == 0) + *work = 0; + else + strcpyW(work, relative.pszSuffix); break; default: diff --git a/dll/win32/shlwapi/wsprintf.c b/dll/win32/shlwapi/wsprintf.c index 34c7a4df8f..6a36b6a28e 100644 --- a/dll/win32/shlwapi/wsprintf.c +++ b/dll/win32/shlwapi/wsprintf.c @@ -22,8 +22,16 @@ * to change it in user32 too. */ -#define WIN32_NO_STATUS -#include <wine/debug.h> +#include <stdarg.h> +#include <string.h> +#include <stdio.h> + +#include "windef.h" +#include "winbase.h" +#define NO_SHLWAPI_REG +#include "shlwapi.h" + +#include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(string); diff --git a/media/doc/README.WINE b/media/doc/README.WINE index d31a67f70f..3c8bf8dd87 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -174,7 +174,7 @@ reactos/dll/win32/shdoclc # Synced to WineStaging-2.9 reactos/dll/win32/shdocvw # Synced to Wine-3.0 reactos/dll/win32/shell32 # Forked at Wine-20071011 reactos/dll/win32/shfolder # Synced to WineStaging-2.9 -reactos/dll/win32/shlwapi # Synced to Wine-3.0 +reactos/dll/win32/shlwapi # Synced to WineStaging-3.3 reactos/dll/win32/slbcsp # Synced to WineStaging-2.9 reactos/dll/win32/snmpapi # Synced to WineStaging-2.9 reactos/dll/win32/softpub # Synced to WineStaging-2.9
6 years, 9 months
1
0
0
0
01/01: [OLEAUT32_WINETEST] Sync with Wine Staging 3.3. CORE-14434
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9d1dc9bee956672e79d86…
commit 9d1dc9bee956672e79d86e2867e7ef520fdabba8 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Sun Mar 4 13:15:59 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Sun Mar 4 13:15:59 2018 +0100 [OLEAUT32_WINETEST] Sync with Wine Staging 3.3. CORE-14434 --- modules/rostests/winetests/oleaut32/dispatch.c | 8 +- modules/rostests/winetests/oleaut32/olefont.c | 20 ++- modules/rostests/winetests/oleaut32/olepicture.c | 183 +++++++++++++++++++++-- modules/rostests/winetests/oleaut32/precomp.h | 2 + modules/rostests/winetests/oleaut32/safearray.c | 137 ++++++++--------- modules/rostests/winetests/oleaut32/tmarshal.c | 86 ++++++++++- modules/rostests/winetests/oleaut32/tmarshal.rc | 10 +- modules/rostests/winetests/oleaut32/typelib.c | 176 +++++++++++++--------- modules/rostests/winetests/oleaut32/usrmarshal.c | 12 +- modules/rostests/winetests/oleaut32/varformat.c | 18 ++- modules/rostests/winetests/oleaut32/vartest.c | 21 ++- modules/rostests/winetests/oleaut32/vartype.c | 12 +- 12 files changed, 510 insertions(+), 175 deletions(-) diff --git a/modules/rostests/winetests/oleaut32/dispatch.c b/modules/rostests/winetests/oleaut32/dispatch.c index 722488da31..ff63a7d592 100644 --- a/modules/rostests/winetests/oleaut32/dispatch.c +++ b/modules/rostests/winetests/oleaut32/dispatch.c @@ -18,7 +18,13 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" +#define COBJMACROS +#define CONST_VTABLE + +#include <wine/test.h> +#include <windef.h> +#include <winbase.h> +#include <oaidl.h> static const WCHAR szSunshine[] = {'S','u','n','s','h','i','n','e',0}; diff --git a/modules/rostests/winetests/oleaut32/olefont.c b/modules/rostests/winetests/oleaut32/olefont.c index 9763271208..f9c5625701 100644 --- a/modules/rostests/winetests/oleaut32/olefont.c +++ b/modules/rostests/winetests/oleaut32/olefont.c @@ -20,7 +20,25 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" +#include <stdarg.h> +#include <stdio.h> +#include <math.h> +#include <float.h> + +#define COBJMACROS + +#include <wine/test.h> +#include <windef.h> +#include <winbase.h> +#include <winuser.h> +#include <wingdi.h> +#include <winnls.h> +#include <winerror.h> +#include <winnt.h> +#include <initguid.h> +#include <wtypes.h> +#include <olectl.h> +#include <ocidl.h> DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0); diff --git a/modules/rostests/winetests/oleaut32/olepicture.c b/modules/rostests/winetests/oleaut32/olepicture.c index 149dfc357f..0b5db1d923 100644 --- a/modules/rostests/winetests/oleaut32/olepicture.c +++ b/modules/rostests/winetests/oleaut32/olepicture.c @@ -19,7 +19,28 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" +#include <stdarg.h> +#include <stdio.h> +#include <math.h> +#include <float.h> + +#define COBJMACROS +#define CONST_VTABLE +#define NONAMELESSUNION + +#include "wine/test.h" +#include <windef.h> +#include <winbase.h> +#include <winuser.h> +#include <wingdi.h> +#include <winnls.h> +#include <winerror.h> +#include <winnt.h> + +#include <urlmon.h> +#include <wtypes.h> +#include <olectl.h> +#include <objidl.h> #define expect_eq(expr, value, type, format) { type ret = (expr); ok((value) == ret, #expr " expected " format " got " format "\n", value, ret); } @@ -77,7 +98,7 @@ static const unsigned char pngimage[285] = { 0xe7,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82 }; -/* 1x1 pixel bmp */ +/* 1bpp BI_RGB 1x1 pixel bmp */ static const unsigned char bmpimage[66] = { 0x42,0x4d,0x42,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x28,0x00, 0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00, @@ -86,6 +107,15 @@ static const unsigned char bmpimage[66] = { 0x00,0x00 }; +/* 8bpp BI_RLE8 1x1 pixel bmp */ +static const unsigned char bmpimage_rle8[] = { +0x42,0x4d,0x42,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x28,0x00, +0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x08,0x00,0x01,0x00, +0x00,0x00,0x04,0x00,0x00,0x00,0x12,0x0b,0x00,0x00,0x12,0x0b,0x00,0x00,0x02,0x00, +0x00,0x00,0x02,0x00,0x00,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0x00,0x01, +0x00,0x00 +}; + /* 2x2 pixel gif */ static const unsigned char gif4pixel[42] = { 0x47,0x49,0x46,0x38,0x37,0x61,0x02,0x00,0x02,0x00,0xa1,0x00,0x00,0x00,0x00,0x00, @@ -219,7 +249,7 @@ test_pic_with_stream(LPSTREAM stream, unsigned int imgsize) { BITMAP bmp; GetObjectA(UlongToHandle(handle), sizeof(BITMAP), &bmp); - todo_wine ok(bmp.bmBits != 0, "not a dib\n"); + ok(bmp.bmBits != 0, "not a dib\n"); } width = 0; @@ -847,6 +877,7 @@ static void test_OleLoadPicturePath(void) HANDLE file; DWORD size; WCHAR *ptr; + VARIANT var; const struct { @@ -913,6 +944,14 @@ static void test_OleLoadPicturePath(void) if (pic) IPicture_Release(pic); + VariantInit(&var); + V_VT(&var) = VT_BSTR; + V_BSTR(&var) = SysAllocString(temp_fileW + 8); + hres = OleLoadPictureFile(var, (IDispatch **)&pic); + ok(hres == S_OK, "OleLoadPictureFile error %#x\n", hres); + IPicture_Release(pic); + VariantClear(&var); + /* Try a DOS path with tacked on "file:". */ hres = OleLoadPicturePath(temp_fileW, NULL, 0, 0, &IID_IPicture, (void **)&pic); ok(hres == S_OK || @@ -921,6 +960,13 @@ static void test_OleLoadPicturePath(void) if (pic) IPicture_Release(pic); + VariantInit(&var); + V_VT(&var) = VT_BSTR; + V_BSTR(&var) = SysAllocString(temp_fileW); + hres = OleLoadPictureFile(var, (IDispatch **)&pic); + ok(hres == CTL_E_PATHFILEACCESSERROR, "wrong error %#x\n", hres); + VariantClear(&var); + DeleteFileA(temp_file); /* Try with a nonexistent file. */ @@ -930,12 +976,26 @@ static void test_OleLoadPicturePath(void) broken(hres == E_FAIL), /*Win2k */ "Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08x\n", hres); + VariantInit(&var); + V_VT(&var) = VT_BSTR; + V_BSTR(&var) = SysAllocString(temp_fileW + 8); + hres = OleLoadPictureFile(var, (IDispatch **)&pic); + ok(hres == CTL_E_FILENOTFOUND, "wrong error %#x\n", hres); + VariantClear(&var); + hres = OleLoadPicturePath(temp_fileW, NULL, 0, 0, &IID_IPicture, (void **)&pic); ok(hres == INET_E_RESOURCE_NOT_FOUND || /* XP+ */ broken(hres == E_UNEXPECTED) || /* NT4 */ broken(hres == E_FAIL), /* Win2k */ "Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08x\n", hres); + VariantInit(&var); + V_VT(&var) = VT_BSTR; + V_BSTR(&var) = SysAllocString(temp_fileW); + hres = OleLoadPictureFile(var, (IDispatch **)&pic); + ok(hres == CTL_E_PATHFILEACCESSERROR, "wrong error %#x\n", hres); + VariantClear(&var); + file = CreateFileA(temp_file, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); WriteFile(file, bmpimage, sizeof(bmpimage), &size, NULL); @@ -957,6 +1017,13 @@ static void test_OleLoadPicturePath(void) if (pic) IPicture_Release(pic); + VariantInit(&var); + V_VT(&var) = VT_BSTR; + V_BSTR(&var) = SysAllocString(temp_fileW); + hres = OleLoadPictureFile(var, (IDispatch **)&pic); + ok(hres == CTL_E_PATHFILEACCESSERROR, "wrong error %#x\n", hres); + VariantClear(&var); + DeleteFileA(temp_file); /* Try with a nonexistent file. */ @@ -965,6 +1032,22 @@ static void test_OleLoadPicturePath(void) broken(hres == E_UNEXPECTED) || /* NT4 */ broken(hres == E_FAIL), /* Win2k */ "Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08x\n", hres); + + VariantInit(&var); + V_VT(&var) = VT_BSTR; + V_BSTR(&var) = SysAllocString(temp_fileW); + hres = OleLoadPictureFile(var, (IDispatch **)&pic); + ok(hres == CTL_E_PATHFILEACCESSERROR, "wrong error %#x\n", hres); + VariantClear(&var); + + VariantInit(&var); + V_VT(&var) = VT_INT; + V_INT(&var) = 762; + hres = OleLoadPictureFile(var, (IDispatch **)&pic); + ok(hres == CTL_E_FILENOTFOUND, "wrong error %#x\n", hres); + +if (0) /* crashes under Windows */ + hres = OleLoadPictureFile(var, NULL); } static void test_himetric(void) @@ -1076,18 +1159,14 @@ static void test_load_save_bmp(void) size = -1; hr = IPicture_SaveAsFile(pic, dst_stream, TRUE, &size); ok(hr == S_OK, "IPicture_SaveasFile error %#x\n", hr); -todo_wine ok(size == 66, "expected 66, got %d\n", size); mem = GlobalLock(hmem); -todo_wine ok(!memcmp(&mem[0], "BM", 2), "got wrong bmp header %04x\n", mem[0]); GlobalUnlock(hmem); size = -1; hr = IPicture_SaveAsFile(pic, dst_stream, FALSE, &size); -todo_wine ok(hr == E_FAIL, "expected E_FAIL, got %#x\n", hr); -todo_wine ok(size == -1, "expected -1, got %d\n", size); offset.QuadPart = 0; @@ -1154,15 +1233,12 @@ static void test_load_save_icon(void) todo_wine ok(size == 766, "expected 766, got %d\n", size); mem = GlobalLock(hmem); -todo_wine ok(mem[0] == 0x00010000, "got wrong icon header %04x\n", mem[0]); GlobalUnlock(hmem); size = -1; hr = IPicture_SaveAsFile(pic, dst_stream, FALSE, &size); -todo_wine ok(hr == E_FAIL, "expected E_FAIL, got %#x\n", hr); -todo_wine ok(size == -1, "expected -1, got %d\n", size); offset.QuadPart = 0; @@ -1228,13 +1304,11 @@ static void test_load_save_empty_picture(void) size = -1; hr = IPicture_SaveAsFile(pic, dst_stream, TRUE, &size); ok(hr == S_OK, "IPicture_SaveasFile error %#x\n", hr); -todo_wine ok(size == -1, "expected -1, got %d\n", size); size = -1; hr = IPicture_SaveAsFile(pic, dst_stream, FALSE, &size); ok(hr == S_OK, "IPicture_SaveasFile error %#x\n", hr); -todo_wine ok(size == -1, "expected -1, got %d\n", size); hr = IPicture_QueryInterface(pic, &IID_IPersistStream, (void **)&src_stream); @@ -1302,6 +1376,89 @@ todo_wine IStream_Release(stream); } +static void test_load_save_emf(void) +{ + HDC hdc; + IPicture *pic; + PICTDESC desc; + short type; + OLE_HANDLE handle; + HGLOBAL hmem; + DWORD *mem; + ENHMETAHEADER *emh; + IPersistStream *src_stream; + IStream *dst_stream; + LARGE_INTEGER offset; + HRESULT hr; + LONG size; + + hdc = CreateEnhMetaFileA(0, NULL, NULL, NULL); + ok(hdc != 0, "CreateEnhMetaFileA failed\n"); + + desc.cbSizeofstruct = sizeof(desc); + desc.picType = PICTYPE_ENHMETAFILE; + desc.emf.hemf = CloseEnhMetaFile(hdc); + ok(desc.emf.hemf != 0, "CloseEnhMetaFile failed\n"); + hr = OleCreatePictureIndirect(&desc, &IID_IPicture, FALSE, (void**)&pic); + ok(hr == S_OK, "OleCreatePictureIndirect error %#x\n", hr); + + type = -1; + hr = IPicture_get_Type(pic, &type); + ok(hr == S_OK,"get_Type error %#8x\n", hr); + ok(type == PICTYPE_ENHMETAFILE,"expected PICTYPE_ENHMETAFILE, got %d\n", type); + + hr = IPicture_get_Handle(pic, &handle); + ok(hr == S_OK,"get_Handle error %#8x\n", hr); + ok(IntToPtr(handle) == desc.emf.hemf, "get_Handle returned wrong handle %#x\n", handle); + + hmem = GlobalAlloc(GMEM_MOVEABLE, 0); + hr = CreateStreamOnHGlobal(hmem, FALSE, &dst_stream); + ok(hr == S_OK, "createstreamonhglobal error %#x\n", hr); + + size = -1; + hr = IPicture_SaveAsFile(pic, dst_stream, TRUE, &size); + ok(hr == S_OK, "IPicture_SaveasFile error %#x\n", hr); + ok(size == 128, "expected 128, got %d\n", size); + emh = GlobalLock(hmem); +if (size) +{ + ok(emh->iType == EMR_HEADER, "wrong iType %04x\n", emh->iType); + ok(emh->dSignature == ENHMETA_SIGNATURE, "wrong dSignature %08x\n", emh->dSignature); +} + GlobalUnlock(hmem); + + size = -1; + hr = IPicture_SaveAsFile(pic, dst_stream, FALSE, &size); + ok(hr == E_FAIL, "expected E_FAIL, got %#x\n", hr); + ok(size == -1, "expected -1, got %d\n", size); + + offset.QuadPart = 0; + hr = IStream_Seek(dst_stream, offset, SEEK_SET, NULL); + ok(hr == S_OK, "IStream_Seek %#x\n", hr); + + hr = IPicture_QueryInterface(pic, &IID_IPersistStream, (void **)&src_stream); + ok(hr == S_OK, "QueryInterface error %#x\n", hr); + + hr = IPersistStream_Save(src_stream, dst_stream, TRUE); + ok(hr == S_OK, "Save error %#x\n", hr); + + IPersistStream_Release(src_stream); + IStream_Release(dst_stream); + + mem = GlobalLock(hmem); + ok(!memcmp(mem, "lt\0\0", 4), "got wrong stream header %04x\n", mem[0]); + ok(mem[1] == 128, "expected 128, got %u\n", mem[1]); + emh = (ENHMETAHEADER *)(mem + 2); + ok(emh->iType == EMR_HEADER, "wrong iType %04x\n", emh->iType); + ok(emh->dSignature == ENHMETA_SIGNATURE, "wrong dSignature %08x\n", emh->dSignature); + + GlobalUnlock(hmem); + GlobalFree(hmem); + + DeleteEnhMetaFile(desc.emf.hemf); + IPicture_Release(pic); +} + START_TEST(olepicture) { hOleaut32 = GetModuleHandleA("oleaut32.dll"); @@ -1317,6 +1474,7 @@ START_TEST(olepicture) test_pic(gifimage, sizeof(gifimage)); test_pic(jpgimage, sizeof(jpgimage)); test_pic(bmpimage, sizeof(bmpimage)); + test_pic(bmpimage_rle8, sizeof(bmpimage_rle8)); test_pic(gif4pixel, sizeof(gif4pixel)); /* FIXME: No PNG support in Windows... */ if (0) test_pic(pngimage, sizeof(pngimage)); @@ -1341,6 +1499,7 @@ START_TEST(olepicture) test_load_save_bmp(); test_load_save_icon(); test_load_save_empty_picture(); + test_load_save_emf(); } diff --git a/modules/rostests/winetests/oleaut32/precomp.h b/modules/rostests/winetests/oleaut32/precomp.h index eb417ca71f..6455f83a1c 100644 --- a/modules/rostests/winetests/oleaut32/precomp.h +++ b/modules/rostests/winetests/oleaut32/precomp.h @@ -1,3 +1,4 @@ + #ifndef _OLEAUT32_WINETEST_PRECOMP_H_ #define _OLEAUT32_WINETEST_PRECOMP_H_ @@ -13,6 +14,7 @@ #include <wine/test.h> +#include <winreg.h> #include <winnls.h> #include <wingdi.h> #include <ole2.h> diff --git a/modules/rostests/winetests/oleaut32/safearray.c b/modules/rostests/winetests/oleaut32/safearray.c index 06dbb269a6..5ff29b3c3e 100644 --- a/modules/rostests/winetests/oleaut32/safearray.c +++ b/modules/rostests/winetests/oleaut32/safearray.c @@ -19,7 +19,25 @@ * */ -#include "precomp.h" +#include <stdarg.h> +#include <stdio.h> +#include <math.h> +#include <float.h> + +#define COBJMACROS +#define CONST_VTABLE +#include "wine/test.h" +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "wingdi.h" +#include "winnls.h" +#include "winsock2.h" +#include "winerror.h" +#include "winnt.h" + +#include "wtypes.h" +#include "oleauto.h" #ifndef FADF_CREATEVECTOR const USHORT FADF_CREATEVECTOR = 0x2000; @@ -29,8 +47,6 @@ static HMODULE hOleaut32; static HRESULT (WINAPI *pSafeArrayAllocDescriptorEx)(VARTYPE,UINT,SAFEARRAY**); static HRESULT (WINAPI *pSafeArrayCopyData)(SAFEARRAY*,SAFEARRAY*); -static HRESULT (WINAPI *pSafeArrayGetIID)(SAFEARRAY*,GUID*); -static HRESULT (WINAPI *pSafeArraySetIID)(SAFEARRAY*,REFGUID); static HRESULT (WINAPI *pSafeArrayGetVartype)(SAFEARRAY*,VARTYPE*); static HRESULT (WINAPI *pSafeArrayGetRecordInfo)(SAFEARRAY*,IRecordInfo**); static SAFEARRAY* (WINAPI *pSafeArrayCreateEx)(VARTYPE,UINT,SAFEARRAYBOUND*,LPVOID); @@ -668,24 +684,22 @@ static void test_safearray(void) hres = SafeArrayDestroyDescriptor(a); ok(hres == S_OK,"SADD with data in array failed with hres %x\n",hres); - /* IID functions */ - /* init a small stack safearray */ - if (pSafeArraySetIID) { - memset(&b, 0, sizeof(b)); - b.cDims = 1; - memset(&iid, 0x42, sizeof(IID)); - hres = pSafeArraySetIID(&b,&iid); - ok(hres == E_INVALIDARG,"SafeArraySetIID of non IID capable safearray did not return E_INVALIDARG, but %x\n",hres); - - hres = SafeArrayAllocDescriptor(1,&a); - ok(hres == S_OK,"SafeArrayAllocDescriptor should return S_OK, but got %x\n",hres); - ok((a->fFeatures & FADF_HAVEIID) == 0,"newly allocated descriptor with SAAD should not have FADF_HAVEIID\n"); - hres = pSafeArraySetIID(a,&iid); - ok(hres == E_INVALIDARG,"SafeArraySetIID of newly allocated descriptor with SAAD should return E_INVALIDARG, but got %x\n",hres); - - hres = SafeArrayDestroyDescriptor(a); - ok(hres == S_OK,"SADD failed with hres %x\n",hres); - } + /* IID functions */ + /* init a small stack safearray */ + memset(&b, 0, sizeof(b)); + b.cDims = 1; + memset(&iid, 0x42, sizeof(IID)); + hres = SafeArraySetIID(&b, &iid); + ok(hres == E_INVALIDARG, "Unexpected ret value %#x.\n", hres); + + hres = SafeArrayAllocDescriptor(1, &a); + ok(hres == S_OK, "Failed to allocate array descriptor, hr %#x.\n", hres); + ok((a->fFeatures & FADF_HAVEIID) == 0, "Unexpected features mask %#x.\n", a->fFeatures); + hres = SafeArraySetIID(a, &iid); + ok(hres == E_INVALIDARG, "Unexpected ret value %#x.\n", hres); + + hres = SafeArrayDestroyDescriptor(a); + ok(hres == S_OK,"SADD failed with hres %x\n",hres); if (!pSafeArrayAllocDescriptorEx) return; @@ -696,7 +710,7 @@ static void test_safearray(void) ok(hres == S_OK, "SafeArrayAllocDescriptorEx gave hres 0x%x\n", hres); ok(a->fFeatures == vttypes[i].expflags,"SAADE(%d) resulted with flags %x, expected %x\n", vttypes[i].vt, a->fFeatures, vttypes[i].expflags); if (a->fFeatures & FADF_HAVEIID) { - hres = pSafeArrayGetIID(a, &iid); + hres = SafeArrayGetIID(a, &iid); ok(hres == S_OK,"SAGIID failed for vt %d with hres %x\n", vttypes[i].vt,hres); switch (vttypes[i].vt) { case VT_UNKNOWN: @@ -712,7 +726,7 @@ static void test_safearray(void) break; } } else { - hres = pSafeArrayGetIID(a, &iid); + hres = SafeArrayGetIID(a, &iid); ok(hres == E_INVALIDARG,"SAGIID did not fail for vt %d with hres %x\n", vttypes[i].vt,hres); } if (a->fFeatures & FADF_RECORD) { @@ -733,13 +747,13 @@ static void test_safearray(void) } if (a->fFeatures & FADF_HAVEIID) { - hres = pSafeArraySetIID(a, &IID_IStorage); /* random IID */ + hres = SafeArraySetIID(a, &IID_IStorage); /* random IID */ ok(hres == S_OK,"SASIID failed with FADF_HAVEIID set for vt %d with %x\n", vttypes[i].vt, hres); - hres = pSafeArrayGetIID(a, &iid); + hres = SafeArrayGetIID(a, &iid); ok(hres == S_OK,"SAGIID failed with FADF_HAVEIID set for vt %d with %x\n", vttypes[i].vt, hres); ok(IsEqualGUID(&iid, &IID_IStorage),"returned iid is not IID_IStorage\n"); } else { - hres = pSafeArraySetIID(a, &IID_IStorage); /* random IID */ + hres = SafeArraySetIID(a, &IID_IStorage); /* random IID */ ok(hres == E_INVALIDARG,"SASIID did not failed with !FADF_HAVEIID set for vt %d with %x\n", vttypes[i].vt, hres); } hres = SafeArrayDestroyDescriptor(a); @@ -867,12 +881,8 @@ static void test_SafeArrayCreateLockDestroy(void) { ok((sa->fFeatures & FADF_HAVEIID) == 0, "Non interface type should not have FADF_HAVEIID\n"); - if (pSafeArraySetIID) - { - hres = pSafeArraySetIID(sa, &IID_IUnknown); - ok(hres == E_INVALIDARG, - "Non interface type allowed SetIID(), hres %x\n", hres); - } + hres = SafeArraySetIID(sa, &IID_IUnknown); + ok(hres == E_INVALIDARG, "Unexpected ret value %#x.\n", hres); if (vt != VT_RECORD) { VARTYPE aVt; @@ -890,12 +900,8 @@ static void test_SafeArrayCreateLockDestroy(void) else { ok(sa->fFeatures & FADF_HAVEIID, "Interface type should have FADF_HAVEIID\n"); - if (pSafeArraySetIID) - { - hres = pSafeArraySetIID(sa, &IID_IUnknown); - ok(hres == S_OK, - "Non interface type disallowed SetIID(), hres %x\n", hres); - } + hres = SafeArraySetIID(sa, &IID_IUnknown); + ok(hres == S_OK, "Failed to set array IID, hres %#x.\n", hres); ok((sa->fFeatures & FADF_HAVEVARTYPE) == 0, "Interface type %d should not have FADF_HAVEVARTYPE\n", vt); } @@ -1526,25 +1532,14 @@ static void test_SafeArrayCreateEx(void) if (sa) { GUID guid; - if (pSafeArrayGetIID) - { - hres = pSafeArrayGetIID(sa, &guid); - ok(hres == S_OK, "CreateEx (ITypeInfo) no IID hres 0x%x\n", hres); - if (hres == S_OK) - { - ok(IsEqualGUID(&guid, &IID_ITypeInfo), "CreateEx (ITypeInfo) bad IID\n"); - } - } - if (pSafeArraySetIID) - { - hres = pSafeArraySetIID(sa, &IID_IUnknown); - ok(hres == S_OK, "Failed to set IID, hres = %8x\n", hres); - if (hres == S_OK && pSafeArrayGetIID) - { - hres = pSafeArrayGetIID(sa, &guid); - ok(hres == S_OK && IsEqualGUID(&guid, &IID_IUnknown), "Set bad IID\n"); - } - } + + hres = SafeArrayGetIID(sa, &guid); + ok(hres == S_OK, "Failed to get array IID, hres %#x.\n", hres); + ok(IsEqualGUID(&guid, &IID_ITypeInfo), "CreateEx (ITypeInfo) bad IID\n"); + hres = SafeArraySetIID(sa, &IID_IUnknown); + ok(hres == S_OK, "Failed to set IID, hres = %8x\n", hres); + hres = SafeArrayGetIID(sa, &guid); + ok(hres == S_OK && IsEqualGUID(&guid, &IID_IUnknown), "Set bad IID\n"); hres = SafeArrayDestroy(sa); ok(hres == S_OK, "got 0x%08x\n", hres); } @@ -1555,15 +1550,10 @@ static void test_SafeArrayCreateEx(void) if (sa) { GUID guid; - if (pSafeArrayGetIID) - { - hres = pSafeArrayGetIID(sa, &guid); - ok(hres == S_OK, "CreateEx (NULL) no IID hres 0x%x\n", hres); - if (hres == S_OK) - { - ok(IsEqualGUID(&guid, &IID_IDispatch), "CreateEx (NULL) bad IID\n"); - } - } + + hres = SafeArrayGetIID(sa, &guid); + ok(hres == S_OK, "Failed to get array IID, hres %#x.\n", hres); + ok(IsEqualGUID(&guid, &IID_IDispatch), "CreateEx (NULL) bad IID\n"); hres = SafeArrayDestroy(sa); ok(hres == S_OK, "got 0x%08x\n", hres); } @@ -1574,15 +1564,10 @@ static void test_SafeArrayCreateEx(void) if (sa) { GUID guid; - if (pSafeArrayGetIID) - { - hres = pSafeArrayGetIID(sa, &guid); - ok(hres == S_OK, "CreateEx (NULL-Unk) no IID hres 0x%x\n", hres); - if (hres == S_OK) - { - ok(IsEqualGUID(&guid, &IID_IUnknown), "CreateEx (NULL-Unk) bad IID\n"); - } - } + + hres = SafeArrayGetIID(sa, &guid); + ok(hres == S_OK, "Failed to get array IID, hres %#x.\n", hres); + ok(IsEqualGUID(&guid, &IID_IUnknown), "CreateEx (NULL-Unk) bad IID\n"); hres = SafeArrayDestroy(sa); ok(hres == S_OK, "got 0x%08x\n", hres); } @@ -2107,8 +2092,6 @@ START_TEST(safearray) GETPTR(SafeArrayAllocDescriptorEx); GETPTR(SafeArrayCopyData); - GETPTR(SafeArrayGetIID); - GETPTR(SafeArraySetIID); GETPTR(SafeArrayGetVartype); GETPTR(SafeArrayCreateEx); GETPTR(SafeArrayCreateVector); diff --git a/modules/rostests/winetests/oleaut32/tmarshal.c b/modules/rostests/winetests/oleaut32/tmarshal.c index ad29d95780..4bd172e796 100644 --- a/modules/rostests/winetests/oleaut32/tmarshal.c +++ b/modules/rostests/winetests/oleaut32/tmarshal.c @@ -17,8 +17,16 @@ * */ -#include "precomp.h" +#define COBJMACROS +#define CONST_VTABLE +#include <windows.h> +#include <ocidl.h> +#include <stdio.h> + +#include "wine/test.h" + +#include "tmarshal.h" #include "tmarshal_dispids.h" static HRESULT (WINAPI *pVarAdd)(LPVARIANT,LPVARIANT,LPVARIANT); @@ -26,6 +34,12 @@ static HRESULT (WINAPI *pVarAdd)(LPVARIANT,LPVARIANT,LPVARIANT); #define ok_ole_success(hr, func) ok(hr == S_OK, #func " failed with error 0x%08x\n", hr) +#ifdef __i386__ +static const int tmarshal_todo = 0; +#else +static const int tmarshal_todo = 1; +#endif + /* ULL suffix is not portable */ #define ULL_CONST(dw1, dw2) ((((ULONGLONG)dw1) << 32) | (ULONGLONG)dw2) @@ -1297,6 +1311,7 @@ static void test_typelibmarshal(void) IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL); hr = CoUnmarshalInterface(pStream, &IID_IKindaEnumWidget, (void **)&pKEW); + todo_wine_if(tmarshal_todo) ok_ole_success(hr, CoUnmarshalInterface); IStream_Release(pStream); @@ -1323,6 +1338,7 @@ static void test_typelibmarshal(void) VariantInit(&varresult); hr = IDispatch_Invoke(pDispatch, DISPID_TM_NAME, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYPUT, &dispparams, &varresult, &excepinfo, NULL); ok_ole_success(hr, IDispatch_Invoke); + todo_wine_if(tmarshal_todo) ok(excepinfo.wCode == 0x0 && excepinfo.scode == S_OK, "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n", excepinfo.wCode, excepinfo.scode); @@ -1342,6 +1358,7 @@ static void test_typelibmarshal(void) VariantInit(&varresult); hr = IDispatch_Invoke(pDispatch, DISPID_TM_NAME, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYGET, &dispparams, &varresult, &excepinfo, NULL); ok_ole_success(hr, IDispatch_Invoke); + todo_wine_if(tmarshal_todo) ok(excepinfo.wCode == 0x0 && excepinfo.scode == S_OK, "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n", excepinfo.wCode, excepinfo.scode); @@ -1355,7 +1372,7 @@ static void test_typelibmarshal(void) ok(!lstrcmpW(bstr, szCat), "IWidget_get_Name should have returned string \"Cat\" instead of %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); - /* call DoSomething */ + /* call DoSomething without optional arguments */ VariantInit(&vararg[0]); VariantInit(&vararg[1]); V_VT(&vararg[1]) = VT_R8; @@ -1370,6 +1387,43 @@ static void test_typelibmarshal(void) ok(V_VT(&varresult) == VT_EMPTY, "varresult should be VT_EMPTY\n"); VariantClear(&varresult); + /* call DoSomething with optional argument set to VT_EMPTY */ + VariantInit(&vararg[0]); + VariantInit(&vararg[1]); + VariantInit(&vararg[2]); + V_VT(&vararg[2]) = VT_R8; + V_R8(&vararg[2]) = 3.141; + dispparams.cNamedArgs = 0; + dispparams.cArgs = 3; + dispparams.rgdispidNamedArgs = NULL; + dispparams.rgvarg = vararg; + VariantInit(&varresult); + hr = IDispatch_Invoke(pDispatch, DISPID_TM_DOSOMETHING, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); + ok_ole_success(hr, IDispatch_Invoke); + ok(V_VT(&varresult) == VT_EMPTY, "varresult should be VT_EMPTY\n"); + VariantClear(&varresult); + + /* call DoSomething with optional arguments set to VT_ERROR/DISP_E_PARAMNOTFOUND */ + VariantInit(&vararg[0]); + VariantInit(&vararg[1]); + VariantInit(&vararg[2]); + VariantInit(&vararg[3]); + V_VT(&vararg[3]) = VT_R8; + V_R8(&vararg[3]) = 3.141; + V_VT(&vararg[1]) = VT_ERROR; + V_ERROR(&vararg[1]) = DISP_E_PARAMNOTFOUND; + V_VT(&vararg[0]) = VT_ERROR; + V_ERROR(&vararg[0]) = DISP_E_PARAMNOTFOUND; + dispparams.cNamedArgs = 0; + dispparams.cArgs = 4; + dispparams.rgdispidNamedArgs = NULL; + dispparams.rgvarg = vararg; + VariantInit(&varresult); + hr = IDispatch_Invoke(pDispatch, DISPID_TM_DOSOMETHING, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); + ok_ole_success(hr, IDispatch_Invoke); + ok(V_VT(&varresult) == VT_EMPTY, "varresult should be VT_EMPTY\n"); + VariantClear(&varresult); + /* call get_State */ dispparams.cNamedArgs = 0; dispparams.cArgs = 0; @@ -1473,6 +1527,7 @@ static void test_typelibmarshal(void) hr = IDispatch_Invoke(pDispatch, DISPID_TM_CLONEDISPATCH, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYGET, &dispparams, &varresult, &excepinfo, NULL); ok_ole_success(hr, IDispatch_Invoke); + todo_wine_if(tmarshal_todo) ok(excepinfo.wCode == 0x0 && excepinfo.scode == S_OK, "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n", excepinfo.wCode, excepinfo.scode); @@ -1490,6 +1545,7 @@ static void test_typelibmarshal(void) hr = IDispatch_Invoke(pDispatch, DISPID_TM_CLONECOCLASS, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYGET, &dispparams, &varresult, &excepinfo, NULL); ok_ole_success(hr, IDispatch_Invoke); + todo_wine_if(tmarshal_todo) ok(excepinfo.wCode == 0x0 && excepinfo.scode == S_OK, "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n", excepinfo.wCode, excepinfo.scode); @@ -1505,11 +1561,16 @@ static void test_typelibmarshal(void) dispparams.rgvarg = vararg; VariantInit(&varresult); hr = IDispatch_Invoke(pDispatch, DISPID_TM_COCLASS, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); - todo_wine ok_ole_success(hr, IDispatch_Invoke); + ok_ole_success(hr, IDispatch_Invoke); + todo_wine_if(tmarshal_todo) ok(excepinfo.wCode == 0x0 && excepinfo.scode == S_OK, "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n", excepinfo.wCode, excepinfo.scode); VariantClear(&varresult); + + /* call CoClass (direct) */ + hr = IWidget_Coclass(pWidget, (void *)V_DISPATCH(&vararg[0])); + ok_ole_success(hr, IWidget_Coclass); VariantClear(&vararg[0]); /* call Value with a VT_VARIANT|VT_BYREF type */ @@ -1525,6 +1586,7 @@ static void test_typelibmarshal(void) hr = IDispatch_Invoke(pDispatch, DISPID_VALUE, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYGET, &dispparams, &varresult, &excepinfo, NULL); ok_ole_success(hr, IDispatch_Invoke); + todo_wine_if(tmarshal_todo) ok(excepinfo.wCode == 0x0 && excepinfo.scode == S_OK, "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n", excepinfo.wCode, excepinfo.scode); @@ -1580,9 +1642,9 @@ static void test_typelibmarshal(void) V_I4(&vararg[1]) = 2; hr = IWidget_VariantCArray(pWidget, 2, vararg); ok_ole_success(hr, IWidget_VariantCArray); - todo_wine + todo_wine_if(!tmarshal_todo) ok(V_VT(&vararg[0]) == VT_I4 && V_I4(&vararg[0]) == 2, "vararg[0] = %d[%d]\n", V_VT(&vararg[0]), V_I4(&vararg[0])); - todo_wine + todo_wine_if(!tmarshal_todo) ok(V_VT(&vararg[1]) == VT_I4 && V_I4(&vararg[1]) == 3, "vararg[1] = %d[%d]\n", V_VT(&vararg[1]), V_I4(&vararg[1])); /* call VarArg */ @@ -1653,6 +1715,7 @@ static void test_typelibmarshal(void) VariantInit(&varresult); hr = IDispatch_Invoke(pDispatch, DISPID_TM_ERROR, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, &excepinfo, NULL); ok(hr == DISP_E_EXCEPTION, "IDispatch_Invoke should have returned DISP_E_EXCEPTION instead of 0x%08x\n", hr); + todo_wine_if(tmarshal_todo) ok(excepinfo.wCode == 0x0 && excepinfo.scode == E_NOTIMPL, "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n", excepinfo.wCode, excepinfo.scode); @@ -1679,6 +1742,7 @@ static void test_typelibmarshal(void) hr = ITypeInfo_Invoke(pTypeInfo, &NonOleAutomation, DISPID_NOA_ERROR, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL); ok(hr == DISP_E_EXCEPTION, "ITypeInfo_Invoke should have returned DISP_E_EXCEPTION instead of 0x%08x\n", hr); ok(V_VT(&varresult) == VT_EMPTY, "V_VT(&varresult) should be VT_EMPTY instead of %d\n", V_VT(&varresult)); + todo_wine_if(tmarshal_todo) ok(excepinfo.wCode == 0x0 && excepinfo.scode == E_NOTIMPL, "EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n", excepinfo.wCode, excepinfo.scode); @@ -1990,6 +2054,7 @@ static void test_external_connection(void) IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL); hres = CoUnmarshalInterface(stream, &IID_ItestDual, (void**)&iface); + todo_wine_if(tmarshal_todo) ok(hres == S_OK, "CoUnmarshalInterface failed: %08x\n", hres); ok(external_connections == 1, "external_connections = %d\n", external_connections); @@ -1998,6 +2063,7 @@ static void test_external_connection(void) /* Creating a stub for new iface causes new external connection. */ hres = ItestDual_QueryInterface(iface, &IID_ITestSecondDisp, (void**)&second); + todo_wine_if(tmarshal_todo) ok(hres == S_OK, "Could not get ITestSecondDisp iface: %08x\n", hres); todo_wine ok(external_connections == 2, "external_connections = %d\n", external_connections); @@ -2009,6 +2075,7 @@ static void test_external_connection(void) expect_last_release_closes = TRUE; ItestDual_Release(iface); + todo_wine_if(tmarshal_todo) ok(external_connections == 0, "external_connections = %d\n", external_connections); end_host_object(tid, thread); @@ -2020,12 +2087,14 @@ static void test_external_connection(void) expect_last_release_closes = FALSE; hres = CoMarshalInterface(stream, &IID_ItestDual, (IUnknown*)&TestDual, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); ok(hres == S_OK, "CoMarshalInterface failed: %08x\n", hres); + todo_wine_if(tmarshal_todo) ok(external_connections == 1, "external_connections = %d\n", external_connections); expect_last_release_closes = TRUE; IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL); hres = CoReleaseMarshalData(stream); ok(hres == S_OK, "CoReleaseMarshalData failed: %08x\n", hres); + todo_wine_if(tmarshal_todo) ok(external_connections == 0, "external_connections = %d\n", external_connections); /* Two separated marshal data are still one external connection. */ @@ -2036,21 +2105,25 @@ static void test_external_connection(void) IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL); hres = CoMarshalInterface(stream, &IID_ItestDual, (IUnknown*)&TestDual, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); ok(hres == S_OK, "CoMarshalInterface failed: %08x\n", hres); + todo_wine_if(tmarshal_todo) ok(external_connections == 1, "external_connections = %d\n", external_connections); hres = CoMarshalInterface(stream2, &IID_ItestDual, (IUnknown*)&TestDual, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL); ok(hres == S_OK, "CoMarshalInterface failed: %08x\n", hres); + todo_wine_if(tmarshal_todo) ok(external_connections == 1, "external_connections = %d\n", external_connections); IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL); hres = CoReleaseMarshalData(stream); ok(hres == S_OK, "CoReleaseMarshalData failed: %08x\n", hres); + todo_wine_if(tmarshal_todo) ok(external_connections == 1, "external_connections = %d\n", external_connections); expect_last_release_closes = TRUE; IStream_Seek(stream2, zero, STREAM_SEEK_SET, NULL); hres = CoReleaseMarshalData(stream2); ok(hres == S_OK, "CoReleaseMarshalData failed: %08x\n", hres); + todo_wine_if(tmarshal_todo) ok(external_connections == 0, "external_connections = %d\n", external_connections); IStream_Release(stream); @@ -2062,17 +2135,20 @@ static void test_external_connection(void) hres = CoMarshalInterface(stream, &IID_ItestDual, (IUnknown*)&TestDual, MSHCTX_INPROC, NULL, MSHLFLAGS_TABLEWEAK); ok(hres == S_OK, "CoMarshalInterface failed: %08x\n", hres); + todo_wine_if(tmarshal_todo) ok(external_connections == 0, "external_connections = %d\n", external_connections); IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL); hres = CoUnmarshalInterface(stream, &IID_ItestDual, (void**)&iface); ok(hres == S_OK, "CoUnmarshalInterface failed: %08x\n", hres); + todo_wine_if(tmarshal_todo) ok(external_connections == 0, "external_connections = %d\n", external_connections); ItestDual_Release(iface); IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL); hres = CoReleaseMarshalData(stream); ok(hres == S_OK, "CoReleaseMarshalData failed: %08x\n", hres); + todo_wine_if(tmarshal_todo) ok(external_connections == 0, "external_connections = %d\n", external_connections); IStream_Release(stream); diff --git a/modules/rostests/winetests/oleaut32/tmarshal.rc b/modules/rostests/winetests/oleaut32/tmarshal.rc index f514e8e9b8..cbb3b18959 100644 --- a/modules/rostests/winetests/oleaut32/tmarshal.rc +++ b/modules/rostests/winetests/oleaut32/tmarshal.rc @@ -18,14 +18,14 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <windef.h> -//#include "winbase.h" -//#include "winuser.h" -//#include "winnls.h" +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "winnls.h" LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL -#include <wine/wine_common_ver.rc> +#include "wine/wine_common_ver.rc" /* @makedep: tmarshal.tlb */ 1 TYPELIB tmarshal.tlb diff --git a/modules/rostests/winetests/oleaut32/typelib.c b/modules/rostests/winetests/oleaut32/typelib.c index 5f7e599a5d..354b4b017c 100644 --- a/modules/rostests/winetests/oleaut32/typelib.c +++ b/modules/rostests/winetests/oleaut32/typelib.c @@ -19,10 +19,28 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" +#define NONAMELESSSTRUCT +#define NONAMELESSUNION -#include <winreg.h> -#include <test_reg.h> +#define COBJMACROS +#define CONST_VTABLE + +#include <wine/test.h> +#include <stdarg.h> +#include <stdio.h> +#include <assert.h> + +#include "windef.h" +#include "winbase.h" +#include "objbase.h" +#include "oleauto.h" +#include "ocidl.h" +#include "shlwapi.h" +#include "tmarshal.h" +#include "olectl.h" + +#include "test_reg.h" +#include "test_tlb.h" #define expect_eq(expr, value, type, format) { type _ret = (expr); ok((value) == _ret, #expr " expected " format " got " format "\n", value, _ret); } #define expect_int(expr, value) expect_eq(expr, (int)(value), int, "%d") @@ -1181,11 +1199,41 @@ static HRESULT WINAPI ret_false_func(void) return S_FALSE; } -static const void *vtable[] = { NULL, NULL, NULL, inst_func }; +static const WCHAR testW[] = { 'T','e','s','t',0 }; + +static void WINAPI variant_func2(VARIANT *ret, VARIANT v1, VARIANT v2) +{ + ok(V_VT(&v1) == VT_I4, "unexpected %d\n", V_VT(&v1)); + ok(V_I4(&v1) == 2, "unexpected %d\n", V_I4(&v1)); + ok(V_VT(&v2) == VT_BSTR, "unexpected %d\n", V_VT(&v2)); + ok(lstrcmpW(V_BSTR(&v2), testW) == 0, "unexpected %s\n", wine_dbgstr_w(V_BSTR(&v2))); + + V_VT(ret) = VT_UI4; + V_I4(ret) = 4321; +} + +static void WINAPI inst_func2(void *inst, VARIANT *ret, VARIANT v1, VARIANT v2) +{ + ok( (*(void ***)inst)[3] == inst_func2, "wrong ptr %p\n", inst ); + + ok(V_VT(ret) == VT_I4 || broken(V_VT(ret) == VT_VARIANT) /* win64 */, "unexpected %d\n", V_VT(ret)); + ok(V_I4(ret) == 1234, "unexpected %d\n", V_I4(ret)); + + ok(V_VT(&v1) == VT_I4, "unexpected %d\n", V_VT(&v1)); + ok(V_I4(&v1) == 2, "unexpected %d\n", V_I4(&v1)); + ok(V_VT(&v2) == VT_BSTR, "unexpected %d\n", V_VT(&v2)); + ok(lstrcmpW(V_BSTR(&v2), testW) == 0, "unexpected %s\n", wine_dbgstr_w(V_BSTR(&v2))); + + V_VT(ret) = VT_UI4; + V_I4(ret) = 4321; +} + +static void *vtable[] = { NULL, NULL, NULL, inst_func }; +static void *vtable2[] = { NULL, NULL, NULL, inst_func2 }; static void test_DispCallFunc(void) { - const void **inst = vtable; + void **inst; HRESULT res; VARIANT result, args[5]; VARIANTARG *pargs[5]; @@ -1194,6 +1242,30 @@ static void test_DispCallFunc(void) for (i = 0; i < 5; i++) pargs[i] = &args[i]; + memset( args, 0x55, sizeof(args) ); + + types[0] = VT_VARIANT; + V_VT(&args[0]) = VT_I4; + V_I4(&args[0]) = 2; + types[1] = VT_VARIANT; + V_VT(&args[1]) = VT_BSTR; + V_BSTR(&args[1]) = SysAllocString(testW); + memset( &result, 0xcc, sizeof(result) ); + res = DispCallFunc(NULL, (ULONG_PTR)variant_func2, CC_STDCALL, VT_VARIANT, 2, types, pargs, &result); + ok(res == S_OK, "DispCallFunc error %#x\n", res); + ok(V_VT(&result) == VT_UI4, "wrong result type %d\n", V_VT(&result)); + ok(V_UI4(&result) == 4321, "wrong result %u\n", V_UI4(&result)); + + V_VT(&result) = VT_I4; + V_UI4(&result) = 1234; + inst = vtable2; + res = DispCallFunc(&inst, 3 * sizeof(void *), CC_STDCALL, VT_VARIANT, 2, types, pargs, &result); + ok(res == S_OK, "DispCallFunc error %#x\n", res); + ok(V_VT(&result) == VT_UI4, "wrong result type %d\n", V_VT(&result)); + ok(V_UI4(&result) == 4321, "wrong result %u\n", V_UI4(&result)); + + VariantClear(&args[1]); + memset( args, 0x55, sizeof(args) ); types[0] = VT_UI4; V_UI4(&args[0]) = 1; @@ -1292,6 +1364,7 @@ static void test_DispCallFunc(void) types[0] = VT_I4; V_I4(&args[0]) = 3; memset( &result, 0xcc, sizeof(result) ); + inst = vtable; res = DispCallFunc( &inst, 3 * sizeof(void*), CC_STDCALL, VT_I4, 1, types, pargs, &result ); ok( res == S_OK, "DispCallFunc failed %x\n", res ); ok( V_VT(&result) == VT_I4, "wrong result type %d\n", V_VT(&result) ); @@ -1999,8 +2072,7 @@ static void test_CreateTypeLib(SYSKIND sys) { hres = ITypeInfo_GetTypeAttr(ti, &typeattr); ok(hres == S_OK, "got %08x\n", hres); - ok(typeattr->cbSizeVft == 3 * ptr_size || broken(sys == SYS_WIN32 && typeattr->cbSizeVft == 24) /* xp64 */, - "retrieved IUnknown gave wrong cbSizeVft: %u\n", typeattr->cbSizeVft); + ok(typeattr->cbSizeVft == 3 * ptr_size, "retrieved IUnknown gave wrong cbSizeVft: %u\n", typeattr->cbSizeVft); ITypeInfo_ReleaseTypeAttr(ti, typeattr); ITypeInfo_Release(ti); @@ -2043,8 +2115,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv); ok(pfuncdesc->cParams == 0, "got %d\n", pfuncdesc->cParams); ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt); - ok(pfuncdesc->oVft == 3 * ptr_size || broken(sys == SYS_WIN32 && pfuncdesc->oVft == 24) /* xp64 */, - "got %d\n", pfuncdesc->oVft); + ok(pfuncdesc->oVft == 3 * ptr_size, "got %d\n", pfuncdesc->oVft); ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes); ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_BSTR, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt); ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags); @@ -2103,8 +2174,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv); ok(pfuncdesc->cParams == 1, "got %d\n", pfuncdesc->cParams); ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt); - ok(pfuncdesc->oVft == 4 * ptr_size || broken(sys == SYS_WIN32 && pfuncdesc->oVft == 28) /* xp64 */, - "got %d\n", pfuncdesc->oVft); + ok(pfuncdesc->oVft == 4 * ptr_size, "got %d\n", pfuncdesc->oVft); ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes); ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt); ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags); @@ -2146,8 +2216,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv); ok(pfuncdesc->cParams == 0, "got %d\n", pfuncdesc->cParams); ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt); - ok(pfuncdesc->oVft == 4 * ptr_size || broken(sys == SYS_WIN32 && pfuncdesc->oVft == 28), /* xp64 */ - "got %d\n", pfuncdesc->oVft); + ok(pfuncdesc->oVft == 4 * ptr_size, "got %d\n", pfuncdesc->oVft); ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes); ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt); ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags); @@ -2177,8 +2246,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv); ok(pfuncdesc->cParams == 1, "got %d\n", pfuncdesc->cParams); ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt); - ok(pfuncdesc->oVft == 7 * ptr_size || broken(sys == SYS_WIN32 && pfuncdesc->oVft == 40) /* xp64 */, - "got %d\n", pfuncdesc->oVft); + ok(pfuncdesc->oVft == 7 * ptr_size, "got %d\n", pfuncdesc->oVft); ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes); ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt); ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags); @@ -2209,8 +2277,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv); ok(pfuncdesc->cParams == 1, "got %d\n", pfuncdesc->cParams); ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt); - ok(pfuncdesc->oVft == 7 * ptr_size || broken(sys == SYS_WIN32 && pfuncdesc->oVft == 40) /* xp64 */, - "got %d\n", pfuncdesc->oVft); + ok(pfuncdesc->oVft == 7 * ptr_size, "got %d\n", pfuncdesc->oVft); ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes); ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt); ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags); @@ -2245,8 +2312,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv); ok(pfuncdesc->cParams == 1, "got %d\n", pfuncdesc->cParams); ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt); - ok(pfuncdesc->oVft == 6 * ptr_size || broken(sys == SYS_WIN32 && pfuncdesc->oVft == 36) /* xp64 */, - "got %d\n", pfuncdesc->oVft); + ok(pfuncdesc->oVft == 6 * ptr_size, "got %d\n", pfuncdesc->oVft); ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes); ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt); ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags); @@ -2286,8 +2352,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv); ok(pfuncdesc->cParams == 2, "got %d\n", pfuncdesc->cParams); ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt); - ok(pfuncdesc->oVft == 6 * ptr_size || broken(sys == SYS_WIN32 && pfuncdesc->oVft == 36) /* xp64 */, - "got %d\n", pfuncdesc->oVft); + ok(pfuncdesc->oVft == 6 * ptr_size, "got %d\n", pfuncdesc->oVft); ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes); ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt); ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags); @@ -2340,8 +2405,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv); ok(pfuncdesc->cParams == 2, "got %d\n", pfuncdesc->cParams); ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt); - ok(pfuncdesc->oVft == 6 * ptr_size || broken(sys == SYS_WIN32 && pfuncdesc->oVft == 36) /* xp64 */, - "got %d\n", pfuncdesc->oVft); + ok(pfuncdesc->oVft == 6 * ptr_size, "got %d\n", pfuncdesc->oVft); ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes); ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt); ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags); @@ -2398,8 +2462,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv); ok(pfuncdesc->cParams == 1, "got %d\n", pfuncdesc->cParams); ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt); - ok(pfuncdesc->oVft == 8 * ptr_size || broken(sys == SYS_WIN32 && pfuncdesc->oVft == 44), /* xp64 */ - "got %d\n", pfuncdesc->oVft); + ok(pfuncdesc->oVft == 8 * ptr_size, "got %d\n", pfuncdesc->oVft); ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes); ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt); ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags); @@ -2442,8 +2505,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv); ok(pfuncdesc->cParams == 1, "got %d\n", pfuncdesc->cParams); ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt); - ok(pfuncdesc->oVft == 9 * ptr_size || broken(sys == SYS_WIN32 && pfuncdesc->oVft == 48), /* xp64 */ - "got %d\n", pfuncdesc->oVft); + ok(pfuncdesc->oVft == 9 * ptr_size, "got %d\n", pfuncdesc->oVft); ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes); ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VARIANT, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt); ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags); @@ -2762,8 +2824,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(typeattr->cFuncs == 1, "cFuncs = %d\n", typeattr->cFuncs); ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); ok(typeattr->cImplTypes == 1, "cImplTypes = %d\n", typeattr->cImplTypes); - ok(typeattr->cbSizeVft == 8 * ptr_size || broken(sys == SYS_WIN32 && typeattr->cbSizeVft == 7 * sizeof(void *) + 4), /* xp64 */ - "cbSizeVft = %d\n", typeattr->cbSizeVft); + ok(typeattr->cbSizeVft == 8 * ptr_size, "cbSizeVft = %d\n", typeattr->cbSizeVft); ok(typeattr->cbAlignment == 4, "cbAlignment = %d\n", typeattr->cbAlignment); ok(typeattr->wTypeFlags == (TYPEFLAG_FDISPATCHABLE|TYPEFLAG_FDUAL), "wTypeFlags = %d\n", typeattr->wTypeFlags); ok(typeattr->wMajorVerNum == 0, "wMajorVerNum = %d\n", typeattr->wMajorVerNum); @@ -2807,8 +2868,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(typeattr->cFuncs == 13, "cFuncs = %d\n", typeattr->cFuncs); ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars); ok(typeattr->cImplTypes == 1, "cImplTypes = %d\n", typeattr->cImplTypes); - ok(typeattr->cbSizeVft == 16 * ptr_size || broken(sys == SYS_WIN32 && typeattr->cbSizeVft == 3 * sizeof(void *) + 52), /* xp64 */ - "cbSizeVft = %d\n", typeattr->cbSizeVft); + ok(typeattr->cbSizeVft == 16 * ptr_size, "cbSizeVft = %d\n", typeattr->cbSizeVft); ok(typeattr->cbAlignment == 4, "cbAlignment = %d\n", typeattr->cbAlignment); ok(typeattr->wTypeFlags == 0, "wTypeFlags = %d\n", typeattr->wTypeFlags); ok(typeattr->wMajorVerNum == 0, "wMajorVerNum = %d\n", typeattr->wMajorVerNum); @@ -3082,8 +3142,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv); ok(pfuncdesc->cParams == 0, "got %d\n", pfuncdesc->cParams); ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt); - todo_wine_if(is_win64 && sys == SYS_WIN32) - ok(pfuncdesc->oVft == 4 * sizeof(void*), "got %d\n", pfuncdesc->oVft); + ok(pfuncdesc->oVft == 4 * sizeof(void*), "got %d\n", pfuncdesc->oVft); ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes); ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt); ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags); @@ -3107,8 +3166,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv); ok(pfuncdesc->cParams == 0, "got %d\n", pfuncdesc->cParams); ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt); - todo_wine_if(is_win64 && sys == SYS_WIN32) - ok(pfuncdesc->oVft == 5 * sizeof(void*), "got %d\n", pfuncdesc->oVft); + ok(pfuncdesc->oVft == 5 * sizeof(void*), "got %d\n", pfuncdesc->oVft); ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes); ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt); ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags); @@ -3132,8 +3190,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv); ok(pfuncdesc->cParams == 2, "got %d\n", pfuncdesc->cParams); ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt); - todo_wine_if(is_win64 && sys == SYS_WIN32) - ok(pfuncdesc->oVft == 6 * sizeof(void*), "got %d\n", pfuncdesc->oVft); + ok(pfuncdesc->oVft == 6 * sizeof(void*), "got %d\n", pfuncdesc->oVft); ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes); ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt); ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags); @@ -3192,8 +3249,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv); ok(pfuncdesc->cParams == 2, "got %d\n", pfuncdesc->cParams); ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt); - todo_wine_if(is_win64 && sys == SYS_WIN32) - ok(pfuncdesc->oVft == 7 * sizeof(void*), "got %d\n", pfuncdesc->oVft); + ok(pfuncdesc->oVft == 7 * sizeof(void*), "got %d\n", pfuncdesc->oVft); ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes); ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt); ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags); @@ -3239,8 +3295,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv); ok(pfuncdesc->cParams == 1, "got %d\n", pfuncdesc->cParams); ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt); - todo_wine_if(is_win64 && sys == SYS_WIN32) - ok(pfuncdesc->oVft == 8 * sizeof(void*), "got %d\n", pfuncdesc->oVft); + ok(pfuncdesc->oVft == 8 * sizeof(void*), "got %d\n", pfuncdesc->oVft); ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes); ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt); ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags); @@ -3277,8 +3332,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv); ok(pfuncdesc->cParams == 1, "got %d\n", pfuncdesc->cParams); ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt); - todo_wine_if(is_win64 && sys == SYS_WIN32) - ok(pfuncdesc->oVft == 9 * sizeof(void*), "got %d\n", pfuncdesc->oVft); + ok(pfuncdesc->oVft == 9 * sizeof(void*), "got %d\n", pfuncdesc->oVft); ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes); ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VARIANT, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt); ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags); @@ -3315,8 +3369,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv); ok(pfuncdesc->cParams == 2, "got %d\n", pfuncdesc->cParams); ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt); - todo_wine_if(is_win64 && sys == SYS_WIN32) - ok(pfuncdesc->oVft == 10 * sizeof(void*), "got %d\n", pfuncdesc->oVft); + ok(pfuncdesc->oVft == 10 * sizeof(void*), "got %d\n", pfuncdesc->oVft); ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes); ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt); ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags); @@ -3356,8 +3409,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv); ok(pfuncdesc->cParams == 1, "got %d\n", pfuncdesc->cParams); ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt); - todo_wine_if(is_win64 && sys == SYS_WIN32) - ok(pfuncdesc->oVft == 11 * sizeof(void*), "got %d\n", pfuncdesc->oVft); + ok(pfuncdesc->oVft == 11 * sizeof(void*), "got %d\n", pfuncdesc->oVft); ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes); ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt); ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags); @@ -3392,8 +3444,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv); ok(pfuncdesc->cParams == 0, "got %d\n", pfuncdesc->cParams); ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt); - todo_wine_if(is_win64 && sys == SYS_WIN32) - ok(pfuncdesc->oVft == 12 * sizeof(void*), "got %d\n", pfuncdesc->oVft); + ok(pfuncdesc->oVft == 12 * sizeof(void*), "got %d\n", pfuncdesc->oVft); ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes); ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_BSTR, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt); ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags); @@ -3424,8 +3475,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv); ok(pfuncdesc->cParams == 1, "got %d\n", pfuncdesc->cParams); ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt); - todo_wine_if(is_win64 && sys == SYS_WIN32) - ok(pfuncdesc->oVft == 13 * sizeof(void*), "got %d\n", pfuncdesc->oVft); + ok(pfuncdesc->oVft == 13 * sizeof(void*), "got %d\n", pfuncdesc->oVft); ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes); ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt); ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags); @@ -3458,8 +3508,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv); ok(pfuncdesc->cParams == 1, "got %d\n", pfuncdesc->cParams); ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt); - todo_wine_if(is_win64 && sys == SYS_WIN32) - ok(pfuncdesc->oVft == 14 * sizeof(void*), "got %d\n", pfuncdesc->oVft); + ok(pfuncdesc->oVft == 14 * sizeof(void*), "got %d\n", pfuncdesc->oVft); ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes); ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt); ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags); @@ -3490,8 +3539,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv); ok(pfuncdesc->cParams == 1, "got %d\n", pfuncdesc->cParams); ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt); - todo_wine_if(is_win64 && sys == SYS_WIN32) - ok(pfuncdesc->oVft == 15 * sizeof(void*), "got %d\n", pfuncdesc->oVft); + ok(pfuncdesc->oVft == 15 * sizeof(void*), "got %d\n", pfuncdesc->oVft); ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes); ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt); ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags); @@ -3552,8 +3600,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv); ok(pfuncdesc->cParams == 1, "got %d\n", pfuncdesc->cParams); ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt); - ok(pfuncdesc->oVft == 0xffffaaa8 || - pfuncdesc->oVft == 0x5550, "got %x\n", pfuncdesc->oVft); + ok(pfuncdesc->oVft == (short)(0xaaa8 * sizeof(void *) / ptr_size), "got %x\n", pfuncdesc->oVft); ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes); ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt); ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags); @@ -3585,9 +3632,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv); ok(pfuncdesc->cParams == 1, "got %d\n", pfuncdesc->cParams); ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt); - ok(pfuncdesc->oVft == 0xffffaaac || - pfuncdesc->oVft == 0xffffaab0 || - pfuncdesc->oVft == 0x5558, "got %x\n", pfuncdesc->oVft); + ok(pfuncdesc->oVft == (short)((sys == SYS_WIN64 ? 0xaab0 : 0xaaac) * sizeof(void *) / ptr_size), "got %x\n", pfuncdesc->oVft); ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes); ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt); ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags); @@ -3723,8 +3768,7 @@ static void test_CreateTypeLib(SYSKIND sys) { ok(bindptr.lpfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", bindptr.lpfuncdesc->callconv); ok(bindptr.lpfuncdesc->cParams == 8, "got %d\n", bindptr.lpfuncdesc->cParams); ok(bindptr.lpfuncdesc->cParamsOpt == 0, "got %d\n", bindptr.lpfuncdesc->cParamsOpt); - todo_wine_if(is_win64 && sys == SYS_WIN32) - ok(bindptr.lpfuncdesc->oVft == 6 * sizeof(void*), "got %x\n", bindptr.lpfuncdesc->oVft); + ok(bindptr.lpfuncdesc->oVft == 6 * sizeof(void*), "got %x\n", bindptr.lpfuncdesc->oVft); ok(bindptr.lpfuncdesc->cScodes == 0, "got %d\n", bindptr.lpfuncdesc->cScodes); ok(bindptr.lpfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", bindptr.lpfuncdesc->elemdescFunc.tdesc.vt); ok(bindptr.lpfuncdesc->wFuncFlags == FUNCFLAG_FRESTRICTED, "got 0x%x\n", bindptr.lpfuncdesc->wFuncFlags); @@ -4780,9 +4824,7 @@ todo_wine /* widl generates broken typelib and typeattr just reflects that */ expect_int(desc->callconv, fn_info->callconv); expect_int(desc->cParams, fn_info->cParams); expect_int(desc->cParamsOpt, fn_info->cParamsOpt); - ok( desc->oVft == fn_info->vtbl_index * sizeof(void*) || - broken(desc->oVft == fn_info->vtbl_index * 4), /* xp64 */ - "desc->oVft got %u\n", desc->oVft ); + expect_int(desc->oVft, fn_info->vtbl_index * sizeof(void*)); expect_int(desc->cScodes, fn_info->cScodes); expect_int(desc->wFuncFlags, fn_info->wFuncFlags); ole_check(ITypeInfo_GetNames(typeinfo, desc->memid, namesTab, 256, &cNames)); @@ -5933,9 +5975,7 @@ static void testTDA(ITypeLib *tl, struct _TDATest *TDATest, #endif } - ok(typeattr->cbSizeInstance == size || - broken(TDATest->vt == VT_VARIANT && ptr_size != sizeof(void*) && typeattr->cbSizeInstance == sizeof(VARIANT)) /* winxp64 */, - "got wrong size for VT %u: 0x%x\n", TDATest->vt, typeattr->cbSizeInstance); + ok(typeattr->cbSizeInstance == size, "got wrong size for VT %u: 0x%x\n", TDATest->vt, typeattr->cbSizeInstance); ok(typeattr->cbAlignment == alignment, "got wrong alignment for VT %u: 0x%x\n", TDATest->vt, typeattr->cbAlignment); ok(typeattr->tdescAlias.vt == TDATest->vt, "got wrong VT for VT %u: 0x%x\n", TDATest->vt, typeattr->tdescAlias.vt); diff --git a/modules/rostests/winetests/oleaut32/usrmarshal.c b/modules/rostests/winetests/oleaut32/usrmarshal.c index d570842a4e..b9478d1b69 100644 --- a/modules/rostests/winetests/oleaut32/usrmarshal.c +++ b/modules/rostests/winetests/oleaut32/usrmarshal.c @@ -18,7 +18,17 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" +#define COBJMACROS +#define CONST_VTABLE + +#include <stdarg.h> + +#include "windef.h" +#include "winbase.h" +#include "objbase.h" +#include "propidl.h" /* for LPSAFEARRAY_User* routines */ + +#include "wine/test.h" #if (__STDC__ && !defined(_FORCENAMELESSUNION)) || defined(NONAMELESSUNION) # define V_U2(A) ((A)->n1.n2) diff --git a/modules/rostests/winetests/oleaut32/varformat.c b/modules/rostests/winetests/oleaut32/varformat.c index 78faa277e4..69476aa5d3 100644 --- a/modules/rostests/winetests/oleaut32/varformat.c +++ b/modules/rostests/winetests/oleaut32/varformat.c @@ -19,7 +19,23 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" +#include <stdarg.h> +#include <stdio.h> +#include <math.h> +#include <float.h> + +#include "windef.h" +#include "winbase.h" +#include "winsock2.h" +#include "wine/test.h" +#include "winuser.h" +#include "wingdi.h" +#include "winnls.h" +#include "winerror.h" +#include "winnt.h" + +#include "wtypes.h" +#include "oleauto.h" static HMODULE hOleaut32; diff --git a/modules/rostests/winetests/oleaut32/vartest.c b/modules/rostests/winetests/oleaut32/vartest.c index 0d0d76012e..429ffbbb2e 100644 --- a/modules/rostests/winetests/oleaut32/vartest.c +++ b/modules/rostests/winetests/oleaut32/vartest.c @@ -19,10 +19,27 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" - +#include <stdarg.h> +#include <stdio.h> +#include <math.h> #include <float.h> +#define COBJMACROS +#define CONST_VTABLE + +#include "windef.h" +#include "winbase.h" +#include "winsock2.h" +#include "wine/test.h" +#include "winuser.h" +#include "wingdi.h" +#include "winnls.h" +#include "winerror.h" +#include "winnt.h" + +#include "wtypes.h" +#include "oleauto.h" + static HMODULE hOleaut32; static HRESULT (WINAPI *pVarUdateFromDate)(DATE,ULONG,UDATE*); diff --git a/modules/rostests/winetests/oleaut32/vartype.c b/modules/rostests/winetests/oleaut32/vartype.c index a831393858..9be2eb2901 100644 --- a/modules/rostests/winetests/oleaut32/vartype.c +++ b/modules/rostests/winetests/oleaut32/vartype.c @@ -18,9 +18,16 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "precomp.h" +#define CONST_VTABLE +#define COBJMACROS -#include <initguid.h> +#include "wine/test.h" +#include "oleauto.h" +#include <math.h> +#include <stdio.h> +#include "test_tlb.h" + +#include "initguid.h" DEFINE_GUID(UUID_test_struct, 0x4029f190, 0xca4a, 0x4611, 0xae,0xb9,0x67,0x39,0x83,0xcb,0x96,0xdd); @@ -6067,6 +6074,7 @@ static void test_recinfo(void) IRecordInfo_Release(recinfo); ITypeInfo_Release(typeinfo); + ITypeLib_Release(typelib2); ITypeLib_Release(typelib); DeleteFileW(filenameW); DeleteFileW(filename2W);
6 years, 9 months
1
0
0
0
← Newer
1
...
39
40
41
42
43
44
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
Results per page:
10
25
50
100
200