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: [ICCVID] Sync with Wine Staging 3.3. CORE-14434
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7546f9fee829bf1eb6b6e…
commit 7546f9fee829bf1eb6b6efc0ca9bc688effec83f Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Thu Mar 15 12:25:00 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Thu Mar 15 12:25:00 2018 +0100 [ICCVID] Sync with Wine Staging 3.3. CORE-14434 --- dll/win32/iccvid/iccvid.c | 41 +++++++++++++++------------------------ dll/win32/iccvid/iccvid_private.h | 2 +- media/doc/README.WINE | 2 +- 3 files changed, 18 insertions(+), 27 deletions(-) diff --git a/dll/win32/iccvid/iccvid.c b/dll/win32/iccvid/iccvid.c index f588b47c55..3977d95a41 100644 --- a/dll/win32/iccvid/iccvid.c +++ b/dll/win32/iccvid/iccvid.c @@ -40,21 +40,18 @@ * Tim Ferguson:
http://www.csse.monash.edu.au/~timf/
* ------------------------------------------------------------------------ */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - #include <stdarg.h> -#include <windef.h> -#include <winbase.h> -#include <wingdi.h> -//#include "winuser.h" -//#include "commdlg.h" -#include <vfw.h> -//#include "mmsystem.h" +#include "windef.h" +#include "winbase.h" +#include "wingdi.h" +#include "winuser.h" +#include "commdlg.h" +#include "vfw.h" +#include "mmsystem.h" #include "iccvid_private.h" -#include <wine/debug.h> +#include "wine/debug.h" +#include "wine/heap.h" WINE_DEFAULT_DEBUG_CHANNEL(iccvid); @@ -85,16 +82,6 @@ typedef struct _ICCVID_Info cinepak_info *cvinfo; } ICCVID_Info; -static inline void* __WINE_ALLOC_SIZE(1) heap_alloc(size_t size) -{ - return HeapAlloc(GetProcessHeap(), 0, size); -} - -static inline BOOL heap_free(void *mem) -{ - return HeapFree(GetProcessHeap(), 0, mem); -} - /* ------------------------------------------------------------------------ */ static unsigned char *in_buffer, uiclip[1024], *uiclp = NULL; @@ -182,6 +169,10 @@ int x, y; } } +static inline int get_stride(int width, int depth) +{ + return ((depth * width + 31) >> 3) & ~3; +} /* ------------------------------------------------------------------------ */ static void cvid_v4_32(unsigned char *frm, unsigned char *limit, int stride, BOOL inverted, @@ -463,7 +454,7 @@ static void decode_cinepak(cinepak_info *cvinfo, unsigned char *buf, int size, break; } - frm_stride = out_width * bpp; + frm_stride = get_stride(out_width, bpp * 8); frm_ptr = output; if(frame.length != size) @@ -848,9 +839,9 @@ static LRESULT ICCVID_DecompressGetFormat( ICCVID_Info *info, LPBITMAPINFO in, L if( out ) { memcpy( out, in, size ); + out->bmiHeader.biBitCount = 24; out->bmiHeader.biCompression = BI_RGB; - out->bmiHeader.biSizeImage = in->bmiHeader.biHeight - * in->bmiHeader.biWidth *4; + out->bmiHeader.biSizeImage = get_stride(in->bmiHeader.biWidth, 24) * in->bmiHeader.biHeight; return ICERR_OK; } return size; diff --git a/dll/win32/iccvid/iccvid_private.h b/dll/win32/iccvid/iccvid_private.h index 40319c2376..56b082d844 100644 --- a/dll/win32/iccvid/iccvid_private.h +++ b/dll/win32/iccvid/iccvid_private.h @@ -19,7 +19,7 @@ #ifndef __ICCVID_PRIVATE_H #define __ICCVID_PRIVATE_H -//#include <windef.h> +#include <windef.h> #define IDS_NAME 100 #define IDS_DESCRIPTION 101 diff --git a/media/doc/README.WINE b/media/doc/README.WINE index e724dd87db..0fdb236751 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -73,7 +73,7 @@ reactos/dll/win32/hhctrl.ocx # Synced to WineStaging-3.3 reactos/dll/win32/hlink # Synced to WineStaging-3.3 reactos/dll/win32/hnetcfg # Synced to WineStaging-3.3 reactos/dll/win32/httpapi # Synced to WineStaging-3.3 -reactos/dll/win32/iccvid # Synced to Wine-3.0 +reactos/dll/win32/iccvid # Synced to WineStaging-3.3 reactos/dll/win32/ieframe # Synced to Wine-3.0 reactos/dll/win32/imaadp32.acm # Synced to WineStaging-2.16 reactos/dll/win32/imagehlp # Synced to Wine-3.0
6 years, 9 months
1
0
0
0
01/01: [HTTPAPI] Sync with Wine Staging 3.3. CORE-14434
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1bcc1c247d725887d48de…
commit 1bcc1c247d725887d48def48175a524b092f9fcb Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Thu Mar 15 12:24:03 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Thu Mar 15 12:24:03 2018 +0100 [HTTPAPI] Sync with Wine Staging 3.3. CORE-14434 --- dll/win32/httpapi/httpapi_main.c | 14 +++++--------- media/doc/README.WINE | 2 +- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/dll/win32/httpapi/httpapi_main.c b/dll/win32/httpapi/httpapi_main.c index 13e4810aca..1b35cd656f 100644 --- a/dll/win32/httpapi/httpapi_main.c +++ b/dll/win32/httpapi/httpapi_main.c @@ -18,18 +18,14 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#include <config.h> +#include "config.h" #include <stdarg.h> -#include <windef.h> -#include <winbase.h> -#include <http.h> -#include <wine/debug.h> +#include "windef.h" +#include "winbase.h" +#include "http.h" +#include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(httpapi); diff --git a/media/doc/README.WINE b/media/doc/README.WINE index b4ebdd7438..e724dd87db 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -72,7 +72,7 @@ reactos/dll/win32/gdiplus # Synced to WineStaging-3.3 reactos/dll/win32/hhctrl.ocx # Synced to WineStaging-3.3 reactos/dll/win32/hlink # Synced to WineStaging-3.3 reactos/dll/win32/hnetcfg # Synced to WineStaging-3.3 -reactos/dll/win32/httpapi # Synced to WineStaging-2.9 +reactos/dll/win32/httpapi # Synced to WineStaging-3.3 reactos/dll/win32/iccvid # Synced to Wine-3.0 reactos/dll/win32/ieframe # Synced to Wine-3.0 reactos/dll/win32/imaadp32.acm # Synced to WineStaging-2.16
6 years, 9 months
1
0
0
0
01/01: [HNETCFG] Sync with Wine Staging 3.3. CORE-14434
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=36755f12cbf8e8b7fbf35…
commit 36755f12cbf8e8b7fbf35f1da48aa6c943e1d7c4 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Thu Mar 15 12:23:02 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Thu Mar 15 12:23:02 2018 +0100 [HNETCFG] Sync with Wine Staging 3.3. CORE-14434 --- dll/win32/hnetcfg/CMakeLists.txt | 4 ++-- dll/win32/hnetcfg/apps.c | 43 +++++++++++++++++++++++++++++++++---- dll/win32/hnetcfg/hnetcfg.c | 13 ++++++++++- dll/win32/hnetcfg/hnetcfg_private.h | 23 +------------------- dll/win32/hnetcfg/manager.c | 17 +++++++++++++++ dll/win32/hnetcfg/policy.c | 16 ++++++++++++++ dll/win32/hnetcfg/port.c | 16 +++++++++++++- dll/win32/hnetcfg/precomp.h | 24 +++++++++++++++++++++ dll/win32/hnetcfg/profile.c | 16 ++++++++++++++ dll/win32/hnetcfg/service.c | 16 ++++++++++++++ media/doc/README.WINE | 2 +- 11 files changed, 159 insertions(+), 31 deletions(-) diff --git a/dll/win32/hnetcfg/CMakeLists.txt b/dll/win32/hnetcfg/CMakeLists.txt index fd216b2a2c..fd3ab10d92 100644 --- a/dll/win32/hnetcfg/CMakeLists.txt +++ b/dll/win32/hnetcfg/CMakeLists.txt @@ -11,7 +11,7 @@ list(APPEND SOURCE port.c profile.c service.c - hnetcfg_private.h) + precomp.h) add_library(hnetcfg SHARED ${SOURCE} @@ -30,5 +30,5 @@ set_module_type(hnetcfg win32dll) add_dependencies(hnetcfg stdole2) target_link_libraries(hnetcfg wine uuid) add_importlibs(hnetcfg ole32 oleaut32 advapi32 msvcrt kernel32 ntdll) -add_pch(hnetcfg hnetcfg_private.h SOURCE) +add_pch(hnetcfg precomp.h SOURCE) add_cd_file(TARGET hnetcfg DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/hnetcfg/apps.c b/dll/win32/hnetcfg/apps.c index 51463e0b27..e63da7f56e 100644 --- a/dll/win32/hnetcfg/apps.c +++ b/dll/win32/hnetcfg/apps.c @@ -16,15 +16,29 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "config.h" +#include <stdarg.h> +#include <stdio.h> + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "ole2.h" +#include "netfw.h" + +#include "wine/debug.h" +#include "wine/unicode.h" #include "hnetcfg_private.h" -#include <winnls.h> -#include <ole2.h> +WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg); typedef struct fw_app { INetFwAuthorizedApplication INetFwAuthorizedApplication_iface; LONG refs; + BSTR filename; } fw_app; static inline fw_app *impl_from_INetFwAuthorizedApplication( INetFwAuthorizedApplication *iface ) @@ -47,6 +61,7 @@ static ULONG WINAPI fw_app_Release( if (!refs) { TRACE("destroying %p\n", fw_app); + if (fw_app->filename) SysFreeString( fw_app->filename ); HeapFree( GetProcessHeap(), 0, fw_app ); } return refs; @@ -239,7 +254,18 @@ static HRESULT WINAPI fw_app_get_ProcessImageFileName( fw_app *This = impl_from_INetFwAuthorizedApplication( iface ); FIXME("%p, %p\n", This, imageFileName); - return E_NOTIMPL; + + if (!imageFileName) + return E_INVALIDARG; + + if (!This->filename) + { + *imageFileName = NULL; + return S_OK; + } + + *imageFileName = SysAllocString( This->filename ); + return *imageFileName ? S_OK : E_OUTOFMEMORY; } static HRESULT WINAPI fw_app_put_ProcessImageFileName( @@ -249,7 +275,15 @@ static HRESULT WINAPI fw_app_put_ProcessImageFileName( fw_app *This = impl_from_INetFwAuthorizedApplication( iface ); FIXME("%p, %s\n", This, debugstr_w(imageFileName)); - return S_OK; + + if (!imageFileName) + { + This->filename = NULL; + return S_OK; + } + + This->filename = SysAllocString( imageFileName ); + return This->filename ? S_OK : E_OUTOFMEMORY; } static HRESULT WINAPI fw_app_get_IpVersion( @@ -372,6 +406,7 @@ HRESULT NetFwAuthorizedApplication_create( IUnknown *pUnkOuter, LPVOID *ppObj ) fa->INetFwAuthorizedApplication_iface.lpVtbl = &fw_app_vtbl; fa->refs = 1; + fa->filename = NULL; *ppObj = &fa->INetFwAuthorizedApplication_iface; diff --git a/dll/win32/hnetcfg/hnetcfg.c b/dll/win32/hnetcfg/hnetcfg.c index 5473838dbd..e56dbab9e7 100644 --- a/dll/win32/hnetcfg/hnetcfg.c +++ b/dll/win32/hnetcfg/hnetcfg.c @@ -16,9 +16,20 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include <stdarg.h> + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "objbase.h" +#include "rpcproxy.h" +#include "netfw.h" + +#include "wine/debug.h" #include "hnetcfg_private.h" -#include <rpcproxy.h> +WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg); static HINSTANCE instance; diff --git a/dll/win32/hnetcfg/hnetcfg_private.h b/dll/win32/hnetcfg/hnetcfg_private.h index a901d0d972..26b52d9231 100644 --- a/dll/win32/hnetcfg/hnetcfg_private.h +++ b/dll/win32/hnetcfg/hnetcfg_private.h @@ -16,26 +16,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#ifndef _HNETCFG_PRIVATE_H_ -#define _HNETCFG_PRIVATE_H_ - -#include <wine/config.h> - -#include <stdarg.h> - -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - -#define COBJMACROS - -#include <windef.h> -#include <winbase.h> -#include <objbase.h> -#include <netfw.h> - -#include <wine/debug.h> -WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg); +#pragma once enum type_id { @@ -63,5 +44,3 @@ HRESULT NetFwAuthorizedApplications_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN HRESULT NetFwOpenPorts_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN; HRESULT NetFwOpenPort_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN; HRESULT NetFwServices_create(IUnknown *, LPVOID *) DECLSPEC_HIDDEN; - -#endif /* _HNETCFG_PRIVATE_H_ */ diff --git a/dll/win32/hnetcfg/manager.c b/dll/win32/hnetcfg/manager.c index c76df2b9d0..1d548b41a9 100644 --- a/dll/win32/hnetcfg/manager.c +++ b/dll/win32/hnetcfg/manager.c @@ -16,8 +16,25 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "config.h" +#include <stdarg.h> +#include <stdio.h> + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "initguid.h" +#include "ole2.h" +#include "netfw.h" + +#include "wine/debug.h" +#include "wine/unicode.h" #include "hnetcfg_private.h" +WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg); + typedef struct fw_manager { INetFwMgr INetFwMgr_iface; diff --git a/dll/win32/hnetcfg/policy.c b/dll/win32/hnetcfg/policy.c index a6ea0b10c5..c2f32520bd 100644 --- a/dll/win32/hnetcfg/policy.c +++ b/dll/win32/hnetcfg/policy.c @@ -16,8 +16,24 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "config.h" +#include <stdarg.h> +#include <stdio.h> + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "ole2.h" +#include "netfw.h" + +#include "wine/debug.h" +#include "wine/unicode.h" #include "hnetcfg_private.h" +WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg); + typedef struct fw_policy { INetFwPolicy INetFwPolicy_iface; diff --git a/dll/win32/hnetcfg/port.c b/dll/win32/hnetcfg/port.c index 2dc71b2b08..7d74965076 100644 --- a/dll/win32/hnetcfg/port.c +++ b/dll/win32/hnetcfg/port.c @@ -16,9 +16,23 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "config.h" +#include <stdarg.h> +#include <stdio.h> + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "ole2.h" +#include "netfw.h" + +#include "wine/debug.h" +#include "wine/unicode.h" #include "hnetcfg_private.h" -#include <ole2.h> +WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg); typedef struct fw_port { diff --git a/dll/win32/hnetcfg/precomp.h b/dll/win32/hnetcfg/precomp.h new file mode 100644 index 0000000000..770f1ea075 --- /dev/null +++ b/dll/win32/hnetcfg/precomp.h @@ -0,0 +1,24 @@ + +#ifndef _HNETCFG_PRECOMP_H_ +#define _HNETCFG_PRECOMP_H_ + +#include <wine/config.h> + +#include <stdarg.h> + +#define WIN32_NO_STATUS +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H + +#define COBJMACROS + +#include <windef.h> +#include <winbase.h> +#include <objbase.h> +#include <netfw.h> + +#include <wine/debug.h> + +#include "hnetcfg_private.h" + +#endif /* !_HNETCFG_PRECOMP_H_ */ diff --git a/dll/win32/hnetcfg/profile.c b/dll/win32/hnetcfg/profile.c index 446ef9325a..835e82ed14 100644 --- a/dll/win32/hnetcfg/profile.c +++ b/dll/win32/hnetcfg/profile.c @@ -16,8 +16,24 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "config.h" +#include <stdarg.h> +#include <stdio.h> + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "ole2.h" +#include "netfw.h" + +#include "wine/debug.h" +#include "wine/unicode.h" #include "hnetcfg_private.h" +WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg); + typedef struct fw_profile { INetFwProfile INetFwProfile_iface; diff --git a/dll/win32/hnetcfg/service.c b/dll/win32/hnetcfg/service.c index ab2ea38ee2..fa214b6760 100644 --- a/dll/win32/hnetcfg/service.c +++ b/dll/win32/hnetcfg/service.c @@ -16,8 +16,24 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "config.h" +#include <stdarg.h> +#include <stdio.h> + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "ole2.h" +#include "netfw.h" + +#include "wine/debug.h" +#include "wine/unicode.h" #include "hnetcfg_private.h" +WINE_DEFAULT_DEBUG_CHANNEL(hnetcfg); + typedef struct fw_service { INetFwService INetFwService_iface; diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 36fc36a97a..b4ebdd7438 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -71,7 +71,7 @@ reactos/dll/win32/fusion # Synced to WineStaging-3.3 reactos/dll/win32/gdiplus # Synced to WineStaging-3.3 reactos/dll/win32/hhctrl.ocx # Synced to WineStaging-3.3 reactos/dll/win32/hlink # Synced to WineStaging-3.3 -reactos/dll/win32/hnetcfg # Synced to Wine-3.0 +reactos/dll/win32/hnetcfg # Synced to WineStaging-3.3 reactos/dll/win32/httpapi # Synced to WineStaging-2.9 reactos/dll/win32/iccvid # Synced to Wine-3.0 reactos/dll/win32/ieframe # Synced to Wine-3.0
6 years, 9 months
1
0
0
0
01/01: [HLINK_WINETEST] Sync with Wine Staging 3.3. CORE-14434
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3d690cee5adde79f91d9d…
commit 3d690cee5adde79f91d9d5324d917ba1c935ea92 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Thu Mar 15 12:21:42 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Thu Mar 15 12:21:42 2018 +0100 [HLINK_WINETEST] Sync with Wine Staging 3.3. CORE-14434 --- modules/rostests/winetests/hlink/hlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/rostests/winetests/hlink/hlink.c b/modules/rostests/winetests/hlink/hlink.c index e40807cc8a..3525c4478c 100644 --- a/modules/rostests/winetests/hlink/hlink.c +++ b/modules/rostests/winetests/hlink/hlink.c @@ -891,7 +891,7 @@ static HRESULT WINAPI HlinkBrowseContext_GetObject(IHlinkBrowseContext *iface, ok(fBindIfRootRegistered == 1, "fBindIfRootRegistered = %x\n", fBindIfRootRegistered); *ppiunk = HBC_object; - return HBC_object ? S_OK : S_FALSE; + return HBC_object ? S_OK : 0xdeadbeef; } static HRESULT WINAPI HlinkBrowseContext_Revoke(IHlinkBrowseContext *iface, DWORD dwRegister)
6 years, 9 months
1
0
0
0
01/01: [HLINK] Sync with Wine Staging 3.3. CORE-14434
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7e88971d050a63bac4971…
commit 7e88971d050a63bac4971e72d9f9a8e13c67a319 Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Thu Mar 15 12:20:55 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Thu Mar 15 12:20:55 2018 +0100 [HLINK] Sync with Wine Staging 3.3. CORE-14434 --- dll/win32/hlink/CMakeLists.txt | 4 ++-- dll/win32/hlink/browse_ctx.c | 5 ++++- dll/win32/hlink/extserv.c | 5 +++++ dll/win32/hlink/hlink_main.c | 9 +++++++-- dll/win32/hlink/hlink_private.h | 41 +++++++++-------------------------------- dll/win32/hlink/link.c | 9 +++++++-- dll/win32/hlink/precomp.h | 15 +++++++++++++++ media/doc/README.WINE | 2 +- 8 files changed, 50 insertions(+), 40 deletions(-) diff --git a/dll/win32/hlink/CMakeLists.txt b/dll/win32/hlink/CMakeLists.txt index d77c65ff92..7ce9922751 100644 --- a/dll/win32/hlink/CMakeLists.txt +++ b/dll/win32/hlink/CMakeLists.txt @@ -8,7 +8,7 @@ list(APPEND SOURCE extserv.c hlink_main.c link.c - hlink_private.h) + precomp.h) add_library(hlink SHARED ${SOURCE} @@ -20,5 +20,5 @@ set_module_type(hlink win32dll) target_link_libraries(hlink uuid wine) add_delay_importlibs(hlink urlmon) add_importlibs(hlink shell32 ole32 advapi32 msvcrt kernel32 ntdll) -add_pch(hlink hlink_private.h SOURCE) +add_pch(hlink precomp.h SOURCE) add_cd_file(TARGET hlink DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/hlink/browse_ctx.c b/dll/win32/hlink/browse_ctx.c index 00007f6b52..2038768be4 100644 --- a/dll/win32/hlink/browse_ctx.c +++ b/dll/win32/hlink/browse_ctx.c @@ -20,7 +20,10 @@ #include "hlink_private.h" -#include <wine/list.h> +#include "wine/debug.h" +#include "wine/list.h" + +WINE_DEFAULT_DEBUG_CHANNEL(hlink); struct link_entry { diff --git a/dll/win32/hlink/extserv.c b/dll/win32/hlink/extserv.c index 6c88a4740b..3a97fa9cb9 100644 --- a/dll/win32/hlink/extserv.c +++ b/dll/win32/hlink/extserv.c @@ -18,6 +18,11 @@ #include "hlink_private.h" +#include "wine/debug.h" +#include "wine/unicode.h" + +WINE_DEFAULT_DEBUG_CHANNEL(hlink); + typedef struct { IUnknown IUnknown_inner; IAuthenticate IAuthenticate_iface; diff --git a/dll/win32/hlink/hlink_main.c b/dll/win32/hlink/hlink_main.c index 36b80527e4..b0a20b18bb 100644 --- a/dll/win32/hlink/hlink_main.c +++ b/dll/win32/hlink/hlink_main.c @@ -20,8 +20,13 @@ #include "hlink_private.h" -#include <winreg.h> -#include <rpcproxy.h> +#include "winreg.h" +#include "rpcproxy.h" +#include "hlguids.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(hlink); static HINSTANCE instance; diff --git a/dll/win32/hlink/hlink_private.h b/dll/win32/hlink/hlink_private.h index 1674f662f4..26132091b9 100644 --- a/dll/win32/hlink/hlink_private.h +++ b/dll/win32/hlink/hlink_private.h @@ -16,46 +16,25 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#ifndef _HLINK_PRIVATE_H -#define _HLINK_PRIVATE_H +#pragma once #include <stdarg.h> -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - #define COBJMACROS -#include <windef.h> -#include <winbase.h> -#include <ole2.h> -#include <hlink.h> -#include <hlguids.h> - -#include <wine/unicode.h> +#include "winerror.h" +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "ole2.h" +#include "hlink.h" -#include <wine/debug.h> -WINE_DEFAULT_DEBUG_CHANNEL(hlink); +#include "wine/heap.h" +#include "wine/unicode.h" extern HRESULT HLink_Constructor(IUnknown*,REFIID,void**) DECLSPEC_HIDDEN; extern HRESULT HLinkBrowseContext_Constructor(IUnknown*,REFIID,void**) DECLSPEC_HIDDEN; -static inline void* __WINE_ALLOC_SIZE(1) heap_alloc(size_t size) -{ - return HeapAlloc(GetProcessHeap(), 0, size); -} - -static inline void* __WINE_ALLOC_SIZE(1) heap_alloc_zero(size_t size) -{ - return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size); -} - -static inline BOOL heap_free(void *mem) -{ - return HeapFree(GetProcessHeap(), 0, mem); -} - static inline LPWSTR hlink_strdupW(LPCWSTR str) { LPWSTR ret = NULL; @@ -85,5 +64,3 @@ static inline LPWSTR hlink_co_strdupW(LPCWSTR str) return ret; } - -#endif /* _HLINK_PRIVATE_H */ diff --git a/dll/win32/hlink/link.c b/dll/win32/hlink/link.c index 88b7093c32..25ee45d7c7 100644 --- a/dll/win32/hlink/link.c +++ b/dll/win32/hlink/link.c @@ -20,7 +20,12 @@ #include "hlink_private.h" -#include <shellapi.h> +#include "shellapi.h" +#include "hlguids.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(hlink); #define HLINK_SAVE_MAGIC 0x00000002 #define HLINK_SAVE_MONIKER_PRESENT 0x01 @@ -488,7 +493,7 @@ static HRESULT WINAPI IHlink_fnNavigate(IHlink* iface, DWORD grfHLNF, LPBC pbc, if (phbc) { r = IHlinkBrowseContext_GetObject(phbc, mon, TRUE, &unk); - if (r == S_FALSE) + if (r != S_OK) { CreateBindCtx(0, &bcxt); RegisterBindStatusCallback(bcxt, pbsc, NULL, 0); diff --git a/dll/win32/hlink/precomp.h b/dll/win32/hlink/precomp.h new file mode 100644 index 0000000000..0fc277331b --- /dev/null +++ b/dll/win32/hlink/precomp.h @@ -0,0 +1,15 @@ + +#ifndef _HLINK_PRECOMP_H +#define _HLINK_PRECOMP_H + +#define WIN32_NO_STATUS +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H + +#include "hlink_private.h" + +#include <hlguids.h> + +#include <wine/debug.h> + +#endif /* !_HLINK_PRECOMP_H */ diff --git a/media/doc/README.WINE b/media/doc/README.WINE index 49de8174aa..36fc36a97a 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -70,7 +70,7 @@ reactos/dll/win32/fontsub # Synced to WineStaging-2.9 reactos/dll/win32/fusion # Synced to WineStaging-3.3 reactos/dll/win32/gdiplus # Synced to WineStaging-3.3 reactos/dll/win32/hhctrl.ocx # Synced to WineStaging-3.3 -reactos/dll/win32/hlink # Synced to Wine-3.0 +reactos/dll/win32/hlink # Synced to WineStaging-3.3 reactos/dll/win32/hnetcfg # Synced to Wine-3.0 reactos/dll/win32/httpapi # Synced to WineStaging-2.9 reactos/dll/win32/iccvid # Synced to Wine-3.0
6 years, 9 months
1
0
0
0
01/01: [HHCTRL.OCX] Sync with Wine Staging 3.3. CORE-14434
by Amine Khaldi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=96f371dcdb1874871a206…
commit 96f371dcdb1874871a206e0ff6659042d248ccdd Author: Amine Khaldi <amine.khaldi(a)reactos.org> AuthorDate: Thu Mar 15 12:19:43 2018 +0100 Commit: Amine Khaldi <amine.khaldi(a)reactos.org> CommitDate: Thu Mar 15 12:19:43 2018 +0100 [HHCTRL.OCX] Sync with Wine Staging 3.3. CORE-14434 --- dll/win32/hhctrl.ocx/CMakeLists.txt | 4 +- dll/win32/hhctrl.ocx/chm.c | 143 ++++++++++++++++++++++++++---------- dll/win32/hhctrl.ocx/content.c | 8 ++ dll/win32/hhctrl.ocx/help.c | 11 ++- dll/win32/hhctrl.ocx/hhctrl.c | 17 ++++- dll/win32/hhctrl.ocx/hhctrl.h | 64 +++++----------- dll/win32/hhctrl.ocx/hhctrl.rc | 5 +- dll/win32/hhctrl.ocx/index.c | 5 ++ dll/win32/hhctrl.ocx/precomp.h | 19 +++++ dll/win32/hhctrl.ocx/resource.h | 5 ++ dll/win32/hhctrl.ocx/search.c | 5 ++ dll/win32/hhctrl.ocx/stream.c | 5 ++ dll/win32/hhctrl.ocx/stream.h | 2 +- dll/win32/hhctrl.ocx/webbrowser.c | 5 +- media/doc/README.WINE | 2 +- 15 files changed, 206 insertions(+), 94 deletions(-) diff --git a/dll/win32/hhctrl.ocx/CMakeLists.txt b/dll/win32/hhctrl.ocx/CMakeLists.txt index d94b5b1553..80b7975dca 100644 --- a/dll/win32/hhctrl.ocx/CMakeLists.txt +++ b/dll/win32/hhctrl.ocx/CMakeLists.txt @@ -15,7 +15,7 @@ list(APPEND SOURCE search.c stream.c webbrowser.c - hhctrl.h) + precomp.h) add_library(hhctrl SHARED ${SOURCE} @@ -34,5 +34,5 @@ set_module_type(hhctrl win32ocx) target_link_libraries(hhctrl uuid wine) add_importlibs(hhctrl advapi32 comctl32 shlwapi ole32 oleaut32 user32 gdi32 msvcrt kernel32 ntdll) add_dependencies(hhctrl stdole2 wineheaders) -add_pch(hhctrl hhctrl.h SOURCE) +add_pch(hhctrl precomp.h SOURCE) add_cd_file(TARGET hhctrl DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/hhctrl.ocx/chm.c b/dll/win32/hhctrl.ocx/chm.c index 617e6dfd1c..8cf2539d71 100644 --- a/dll/win32/hhctrl.ocx/chm.c +++ b/dll/win32/hhctrl.ocx/chm.c @@ -20,9 +20,13 @@ */ #include "hhctrl.h" +#include "stream.h" -#include <winreg.h> -#include <shlwapi.h> +#include "winreg.h" +#include "shlwapi.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(htmlhelp); /* Reads a string from the #STRINGS section in the CHM file */ static LPCSTR GetChmString(CHMInfo *chm, DWORD offset) @@ -304,15 +308,31 @@ void MergeChmProperties(HH_WINTYPEW *src, HHInfo *info, BOOL override) #endif } -static inline WCHAR *ConvertChmString(HHInfo *info, const WCHAR **str) +static inline WCHAR *ConvertChmString(HHInfo *info, DWORD id) { WCHAR *ret = NULL; - if(*str) - *str = ret = strdupAtoW(GetChmString(info->pCHMInfo, (DWORD_PTR)*str)); + if(id) + ret = strdupAtoW(GetChmString(info->pCHMInfo, id)); return ret; } +static inline void wintype_free(HH_WINTYPEW *wintype) +{ + heap_free((void *)wintype->pszType); + heap_free((void *)wintype->pszCaption); + heap_free(wintype->paInfoTypes); + heap_free((void *)wintype->pszToc); + heap_free((void *)wintype->pszIndex); + heap_free((void *)wintype->pszFile); + heap_free((void *)wintype->pszHome); + heap_free((void *)wintype->pszJump1); + heap_free((void *)wintype->pszJump2); + heap_free((void *)wintype->pszUrlJump1); + heap_free((void *)wintype->pszUrlJump2); + heap_free((void *)wintype->pszCustomTabs); +} + /* Loads the HH_WINTYPE data from the CHM file * * FIXME: There may be more than one window type in the file, so @@ -321,8 +341,6 @@ static inline WCHAR *ConvertChmString(HHInfo *info, const WCHAR **str) BOOL LoadWinTypeFromCHM(HHInfo *info) { LARGE_INTEGER liOffset; - WCHAR *pszType = NULL, *pszFile = NULL, *pszToc = NULL, *pszIndex = NULL, *pszCaption = NULL; - WCHAR *pszHome = NULL, *pszJump1 = NULL, *pszJump2 = NULL, *pszUrlJump1 = NULL, *pszUrlJump2 = NULL; IStorage *pStorage = info->pCHMInfo->pStorage; IStream *pStream = NULL; HH_WINTYPEW wintype; @@ -330,11 +348,57 @@ BOOL LoadWinTypeFromCHM(HHInfo *info) DWORD cbRead; BOOL ret = FALSE; - static const WCHAR null[] = {0}; + static const WCHAR empty[] = {0}; static const WCHAR toc_extW[] = {'h','h','c',0}; static const WCHAR index_extW[] = {'h','h','k',0}; static const WCHAR windowsW[] = {'#','W','I','N','D','O','W','S',0}; + /* HH_WINTYPE as stored on disk. It's identical to HH_WINTYPE except that the pointer fields + have been changed to DWORDs, so that the layout on 64-bit remains unchanged. */ + struct file_wintype + { + int cbStruct; + BOOL fUniCodeStrings; + DWORD pszType; + DWORD fsValidMembers; + DWORD fsWinProperties; + DWORD pszCaption; + DWORD dwStyles; + DWORD dwExStyles; + RECT rcWindowPos; + int nShowState; + DWORD hwndHelp; + DWORD hwndCaller; + DWORD paInfoTypes; + DWORD hwndToolBar; + DWORD hwndNavigation; + DWORD hwndHTML; + int iNavWidth; + RECT rcHTML; + DWORD pszToc; + DWORD pszIndex; + DWORD pszFile; + DWORD pszHome; + DWORD fsToolBarFlags; + BOOL fNotExpanded; + int curNavType; + int tabpos; + int idNotify; + BYTE tabOrder[HH_MAX_TABS+1]; + int cHistory; + DWORD pszJump1; + DWORD pszJump2; + DWORD pszUrlJump1; + DWORD pszUrlJump2; + RECT rcMinSize; + int cbInfoTypes; + DWORD pszCustomTabs; + } file_wintype; + + memset(&wintype, 0, sizeof(wintype)); + wintype.cbStruct = sizeof(wintype); + wintype.fUniCodeStrings = TRUE; + hr = IStorage_OpenStream(pStorage, windowsW, NULL, STGM_READ, 0, &pStream); if (SUCCEEDED(hr)) { @@ -345,31 +409,45 @@ BOOL LoadWinTypeFromCHM(HHInfo *info) if (FAILED(hr)) goto done; /* read the HH_WINTYPE struct data */ - hr = IStream_Read(pStream, &wintype, sizeof(wintype), &cbRead); + hr = IStream_Read(pStream, &file_wintype, sizeof(file_wintype), &cbRead); if (FAILED(hr)) goto done; /* convert the #STRINGS offsets to actual strings */ - pszType = ConvertChmString(info, &wintype.pszType); - pszFile = ConvertChmString(info, &wintype.pszFile); - pszToc = ConvertChmString(info, &wintype.pszToc); - pszIndex = ConvertChmString(info, &wintype.pszIndex); - pszCaption = ConvertChmString(info, &wintype.pszCaption); - pszHome = ConvertChmString(info, &wintype.pszHome); - pszJump1 = ConvertChmString(info, &wintype.pszJump1); - pszJump2 = ConvertChmString(info, &wintype.pszJump2); - pszUrlJump1 = ConvertChmString(info, &wintype.pszUrlJump1); - pszUrlJump2 = ConvertChmString(info, &wintype.pszUrlJump2); + wintype.pszType = ConvertChmString(info, file_wintype.pszType); + wintype.fsValidMembers = file_wintype.fsValidMembers; + wintype.fsWinProperties = file_wintype.fsWinProperties; + wintype.pszCaption = ConvertChmString(info, file_wintype.pszCaption); + wintype.dwStyles = file_wintype.dwStyles; + wintype.dwExStyles = file_wintype.dwExStyles; + wintype.rcWindowPos = file_wintype.rcWindowPos; + wintype.nShowState = file_wintype.nShowState; + wintype.iNavWidth = file_wintype.iNavWidth; + wintype.rcHTML = file_wintype.rcHTML; + wintype.pszToc = ConvertChmString(info, file_wintype.pszToc); + wintype.pszIndex = ConvertChmString(info, file_wintype.pszIndex); + wintype.pszFile = ConvertChmString(info, file_wintype.pszFile); + wintype.pszHome = ConvertChmString(info, file_wintype.pszHome); + wintype.fsToolBarFlags = file_wintype.fsToolBarFlags; + wintype.fNotExpanded = file_wintype.fNotExpanded; + wintype.curNavType = file_wintype.curNavType; + wintype.tabpos = file_wintype.tabpos; + wintype.idNotify = file_wintype.idNotify; + memcpy(&wintype.tabOrder, file_wintype.tabOrder, sizeof(wintype.tabOrder)); + wintype.cHistory = file_wintype.cHistory; + wintype.pszJump1 = ConvertChmString(info, file_wintype.pszJump1); + wintype.pszJump2 = ConvertChmString(info, file_wintype.pszJump2); + wintype.pszUrlJump1 = ConvertChmString(info, file_wintype.pszUrlJump1); + wintype.pszUrlJump2 = ConvertChmString(info, file_wintype.pszUrlJump2); + wintype.rcMinSize = file_wintype.rcMinSize; + wintype.cbInfoTypes = file_wintype.cbInfoTypes; } else { /* no defined window types so use (hopefully) sane defaults */ static const WCHAR defaultwinW[] = {'d','e','f','a','u','l','t','w','i','n','\0'}; - memset(&wintype, 0, sizeof(wintype)); - wintype.cbStruct = sizeof(wintype); - wintype.fUniCodeStrings = TRUE; - wintype.pszType = pszType = strdupW(info->pCHMInfo->defWindow ? info->pCHMInfo->defWindow : defaultwinW); - wintype.pszToc = pszToc = strdupW(info->pCHMInfo->defToc ? info->pCHMInfo->defToc : null); - wintype.pszIndex = pszIndex = strdupW(null); + wintype.pszType = strdupW(info->pCHMInfo->defWindow ? info->pCHMInfo->defWindow : defaultwinW); + wintype.pszToc = strdupW(info->pCHMInfo->defToc ? info->pCHMInfo->defToc : empty); + wintype.pszIndex = strdupW(empty); wintype.fsValidMembers = 0; wintype.fsWinProperties = HHWIN_PROP_TRI_PANE; wintype.dwStyles = WS_POPUP; @@ -381,24 +459,15 @@ BOOL LoadWinTypeFromCHM(HHInfo *info) /* merge the new data with any pre-existing HH_WINTYPE structure */ MergeChmProperties(&wintype, info, FALSE); if (!info->WinType.pszCaption) - info->WinType.pszCaption = info->stringsW.pszCaption = strdupW(info->pCHMInfo->defTitle ? info->pCHMInfo->defTitle : null); + info->WinType.pszCaption = info->stringsW.pszCaption = strdupW(info->pCHMInfo->defTitle ? info->pCHMInfo->defTitle : empty); if (!info->WinType.pszFile) - info->WinType.pszFile = info->stringsW.pszFile = strdupW(info->pCHMInfo->defTopic ? info->pCHMInfo->defTopic : null); + info->WinType.pszFile = info->stringsW.pszFile = strdupW(info->pCHMInfo->defTopic ? info->pCHMInfo->defTopic : empty); if (!info->WinType.pszToc) info->WinType.pszToc = info->stringsW.pszToc = FindHTMLHelpSetting(info, toc_extW); if (!info->WinType.pszIndex) info->WinType.pszIndex = info->stringsW.pszIndex = FindHTMLHelpSetting(info, index_extW); - heap_free(pszType); - heap_free(pszFile); - heap_free(pszToc); - heap_free(pszIndex); - heap_free(pszCaption); - heap_free(pszHome); - heap_free(pszJump1); - heap_free(pszJump2); - heap_free(pszUrlJump1); - heap_free(pszUrlJump2); + wintype_free(&wintype); ret = TRUE; done: diff --git a/dll/win32/hhctrl.ocx/content.c b/dll/win32/hhctrl.ocx/content.c index 2a411bd69c..6a7c8f8a8c 100644 --- a/dll/win32/hhctrl.ocx/content.c +++ b/dll/win32/hhctrl.ocx/content.c @@ -17,7 +17,15 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#define NONAMELESSUNION + #include "hhctrl.h" +#include "stream.h" +#include "resource.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(htmlhelp); typedef enum { INSERT_NEXT, diff --git a/dll/win32/hhctrl.ocx/help.c b/dll/win32/hhctrl.ocx/help.c index add3b74dac..c7a2a7a9e2 100644 --- a/dll/win32/hhctrl.ocx/help.c +++ b/dll/win32/hhctrl.ocx/help.c @@ -22,8 +22,15 @@ #include "hhctrl.h" -#include <wingdi.h> -#include <wininet.h> +#include "wingdi.h" +#include "commctrl.h" +#include "wininet.h" + +#include "wine/debug.h" + +#include "resource.h" + +WINE_DEFAULT_DEBUG_CHANNEL(htmlhelp); static LRESULT Help_OnSize(HWND hWnd); static void ExpandContract(HHInfo *pHHInfo); diff --git a/dll/win32/hhctrl.ocx/hhctrl.c b/dll/win32/hhctrl.ocx/hhctrl.c index 89cda1f96a..7efca002f9 100644 --- a/dll/win32/hhctrl.ocx/hhctrl.c +++ b/dll/win32/hhctrl.ocx/hhctrl.c @@ -19,9 +19,24 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "wine/debug.h" + +#include <stdarg.h> + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "winnls.h" +#include "htmlhelp.h" +#include "ole2.h" +#include "rpcproxy.h" + +#define INIT_GUID #include "hhctrl.h" -#include <rpcproxy.h> +WINE_DEFAULT_DEBUG_CHANNEL(htmlhelp); HINSTANCE hhctrl_hinstance; BOOL hh_process = FALSE; diff --git a/dll/win32/hhctrl.ocx/hhctrl.h b/dll/win32/hhctrl.ocx/hhctrl.h index 34a9153407..b358f54378 100644 --- a/dll/win32/hhctrl.ocx/hhctrl.h +++ b/dll/win32/hhctrl.ocx/hhctrl.h @@ -22,32 +22,26 @@ #include <stdarg.h> -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H - #define COBJMACROS -#define NONAMELESSUNION -#define NONAMELESSSTRUCT - -#include <windef.h> -#include <winbase.h> -#include <winuser.h> -#include <htmlhelp.h> -#include <ole2.h> -#include <exdisp.h> -#include <mshtmhst.h> -#include <commctrl.h> - -#include <wine/itss.h> -#include <wine/unicode.h> -#include <wine/list.h> - -#include <wine/debug.h> -WINE_DEFAULT_DEBUG_CHANNEL(htmlhelp); -#include "resource.h" -#include "stream.h" +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "winnls.h" +#include "htmlhelp.h" +#include "ole2.h" +#include "exdisp.h" +#include "mshtmhst.h" +#include "commctrl.h" + +#ifdef INIT_GUID +#include "initguid.h" +#endif + +#include "wine/itss.h" +#include "wine/unicode.h" +#include "wine/heap.h" +#include "wine/list.h" #define WB_GOBACK 0 #define WB_GOFORWARD 1 @@ -251,31 +245,11 @@ HHInfo *find_window(const WCHAR *window) DECLSPEC_HIDDEN; /* memory allocation functions */ -static inline void * __WINE_ALLOC_SIZE(1) heap_alloc(size_t len) -{ - return HeapAlloc(GetProcessHeap(), 0, len); -} - -static inline void * __WINE_ALLOC_SIZE(1) heap_alloc_zero(size_t len) -{ - return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len); -} - -static inline void * __WINE_ALLOC_SIZE(2) heap_realloc(void *mem, size_t len) -{ - return HeapReAlloc(GetProcessHeap(), 0, mem, len); -} - static inline void * __WINE_ALLOC_SIZE(2) heap_realloc_zero(void *mem, size_t len) { return HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, mem, len); } -static inline BOOL heap_free(void *mem) -{ - return HeapFree(GetProcessHeap(), 0, mem); -} - static inline LPWSTR strdupW(LPCWSTR str) { LPWSTR ret; @@ -337,4 +311,4 @@ static inline LPSTR strdupWtoA(LPCWSTR str) extern HINSTANCE hhctrl_hinstance DECLSPEC_HIDDEN; extern BOOL hh_process DECLSPEC_HIDDEN; -#endif /* HHCTRL_H */ +#endif diff --git a/dll/win32/hhctrl.ocx/hhctrl.rc b/dll/win32/hhctrl.ocx/hhctrl.rc index aad7643aec..c270efa937 100644 --- a/dll/win32/hhctrl.ocx/hhctrl.rc +++ b/dll/win32/hhctrl.ocx/hhctrl.rc @@ -19,9 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include <windef.h> -#include <htmlhelp.h> - #include "resource.h" /* UTF-8 */ @@ -115,7 +112,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #define WINE_PRODUCTVERSION 5,2,3790,2744 #define WINE_PRODUCTVERSION_STR "5.2.3790.2744" -#include <wine/wine_common_ver.rc> +#include "wine/wine_common_ver.rc" /* @makedep: hhtoolbar.bmp */ IDB_HHTOOLBAR BITMAP "res/hhtoolbar.bmp" diff --git a/dll/win32/hhctrl.ocx/index.c b/dll/win32/hhctrl.ocx/index.c index 327d4d7364..8b80ce24e7 100644 --- a/dll/win32/hhctrl.ocx/index.c +++ b/dll/win32/hhctrl.ocx/index.c @@ -18,6 +18,11 @@ */ #include "hhctrl.h" +#include "stream.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(htmlhelp); /* Fill the TreeView object corresponding to the Index items */ static void fill_index_tree(HWND hwnd, IndexItem *item) diff --git a/dll/win32/hhctrl.ocx/precomp.h b/dll/win32/hhctrl.ocx/precomp.h new file mode 100644 index 0000000000..fa41030858 --- /dev/null +++ b/dll/win32/hhctrl.ocx/precomp.h @@ -0,0 +1,19 @@ + +#ifndef _HHCTRL_PRECOMP_H +#define _HHCTRL_PRECOMP_H + +#define WIN32_NO_STATUS +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H + +#define NONAMELESSUNION +#define NONAMELESSSTRUCT + +#include "hhctrl.h" + +#include <wine/debug.h> + +#include "resource.h" +#include "stream.h" + +#endif /* !_HHCTRL_PRECOMP_H */ diff --git a/dll/win32/hhctrl.ocx/resource.h b/dll/win32/hhctrl.ocx/resource.h index 1a1ca0ed22..f2b4383493 100644 --- a/dll/win32/hhctrl.ocx/resource.h +++ b/dll/win32/hhctrl.ocx/resource.h @@ -20,6 +20,11 @@ #pragma once +#include <windef.h> +#include <winbase.h> +#include <wingdi.h> +#include <htmlhelp.h> + #define IDS_CONTENTS 1 #define IDS_INDEX 2 #define IDS_SEARCH 3 diff --git a/dll/win32/hhctrl.ocx/search.c b/dll/win32/hhctrl.ocx/search.c index 874889071b..d758a1b30f 100644 --- a/dll/win32/hhctrl.ocx/search.c +++ b/dll/win32/hhctrl.ocx/search.c @@ -17,6 +17,11 @@ */ #include "hhctrl.h" +#include "stream.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(htmlhelp); static SearchItem *SearchCHM_Folder(SearchItem *item, IStorage *pStorage, const WCHAR *folder, const char *needle); diff --git a/dll/win32/hhctrl.ocx/stream.c b/dll/win32/hhctrl.ocx/stream.c index 226aa70184..b4239ca5b6 100644 --- a/dll/win32/hhctrl.ocx/stream.c +++ b/dll/win32/hhctrl.ocx/stream.c @@ -17,6 +17,11 @@ */ #include "hhctrl.h" +#include "stream.h" + +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(htmlhelp); void strbuf_init(strbuf_t *buf) { diff --git a/dll/win32/hhctrl.ocx/stream.h b/dll/win32/hhctrl.ocx/stream.h index b45869b738..8d61ad54d5 100644 --- a/dll/win32/hhctrl.ocx/stream.h +++ b/dll/win32/hhctrl.ocx/stream.h @@ -45,4 +45,4 @@ BOOL next_content(stream_t *stream, strbuf_t *buf) DECLSPEC_HIDDEN; BOOL next_node(stream_t *stream, strbuf_t *buf) DECLSPEC_HIDDEN; const char *get_attr(const char *node, const char *name, int *len) DECLSPEC_HIDDEN; -#endif /* HHCTRL_STREAM_H */ +#endif diff --git a/dll/win32/hhctrl.ocx/webbrowser.c b/dll/win32/hhctrl.ocx/webbrowser.c index 0ffc69898b..e44c4ecd9d 100644 --- a/dll/win32/hhctrl.ocx/webbrowser.c +++ b/dll/win32/hhctrl.ocx/webbrowser.c @@ -19,8 +19,11 @@ */ #include "hhctrl.h" +#include "resource.h" -#include <mshtmhst.h> +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(htmlhelp); static inline WebBrowserContainer *impl_from_IOleClientSite(IOleClientSite *iface) { diff --git a/media/doc/README.WINE b/media/doc/README.WINE index fc1cce6951..49de8174aa 100644 --- a/media/doc/README.WINE +++ b/media/doc/README.WINE @@ -69,7 +69,7 @@ reactos/dll/win32/faultrep # Synced to WineStaging-2.9 reactos/dll/win32/fontsub # Synced to WineStaging-2.9 reactos/dll/win32/fusion # Synced to WineStaging-3.3 reactos/dll/win32/gdiplus # Synced to WineStaging-3.3 -reactos/dll/win32/hhctrl.ocx # Synced to Wine-3.0 +reactos/dll/win32/hhctrl.ocx # Synced to WineStaging-3.3 reactos/dll/win32/hlink # Synced to Wine-3.0 reactos/dll/win32/hnetcfg # Synced to Wine-3.0 reactos/dll/win32/httpapi # Synced to WineStaging-2.9
6 years, 9 months
1
0
0
0
01/01: [BUS][ACPI] Silence DPRINT1 in the special case of IOCTL_BATTERY_QUERY_TAG (#427)
by Bișoc George
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1a951aa4e60fc1783833c…
commit 1a951aa4e60fc1783833c02799d04a549ffdae2b Author: Bișoc George <fraizeraust99(a)gmail.com> AuthorDate: Mon Mar 12 15:29:14 2018 +0100 Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org> CommitDate: Mon Mar 12 15:29:14 2018 +0100 [BUS][ACPI] Silence DPRINT1 in the special case of IOCTL_BATTERY_QUERY_TAG (#427) --- drivers/bus/acpi/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/bus/acpi/main.c b/drivers/bus/acpi/main.c index b58c097eed..d9dc256312 100644 --- a/drivers/bus/acpi/main.c +++ b/drivers/bus/acpi/main.c @@ -311,6 +311,10 @@ ACPIDispatchDeviceControl( status = STATUS_PENDING; break; + + case IOCTL_BATTERY_QUERY_TAG: + DPRINT("IOCTL_BATTERY_QUERY_TAG is not supported!\n"); + break; default: DPRINT1("Unsupported IOCTL: %x\n", irpStack->Parameters.DeviceIoControl.IoControlCode);
6 years, 9 months
1
0
0
0
01/01: [CONSRV] Fix build
by Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=741ae8ccdc87beb774632…
commit 741ae8ccdc87beb7746321c74384586149fa67b6 Author: Pierre Schweitzer <pierre(a)reactos.org> AuthorDate: Sun Mar 11 21:19:11 2018 +0100 Commit: Pierre Schweitzer <pierre(a)reactos.org> CommitDate: Sun Mar 11 21:19:11 2018 +0100 [CONSRV] Fix build --- win32ss/user/winsrv/consrv/frontends/gui/graphics.c | 2 +- win32ss/user/winsrv/consrv/frontends/gui/text.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/win32ss/user/winsrv/consrv/frontends/gui/graphics.c b/win32ss/user/winsrv/consrv/frontends/gui/graphics.c index 6b7084b8c6..4b0662f9de 100644 --- a/win32ss/user/winsrv/consrv/frontends/gui/graphics.c +++ b/win32ss/user/winsrv/consrv/frontends/gui/graphics.c @@ -129,7 +129,7 @@ GuiPaintGraphicsBuffer(PGRAPHICS_SCREEN_BUFFER Buffer, PCONSRV_CONSOLE Console = Buffer->Header.Console; // ASSERT(Console == GuiData->Console); - SetRectEmpty(&rcFramebuffer); + SetRectEmpty(rcFramebuffer); if (Buffer->BitMap == NULL) return; diff --git a/win32ss/user/winsrv/consrv/frontends/gui/text.c b/win32ss/user/winsrv/consrv/frontends/gui/text.c index 21355ed81f..8e6e870399 100644 --- a/win32ss/user/winsrv/consrv/frontends/gui/text.c +++ b/win32ss/user/winsrv/consrv/frontends/gui/text.c @@ -358,7 +358,7 @@ GuiPaintTextModeBuffer(PTEXTMODE_SCREEN_BUFFER Buffer, HFONT OldFont, NewFont; BOOLEAN IsUnderline; - SetRectEmpty(&rcFramebuffer); + SetRectEmpty(rcFramebuffer); if (Buffer->Buffer == NULL) return;
6 years, 9 months
1
0
0
0
01/01: [RAPPS] Replace Extract with FDI for handling .cab
by Alexander Shaposhnikov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=95915501162e727900e07…
commit 95915501162e727900e077d97026a3e2e00f117c Author: Alexander Shaposhnikov <sanchaez(a)reactos.org> AuthorDate: Sun Feb 25 15:20:00 2018 +0200 Commit: Alexander Shaposhnikov <sanchaez(a)reactos.org> CommitDate: Sun Mar 11 21:56:32 2018 +0200 [RAPPS] Replace Extract with FDI for handling .cab FDI allows to have user-defined callbacks for file handling. Since it doesn't provide support for Unicode we convert strings to multi-byte UTF-8 and handle them appropriately in the callbacks. They are properly null-terminated so FDI won't choke when doing operations with strings. Thanks to hbelusca and mjansen for the help. CORE-14466 --- base/applications/rapps/CMakeLists.txt | 2 +- base/applications/rapps/available.cpp | 8 +- base/applications/rapps/cabinet.cpp | 334 ++++++++++++++++++++++++++++ base/applications/rapps/include/available.h | 2 + base/applications/rapps/include/cabinet.h | 32 --- base/applications/rapps/include/misc.h | 6 +- base/applications/rapps/misc.cpp | 54 ----- 7 files changed, 348 insertions(+), 90 deletions(-) diff --git a/base/applications/rapps/CMakeLists.txt b/base/applications/rapps/CMakeLists.txt index cdbb6f97dc..ce8ba3a0ba 100644 --- a/base/applications/rapps/CMakeLists.txt +++ b/base/applications/rapps/CMakeLists.txt @@ -9,6 +9,7 @@ include_directories(include) list(APPEND SOURCE aboutdlg.cpp available.cpp + cabinet.cpp gui.cpp installed.cpp integrity.cpp @@ -22,7 +23,6 @@ list(APPEND SOURCE include/gui.h include/dialogs.h include/installed.h - include/cabinet.h include/crichedit.h include/defines.h include/misc.h diff --git a/base/applications/rapps/available.cpp b/base/applications/rapps/available.cpp index 04e5005e5a..5ed7119853 100644 --- a/base/applications/rapps/available.cpp +++ b/base/applications/rapps/available.cpp @@ -213,7 +213,9 @@ AvailableStrings::AvailableStrings() if (GetStorageDirectory(szPath)) { szAppsPath = szPath + L"\\rapps\\"; - szCabPath = szPath + L"\\rappmgr.cab"; + szCabName = L"rappmgr.cab"; + szCabDir = szPath; + szCabPath = (szCabDir + L"\\") + szCabName; szSearchPath = szAppsPath + L"*.txt"; } } @@ -282,7 +284,9 @@ BOOL CAvailableApps::UpdateAppsDB() CDownloadManager::DownloadApplicationsDB(APPLICATION_DATABASE_URL); - if (!ExtractFilesFromCab(m_Strings.szCabPath, m_Strings.szAppsPath)) + if (!ExtractFilesFromCab(m_Strings.szCabName, + m_Strings.szCabDir, + m_Strings.szAppsPath)) { return FALSE; } diff --git a/base/applications/rapps/cabinet.cpp b/base/applications/rapps/cabinet.cpp new file mode 100644 index 0000000000..11b301ed9c --- /dev/null +++ b/base/applications/rapps/cabinet.cpp @@ -0,0 +1,334 @@ +/* +* PROJECT: ReactOS Applications Manager +* LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+
) +* FILE: base/applications/rapps/cabinet.cpp +* PURPOSE: Cabinet extraction using FDI API +* COPYRIGHT: Copyright 2018 Alexander Shaposhnikov (sanchaez(a)reactos.org) +*/ +#include "rapps.h" + +#include <fdi.h> +#include <fcntl.h> + +/* + * HACK: treat any input strings as Unicode (UTF-8) + * cabinet.dll lacks any sort of a Unicode API, but FCI/FDI + * provide an ability to use user-defined callbacks for any file or memory + * operations. This flexibility and the magic power of C/C++ casting allows + * us to treat input as we please. + * This is by far the best way to extract .cab using Unicode paths. + */ + +/* String conversion helper functions */ + +// converts CStringW to CStringA using a given codepage +inline BOOL WideToMultiByte(const CStringW& szSource, + CStringA& szDest, + UINT Codepage) +{ + // determine the needed size + INT sz = WideCharToMultiByte(Codepage, + 0, + szSource, + -1, + NULL, + NULL, + NULL, + NULL); + if (!sz) + return FALSE; + + // do the actual conversion + sz = WideCharToMultiByte(Codepage, + 0, + szSource, + -1, + szDest.GetBuffer(sz), + sz, + NULL, + NULL); + + szDest.ReleaseBuffer(); + return sz != 0; +} + +// converts CStringA to CStringW using a given codepage +inline BOOL MultiByteToWide(const CStringA& szSource, + CStringW& szDest, + UINT Codepage) +{ + // determine the needed size + INT sz = MultiByteToWideChar(Codepage, + 0, + szSource, + -1, + NULL, + NULL); + if (!sz) + return FALSE; + + // do the actual conversion + sz = MultiByteToWideChar(CP_UTF8, + 0, + szSource, + -1, + szDest.GetBuffer(sz), + sz); + + szDest.ReleaseBuffer(); + return sz != 0; +} + +/* FDICreate callbacks */ + +FNALLOC(fnMemAlloc) +{ + return HeapAlloc(GetProcessHeap(), NULL, cb); +} + +FNFREE(fnMemFree) +{ + HeapFree(GetProcessHeap(), NULL, pv); +} + +FNOPEN(fnFileOpen) +{ + HANDLE hFile = NULL; + DWORD dwDesiredAccess = 0; + DWORD dwCreationDisposition = 0; + ATL::CStringW szFileName; + + UNREFERENCED_PARAMETER(pmode); + + if (oflag & _O_RDWR) + { + dwDesiredAccess = GENERIC_READ | GENERIC_WRITE; + } + else if (oflag & _O_WRONLY) + { + dwDesiredAccess = GENERIC_WRITE; + } + else + { + dwDesiredAccess = GENERIC_READ; + } + + if (oflag & _O_CREAT) + { + dwCreationDisposition = CREATE_ALWAYS; + } + else + { + dwCreationDisposition = OPEN_EXISTING; + } + + MultiByteToWide(pszFile, szFileName, CP_UTF8); + + hFile = CreateFileW(szFileName, + dwDesiredAccess, + FILE_SHARE_READ, + NULL, + dwCreationDisposition, + FILE_ATTRIBUTE_NORMAL, + NULL); + + return (INT_PTR) hFile; +} + +FNREAD(fnFileRead) +{ + DWORD dwBytesRead = 0; + + if (ReadFile((HANDLE) hf, pv, cb, &dwBytesRead, NULL) == FALSE) + { + dwBytesRead = (DWORD) -1L; + } + + return dwBytesRead; +} + +FNWRITE(fnFileWrite) +{ + DWORD dwBytesWritten = 0; + + if (WriteFile((HANDLE) hf, pv, cb, &dwBytesWritten, NULL) == FALSE) + { + dwBytesWritten = (DWORD) -1; + } + + return dwBytesWritten; +} + +FNCLOSE(fnFileClose) +{ + return (CloseHandle((HANDLE) hf) != FALSE) ? 0 : -1; +} + +FNSEEK(fnFileSeek) +{ + return SetFilePointer((HANDLE) hf, dist, NULL, seektype); +} + +/* FDICopy callbacks */ + +FNFDINOTIFY(fnNotify) +{ + INT_PTR iResult = 0; + + switch (fdint) + { + case fdintCOPY_FILE: + { + ATL::CStringW szNewFileName, szExtractDir, szCabFileName; + ATL::CStringA szFilePathUTF8; + + // Append the destination directory to the file name. + MultiByteToWide((LPCSTR) pfdin->pv, szExtractDir, CP_UTF8); + MultiByteToWide(pfdin->psz1, szCabFileName, CP_ACP); + + szNewFileName = szExtractDir + L"\\" + szCabFileName; + + WideToMultiByte(szNewFileName, szFilePathUTF8, CP_UTF8); + + // Copy file + iResult = fnFileOpen((LPSTR) szFilePathUTF8.GetString(), + _O_WRONLY | _O_CREAT, + 0); + } + break; + + case fdintCLOSE_FILE_INFO: + iResult = !fnFileClose(pfdin->hf); + break; + + case fdintNEXT_CABINET: + if (pfdin->fdie != FDIERROR_NONE) + { + iResult = -1; + } + break; + + case fdintPARTIAL_FILE: + iResult = 0; + break; + + case fdintCABINET_INFO: + iResult = 0; + break; + + case fdintENUMERATE: + iResult = 0; + break; + + default: + iResult = -1; + break; + } + + return iResult; +} + +/* cabinet.dll FDI function pointers */ + +typedef HFDI(*fnFDICreate)(PFNALLOC, + PFNFREE, + PFNOPEN, + PFNREAD, + PFNWRITE, + PFNCLOSE, + PFNSEEK, + int, + PERF); + +typedef BOOL(*fnFDICopy)(HFDI, + LPSTR, + LPSTR, + INT, + PFNFDINOTIFY, + PFNFDIDECRYPT, + void FAR *pvUser); + +typedef BOOL(*fnFDIDestroy)(HFDI); + +/* + * Extraction function + * TODO: require only a full path to the cab as an argument + */ +BOOL ExtractFilesFromCab(const ATL::CStringW& szCabName, + const ATL::CStringW& szCabDir, + const ATL::CStringW& szOutputDir) +{ + HINSTANCE hCabinetDll; + HFDI ExtractHandler; + ERF ExtractErrors; + ATL::CStringA szCabNameUTF8, szCabDirUTF8, szOutputDirUTF8; + fnFDICreate pfnFDICreate; + fnFDICopy pfnFDICopy; + fnFDIDestroy pfnFDIDestroy; + BOOL bResult; + + // Load cabinet.dll and extract needed functions + hCabinetDll = LoadLibraryW(L"cabinet.dll"); + + if (!hCabinetDll) + { + return FALSE; + } + + pfnFDICreate = (fnFDICreate) GetProcAddress(hCabinetDll, "FDICreate"); + pfnFDICopy = (fnFDICopy) GetProcAddress(hCabinetDll, "FDICopy"); + pfnFDIDestroy = (fnFDIDestroy) GetProcAddress(hCabinetDll, "FDIDestroy"); + + if (!pfnFDICreate || !pfnFDICopy || !pfnFDIDestroy) + { + FreeLibrary(hCabinetDll); + return FALSE; + } + + // Create FDI context + ExtractHandler = pfnFDICreate(fnMemAlloc, + fnMemFree, + fnFileOpen, + fnFileRead, + fnFileWrite, + fnFileClose, + fnFileSeek, + cpuUNKNOWN, + &ExtractErrors); + + if (!ExtractHandler) + { + FreeLibrary(hCabinetDll); + return FALSE; + } + + // Create output dir + bResult = CreateDirectoryW(szOutputDir, NULL); + + if (bResult || GetLastError() == ERROR_ALREADY_EXISTS) + { + // Convert wide strings to UTF-8 + bResult = WideToMultiByte(szCabName, szCabNameUTF8, CP_UTF8); + bResult &= WideToMultiByte(szCabDir, szCabDirUTF8, CP_UTF8); + bResult &= WideToMultiByte(szOutputDir, szOutputDirUTF8, CP_UTF8); + } + + // Perform extraction + if (bResult) + { + // Add a slash to cab name as required by the api + szCabNameUTF8 = "\\" + szCabNameUTF8; + + bResult = pfnFDICopy(ExtractHandler, + (LPSTR) szCabNameUTF8.GetString(), + (LPSTR) szCabDirUTF8.GetString(), + 0, + fnNotify, + NULL, + (void FAR *) szOutputDirUTF8.GetString()); + } + + pfnFDIDestroy(ExtractHandler); + FreeLibrary(hCabinetDll); + return bResult; +} diff --git a/base/applications/rapps/include/available.h b/base/applications/rapps/include/available.h index 782f960be8..876465fd09 100644 --- a/base/applications/rapps/include/available.h +++ b/base/applications/rapps/include/available.h @@ -86,6 +86,8 @@ struct AvailableStrings ATL::CStringW szCabPath; ATL::CStringW szAppsPath; ATL::CStringW szSearchPath; + ATL::CStringW szCabName; + ATL::CStringW szCabDir; AvailableStrings(); }; diff --git a/base/applications/rapps/include/cabinet.h b/base/applications/rapps/include/cabinet.h deleted file mode 100644 index 02bbd5738d..0000000000 --- a/base/applications/rapps/include/cabinet.h +++ /dev/null @@ -1,32 +0,0 @@ -// Structs related to .cab extraction -// FIXME: they should belong to exports of cabinet.dll -#pragma once - -struct ERF -{ - INT erfOper; - INT erfType; - BOOL fError; -}; - -struct FILELIST -{ - LPSTR FileName; - FILELIST *next; - BOOL DoExtract; -}; - -struct SESSION -{ - INT FileSize; - ERF Error; - FILELIST *FileList; - INT FileCount; - INT Operation; - CHAR Destination[MAX_PATH]; - CHAR CurrentFile[MAX_PATH]; - CHAR Reserved[MAX_PATH]; - FILELIST *FilterList; -}; - -typedef HRESULT(WINAPI *fnExtract)(SESSION *dest, LPCSTR szCabName); diff --git a/base/applications/rapps/include/misc.h b/base/applications/rapps/include/misc.h index b3f3063001..738f6746cb 100644 --- a/base/applications/rapps/include/misc.h +++ b/base/applications/rapps/include/misc.h @@ -14,12 +14,16 @@ VOID ShowPopupMenu(HWND hwnd, UINT MenuID, UINT DefaultItem); BOOL StartProcess(ATL::CStringW &Path, BOOL Wait); BOOL StartProcess(LPWSTR lpPath, BOOL Wait); BOOL GetStorageDirectory(ATL::CStringW &lpDirectory); -BOOL ExtractFilesFromCab(LPCWSTR lpCabName, LPCWSTR lpOutputPath); + VOID InitLogs(); VOID FreeLogs(); BOOL WriteLogMessage(WORD wType, DWORD dwEventID, LPCWSTR lpMsg); BOOL GetInstalledVersion(ATL::CStringW *pszVersion, const ATL::CStringW &szRegName); +BOOL ExtractFilesFromCab(const ATL::CStringW& szCabName, + const ATL::CStringW& szCabDir, + const ATL::CStringW& szOutputDir); + class CConfigParser { // Locale names cache diff --git a/base/applications/rapps/misc.cpp b/base/applications/rapps/misc.cpp index 1a527317af..db0ae0bf1b 100644 --- a/base/applications/rapps/misc.cpp +++ b/base/applications/rapps/misc.cpp @@ -11,11 +11,6 @@ #include "gui.h" #include "misc.h" -#include "cabinet.h" - - /* SESSION Operation */ -#define EXTRACT_FILLFILELIST 0x00000001 -#define EXTRACT_EXTRACTFILES 0x00000002 static HANDLE hLog = NULL; @@ -203,55 +198,6 @@ BOOL GetStorageDirectory(ATL::CStringW& Directory) return (CreateDirectoryW(Directory.GetString(), NULL) || GetLastError() == ERROR_ALREADY_EXISTS); } -BOOL ExtractFilesFromCab(const ATL::CStringW &CabName, const ATL::CStringW &OutputPath) -{ - return ExtractFilesFromCab(CabName.GetString(), OutputPath.GetString()); -} - -BOOL ExtractFilesFromCab(LPCWSTR lpCabName, LPCWSTR lpOutputPath) -{ - HINSTANCE hCabinetDll; - CHAR szCabName[MAX_PATH]; - SESSION Dest; - HRESULT Result; - fnExtract pfnExtract; - - hCabinetDll = LoadLibraryW(L"cabinet.dll"); - if (hCabinetDll) - { - pfnExtract = (fnExtract) GetProcAddress(hCabinetDll, "Extract"); - if (pfnExtract) - { - ZeroMemory(&Dest, sizeof(Dest)); - - WideCharToMultiByte(CP_ACP, 0, lpOutputPath, -1, Dest.Destination, MAX_PATH, NULL, NULL); - WideCharToMultiByte(CP_ACP, 0, lpCabName, -1, szCabName, _countof(szCabName), NULL, NULL); - Dest.Operation = EXTRACT_FILLFILELIST; - - Result = pfnExtract(&Dest, szCabName); - if (Result == S_OK) - { - Dest.Operation = EXTRACT_EXTRACTFILES; - CreateDirectoryW(lpOutputPath, NULL); - - Result = pfnExtract(&Dest, szCabName); - if (Result == S_OK) - { - FreeLibrary(hCabinetDll); - return TRUE; - } - else - { - RemoveDirectoryW(lpOutputPath); - } - } - } - FreeLibrary(hCabinetDll); - } - - return FALSE; -} - VOID InitLogs() { if (!SettingsInfo.bLogEnabled)
6 years, 9 months
1
0
0
0
01/01: [CONSRV] Initialize rcFramebuffer in every case, otherwise it is left unintialized in case of e.g. console termination. (#428, #429) Fixes CORE-14463. Debugged and and fix suggested by Timo Kreuzer.
by Michael Fritscher
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=602db402771064216d834…
commit 602db402771064216d834b31a0c944afa866e307 Author: Michael Fritscher <reactos(a)mifritscher.de> AuthorDate: Sun Mar 11 17:49:17 2018 +0100 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sun Mar 11 20:31:40 2018 +0100 [CONSRV] Initialize rcFramebuffer in every case, otherwise it is left unintialized in case of e.g. console termination. (#428, #429) Fixes CORE-14463. Debugged and and fix suggested by Timo Kreuzer. Signed-off-by: Michael Fritscher <reactos(a)mifritscher.de> --- win32ss/user/winsrv/consrv/frontends/gui/graphics.c | 2 ++ win32ss/user/winsrv/consrv/frontends/gui/text.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/win32ss/user/winsrv/consrv/frontends/gui/graphics.c b/win32ss/user/winsrv/consrv/frontends/gui/graphics.c index 67c2516ba2..6b7084b8c6 100644 --- a/win32ss/user/winsrv/consrv/frontends/gui/graphics.c +++ b/win32ss/user/winsrv/consrv/frontends/gui/graphics.c @@ -129,6 +129,8 @@ GuiPaintGraphicsBuffer(PGRAPHICS_SCREEN_BUFFER Buffer, PCONSRV_CONSOLE Console = Buffer->Header.Console; // ASSERT(Console == GuiData->Console); + SetRectEmpty(&rcFramebuffer); + if (Buffer->BitMap == NULL) return; if (!ConDrvValidateConsoleUnsafe((PCONSOLE)Console, CONSOLE_RUNNING, TRUE)) return; diff --git a/win32ss/user/winsrv/consrv/frontends/gui/text.c b/win32ss/user/winsrv/consrv/frontends/gui/text.c index a206fcd00b..21355ed81f 100644 --- a/win32ss/user/winsrv/consrv/frontends/gui/text.c +++ b/win32ss/user/winsrv/consrv/frontends/gui/text.c @@ -358,6 +358,8 @@ GuiPaintTextModeBuffer(PTEXTMODE_SCREEN_BUFFER Buffer, HFONT OldFont, NewFont; BOOLEAN IsUnderline; + SetRectEmpty(&rcFramebuffer); + if (Buffer->Buffer == NULL) return; if (!ConDrvValidateConsoleUnsafe((PCONSOLE)Console, CONSOLE_RUNNING, TRUE)) return;
6 years, 9 months
1
0
0
0
← Newer
1
...
29
30
31
32
33
34
35
...
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