winehq.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
2025
June
May
April
March
February
January
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
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
February 2007
----- 2025 -----
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 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
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
4 participants
839 discussions
Start a n
N
ew thread
Jan Zerebecki : cmd: Remove redundant const.
by Alexandre Julliard
23 Feb '07
23 Feb '07
Module: wine Branch: master Commit: 2dd35ac53b86f8273eef51ab4b210e544a8aa02b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2dd35ac53b86f8273eef51ab4…
Author: Jan Zerebecki <jan.wine(a)zerebecki.de> Date: Fri Feb 23 09:25:00 2007 +0100 cmd: Remove redundant const. --- programs/cmd/batch.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/programs/cmd/batch.c b/programs/cmd/batch.c index 2044e28..1a9d9e1 100755 --- a/programs/cmd/batch.c +++ b/programs/cmd/batch.c @@ -437,7 +437,7 @@ void _splitpath(const CHAR* path, CHAR* drv, CHAR* dir, CHAR* name, CHAR* ext) void WCMD_HandleTildaModifiers(char **start, char *forVariable) { #define NUMMODIFIERS 11 - const char const validmodifiers[NUMMODIFIERS] = { + const char validmodifiers[NUMMODIFIERS] = { '~', 'f', 'd', 'p', 'n', 'x', 's', 'a', 't', 'z', '$' };
1
0
0
0
Francois Gouget : user32/tests: Fix the ChangeDisplaySettingsEx() test so it succeeds on NT4.
by Alexandre Julliard
23 Feb '07
23 Feb '07
Module: wine Branch: master Commit: 3bf42961a826b7bc8060f1bcc9a5ce00c7b443d5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3bf42961a826b7bc8060f1bcc…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Thu Feb 22 12:43:06 2007 +0100 user32/tests: Fix the ChangeDisplaySettingsEx() test so it succeeds on NT4. --- dlls/user32/tests/monitor.c | 39 +++++++++++++++++++++------------------ 1 files changed, 21 insertions(+), 18 deletions(-) diff --git a/dlls/user32/tests/monitor.c b/dlls/user32/tests/monitor.c index a4ea8ec..edb881a 100644 --- a/dlls/user32/tests/monitor.c +++ b/dlls/user32/tests/monitor.c @@ -104,26 +104,26 @@ static void test_enumdisplaydevices(void) struct vid_mode { DWORD w, h, bpp, freq, fields; - LONG res; + LONG success; }; static struct vid_mode vid_modes_test[] = { - {640, 480, 0, 0, DM_PELSWIDTH | DM_PELSHEIGHT | DM_BITSPERPEL | DM_DISPLAYFREQUENCY, DISP_CHANGE_SUCCESSFUL}, - {640, 480, 0, 0, DM_PELSWIDTH | DM_PELSHEIGHT | DM_DISPLAYFREQUENCY, DISP_CHANGE_SUCCESSFUL}, - {640, 480, 0, 0, DM_PELSWIDTH | DM_PELSHEIGHT | DM_BITSPERPEL , DISP_CHANGE_SUCCESSFUL}, - {640, 480, 0, 0, DM_PELSWIDTH | DM_PELSHEIGHT , DISP_CHANGE_SUCCESSFUL}, - {640, 480, 0, 0, DM_BITSPERPEL , DISP_CHANGE_SUCCESSFUL}, - {640, 480, 0, 0, DM_DISPLAYFREQUENCY, DISP_CHANGE_SUCCESSFUL}, - - {0, 0, 0, 0, DM_PELSWIDTH, DISP_CHANGE_SUCCESSFUL}, - {0, 0, 0, 0, DM_PELSHEIGHT, DISP_CHANGE_SUCCESSFUL}, - - {640, 480, 0, 0, DM_PELSWIDTH, DISP_CHANGE_BADMODE}, - {640, 480, 0, 0, DM_PELSHEIGHT, DISP_CHANGE_BADMODE}, - { 0, 480, 0, 0, DM_PELSWIDTH | DM_PELSHEIGHT, DISP_CHANGE_BADMODE}, - {640, 0, 0, 0, DM_PELSWIDTH | DM_PELSHEIGHT, DISP_CHANGE_BADMODE}, - - {0, 0, 0, 10, DM_DISPLAYFREQUENCY, DISP_CHANGE_BADMODE}, + {640, 480, 0, 0, DM_PELSWIDTH | DM_PELSHEIGHT | DM_BITSPERPEL | DM_DISPLAYFREQUENCY, 1}, + {640, 480, 0, 0, DM_PELSWIDTH | DM_PELSHEIGHT | DM_DISPLAYFREQUENCY, 1}, + {640, 480, 0, 0, DM_PELSWIDTH | DM_PELSHEIGHT | DM_BITSPERPEL , 1}, + {640, 480, 0, 0, DM_PELSWIDTH | DM_PELSHEIGHT , 1}, + {640, 480, 0, 0, DM_BITSPERPEL , 1}, + {640, 480, 0, 0, DM_DISPLAYFREQUENCY, 1}, + + {0, 0, 0, 0, DM_PELSWIDTH, 1}, + {0, 0, 0, 0, DM_PELSHEIGHT, 1}, + + {640, 480, 0, 0, DM_PELSWIDTH, 0}, + {640, 480, 0, 0, DM_PELSHEIGHT, 0}, + { 0, 480, 0, 0, DM_PELSWIDTH | DM_PELSHEIGHT, 0}, + {640, 0, 0, 0, DM_PELSWIDTH | DM_PELSHEIGHT, 0}, + + {0, 0, 0, 0, DM_DISPLAYFREQUENCY, 0}, }; #define vid_modes_cnt (sizeof(vid_modes_test) / sizeof(vid_modes_test[0])) @@ -144,7 +144,10 @@ static void test_ChangeDisplaySettingsEx(void) dm.dmDisplayFrequency = vid_modes_test[i].freq; dm.dmFields = vid_modes_test[i].fields; res = ChangeDisplaySettingsEx(NULL, &dm, NULL, CDS_FULLSCREEN, NULL); - ok(res == vid_modes_test[i].res, "Failed to change resolution[%d]: %d\n", i, res); + ok(vid_modes_test[i].success ? + (res == DISP_CHANGE_SUCCESSFUL) : + (res == DISP_CHANGE_BADMODE || res == DISP_CHANGE_BADPARAM), + "Unexpected ChangeDisplaySettingsEx() return code for resolution[%d]: %d\n", i, res); if (res == DISP_CHANGE_SUCCESSFUL) {
1
0
0
0
Francois Gouget : winex11.drv: Catch and report screen resolution change errors.
by Alexandre Julliard
23 Feb '07
23 Feb '07
Module: wine Branch: master Commit: 3e6aa432295a301c4e59ef1a217ab4cfea6ac5d3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3e6aa432295a301c4e59ef1a2…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Thu Feb 22 12:42:20 2007 +0100 winex11.drv: Catch and report screen resolution change errors. --- dlls/winex11.drv/desktop.c | 8 +++++--- dlls/winex11.drv/settings.c | 32 +++++++++++++++++++++----------- dlls/winex11.drv/x11drv.h | 8 ++++---- dlls/winex11.drv/xrandr.c | 10 +++++++--- dlls/winex11.drv/xvidmode.c | 3 ++- 5 files changed, 39 insertions(+), 22 deletions(-) diff --git a/dlls/winex11.drv/desktop.c b/dlls/winex11.drv/desktop.c index 8863472..7f27566 100644 --- a/dlls/winex11.drv/desktop.c +++ b/dlls/winex11.drv/desktop.c @@ -117,16 +117,18 @@ static int X11DRV_desktop_GetCurrentMode(void) return 0; } -static void X11DRV_desktop_SetCurrentMode(int mode) +static LONG X11DRV_desktop_SetCurrentMode(int mode) { DWORD dwBpp = screen_depth; if (dwBpp == 24) dwBpp = 32; - TRACE("Resizing Wine desktop window to %dx%d\n", dd_modes[mode].dwWidth, dd_modes[mode].dwHeight); - X11DRV_resize_desktop(dd_modes[mode].dwWidth, dd_modes[mode].dwHeight); if (dwBpp != dd_modes[mode].dwBPP) { FIXME("Cannot change screen BPP from %d to %d\n", dwBpp, dd_modes[mode].dwBPP); + return DISP_CHANGE_BADMODE; } + TRACE("Resizing Wine desktop window to %dx%d\n", dd_modes[mode].dwWidth, dd_modes[mode].dwHeight); + X11DRV_resize_desktop(dd_modes[mode].dwWidth, dd_modes[mode].dwHeight); + return DISP_CHANGE_SUCCESSFUL; } /*********************************************************************** diff --git a/dlls/winex11.drv/settings.c b/dlls/winex11.drv/settings.c index 03585ca..1965e05 100644 --- a/dlls/winex11.drv/settings.c +++ b/dlls/winex11.drv/settings.c @@ -43,17 +43,17 @@ static const unsigned int depths[] = {8, 16, 32}; /* pointers to functions that actually do the hard stuff */ static int (*pGetCurrentMode)(void); -static void (*pSetCurrentMode)(int mode); +static LONG (*pSetCurrentMode)(int mode); static const char *handler_name; -/* +/* * Set the handlers for resolution changing functions * and initialize the master list of modes */ -LPDDHALMODEINFO X11DRV_Settings_SetHandlers(const char *name, - int (*pNewGCM)(void), - void (*pNewSCM)(int), - unsigned int nmodes, +LPDDHALMODEINFO X11DRV_Settings_SetHandlers(const char *name, + int (*pNewGCM)(void), + LONG (*pNewSCM)(int), + unsigned int nmodes, int reserve_depths) { handler_name = name; @@ -144,9 +144,10 @@ static int X11DRV_nores_GetCurrentMode(void) { return 0; } -static void X11DRV_nores_SetCurrentMode(int mode) +static LONG X11DRV_nores_SetCurrentMode(int mode) { TRACE("Ignoring mode change request\n"); + return DISP_CHANGE_FAILED; } /* default handler only gets the current X desktop resolution */ void X11DRV_Settings_Init(void) @@ -297,7 +298,7 @@ LONG X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode, /* we have a valid mode */ TRACE("Requested display settings match mode %d (%s)\n", i, handler_name); if (!(flags & CDS_TEST)) - pSetCurrentMode(i); + return pSetCurrentMode(i); return DISP_CHANGE_SUCCESSFUL; } @@ -316,9 +317,18 @@ LONG X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode, static DWORD PASCAL X11DRV_Settings_SetMode(LPDDHAL_SETMODEDATA data) { TRACE("Mode %d requested by DDHAL (%s)\n", data->dwModeIndex, handler_name); - pSetCurrentMode(data->dwModeIndex); - X11DRV_DDHAL_SwitchMode(data->dwModeIndex, NULL, NULL); - data->ddRVal = DD_OK; + switch (pSetCurrentMode(data->dwModeIndex)) + { + case DISP_CHANGE_SUCCESSFUL: + X11DRV_DDHAL_SwitchMode(data->dwModeIndex, NULL, NULL); + data->ddRVal = DD_OK; + break; + case DISP_CHANGE_BADMODE: + data->ddRVal = DDERR_WRONGMODE; + break; + default: + data->ddRVal = DDERR_UNSUPPORTEDMODE; + } return DDHAL_DRIVER_HANDLED; } int X11DRV_Settings_CreateDriver(LPDDHALINFO info) diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index dc1d955..8f2c984 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -699,10 +699,10 @@ extern LPDDHALMODEINFO X11DRV_Settings_CreateModes(unsigned int max_modes, int r unsigned int X11DRV_Settings_GetModeCount(void); void X11DRV_Settings_Init(void); extern void X11DRV_Settings_SetDefaultMode(int mode); -LPDDHALMODEINFO X11DRV_Settings_SetHandlers(const char *name, - int (*pNewGCM)(void), - void (*pNewSCM)(int), - unsigned int nmodes, +LPDDHALMODEINFO X11DRV_Settings_SetHandlers(const char *name, + int (*pNewGCM)(void), + LONG (*pNewSCM)(int), + unsigned int nmodes, int reserve_depths); extern void X11DRV_DDHAL_SwitchMode(DWORD dwModeIndex, LPVOID fb_addr, LPVIDMEM fb_mem); diff --git a/dlls/winex11.drv/xrandr.c b/dlls/winex11.drv/xrandr.c index 997fc72..be262dc 100644 --- a/dlls/winex11.drv/xrandr.c +++ b/dlls/winex11.drv/xrandr.c @@ -182,7 +182,7 @@ static int X11DRV_XRandR_GetCurrentMode(void) return res; } -static void X11DRV_XRandR_SetCurrentMode(int mode) +static LONG X11DRV_XRandR_SetCurrentMode(int mode) { SizeID size; Rotation rot; @@ -243,9 +243,13 @@ static void X11DRV_XRandR_SetCurrentMode(int mode) pXRRFreeScreenConfigInfo(sc); wine_tsx11_unlock(); if (stat == RRSetConfigSuccess) + { X11DRV_handle_desktop_resize( dd_modes[mode].dwWidth, dd_modes[mode].dwHeight ); - else - ERR("Resolution change not successful -- perhaps display has changed?\n"); + return DISP_CHANGE_SUCCESSFUL; + } + + ERR("Resolution change not successful -- perhaps display has changed?\n"); + return DISP_CHANGE_FAILED; } void X11DRV_XRandR_Init(void) diff --git a/dlls/winex11.drv/xvidmode.c b/dlls/winex11.drv/xvidmode.c index 30b9324..3a0363c 100644 --- a/dlls/winex11.drv/xvidmode.c +++ b/dlls/winex11.drv/xvidmode.c @@ -111,7 +111,7 @@ static int X11DRV_XF86VM_GetCurrentMode(void) return 0; } -static void X11DRV_XF86VM_SetCurrentMode(int mode) +static LONG X11DRV_XF86VM_SetCurrentMode(int mode) { DWORD dwBpp = screen_depth; if (dwBpp == 24) dwBpp = 32; @@ -135,6 +135,7 @@ static void X11DRV_XF86VM_SetCurrentMode(int mode) wine_tsx11_unlock(); X11DRV_handle_desktop_resize( real_xf86vm_modes[mode]->hdisplay, real_xf86vm_modes[mode]->vdisplay ); + return DISP_CHANGE_SUCCESSFUL; } void X11DRV_XF86VM_Init(void)
1
0
0
0
Aric Stewart : imm32: Corrections to the message ordering for IME input.
by Alexandre Julliard
23 Feb '07
23 Feb '07
Module: wine Branch: master Commit: f273bf1ad6047fdb7db2dd4987e708f4225fec5c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f273bf1ad6047fdb7db2dd498…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Fri Feb 23 15:28:28 2007 +0900 imm32: Corrections to the message ordering for IME input. --- dlls/imm32/imm.c | 24 ++++++++++++++---------- 1 files changed, 14 insertions(+), 10 deletions(-) diff --git a/dlls/imm32/imm.c b/dlls/imm32/imm.c index e1ff14c..69cd490 100644 --- a/dlls/imm32/imm.c +++ b/dlls/imm32/imm.c @@ -51,6 +51,7 @@ typedef struct tagInputContextData BOOL bOpen; BOOL bInternalState; BOOL bRead; + BOOL bInComposition; LOGFONTW font; HFONT textfont; COMPOSITIONFORM CompForm; @@ -1130,6 +1131,9 @@ BOOL WINAPI ImmNotifyIME( ImmInternalPostIMEMessage(WM_IME_COMPOSITION, root_context->ResultString[0], GCS_RESULTSTR|GCS_RESULTCLAUSE); + + ImmInternalPostIMEMessage(WM_IME_ENDCOMPOSITION, 0, 0); + root_context->bInComposition = FALSE; } break; case CPS_CONVERT: @@ -1227,7 +1231,7 @@ BOOL WINAPI ImmSetCompositionFontA(HIMC hIMC, LPLOGFONTA lplf) MultiByteToWideChar(CP_ACP, 0, lplf->lfFaceName, -1, data->font.lfFaceName, LF_FACESIZE); - SendMessageW(root_context->hwnd, WM_IME_NOTIFY, IMN_SETCOMPOSITIONFONT, 0); + ImmInternalPostIMEMessage(WM_IME_NOTIFY, IMN_SETCOMPOSITIONFONT, 0); if (data->textfont) { @@ -1251,7 +1255,7 @@ BOOL WINAPI ImmSetCompositionFontW(HIMC hIMC, LPLOGFONTW lplf) return FALSE; memcpy(&data->font,lplf,sizeof(LOGFONTW)); - SendMessageW(root_context->hwnd, WM_IME_NOTIFY, IMN_SETCOMPOSITIONFONT, 0); + ImmInternalPostIMEMessage(WM_IME_NOTIFY, IMN_SETCOMPOSITIONFONT, 0); if (data->textfont) { @@ -1337,6 +1341,12 @@ BOOL WINAPI ImmSetCompositionStringW( if (dwIndex == SCS_SETSTR) { + if (!root_context->bInComposition) + { + ImmInternalPostIMEMessage(WM_IME_STARTCOMPOSITION, 0, 0); + root_context->bInComposition = TRUE; + } + flags = GCS_COMPSTR; if (root_context->dwCompStringLength) @@ -1396,7 +1406,7 @@ BOOL WINAPI ImmSetCompositionWindow( if (reshow) ShowWindow(hwndDefault,SW_SHOWNOACTIVATE); - SendMessageW(root_context->hwnd, WM_IME_NOTIFY,IMN_SETCOMPOSITIONWINDOW, 0); + ImmInternalPostIMEMessage(WM_IME_NOTIFY,IMN_SETCOMPOSITIONWINDOW, 0); return TRUE; } @@ -1424,14 +1434,8 @@ BOOL WINAPI ImmSetOpenStatus(HIMC hIMC, BOOL fOpen) if (hIMC == (HIMC)FROM_IME) { - if (fOpen) - ImmInternalPostIMEMessage(WM_IME_STARTCOMPOSITION, 0, 0); - ImmInternalSetOpenStatus(fOpen); - - if (!fOpen) - ImmInternalPostIMEMessage(WM_IME_ENDCOMPOSITION, 0, 0); - + ImmInternalPostIMEMessage(WM_IME_NOTIFY, IMN_SETOPENSTATUS, 0); return TRUE; }
1
0
0
0
Aric Stewart : imm32: Implement GSC_RESULTCLAUSE.
by Alexandre Julliard
23 Feb '07
23 Feb '07
Module: wine Branch: master Commit: 26e22f18405a60f683be3861a3bf1ce74943adec URL:
http://source.winehq.org/git/wine.git/?a=commit;h=26e22f18405a60f683be3861a…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Fri Feb 23 15:21:59 2007 +0900 imm32: Implement GSC_RESULTCLAUSE. --- dlls/imm32/imm.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/dlls/imm32/imm.c b/dlls/imm32/imm.c index c63b300..e1ff14c 100644 --- a/dlls/imm32/imm.c +++ b/dlls/imm32/imm.c @@ -563,6 +563,21 @@ LONG WINAPI ImmGetCompositionStringA( } rc = sizeof(DWORD)*2; } + else if (dwIndex == GCS_RESULTCLAUSE) + { + TRACE("GSC_RESULTCLAUSE %p %i\n", data->ResultString, data->dwResultStringSize); + + rc = WideCharToMultiByte(CP_ACP, 0, (LPWSTR)data->ResultString, + data->dwResultStringSize/ sizeof(WCHAR), NULL, + 0, NULL, NULL); + + if (dwBufLen >= sizeof(DWORD)*2) + { + ((LPDWORD)lpBuf)[0] = 0; + ((LPDWORD)lpBuf)[1] = rc; + } + rc = sizeof(DWORD)*2; + } else { FIXME("Unhandled index 0x%x\n",dwIndex);
1
0
0
0
Andrew Talbot : version: Constify a variable.
by Alexandre Julliard
23 Feb '07
23 Feb '07
Module: wine Branch: master Commit: 19daedffaf1abcce6e8b1ec689b0478c77b0501b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=19daedffaf1abcce6e8b1ec68…
Author: Andrew Talbot <Andrew.Talbot(a)talbotville.com> Date: Thu Feb 22 21:48:14 2007 +0000 version: Constify a variable. --- dlls/version/install.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/version/install.c b/dlls/version/install.c index c341f83..2f70b10 100644 --- a/dlls/version/install.c +++ b/dlls/version/install.c @@ -453,8 +453,8 @@ DWORD WINAPI VerInstallFileA( if (buf1) { buf2 = _fetch_versioninfo(tmpfn,&tmpvffi); if (buf2) { - char *tbuf1,*tbuf2; - static CHAR trans_array[] = "\\VarFileInfo\\Translation"; + char *tbuf1,*tbuf2; + static const CHAR trans_array[] = "\\VarFileInfo\\Translation"; UINT len1,len2; len1=len2=40;
1
0
0
0
Jacek Caban : urlmon: Check if protocol object implements IInternetProtocolInfo interface.
by Alexandre Julliard
23 Feb '07
23 Feb '07
Module: wine Branch: master Commit: d31969b5e61f6deb1387a29e01b79b4d6f24e755 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d31969b5e61f6deb1387a29e0…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Feb 22 21:13:01 2007 +0100 urlmon: Check if protocol object implements IInternetProtocolInfo interface. --- dlls/urlmon/session.c | 23 +++++++++-------------- 1 files changed, 9 insertions(+), 14 deletions(-) diff --git a/dlls/urlmon/session.c b/dlls/urlmon/session.c index f66b22e..6e80996 100644 --- a/dlls/urlmon/session.c +++ b/dlls/urlmon/session.c @@ -55,7 +55,7 @@ static name_space *find_name_space(LPCWSTR protocol) return NULL; } -static HRESULT get_protocol_iface(LPCWSTR schema, DWORD schema_len, CLSID *pclsid, IUnknown **ret) +static HRESULT get_protocol_cf(LPCWSTR schema, DWORD schema_len, CLSID *pclsid, IClassFactory **ret) { WCHAR str_clsid[64]; HKEY hkey = NULL; @@ -96,14 +96,14 @@ static HRESULT get_protocol_iface(LPCWSTR schema, DWORD schema_len, CLSID *pclsi if(pclsid) *pclsid = clsid; - return CoGetClassObject(&clsid, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void**)ret); + return CoGetClassObject(&clsid, CLSCTX_INPROC_SERVER, NULL, &IID_IClassFactory, (void**)ret); } IInternetProtocolInfo *get_protocol_info(LPCWSTR url) { IInternetProtocolInfo *ret = NULL; + IClassFactory *cf; name_space *ns; - IUnknown *unk; WCHAR schema[64]; DWORD schema_len; HRESULT hres; @@ -124,19 +124,20 @@ IInternetProtocolInfo *get_protocol_info(LPCWSTR url) return ret; } - hres = get_protocol_iface(schema, schema_len, NULL, &unk); + hres = get_protocol_cf(schema, schema_len, NULL, &cf); if(FAILED(hres)) return NULL; - hres = IUnknown_QueryInterface(unk, &IID_IInternetProtocolInfo, (void**)&ret); - IUnknown_Release(unk); + hres = IClassFactory_QueryInterface(cf, &IID_IInternetProtocolInfo, (void**)&ret); + if(FAILED(hres)) + IClassFactory_CreateInstance(cf, NULL, &IID_IInternetProtocolInfo, (void**)&ret); + IClassFactory_Release(cf); return ret; } HRESULT get_protocol_handler(LPCWSTR url, CLSID *clsid, IClassFactory **ret) { - IUnknown *unk; name_space *ns; WCHAR schema[64]; DWORD schema_len; @@ -155,13 +156,7 @@ HRESULT get_protocol_handler(LPCWSTR url, CLSID *clsid, IClassFactory **ret) return S_OK; } - hres = get_protocol_iface(schema, schema_len, clsid, &unk); - if(FAILED(hres)) - return hres; - - hres = IUnknown_QueryInterface(unk, &IID_IClassFactory, (void**)ret); - IUnknown_Release(unk); - return hres; + return get_protocol_cf(schema, schema_len, clsid, ret); } static HRESULT WINAPI InternetSession_QueryInterface(IInternetSession *iface,
1
0
0
0
Jacek Caban : itss: Added CombineUrl implementation.
by Alexandre Julliard
23 Feb '07
23 Feb '07
Module: wine Branch: master Commit: 46132ee2cd76e5eace876dc353d999758da75610 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=46132ee2cd76e5eace876dc35…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Feb 22 21:12:19 2007 +0100 itss: Added CombineUrl implementation. --- dlls/itss/protocol.c | 39 +++++++++++++++++++- dlls/itss/tests/protocol.c | 85 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 122 insertions(+), 2 deletions(-) diff --git a/dlls/itss/protocol.c b/dlls/itss/protocol.c index 44345db..2094590 100644 --- a/dlls/itss/protocol.c +++ b/dlls/itss/protocol.c @@ -392,10 +392,45 @@ static HRESULT WINAPI ITSProtocolInfo_CombineUrl(IInternetProtocolInfo *iface, DWORD cchResult, DWORD* pcchResult, DWORD dwReserved) { ITSProtocol *This = PROTINFO_THIS(iface); - FIXME("(%p)->(%s %s %08x %p %d %p %d)\n", This, debugstr_w(pwzBaseUrl), + LPCWSTR base_end, ptr; + DWORD rel_len; + + static const WCHAR separator[] = {':',':',0}; + + TRACE("(%p)->(%s %s %08x %p %d %p %d)\n", This, debugstr_w(pwzBaseUrl), debugstr_w(pwzRelativeUrl), dwCombineFlags, pwzResult, cchResult, pcchResult, dwReserved); - return E_NOTIMPL; + + base_end = strstrW(pwzBaseUrl, separator); + if(!base_end) + return 0x80041001; + base_end += 2; + + if(!skip_schema(pwzBaseUrl)) + return INET_E_USE_DEFAULT_PROTOCOLHANDLER; + + if(strchrW(pwzRelativeUrl, ':')) + return STG_E_INVALIDNAME; + + if(pwzRelativeUrl[0] != '/') { + ptr = strrchrW(base_end, '/'); + if(ptr) + base_end = ptr+1; + else + base_end += strlenW(base_end); + } + + rel_len = strlenW(pwzRelativeUrl)+1; + + *pcchResult = rel_len + (base_end-pwzBaseUrl); + + if(*pcchResult > cchResult) + return E_OUTOFMEMORY; + + memcpy(pwzResult, pwzBaseUrl, (base_end-pwzBaseUrl)*sizeof(WCHAR)); + strcpyW(pwzResult + (base_end-pwzBaseUrl), pwzRelativeUrl); + + return S_OK; } static HRESULT WINAPI ITSProtocolInfo_CompareUrl(IInternetProtocolInfo *iface, LPCWSTR pwzUrl1, diff --git a/dlls/itss/tests/protocol.c b/dlls/itss/tests/protocol.c index 4ef8045..c170d7e 100644 --- a/dlls/itss/tests/protocol.c +++ b/dlls/itss/tests/protocol.c @@ -409,6 +409,67 @@ static void test_protocol_url(IClassFactory *factory, LPCWSTR url) read_protocol = NULL; } +static const WCHAR rel_url1[] = + {'t','e','s','t','.','h','t','m','l',0}; +static const WCHAR rel_url2[] = + {'t','e','s','t','.','c','h','m',':',':','/','t','e','s','t','.','h','t','m','l',0}; +static const WCHAR rel_url3[] = + {'/','t','e','s','t','.','h','t','m','l',0}; +static const WCHAR rel_url4[] = + {'t','e',':','t','.','h','t','m','l',0}; +static const WCHAR rel_url5[] = + {'d','i','r','/','t','e','s','t','.','h','t','m','l',0}; + +static const WCHAR base_url1[] = {'i','t','s',':', + 't','e','s','t',':','.','c','h','m',':',':','/','b','l','a','n','k','.','h','t','m','l',0}; +static const WCHAR base_url2[] = {'i','t','s',':','t','e','s','t','.','c','h','m', + ':',':','/','d','i','r','/','b','l','a','n','k','.','h','t','m','l',0}; +static const WCHAR base_url3[] = {'m','s','-','i','t','s',':','t','e','s','t','.','c','h','m', + ':',':','/','d','i','r','/','b','l','a','n','k','.','h','t','m','l',0}; +static const WCHAR base_url4[] = {'m','k',':','@','M','S','I','T','S','t','o','r','e',':', + 't','e','s','t','.','c','h','m',':',':','/','d','i','r','/', + 'b','l','a','n','k','.','h','t','m','l',0}; +static const WCHAR base_url5[] = {'x','x','x',':','t','e','s','t','.','c','h','m', + ':',':','/','d','i','r','/','b','l','a','n','k','.','h','t','m','l',0}; + +static const WCHAR combined_url1[] = {'i','t','s',':', + 't','e','s','t','.','c','h','m',':',':','/','t','e','s','t','.','h','t','m','l',0}; +static const WCHAR combined_url2[] = {'i','t','s',':', + 't','e','s','t','.','c','h','m',':',':','/','d','i','r','/','t','e','s','t','.','h','t','m','l',0}; +static const WCHAR combined_url3[] = {'i','t','s',':', + 't','e','s','t',':','.','c','h','m',':',':','/','t','e','s','t','.','h','t','m','l',0}; +static const WCHAR combined_url4[] = {'i','t','s',':','t','e','s','t','.','c','h','m', + ':',':','b','l','a','n','k','.','h','t','m','l','t','e','s','t','.','h','t','m','l',0}; +static const WCHAR combined_url5[] = {'m','s','-','i','t','s',':', + 't','e','s','t','.','c','h','m',':',':','/','d','i','r','/','t','e','s','t','.','h','t','m','l',0}; +static const WCHAR combined_url6[] = {'m','k',':','@','M','S','I','T','S','t','o','r','e',':', + 't','e','s','t','.','c','h','m',':',':','/','d','i','r','/','t','e','s','t','.','h','t','m','l',0}; + +static const struct { + LPCWSTR base_url; + LPCWSTR rel_url; + DWORD flags; + HRESULT hres; + LPCWSTR combined_url; +} combine_tests[] = { + {blank_url1, blank_url1, 0, STG_E_INVALIDNAME, NULL}, + {blank_url2, blank_url2, 0, STG_E_INVALIDNAME, NULL}, + {blank_url1, rel_url1, 0, S_OK, combined_url1}, + {blank_url1, rel_url2, 0, STG_E_INVALIDNAME, NULL}, + {blank_url1, rel_url3, 0, S_OK, combined_url1}, + {blank_url1, rel_url4, 0, STG_E_INVALIDNAME, NULL}, + {blank_url1, rel_url3, URL_ESCAPE_SPACES_ONLY|URL_DONT_ESCAPE_EXTRA_INFO, S_OK, combined_url1}, + {blank_url1, rel_url5, 0, S_OK, combined_url2}, + {rel_url1, rel_url2, 0, 0x80041001, NULL}, + {base_url1, rel_url1, 0, S_OK, combined_url3}, + {base_url2, rel_url1, 0, S_OK, combined_url2}, + {blank_url4, rel_url1, 0, S_OK, combined_url4}, + {base_url3, rel_url1, 0, S_OK, combined_url5}, + {base_url4, rel_url1, 0, S_OK, combined_url6}, + {base_url5, rel_url1, 0, INET_E_USE_DEFAULT_PROTOCOLHANDLER, NULL}, + {base_url2, rel_url3, 0, S_OK, combined_url1}, +}; + static void test_its_protocol_info(IInternetProtocol *protocol) { IInternetProtocolInfo *info; @@ -430,6 +491,30 @@ static void test_its_protocol_info(IInternetProtocol *protocol) } } + for(i=0; i < sizeof(combine_tests)/sizeof(combine_tests[0]); i++) { + size = 0xdeadbeef; + memset(buf, 0xfe, sizeof(buf)); + hres = IInternetProtocolInfo_CombineUrl(info, combine_tests[i].base_url, + combine_tests[i].rel_url, combine_tests[i].flags, buf, + sizeof(buf)/sizeof(WCHAR), &size, 0); + ok(hres == combine_tests[i].hres, "[%d] CombineUrl returned %08x, expected %08x\n", + i, hres, combine_tests[i].hres); + ok(size == (combine_tests[i].combined_url ? lstrlenW(combine_tests[i].combined_url)+1 + : 0xdeadbeef), "[%d] unexpected size=%d\n", i, size); + if(combine_tests[i].combined_url) + ok(!lstrcmpW(combine_tests[i].combined_url, buf), "[%d] unexpected result\n", i); + else + ok(buf[0] == 0xfefe, "buf changed\n"); + } + + size = 0xdeadbeef; + memset(buf, 0xfe, sizeof(buf)); + hres = IInternetProtocolInfo_CombineUrl(info, blank_url1, rel_url1, 0, buf, + 1, &size, 0); + ok(hres == E_OUTOFMEMORY, "CombineUrl failed: %08x\n", hres); + ok(size == sizeof(combined_url1)/sizeof(WCHAR), "size=%d\n", size); + ok(buf[0] == 0xfefe, "buf changed\n"); + IInternetProtocolInfo_Release(info); }
1
0
0
0
Jacek Caban : itss: Added ParseUrl implementation.
by Alexandre Julliard
23 Feb '07
23 Feb '07
Module: wine Branch: master Commit: c0351acd5788664637b8eb95ccba976c516ba3ad URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c0351acd5788664637b8eb95c…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Feb 22 21:11:21 2007 +0100 itss: Added ParseUrl implementation. --- dlls/itss/protocol.c | 17 +++++++++++++- dlls/itss/tests/protocol.c | 48 ++++++++++++++++++++++++++----------------- 2 files changed, 44 insertions(+), 21 deletions(-) diff --git a/dlls/itss/protocol.c b/dlls/itss/protocol.c index 8286aed..44345db 100644 --- a/dlls/itss/protocol.c +++ b/dlls/itss/protocol.c @@ -369,9 +369,22 @@ static HRESULT WINAPI ITSProtocolInfo_ParseUrl(IInternetProtocolInfo *iface, LPC DWORD *pcchResult, DWORD dwReserved) { ITSProtocol *This = PROTINFO_THIS(iface); - FIXME("(%p)->(%s %x %08x %p %d %p %d)\n", This, debugstr_w(pwzUrl), ParseAction, + + TRACE("(%p)->(%s %x %08x %p %d %p %d)\n", This, debugstr_w(pwzUrl), ParseAction, dwParseFlags, pwzResult, cchResult, pcchResult, dwReserved); - return E_NOTIMPL; + + switch(ParseAction) { + case PARSE_CANONICALIZE: + FIXME("PARSE_CANONICALIZE\n"); + return E_NOTIMPL; + case PARSE_SECURITY_URL: + FIXME("PARSE_SECURITY_URL\n"); + return E_NOTIMPL; + default: + return INET_E_DEFAULT_ACTION; + } + + return S_OK; } static HRESULT WINAPI ITSProtocolInfo_CombineUrl(IInternetProtocolInfo *iface, diff --git a/dlls/itss/tests/protocol.c b/dlls/itss/tests/protocol.c index 4cdf09f..4ef8045 100644 --- a/dlls/itss/tests/protocol.c +++ b/dlls/itss/tests/protocol.c @@ -68,6 +68,22 @@ DEFINE_EXPECT(ReportResult); static HRESULT expect_hrResult; static IInternetProtocol *read_protocol = NULL; +static const WCHAR blank_url1[] = {'i','t','s',':', + 't','e','s','t','.','c','h','m',':',':','/','b','l','a','n','k','.','h','t','m','l',0}; +static const WCHAR blank_url2[] = {'m','S','-','i','T','s',':', + 't','e','s','t','.','c','h','m',':',':','/','b','l','a','n','k','.','h','t','m','l',0}; +static const WCHAR blank_url3[] = {'m','k',':','@','M','S','I','T','S','t','o','r','e',':', + 't','e','s','t','.','c','h','m',':',':','/','b','l','a','n','k','.','h','t','m','l',0}; +static const WCHAR blank_url4[] = {'i','t','s',':', + 't','e','s','t','.','c','h','m',':',':','b','l','a','n','k','.','h','t','m','l',0}; +static const WCHAR blank_url5[] = {'i','t','s',':', + 't','e','s','t','.','c','h','m',':',':','\\','b','l','a','n','k','.','h','t','m','l',0}; +static const WCHAR blank_url6[] = {'i','t','s',':', + 't','e','s','t','.','c','h','m',':',':','/','%','6','2','l','a','n','k','.','h','t','m','l',0}; +static const WCHAR blank_url7[] = {'m','k',':','@','M','S','I','T','S','t','o','r','e',':', + 't','e','s','t','.','c','h','m',':',':','\\','b','l','a','n','k','.','h','t','m','l',0}; + + static enum { ITS_PROTOCOL, MK_PROTOCOL @@ -396,6 +412,8 @@ static void test_protocol_url(IClassFactory *factory, LPCWSTR url) static void test_its_protocol_info(IInternetProtocol *protocol) { IInternetProtocolInfo *info; + WCHAR buf[1024]; + DWORD size, i; HRESULT hres; hres = IInternetProtocol_QueryInterface(protocol, &IID_IInternetProtocolInfo, (void**)&info); @@ -403,6 +421,15 @@ static void test_its_protocol_info(IInternetProtocol *protocol) if(FAILED(hres)) return; + for(i = PARSE_CANONICALIZE; i <= PARSE_UNESCAPE; i++) { + if(i != PARSE_CANONICALIZE && i != PARSE_SECURITY_URL) { + hres = IInternetProtocolInfo_ParseUrl(info, blank_url1, i, 0, buf, + sizeof(buf)/sizeof(buf[0]), &size, 0); + ok(hres == INET_E_DEFAULT_ACTION, + "[%d] failed: %08x, expected INET_E_DEFAULT_ACTION\n", i, hres); + } + } + IInternetProtocolInfo_Release(info); } @@ -414,18 +441,6 @@ static void test_its_protocol(void) ULONG ref; HRESULT hres; - static const WCHAR blank_url1[] = {'i','t','s',':', - 't','e','s','t','.','c','h','m',':',':','/','b','l','a','n','k','.','h','t','m','l',0}; - static const WCHAR blank_url2[] = {'m','S','-','i','T','s',':', - 't','e','s','t','.','c','h','m',':',':','/','b','l','a','n','k','.','h','t','m','l',0}; - static const WCHAR blank_url3[] = {'m','k',':','@','M','S','I','T','S','t','o','r','e',':', - 't','e','s','t','.','c','h','m',':',':','/','b','l','a','n','k','.','h','t','m','l',0}; - static const WCHAR blank_url4[] = {'i','t','s',':', - 't','e','s','t','.','c','h','m',':',':','b','l','a','n','k','.','h','t','m','l',0}; - static const WCHAR blank_url5[] = {'i','t','s',':', - 't','e','s','t','.','c','h','m',':',':','\\','b','l','a','n','k','.','h','t','m','l',0}; - static const WCHAR blank_url6[] = {'i','t','s',':', - 't','e','s','t','.','c','h','m',':',':','/','%','6','2','l','a','n','k','.','h','t','m','l',0}; static const WCHAR wrong_url1[] = {'i','t','s',':','t','e','s','t','.','c','h','m',':',':','/','b','l','a','n','.','h','t','m','l',0}; static const WCHAR wrong_url2[] = @@ -491,11 +506,6 @@ static void test_mk_protocol(void) IClassFactory *cf; HRESULT hres; - static const WCHAR blank_url1[] = {'m','k',':','@','M','S','I','T','S','t','o','r','e',':', - 't','e','s','t','.','c','h','m',':',':','/','b','l','a','n','k','.','h','t','m','l',0}; - static const WCHAR blank_url2[] = {'m','k',':','@','M','S','I','T','S','t','o','r','e',':', - 't','e','s','t','.','c','h','m',':',':','\\','b','l','a','n','k','.','h','t','m','l',0}; - test_protocol = MK_PROTOCOL; hres = CoGetClassObject(&CLSID_MkProtocol, CLSCTX_INPROC_SERVER, NULL, &IID_IClassFactory, @@ -505,9 +515,9 @@ static void test_mk_protocol(void) return; cache_file = cache_file1; - test_protocol_url(cf, blank_url1); + test_protocol_url(cf, blank_url3); cache_file = cache_file2; - test_protocol_url(cf, blank_url2); + test_protocol_url(cf, blank_url7); IClassFactory_Release(cf); }
1
0
0
0
Jacek Caban : itss: Added IInternetProtocolInfo interface stub implementation.
by Alexandre Julliard
23 Feb '07
23 Feb '07
Module: wine Branch: master Commit: a4cc844bec5cdbbc8c1c97d3a39e3e34dc8b1f7c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a4cc844bec5cdbbc8c1c97d3a…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Feb 22 21:10:42 2007 +0100 itss: Added IInternetProtocolInfo interface stub implementation. --- dlls/itss/protocol.c | 82 ++++++++++++++++++++++++++++++++++++++++++- dlls/itss/tests/protocol.c | 15 ++++++++ 2 files changed, 95 insertions(+), 2 deletions(-) diff --git a/dlls/itss/protocol.c b/dlls/itss/protocol.c index 357476d..8286aed 100644 --- a/dlls/itss/protocol.c +++ b/dlls/itss/protocol.c @@ -1,5 +1,5 @@ /* - * Copyright 2006 Jacek Caban for CodeWeavers + * Copyright 2006-2007 Jacek Caban for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -36,7 +36,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(itss); typedef struct { - const IInternetProtocolVtbl *lpInternetProtocolVtbl; + const IInternetProtocolVtbl *lpInternetProtocolVtbl; + const IInternetProtocolInfoVtbl *lpInternetProtocolInfoVtbl; LONG ref; @@ -46,6 +47,7 @@ typedef struct { } ITSProtocol; #define PROTOCOL(x) ((IInternetProtocol*) &(x)->lpInternetProtocolVtbl) +#define PROTINFO(x) ((IInternetProtocolInfo*) &(x)->lpInternetProtocolInfoVtbl) static void release_chm(ITSProtocol *This) { @@ -72,6 +74,9 @@ static HRESULT WINAPI ITSProtocol_QueryInterface(IInternetProtocol *iface, REFII }else if(IsEqualGUID(&IID_IInternetProtocol, riid)) { TRACE("(%p)->(IID_IInternetProtocol %p)\n", This, ppv); *ppv = PROTOCOL(This); + }else if(IsEqualGUID(&IID_IInternetProtocolInfo, riid)) { + TRACE("(%p)->(IID_IInternetProtocolInfo %p)\n", This, ppv); + *ppv = PROTINFO(This); } if(*ppv) { @@ -338,6 +343,78 @@ static const IInternetProtocolVtbl ITSProtocolVtbl = { ITSProtocol_UnlockRequest }; +#define PROTINFO_THIS(iface) DEFINE_THIS(ITSProtocol, InternetProtocolInfo, iface) + +static HRESULT WINAPI ITSProtocolInfo_QueryInterface(IInternetProtocolInfo *iface, + REFIID riid, void **ppv) +{ + ITSProtocol *This = PROTINFO_THIS(iface); + return IInternetProtocol_QueryInterface(PROTOCOL(This), riid, ppv); +} + +static ULONG WINAPI ITSProtocolInfo_AddRef(IInternetProtocolInfo *iface) +{ + ITSProtocol *This = PROTINFO_THIS(iface); + return IInternetProtocol_AddRef(PROTOCOL(This)); +} + +static ULONG WINAPI ITSProtocolInfo_Release(IInternetProtocolInfo *iface) +{ + ITSProtocol *This = PROTINFO_THIS(iface); + return IInternetProtocol_Release(PROTOCOL(This)); +} + +static HRESULT WINAPI ITSProtocolInfo_ParseUrl(IInternetProtocolInfo *iface, LPCWSTR pwzUrl, + PARSEACTION ParseAction, DWORD dwParseFlags, LPWSTR pwzResult, DWORD cchResult, + DWORD *pcchResult, DWORD dwReserved) +{ + ITSProtocol *This = PROTINFO_THIS(iface); + FIXME("(%p)->(%s %x %08x %p %d %p %d)\n", This, debugstr_w(pwzUrl), ParseAction, + dwParseFlags, pwzResult, cchResult, pcchResult, dwReserved); + return E_NOTIMPL; +} + +static HRESULT WINAPI ITSProtocolInfo_CombineUrl(IInternetProtocolInfo *iface, + LPCWSTR pwzBaseUrl, LPCWSTR pwzRelativeUrl, DWORD dwCombineFlags, LPWSTR pwzResult, + DWORD cchResult, DWORD* pcchResult, DWORD dwReserved) +{ + ITSProtocol *This = PROTINFO_THIS(iface); + FIXME("(%p)->(%s %s %08x %p %d %p %d)\n", This, debugstr_w(pwzBaseUrl), + debugstr_w(pwzRelativeUrl), dwCombineFlags, pwzResult, cchResult, + pcchResult, dwReserved); + return E_NOTIMPL; +} + +static HRESULT WINAPI ITSProtocolInfo_CompareUrl(IInternetProtocolInfo *iface, LPCWSTR pwzUrl1, + LPCWSTR pwzUrl2, DWORD dwCompareFlags) +{ + ITSProtocol *This = PROTINFO_THIS(iface); + FIXME("%p)->(%s %s %08x)\n", This, debugstr_w(pwzUrl1), debugstr_w(pwzUrl2), dwCompareFlags); + return E_NOTIMPL; +} + +static HRESULT WINAPI ITSProtocolInfo_QueryInfo(IInternetProtocolInfo *iface, LPCWSTR pwzUrl, + QUERYOPTION QueryOption, DWORD dwQueryFlags, LPVOID pBuffer, DWORD cbBuffer, DWORD* pcbBuf, + DWORD dwReserved) +{ + ITSProtocol *This = PROTINFO_THIS(iface); + FIXME("(%p)->(%s %08x %08x %p %d %p %d)\n", This, debugstr_w(pwzUrl), QueryOption, + dwQueryFlags, pBuffer, cbBuffer, pcbBuf, dwReserved); + return E_NOTIMPL; +} + +#undef PROTINFO_THIS + +static const IInternetProtocolInfoVtbl ITSProtocolInfoVtbl = { + ITSProtocolInfo_QueryInterface, + ITSProtocolInfo_AddRef, + ITSProtocolInfo_Release, + ITSProtocolInfo_ParseUrl, + ITSProtocolInfo_CombineUrl, + ITSProtocolInfo_CompareUrl, + ITSProtocolInfo_QueryInfo +}; + HRESULT ITSProtocol_create(IUnknown *pUnkOuter, LPVOID *ppobj) { ITSProtocol *ret; @@ -349,6 +426,7 @@ HRESULT ITSProtocol_create(IUnknown *pUnkOuter, LPVOID *ppobj) ret = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(ITSProtocol)); ret->lpInternetProtocolVtbl = &ITSProtocolVtbl; + ret->lpInternetProtocolInfoVtbl = &ITSProtocolInfoVtbl; ret->ref = 1; *ppobj = PROTOCOL(ret); diff --git a/dlls/itss/tests/protocol.c b/dlls/itss/tests/protocol.c index c9f7e95..4cdf09f 100644 --- a/dlls/itss/tests/protocol.c +++ b/dlls/itss/tests/protocol.c @@ -393,6 +393,19 @@ static void test_protocol_url(IClassFactory *factory, LPCWSTR url) read_protocol = NULL; } +static void test_its_protocol_info(IInternetProtocol *protocol) +{ + IInternetProtocolInfo *info; + HRESULT hres; + + hres = IInternetProtocol_QueryInterface(protocol, &IID_IInternetProtocolInfo, (void**)&info); + ok(hres == S_OK, "Could not get IInternetProtocolInfo interface: %08x\n", hres); + if(FAILED(hres)) + return; + + IInternetProtocolInfo_Release(info); +} + static void test_its_protocol(void) { IInternetProtocolInfo *info; @@ -442,6 +455,8 @@ static void test_its_protocol(void) hres = IClassFactory_CreateInstance(factory, NULL, &IID_IInternetProtocol, (void**)&protocol); ok(hres == S_OK, "Could not get IInternetProtocol: %08x\n", hres); if(SUCCEEDED(hres)) { + test_its_protocol_info(protocol); + test_protocol_fail(protocol, wrong_url1, STG_E_FILENOTFOUND); test_protocol_fail(protocol, wrong_url2, STG_E_FILENOTFOUND); test_protocol_fail(protocol, wrong_url3, STG_E_FILENOTFOUND);
1
0
0
0
← Newer
1
...
13
14
15
16
17
18
19
...
84
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
Results per page:
10
25
50
100
200