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
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
November 2006
----- 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
3 participants
792 discussions
Start a n
N
ew thread
Hans Leidekker : setupapi: Implement SetupGetSourceFileLocation{A, W}.
by Alexandre Julliard
14 Nov '06
14 Nov '06
Module: wine Branch: master Commit: 02c5df73d2104209f06c93165bf25c9d592f0d89 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=02c5df73d2104209f06c93165…
Author: Hans Leidekker <hans(a)it.vu.nl> Date: Mon Nov 13 21:04:32 2006 +0100 setupapi: Implement SetupGetSourceFileLocation{A,W}. --- dlls/setupapi/query.c | 144 ++++++++++++++++++++++++++++++++++++++ dlls/setupapi/queue.c | 13 ---- dlls/setupapi/setupapi.spec | 4 +- dlls/setupapi/setupapi_private.h | 12 +++ include/setupapi.h | 3 + 5 files changed, 161 insertions(+), 15 deletions(-) diff --git a/dlls/setupapi/query.c b/dlls/setupapi/query.c index 932fb98..e11ea59 100644 --- a/dlls/setupapi/query.c +++ b/dlls/setupapi/query.c @@ -29,10 +29,32 @@ #include "setupapi.h" #include "advpub.h" #include "winnls.h" #include "wine/debug.h" +#include "wine/unicode.h" #include "setupapi_private.h" WINE_DEFAULT_DEBUG_CHANNEL(setupapi); +#ifdef __i386__ +static const WCHAR source_disks_names_platform[] = + {'S','o','u','r','c','e','D','i','s','k','s','N','a','m','e','s','.','x','8','6',0}; +static const WCHAR source_disks_files_platform[] = + {'S','o','u','r','c','e','D','i','s','k','s','F','i','l','e','s','.','x','8','6',0}; +#elif defined(__x86_64) +static const WCHAR source_disks_names_platform[] = + {'S','o','u','r','c','e','D','i','s','k','s','N','a','m','e','s','.','a','m','d','6','4',0}; +static const WCHAR source_disks_files_platform[] = + {'S','o','u','r','c','e','D','i','s','k','s','F','i','l','e','s','.','a','m','d','6','4',0}; +#else /* FIXME: other platforms */ +static const WCHAR source_disks_names_platform[] = + {'S','o','u','r','c','e','D','i','s','k','s','N','a','m','e','s',0}; +static const WCHAR source_disks_files_platform[] = + {'S','o','u','r','c','e','D','i','s','k','s','F','i','l','e','s',0}; +#endif +static const WCHAR source_disks_names[] = + {'S','o','u','r','c','e','D','i','s','k','s','N','a','m','e','s',0}; +static const WCHAR source_disks_files[] = + {'S','o','u','r','c','e','D','i','s','k','s','F','i','l','e','s',0}; + /* fills the PSP_INF_INFORMATION struct fill_info is TRUE * always returns the required size of the information */ @@ -281,3 +303,125 @@ BOOL WINAPI SetupQueryInfFileInformation lstrcpyW(ReturnBuffer, ptr); return TRUE; } + +/*********************************************************************** + * SetupGetSourceFileLocationA (SETUPAPI.@) + */ + +BOOL WINAPI SetupGetSourceFileLocationA( HINF hinf, PINFCONTEXT context, PCSTR filename, + PUINT source_id, PSTR buffer, DWORD buffer_size, + PDWORD required_size ) +{ + BOOL ret = FALSE; + WCHAR *filenameW = NULL, *bufferW = NULL; + DWORD required; + INT size; + + TRACE("%p, %p, %s, %p, %p, 0x%08x, %p\n", hinf, context, debugstr_a(filename), source_id, + buffer, buffer_size, required_size); + + if (filename && !(filenameW = strdupAtoW( filename ))) + return FALSE; + + if (!SetupGetSourceFileLocationW( hinf, context, filenameW, source_id, NULL, 0, &required )) + goto done; + + if (!(bufferW = HeapAlloc( GetProcessHeap(), 0, required * sizeof(WCHAR) ))) + goto done; + + if (!SetupGetSourceFileLocationW( hinf, context, filenameW, source_id, bufferW, required, NULL )) + goto done; + + size = WideCharToMultiByte( CP_ACP, 0, bufferW, -1, NULL, 0, NULL, NULL ); + if (required_size) *required_size = size; + + if (buffer) + { + if (buffer_size >= size) + WideCharToMultiByte( CP_ACP, 0, bufferW, -1, buffer, buffer_size, NULL, NULL ); + else + { + SetLastError( ERROR_INSUFFICIENT_BUFFER ); + goto done; + } + } + ret = TRUE; + + done: + HeapFree( GetProcessHeap(), 0, filenameW ); + HeapFree( GetProcessHeap(), 0, bufferW ); + return ret; +} + +static LPWSTR get_source_id( HINF hinf, PINFCONTEXT context, PCWSTR filename ) +{ + DWORD size; + LPWSTR source_id; + + if (!SetupFindFirstLineW( hinf, source_disks_files_platform, filename, context ) && + !SetupFindFirstLineW( hinf, source_disks_files, filename, context )) + return NULL; + + if (!SetupGetStringFieldW( context, 1, NULL, 0, &size )) + return NULL; + + if (!(source_id = HeapAlloc( GetProcessHeap(), 0, size * sizeof(WCHAR) ))) + return NULL; + + if (!SetupGetStringFieldW( context, 1, source_id, size, NULL )) + { + HeapFree( GetProcessHeap(), 0, source_id ); + return NULL; + } + + if (!SetupFindFirstLineW( hinf, source_disks_names_platform, source_id, context ) && + !SetupFindFirstLineW( hinf, source_disks_names, source_id, context )) + { + HeapFree( GetProcessHeap(), 0, source_id ); + return NULL; + } + return source_id; +} + +/*********************************************************************** + * SetupGetSourceFileLocationW (SETUPAPI.@) + */ + +BOOL WINAPI SetupGetSourceFileLocationW( HINF hinf, PINFCONTEXT context, PCWSTR filename, + PUINT source_id, PWSTR buffer, DWORD buffer_size, + PDWORD required_size ) +{ + INFCONTEXT ctx; + WCHAR *end, *source_id_str; + + TRACE("%p, %p, %s, %p, %p, 0x%08x, %p\n", hinf, context, debugstr_w(filename), source_id, + buffer, buffer_size, required_size); + + if (!context) context = &ctx; + + if (!(source_id_str = get_source_id( hinf, context, filename ))) + return FALSE; + + *source_id = strtolW( source_id_str, &end, 10 ); + if (end == source_id_str || *end) + { + HeapFree( GetProcessHeap(), 0, source_id_str ); + return FALSE; + } + HeapFree( GetProcessHeap(), 0, source_id_str ); + + if (SetupGetStringFieldW( context, 4, buffer, buffer_size, required_size )) + return TRUE; + + if (required_size) *required_size = 1; + if (buffer) + { + if (buffer_size >= 1) buffer[0] = 0; + else + { + SetLastError( ERROR_INSUFFICIENT_BUFFER ); + return FALSE; + } + } + return TRUE; +} diff --git a/dlls/setupapi/queue.c b/dlls/setupapi/queue.c index 3ddb552..26522e6 100644 --- a/dlls/setupapi/queue.c +++ b/dlls/setupapi/queue.c @@ -84,19 +84,6 @@ inline static WCHAR *strdupW( const WCHA return ret; } - -inline static WCHAR *strdupAtoW( const char *str ) -{ - WCHAR *ret = NULL; - if (str) - { - DWORD len = MultiByteToWideChar( CP_ACP, 0, str, -1, NULL, 0 ); - if ((ret = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ))) - MultiByteToWideChar( CP_ACP, 0, str, -1, ret, len ); - } - return ret; -} - inline static char *strdupWtoA( const WCHAR *str ) { char *ret = NULL; diff --git a/dlls/setupapi/setupapi.spec b/dlls/setupapi/setupapi.spec index d0a6d22..4ea80f5 100644 --- a/dlls/setupapi/setupapi.spec +++ b/dlls/setupapi/setupapi.spec @@ -413,8 +413,8 @@ # Yes, Microsoft really misspelled this @ stdcall SetupGetLineTextW(ptr long wstr wstr ptr long ptr) @ stdcall SetupGetMultiSzFieldA(ptr long ptr long ptr) @ stdcall SetupGetMultiSzFieldW(ptr long ptr long ptr) -@ stub SetupGetSourceFileLocationA -@ stub SetupGetSourceFileLocationW +@ stdcall SetupGetSourceFileLocationA(ptr ptr str ptr ptr long ptr) +@ stdcall SetupGetSourceFileLocationW(ptr ptr wstr ptr ptr long ptr) @ stub SetupGetSourceFileSizeA @ stub SetupGetSourceFileSizeW @ stdcall SetupGetSourceInfoA(ptr long long str long ptr) diff --git a/dlls/setupapi/setupapi_private.h b/dlls/setupapi/setupapi_private.h index bce05cb..ed9a7bf 100644 --- a/dlls/setupapi/setupapi_private.h +++ b/dlls/setupapi/setupapi_private.h @@ -29,6 +29,18 @@ #define REG_INSTALLEDFILES "System\\Curr #define REGPART_RENAME "\\Rename" #define REG_VERSIONCONFLICT "Software\\Microsoft\\VersionConflictManager" +inline static WCHAR *strdupAtoW( const char *str ) +{ + WCHAR *ret = NULL; + if (str) + { + DWORD len = MultiByteToWideChar( CP_ACP, 0, str, -1, NULL, 0 ); + if ((ret = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) ))) + MultiByteToWideChar( CP_ACP, 0, str, -1, ret, len ); + } + return ret; +} + /* string substitutions */ struct inf_file; diff --git a/include/setupapi.h b/include/setupapi.h index 231b30a..f74bd5b 100644 --- a/include/setupapi.h +++ b/include/setupapi.h @@ -814,6 +814,9 @@ #define SetupGetLineText WINELIB BOOL WINAPI SetupGetMultiSzFieldA( PINFCONTEXT context, DWORD index, PSTR buffer, DWORD size, LPDWORD required ); BOOL WINAPI SetupGetMultiSzFieldW( PINFCONTEXT context, DWORD index, PWSTR buffer, DWORD size, LPDWORD required ); #define SetupGetMultiSzField WINELIB_NAME_AW(SetupGetMultiSzField) +BOOL WINAPI SetupGetSourceFileLocationA( HINF hinf, PINFCONTEXT context, PCSTR filename, PUINT source_id, PSTR buffer, DWORD buffer_size, PDWORD required_size ); +BOOL WINAPI SetupGetSourceFileLocationW( HINF hinf, PINFCONTEXT context, PCWSTR filename, PUINT source_id, PWSTR buffer, DWORD buffer_size, PDWORD required_size ); +#define SetupGetSourceFileLocation WINELIB_NAME_AW(SetupGetSourceFileLocation) BOOL WINAPI SetupGetStringFieldA( PINFCONTEXT context, DWORD index, PSTR buffer, DWORD size, PDWORD required ); BOOL WINAPI SetupGetStringFieldW( PINFCONTEXT context, DWORD index, PWSTR buffer, DWORD size, PDWORD required ); #define SetupGetStringField WINELIB_NAME_AW(SetupGetStringField)
1
0
0
0
Hans Leidekker : setupapi: The inf section suffix that corresponds to __x86_64 is .ntamd64.
by Alexandre Julliard
14 Nov '06
14 Nov '06
Module: wine Branch: master Commit: 709735e294412a0cab15696faa9fcf6833e552bc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=709735e294412a0cab15696fa…
Author: Hans Leidekker <hans(a)it.vu.nl> Date: Mon Nov 13 16:26:53 2006 +0100 setupapi: The inf section suffix that corresponds to __x86_64 is .ntamd64. --- dlls/setupapi/install.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/setupapi/install.c b/dlls/setupapi/install.c index f6a541b..4c60b86 100644 --- a/dlls/setupapi/install.c +++ b/dlls/setupapi/install.c @@ -995,7 +995,7 @@ void WINAPI InstallHinfSectionW( HWND hw #ifdef __i386__ static const WCHAR nt_platformW[] = {'.','n','t','x','8','6',0}; #elif defined(__x86_64) - static const WCHAR nt_platformW[] = {'.','n','t','i','a','6','4',0}; + static const WCHAR nt_platformW[] = {'.','n','t','a','m','d','6','4',0}; #else /* FIXME: other platforms */ static const WCHAR nt_platformW[] = {'.','n','t',0}; #endif
1
0
0
0
Kai Blin : secur32: Fix handling of ISC_REQ* flags in InitializeSecurityContext.
by Alexandre Julliard
14 Nov '06
14 Nov '06
Module: wine Branch: master Commit: 1037e20bc7625cf721a86b638c112fc4c0307075 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1037e20bc7625cf721a86b638…
Author: Kai Blin <kai.blin(a)gmail.com> Date: Mon Nov 13 15:55:39 2006 +0100 secur32: Fix handling of ISC_REQ* flags in InitializeSecurityContext. --- dlls/secur32/ntlm.c | 42 ++++++--- dlls/secur32/tests/ntlm.c | 213 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 239 insertions(+), 16 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=1037e20bc7625cf721a86…
1
0
0
0
Alexandre Julliard : winex11.drv: Update the X11 window position when the primary monitor origin changes.
by Alexandre Julliard
14 Nov '06
14 Nov '06
Module: wine Branch: master Commit: 00e097b6e332990289d272c934cc9d7c060d5a1c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=00e097b6e332990289d272c93…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Nov 14 10:40:49 2006 +0100 winex11.drv: Update the X11 window position when the primary monitor origin changes. --- dlls/winex11.drv/winpos.c | 39 ++++++++++++++++++++++++++++----------- 1 files changed, 28 insertions(+), 11 deletions(-) diff --git a/dlls/winex11.drv/winpos.c b/dlls/winex11.drv/winpos.c index b3e70f5..552622e 100644 --- a/dlls/winex11.drv/winpos.c +++ b/dlls/winex11.drv/winpos.c @@ -1224,17 +1224,36 @@ void X11DRV_UnmapNotify( HWND hwnd, XEve else WIN_ReleasePtr( win ); } +struct desktop_resize_data +{ + RECT old_screen_rect; + RECT old_virtual_rect; +}; -static BOOL CALLBACK update_windows_fullscreen_state( HWND hwnd, LPARAM lparam ) +static BOOL CALLBACK update_windows_on_desktop_resize( HWND hwnd, LPARAM lparam ) { struct x11drv_win_data *data; Display *display = thread_display(); - RECT *old_screen_rect = (RECT *)lparam; + struct desktop_resize_data *resize_data = (struct desktop_resize_data *)lparam; + int mask = 0; + + if (!(data = X11DRV_get_win_data( hwnd ))) return TRUE; + + if (GetWindowLongW( hwnd, GWL_STYLE ) & WS_VISIBLE) + update_fullscreen_state( display, data, &data->client_rect, &resize_data->old_screen_rect ); - if ((data = X11DRV_get_win_data( hwnd )) && - (GetWindowLongW( hwnd, GWL_STYLE ) & WS_VISIBLE)) + if (resize_data->old_virtual_rect.left != virtual_screen_rect.left) mask |= CWX; + if (resize_data->old_virtual_rect.top != virtual_screen_rect.top) mask |= CWY; + if (mask && data->whole_window) { - update_fullscreen_state( display, data, &data->client_rect, old_screen_rect ); + XWindowChanges changes; + + wine_tsx11_lock(); + changes.x = data->whole_rect.left - virtual_screen_rect.left; + changes.y = data->whole_rect.top - virtual_screen_rect.top; + XReconfigureWMWindow( display, data->whole_window, + DefaultScreen(display), mask, &changes ); + wine_tsx11_unlock(); } return TRUE; } @@ -1245,15 +1264,14 @@ static BOOL CALLBACK update_windows_full */ void X11DRV_handle_desktop_resize( unsigned int width, unsigned int height ) { - unsigned int old_screen_width, old_screen_height; - RECT rect; HWND hwnd = GetDesktopWindow(); struct x11drv_win_data *data; + struct desktop_resize_data resize_data; if (!(data = X11DRV_get_win_data( hwnd ))) return; - old_screen_width = screen_width; - old_screen_height = screen_height; + SetRect( &resize_data.old_screen_rect, 0, 0, screen_width, screen_height ); + resize_data.old_virtual_rect = virtual_screen_rect; screen_width = width; screen_height = height; @@ -1266,8 +1284,7 @@ void X11DRV_handle_desktop_resize( unsig SendMessageTimeoutW( HWND_BROADCAST, WM_DISPLAYCHANGE, screen_depth, MAKELPARAM( width, height ), SMTO_ABORTIFHUNG, 2000, NULL ); - SetRect( &rect, 0, 0, old_screen_width, old_screen_height ); - EnumWindows( update_windows_fullscreen_state, (LPARAM)&rect ); + EnumWindows( update_windows_on_desktop_resize, (LPARAM)&resize_data ); }
1
0
0
0
Rob Shearman : include: Add wincred.h header file.
by Alexandre Julliard
13 Nov '06
13 Nov '06
Module: wine Branch: master Commit: 0ca78828c36b1bf37fb8dd2f8ae112ec5c49946a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0ca78828c36b1bf37fb8dd2f8…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Mon Nov 13 14:37:57 2006 +0000 include: Add wincred.h header file. --- include/Makefile.in | 1 + include/wincred.h | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 104 insertions(+), 0 deletions(-) diff --git a/include/Makefile.in b/include/Makefile.in index 2e2ddee..c55919b 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -289,6 +289,7 @@ WINDOWS_INCLUDES = \ vfwmsgs.h \ winbase.h \ wincon.h \ + wincred.h \ wincrypt.h \ windef.h \ windns.h \ diff --git a/include/wincred.h b/include/wincred.h new file mode 100644 index 0000000..f66af02 --- /dev/null +++ b/include/wincred.h @@ -0,0 +1,103 @@ +/* + * Copyright (C) 2006 Robert Shearman (for CodeWeavers) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef _WINCRED_H_ +#define _WINCRED_H_ + +#ifndef __SECHANDLE_DEFINED__ +#define __SECHANDLE_DEFINED__ +typedef struct _SecHandle +{ + ULONG_PTR dwLower; + ULONG_PTR dwUpper; +} SecHandle, *PSecHandle; +#endif + +typedef SecHandle CtxtHandle; +typedef PSecHandle PCtxtHandle; + +typedef struct _CREDUI_INFOA +{ + DWORD cbSize; + HWND hwndParent; + PCSTR pszMessageText; + PCSTR pszCaptionText; + HBITMAP hbmBanner; +} CREDUI_INFOA, *PCREDUI_INFOA; + +typedef struct _CREDUI_INFOW +{ + DWORD cbSize; + HWND hwndParent; + PCWSTR pszMessageText; + PCWSTR pszCaptionText; + HBITMAP hbmBanner; +} CREDUI_INFOW, *PCREDUI_INFOW; + +#define CRED_MAX_STRING_LENGTH 256 +#define CRED_MAX_USERNAME_LENGTH 513 +#define CRED_MAX_GENERIC_TARGET_NAME_LENGTH 32767 +#define CRED_MAX_DOMAIN_TARGET_NAME_LENGTH 337 +#define CRED_MAX_VALUE_SIZE 256 +#define CRED_MAX_ATTRIBUTES 64 + +#define CRED_MAX_BLOB_SIZE 512 + +#define CREDUI_MAX_MESSAGE_LENGTH 32767 +#define CREDUI_MAX_CAPTION_LENGTH 128 +#define CREDUI_MAX_GENERIC_TARGET_LENGTH CRED_MAX_GENERIC_TARGET_NAME_LENGTH +#define CREDUI_MAX_DOMAIN_TARGET_LENGTH CRED_MAX_DOMAIN_TARGET_LENGTH +#define CREDUI_MAX_USERNAME_LENGTH CRED_MAX_USERNAME_LENGTH +#define CREDUI_MAX_PASSWORD_LENGTH (CRED_MAX_CREDENTIAL_BLOB_SIZE / 2) + +#define CREDUI_FLAGS_INCORRECT_PASSWORD 0x00000001 +#define CREDUI_FLAGS_DO_NOT_PERSIST 0x00000002 +#define CREDUI_FLAGS_REQUEST_ADMINISTRATOR 0x00000004 +#define CREDUI_FLAGS_EXCLUDE_CERTIFICATES 0x00000008 +#define CREDUI_FLAGS_REQUIRE_CERTIFICATE 0x00000010 +#define CREDUI_FLAGS_SHOW_SAVE_CHECK_BOX 0x00000040 +#define CREDUI_FLAGS_ALWAYS_SHOW_UI 0x00000080 +#define CREDUI_FLAGS_REQUIRE_SMARTCARD 0x00000100 +#define CREDUI_FLAGS_PASSWORD_ONLY_OK 0x00000200 +#define CREDUI_FLAGS_VALIDATE_USERNAME 0x00000400 +#define CREDUI_FLAGS_COMPLETE_USERNAME 0x00000800 +#define CREDUI_FLAGS_PERSIST 0x00001000 +#define CREDUI_FLAGS_SERVER_CREDENTIAL 0x00004000 +#define CREDUI_FLAGS_EXPECT_CONFIRMATION 0x00020000 +#define CREDUI_FLAGS_GENERIC_CREDENTIALS 0x00040000 +#define CREDUI_FLAGS_USERNAME_TARGET_CREDENTIALS 0x00080000 +#define CREDUI_FLAGS_KEEP_USERNAME 0x00100000 + +DWORD WINAPI CredUICmdLinePromptForCredentialsW(PCWSTR,PCWSTR,PCtxtHandle,DWORD,PWSTR,ULONG,PWSTR,ULONG,BOOL*,DWORD); +DWORD WINAPI CredUICmdLinePromptForCredentialsA(PCSTR,PCSTR,PCtxtHandle,DWORD,PSTR,ULONG,PSTR,ULONG,BOOL*,DWORD); +#define CredUICmdLinePromptForCredentials WINELIB_NAME_AW(CredUICmdLinePromptForCredentials) +DWORD WINAPI CredUIConfirmCredentialsW(PCWSTR,BOOL); +DWORD WINAPI CredUIConfirmCredentialsA(PCSTR,BOOL); +#define CredUIConfirmCredentials WINELIB_NAME_AW(CredUIConfirmCredentials) +DWORD WINAPI CredUIParseUserNameW(PCWSTR,PWSTR,ULONG,PWSTR,ULONG); +DWORD WINAPI CredUIParseUserNameA(PCSTR,PSTR,ULONG,PSTR,ULONG); +#define CredUIParseUserName WINELIB_NAME_AW(CredUIParseUserName) +DWORD WINAPI CredUIPromptForCredentialsW(PCREDUI_INFOW,PCWSTR,PCtxtHandle,DWORD,PWSTR,ULONG,PWSTR,ULONG,BOOL*,DWORD); +DWORD WINAPI CredUIPromptForCredentialsA(PCREDUI_INFOA,PCSTR,PCtxtHandle,DWORD,PSTR,ULONG,PSTR,ULONG,BOOL*,DWORD); +#define CredUIPromptForCredentials WINELIB_NAME_AW(CredUIPromptForCredentials) +DWORD WINAPI CredUIStoreSSOCredW(PCWSTR,PCWSTR,PCWSTR,BOOL); +/* Note: no CredUIStoreSSOCredA in PSDK header */ +DWORD WINAPI CredUIReadSSOCredW(PCWSTR,PWSTR*); +/* Note: no CredUIReadSSOCredA in PSDK header */ + +#endif /* _WINCRED_H_ */
1
0
0
0
Rob Shearman : include: Fix a typo in the SecInvalidateHandle macro in sspi .h.
by Alexandre Julliard
13 Nov '06
13 Nov '06
Module: wine Branch: master Commit: d5da94011e9fab44752b9a03f27e29d92672353b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d5da94011e9fab44752b9a03f…
Author: Rob Shearman <rob(a)codeweavers.com> Date: Mon Nov 13 13:29:06 2006 +0000 include: Fix a typo in the SecInvalidateHandle macro in sspi.h. --- include/sspi.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/sspi.h b/include/sspi.h index 1a4ce52..459de14 100644 --- a/include/sspi.h +++ b/include/sspi.h @@ -54,7 +54,7 @@ #endif #define SecInvalidateHandle(x) do { \ ((PSecHandle)(x))->dwLower = ((ULONG_PTR)((INT_PTR)-1)); \ ((PSecHandle)(x))->dwUpper = ((ULONG_PTR)((INT_PTR)-1)); \ - while (0) + } while (0) #define SecIsValidHandle(x) \ ((((PSecHandle)(x))->dwLower != ((ULONG_PTR)(INT_PTR)-1)) && \
1
0
0
0
Alexandre Julliard : ntdll: Added support for reading directories using the BSD getdirentries function .
by Alexandre Julliard
13 Nov '06
13 Nov '06
Module: wine Branch: master Commit: a9f214cb0d99335378688fbaf6f8894ab050fb37 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a9f214cb0d99335378688fbaf…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Nov 13 15:42:48 2006 +0100 ntdll: Added support for reading directories using the BSD getdirentries function. --- configure | 2 + configure.ac | 1 + dlls/ntdll/directory.c | 114 ++++++++++++++++++++++++++++++++++++++++++++++-- include/config.h.in | 3 + 4 files changed, 116 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 54e689e..64e16d1 100755 --- a/configure +++ b/configure @@ -18185,6 +18185,7 @@ fi + for ac_func in \ _pclose \ _popen \ @@ -18209,6 +18210,7 @@ for ac_func in \ futimes \ futimesat \ getaddrinfo \ + getdirentries \ gethostbyname \ getnameinfo \ getnetbyname \ diff --git a/configure.ac b/configure.ac index 958a6c8..37cc2ae 100644 --- a/configure.ac +++ b/configure.ac @@ -1200,6 +1200,7 @@ AC_CHECK_FUNCS(\ futimes \ futimesat \ getaddrinfo \ + getdirentries \ gethostbyname \ getnameinfo \ getnetbyname \ diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c index d2c0d16..042daef 100644 --- a/dlls/ntdll/directory.c +++ b/dlls/ntdll/directory.c @@ -135,6 +135,8 @@ #define INVALID_DOS_CHARS INVALID_NT_CH #define MAX_DIR_ENTRY_LEN 255 /* max length of a directory entry in chars */ +static const unsigned int max_dir_info_size = FIELD_OFFSET( FILE_BOTH_DIR_INFORMATION, FileName[MAX_DIR_ENTRY_LEN] ); + static int show_dot_files = -1; /* at some point we may want to allow Winelib apps to set this */ @@ -971,7 +973,6 @@ static int read_directory_vfat( int fd, size_t len; KERNEL_DIRENT *de; FILE_BOTH_DIR_INFORMATION *info, *last_info = NULL; - static const unsigned int max_dir_info_size = sizeof(*info) + (MAX_DIR_ENTRY_LEN-1) * sizeof(WCHAR); io->u.Status = STATUS_SUCCESS; @@ -1063,7 +1064,6 @@ static int read_directory_getdents( int char local_buffer[8192]; KERNEL_DIRENT64 *data, *de; FILE_BOTH_DIR_INFORMATION *info, *last_info = NULL; - static const unsigned int max_dir_info_size = sizeof(*info) + (MAX_DIR_ENTRY_LEN-1) * sizeof(WCHAR); if (size <= sizeof(local_buffer) || !(data = RtlAllocateHeap( GetProcessHeap(), 0, size ))) { @@ -1135,7 +1135,111 @@ done: if ((char *)data != local_buffer) RtlFreeHeap( GetProcessHeap(), 0, data ); return res; } -#endif /* USE_GETDENTS */ + +#elif defined HAVE_GETDIRENTRIES + +/*********************************************************************** + * read_directory_getdirentries + * + * Read a directory using the BSD getdirentries system call; helper for NtQueryDirectoryFile. + */ +static int read_directory_getdirentries( int fd, IO_STATUS_BLOCK *io, void *buffer, ULONG length, + BOOLEAN single_entry, const UNICODE_STRING *mask, + BOOLEAN restart_scan ) +{ + long restart_pos; + ULONG_PTR restart_info_pos = 0; + size_t size, initial_size = length; + int res; + char *data, local_buffer[8192]; + struct dirent *de; + FILE_BOTH_DIR_INFORMATION *info, *last_info = NULL, *restart_last_info = NULL; + + size = initial_size; + data = local_buffer; + if (size > sizeof(local_buffer) && !(data = RtlAllocateHeap( GetProcessHeap(), 0, size ))) + { + io->u.Status = STATUS_NO_MEMORY; + return io->u.Status; + } + + if (restart_scan) lseek( fd, 0, SEEK_SET ); + + io->u.Status = STATUS_SUCCESS; + + /* FIXME: should make sure size is larger than filesystem block size */ + res = getdirentries( fd, data, size, &restart_pos ); + if (res == -1) + { + io->u.Status = FILE_GetNtStatus(); + res = 0; + goto done; + } + + de = (struct dirent *)data; + + while (res > 0) + { + res -= de->d_reclen; + if (de->d_fileno && + ((info = append_entry( buffer, &io->Information, length, de->d_name, NULL, mask )))) + { + last_info = info; + if ((char *)info->FileName + info->FileNameLength > (char *)buffer + length) + { + lseek( fd, (unsigned long)restart_pos, SEEK_SET ); + if (restart_info_pos) /* if we have a complete read already, return it */ + { + io->Information = restart_info_pos; + last_info = restart_last_info; + break; + } + /* otherwise restart from the start with a smaller size */ + size = (char *)de - data; + if (!size) + { + io->u.Status = STATUS_BUFFER_OVERFLOW; + break; + } + io->Information = 0; + last_info = NULL; + goto restart; + } + /* if we have to return but the buffer contains more data, restart with a smaller size */ + if (res > 0 && (single_entry || io->Information + max_dir_info_size > length)) + { + lseek( fd, (unsigned long)restart_pos, SEEK_SET ); + size = (char *)de - data; + io->Information = restart_info_pos; + last_info = restart_last_info; + goto restart; + } + } + /* move on to the next entry */ + if (res > 0) + { + de = (struct dirent *)((char *)de + de->d_reclen); + continue; + } + if (size < initial_size) break; /* already restarted once, give up now */ + size = min( size, length - io->Information ); + /* if size is too small don't bother to continue */ + if (size < max_dir_info_size && last_info) break; + restart_last_info = last_info; + restart_info_pos = io->Information; + restart: + res = getdirentries( fd, data, size, &restart_pos ); + de = (struct dirent *)data; + } + + if (last_info) last_info->NextEntryOffset = 0; + else io->u.Status = restart_scan ? STATUS_NO_SUCH_FILE : STATUS_NO_MORE_FILES; + res = 0; +done: + if (data != local_buffer) RtlFreeHeap( GetProcessHeap(), 0, data ); + return res; +} +#endif /* HAVE_GETDIRENTRIES */ /*********************************************************************** @@ -1151,7 +1255,6 @@ static void read_directory_readdir( int off_t i, old_pos = 0; struct dirent *de; FILE_BOTH_DIR_INFORMATION *info, *last_info = NULL; - static const unsigned int max_dir_info_size = sizeof(*info) + (MAX_DIR_ENTRY_LEN-1) * sizeof(WCHAR); if (!(dir = opendir( "." ))) { @@ -1326,6 +1429,9 @@ #endif #ifdef USE_GETDENTS if ((read_directory_getdents( fd, io, buffer, length, single_entry, mask, restart_scan )) != -1) goto done; +#elif defined HAVE_GETDIRENTRIES + if ((read_directory_getdirentries( fd, io, buffer, length, single_entry, mask, restart_scan )) != -1) + goto done; #endif read_directory_readdir( fd, io, buffer, length, single_entry, mask, restart_scan ); diff --git a/include/config.h.in b/include/config.h.in index f26735d..69a0af9 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -180,6 +180,9 @@ #undef HAVE_FUTIMESAT /* Define to 1 if you have the `getaddrinfo' function. */ #undef HAVE_GETADDRINFO +/* Define to 1 if you have the `getdirentries' function. */ +#undef HAVE_GETDIRENTRIES + /* Define to 1 if you have the `gethostbyname' function. */ #undef HAVE_GETHOSTBYNAME
1
0
0
0
Paul Vriens : comctl32: Remove deadcode (Coverity).
by Alexandre Julliard
13 Nov '06
13 Nov '06
Module: wine Branch: master Commit: d4796304ad9ea2844990166599aa53ce24ea0614 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d4796304ad9ea284499016659…
Author: Paul Vriens <paul.vriens.wine(a)gmail.com> Date: Sat Nov 11 19:28:18 2006 +0100 comctl32: Remove deadcode (Coverity). --- dlls/comctl32/imagelist.c | 8 +------- 1 files changed, 1 insertions(+), 7 deletions(-) diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c index 36fe384..e9970e0 100644 --- a/dlls/comctl32/imagelist.c +++ b/dlls/comctl32/imagelist.c @@ -1980,7 +1980,7 @@ HIMAGELIST WINAPI ImageList_Read (LPSTRE { ILHEAD ilHead; HIMAGELIST himl; - HBITMAP hbmColor=0,hbmMask=0; + HBITMAP hbmColor=0; int i; TRACE("%p\n", pstm); @@ -1995,7 +1995,6 @@ HIMAGELIST WINAPI ImageList_Read (LPSTRE himl = ImageList_Create(ilHead.cx, ilHead.cy, ilHead.flags, ilHead.cCurImage, ilHead.cMaxImage); if (!himl) { DeleteObject(hbmColor); - DeleteObject(hbmMask); return NULL; } if (!_read_bitmap(himl, himl->hdcImage, pstm, ilHead.flags & ~ILC_MASK)) { @@ -2012,11 +2011,6 @@ HIMAGELIST WINAPI ImageList_Read (LPSTRE SelectObject(himl->hdcImage, hbmColor); DeleteObject(himl->hbmImage); himl->hbmImage = hbmColor; - if (hbmMask){ - SelectObject(himl->hdcMask, hbmMask); - DeleteObject(himl->hbmMask); - himl->hbmMask = hbmMask; - } himl->cCurImage = ilHead.cCurImage; himl->cMaxImage = ilHead.cMaxImage;
1
0
0
0
Andrey Turkin : atl: Implement AtlModuleRegisterServer.
by Alexandre Julliard
13 Nov '06
13 Nov '06
Module: wine Branch: master Commit: 131d9964b7a5be574177ca9393d00240575840a1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=131d9964b7a5be574177ca939…
Author: Andrey Turkin <pancha(a)mail.nnov.ru> Date: Sat Nov 11 00:08:11 2006 +0300 atl: Implement AtlModuleRegisterServer. --- dlls/atl/atl_main.c | 29 ++++++++++++++++++++++++++++- 1 files changed, 28 insertions(+), 1 deletions(-) diff --git a/dlls/atl/atl_main.c b/dlls/atl/atl_main.c index 7195f13..c64ef46 100644 --- a/dlls/atl/atl_main.c +++ b/dlls/atl/atl_main.c @@ -257,7 +257,34 @@ HRESULT WINAPI AtlInternalQueryInterface */ HRESULT WINAPI AtlModuleRegisterServer(_ATL_MODULEW* pM, BOOL bRegTypeLib, const CLSID* clsid) { - FIXME("%p %d %s\n", pM, bRegTypeLib, debugstr_guid(clsid)); + int i; + HRESULT hRes; + + TRACE("%p %d %s\n", pM, bRegTypeLib, debugstr_guid(clsid)); + + if (pM == NULL) + return E_INVALIDARG; + + for (i = 0; pM->m_pObjMap[i].pclsid != NULL; i++) /* register CLSIDs */ + { + if (!clsid || IsEqualCLSID(pM->m_pObjMap[i].pclsid, clsid)) + { + const _ATL_OBJMAP_ENTRYW *obj = &pM->m_pObjMap[i]; + + TRACE("Registering clsid %s\n", debugstr_guid(obj->pclsid)); + hRes = obj->pfnUpdateRegistry(TRUE); /* register */ + if (FAILED(hRes)) + return hRes; + } + } + + if (bRegTypeLib) + { + hRes = AtlModuleRegisterTypeLib(pM, NULL); + if (FAILED(hRes)) + return hRes; + } + return S_OK; }
1
0
0
0
Andrey Turkin : atl: Implement AtlRegisterLoadTypeLib.
by Alexandre Julliard
13 Nov '06
13 Nov '06
Module: wine Branch: master Commit: da7bdf745f7a9973feff9d0aa9dd9fd3acbcc406 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=da7bdf745f7a9973feff9d0aa…
Author: Andrey Turkin <pancha(a)mail.nnov.ru> Date: Sat Nov 11 00:07:29 2006 +0300 atl: Implement AtlRegisterLoadTypeLib. --- dlls/atl/atl_main.c | 21 +++++++++++++++++++-- dlls/atl/atlbase.h | 1 + 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/dlls/atl/atl_main.c b/dlls/atl/atl_main.c index 1fac5b1..7195f13 100644 --- a/dlls/atl/atl_main.c +++ b/dlls/atl/atl_main.c @@ -341,8 +341,25 @@ HRESULT WINAPI AtlModuleGetClassObject(_ */ HRESULT WINAPI AtlModuleRegisterTypeLib(_ATL_MODULEW *pm, LPCOLESTR lpszIndex) { - FIXME("%p %s\n", pm, debugstr_w(lpszIndex)); - return E_FAIL; + HRESULT hRes; + BSTR path; + ITypeLib *typelib; + + TRACE("%p %s\n", pm, debugstr_w(lpszIndex)); + + if (!pm) + return E_INVALIDARG; + + hRes = AtlModuleLoadTypeLib(pm, lpszIndex, &path, &typelib); + + if (SUCCEEDED(hRes)) + { + hRes = RegisterTypeLib(typelib, path, NULL); /* FIXME: pass help directory */ + ITypeLib_Release(typelib); + SysFreeString(path); + } + + return hRes; } /*********************************************************************** diff --git a/dlls/atl/atlbase.h b/dlls/atl/atlbase.h index 809a89f..0aec2e9 100644 --- a/dlls/atl/atlbase.h +++ b/dlls/atl/atlbase.h @@ -154,6 +154,7 @@ LPVOID WINAPI AtlModuleExtractCreateWnd HRESULT WINAPI AtlModuleInit(_ATL_MODULEW* pM, _ATL_OBJMAP_ENTRYW* p, HINSTANCE h); HRESULT WINAPI AtlModuleRegisterClassObjects(_ATL_MODULEW* pM, DWORD dwClsContext, DWORD dwFlags); HRESULT WINAPI AtlModuleRegisterServer(_ATL_MODULEW* pM, BOOL bRegTypeLib, const CLSID* pCLSID); +HRESULT WINAPI AtlModuleRegisterTypeLib(_ATL_MODULEW *pM, LPCOLESTR lpszIndex); HRESULT WINAPI AtlModuleUnregisterServer(_ATL_MODULEW* pM, const CLSID* pCLSID); HRESULT WINAPI AtlModuleUpdateRegistryFromResourceD(_ATL_MODULEW *pM, LPCOLESTR lpszRes, BOOL bRegister, struct _ATL_REGMAP_ENTRY *pMapEntries, IRegistrar *pReg ); HRESULT WINAPI AtlModuleUnregisterServerEx(_ATL_MODULEW* pM, BOOL bUnRegTypeLib, const CLSID* pCLSID);
1
0
0
0
← Newer
1
...
38
39
40
41
42
43
44
...
80
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
Results per page:
10
25
50
100
200