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
December 2009
----- 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
1233 discussions
Start a n
N
ew thread
Alexandre Julliard : user32: Don' t store the 16-bit hook info in the 32-bit thread queue structure.
by Alexandre Julliard
23 Dec '09
23 Dec '09
Module: wine Branch: master Commit: ecca543ff248ebb5c9fd814bdadf49db2a540191 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ecca543ff248ebb5c9fd814bd…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Dec 23 13:45:06 2009 +0100 user32: Don't store the 16-bit hook info in the 32-bit thread queue structure. --- dlls/user32/hook16.c | 29 ++++++++++++++++++----------- dlls/user32/user_private.h | 2 -- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/dlls/user32/hook16.c b/dlls/user32/hook16.c index 436a168..17d187d 100644 --- a/dlls/user32/hook16.c +++ b/dlls/user32/hook16.c @@ -63,7 +63,6 @@ static const HOOKPROC hook_procs[NB_HOOKS16] = }; -/* this structure is stored in the thread queue */ struct hook16_queue_info { INT id; /* id of current hook */ @@ -71,6 +70,19 @@ struct hook16_queue_info HOOKPROC16 proc[NB_HOOKS16]; /* 16-bit hook procedures */ }; +static struct hook16_queue_info *get_hook_info( BOOL create ) +{ + static DWORD hook_tls = TLS_OUT_OF_INDEXES; + struct hook16_queue_info *info = TlsGetValue( hook_tls ); + + if (!info && create) + { + if (hook_tls == TLS_OUT_OF_INDEXES) hook_tls = TlsAlloc(); + info = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*info) ); + TlsSetValue( hook_tls, info ); + } + return info; +} /*********************************************************************** @@ -108,7 +120,7 @@ static inline void map_msg_32_to_16( const MSG *msg32, MSG16 *msg16 ) */ static LRESULT call_hook_16( INT id, INT code, WPARAM wp, LPARAM lp ) { - struct hook16_queue_info *info = get_user_thread_info()->hook16_info; + struct hook16_queue_info *info = get_hook_info( FALSE ); WORD args[4]; DWORD ret; INT prev_id = info->id; @@ -378,7 +390,6 @@ FARPROC16 WINAPI SetWindowsHook16( INT16 id, HOOKPROC16 proc ) */ HHOOK WINAPI SetWindowsHookEx16( INT16 id, HOOKPROC16 proc, HINSTANCE16 hInst, HTASK16 hTask ) { - struct user_thread_info *thread_info = get_user_thread_info(); struct hook16_queue_info *info; HHOOK hook; int index = id - WH_MINHOOK; @@ -396,11 +407,7 @@ HHOOK WINAPI SetWindowsHookEx16( INT16 id, HOOKPROC16 proc, HINSTANCE16 hInst, H return 0; } - if (!(info = thread_info->hook16_info)) - { - if (!(info = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*info) ))) return 0; - thread_info->hook16_info = info; - } + if (!(info = get_hook_info( TRUE ))) return 0; if (info->hook[index]) { FIXME( "Multiple hooks (%d) for the same task not supported yet\n", id ); @@ -422,7 +429,7 @@ BOOL16 WINAPI UnhookWindowsHook16( INT16 id, HOOKPROC16 proc ) int index = id - WH_MINHOOK; if (id < WH_MINHOOK || id > WH_MAXHOOK16) return FALSE; - if (!(info = get_user_thread_info()->hook16_info)) return FALSE; + if (!(info = get_hook_info( FALSE ))) return FALSE; if (info->proc[index] != proc) return FALSE; if (!UnhookWindowsHookEx( info->hook[index] )) return FALSE; info->hook[index] = 0; @@ -439,7 +446,7 @@ BOOL16 WINAPI UnhookWindowsHookEx16( HHOOK hhook ) struct hook16_queue_info *info; int index; - if (!(info = get_user_thread_info()->hook16_info)) return FALSE; + if (!(info = get_hook_info( FALSE ))) return FALSE; for (index = 0; index < NB_HOOKS16; index++) { if (info->hook[index] == hhook) @@ -502,7 +509,7 @@ LRESULT WINAPI CallNextHookEx16( HHOOK hhook, INT16 code, WPARAM16 wparam, LPARA struct hook16_queue_info *info; LRESULT ret = 0; - if (!(info = get_user_thread_info()->hook16_info)) return 0; + if (!(info = get_hook_info( FALSE ))) return 0; switch (info->id) { diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h index 33d683b..7ca39ff 100644 --- a/dlls/user32/user_private.h +++ b/dlls/user32/user_private.h @@ -122,7 +122,6 @@ extern const USER_DRIVER *USER_Driver DECLSPEC_HIDDEN; extern void USER_unload_driver(void) DECLSPEC_HIDDEN; struct received_message_info; -struct hook16_queue_info; enum user_obj_type { @@ -175,7 +174,6 @@ struct user_thread_info BOOL hook_unicode; /* Is current hook unicode? */ HHOOK hook; /* Current hook */ struct received_message_info *receive_info; /* Message being currently received */ - struct hook16_queue_info *hook16_info; /* Opaque pointer for 16-bit hook support */ struct wm_char_mapping_data *wmchar_data; /* Data for WM_CHAR mappings */ DWORD GetMessageTimeVal; /* Value for GetMessageTime */ DWORD GetMessagePosVal; /* Value for GetMessagePos */
1
0
0
0
Alexandre Julliard : user32: Make HOOK_IsHooked function static.
by Alexandre Julliard
23 Dec '09
23 Dec '09
Module: wine Branch: master Commit: 1bee9f4f7181e1dd0f3377726302f57435e14103 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1bee9f4f7181e1dd0f3377726…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Dec 22 17:44:37 2009 +0100 user32: Make HOOK_IsHooked function static. --- dlls/user32/hook.c | 25 +++++++++++++------------ dlls/user32/msg16.c | 3 +-- dlls/user32/user_private.h | 1 - 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/dlls/user32/hook.c b/dlls/user32/hook.c index 916c37e..386a585 100644 --- a/dlls/user32/hook.c +++ b/dlls/user32/hook.c @@ -388,6 +388,19 @@ static LRESULT call_hook( struct hook_info *info, INT code, WPARAM wparam, LPARA return ret; } + +/*********************************************************************** + * HOOK_IsHooked + */ +static BOOL HOOK_IsHooked( INT id ) +{ + struct user_thread_info *thread_info = get_user_thread_info(); + + if (!thread_info->active_hooks) return TRUE; + return (thread_info->active_hooks & (1 << (id - WH_MINHOOK))) != 0; +} + + /*********************************************************************** * HOOK_CallHooks */ @@ -441,18 +454,6 @@ LRESULT HOOK_CallHooks( INT id, INT code, WPARAM wparam, LPARAM lparam, BOOL uni /*********************************************************************** - * HOOK_IsHooked - */ -BOOL HOOK_IsHooked( INT id ) -{ - struct user_thread_info *thread_info = get_user_thread_info(); - - if (!thread_info->active_hooks) return TRUE; - return (thread_info->active_hooks & (1 << (id - WH_MINHOOK))) != 0; -} - - -/*********************************************************************** * SetWindowsHookA (USER32.@) */ HHOOK WINAPI SetWindowsHookA( INT id, HOOKPROC proc ) diff --git a/dlls/user32/msg16.c b/dlls/user32/msg16.c index 710dfa0..1d96738 100644 --- a/dlls/user32/msg16.c +++ b/dlls/user32/msg16.c @@ -1500,8 +1500,7 @@ LRESULT WINAPI SendMessage16( HWND16 hwnd16, UINT16 msg, WPARAM16 wparam, LPARAM WNDPROC16 winproc; /* first the WH_CALLWNDPROC hook */ - if (HOOK_IsHooked( WH_CALLWNDPROC )) - WINPROC_CallProc16To32A( cwp_hook_callback, hwnd16, msg, wparam, lparam, &result, NULL ); + WINPROC_CallProc16To32A( cwp_hook_callback, hwnd16, msg, wparam, lparam, &result, NULL ); if (!(winproc = (WNDPROC16)GetWindowLong16( hwnd16, GWLP_WNDPROC ))) return 0; diff --git a/dlls/user32/user_private.h b/dlls/user32/user_private.h index 47dcbb7..33d683b 100644 --- a/dlls/user32/user_private.h +++ b/dlls/user32/user_private.h @@ -214,7 +214,6 @@ struct dce; extern BOOL CLIPBOARD_ReleaseOwner(void) DECLSPEC_HIDDEN; extern BOOL FOCUS_MouseActivate( HWND hwnd ) DECLSPEC_HIDDEN; -extern BOOL HOOK_IsHooked( INT id ) DECLSPEC_HIDDEN; extern BOOL set_capture_window( HWND hwnd, UINT gui_flags, HWND *prev_ret ); extern void free_dce( struct dce *dce, HWND hwnd ) DECLSPEC_HIDDEN; extern void invalidate_dce( HWND hwnd, const RECT *rect ) DECLSPEC_HIDDEN;
1
0
0
0
Alexandre Julliard : user32: Get rid of 16-bit handles in the driver clipboard interface.
by Alexandre Julliard
23 Dec '09
23 Dec '09
Module: wine Branch: master Commit: 83b66549da32fe6b23ed366da818b37d6b39f259 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=83b66549da32fe6b23ed366da…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Dec 22 21:18:40 2009 +0100 user32: Get rid of 16-bit handles in the driver clipboard interface. --- dlls/user32/clipboard.c | 5 +- dlls/user32/driver.c | 14 +- dlls/user32/user_private.h | 4 +- dlls/winex11.drv/clipboard.c | 274 ++++++++++--------------------------- dlls/winex11.drv/winex11.drv.spec | 4 +- 5 files changed, 87 insertions(+), 214 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=83b66549da32fe6b23ed3…
1
0
0
0
Alexandre Julliard : user32: Reimplement 16-bit clipboard functions on top of the 32-bit ones.
by Alexandre Julliard
23 Dec '09
23 Dec '09
Module: wine Branch: master Commit: 3313c40b7ca745b3500cd48b51bb0d8d2fd3da98 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3313c40b7ca745b3500cd48b5…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Dec 22 21:08:11 2009 +0100 user32: Reimplement 16-bit clipboard functions on top of the 32-bit ones. --- dlls/user32/clipboard.c | 51 ------------- dlls/user32/user16.c | 192 ++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 190 insertions(+), 53 deletions(-) diff --git a/dlls/user32/clipboard.c b/dlls/user32/clipboard.c index 860e73f..e399704 100644 --- a/dlls/user32/clipboard.c +++ b/dlls/user32/clipboard.c @@ -461,35 +461,6 @@ BOOL WINAPI ChangeClipboardChain(HWND hWnd, HWND hWndNext) /************************************************************************** - * SetClipboardData (USER.141) - */ -HANDLE16 WINAPI SetClipboardData16(UINT16 wFormat, HANDLE16 hData) -{ - CLIPBOARDINFO cbinfo; - HANDLE16 hResult = 0; - - TRACE("(%04X, %04x) !\n", wFormat, hData); - - /* If it's not owned, data can only be set if the format doesn't exists - and its rendering is not delayed */ - if (!CLIPBOARD_GetClipboardInfo(&cbinfo) || - (!(cbinfo.flags & CB_OWNER) && !hData)) - { - WARN("Clipboard not owned by calling task. Operation failed.\n"); - return 0; - } - - if (USER_Driver->pSetClipboardData(wFormat, hData, 0, cbinfo.flags & CB_OWNER)) - { - hResult = hData; - bCBHasChanged = TRUE; - } - - return hResult; -} - - -/************************************************************************** * SetClipboardData (USER32.@) */ HANDLE WINAPI SetClipboardData(UINT wFormat, HANDLE hData) @@ -561,28 +532,6 @@ BOOL WINAPI IsClipboardFormatAvailable(UINT wFormat) /************************************************************************** - * GetClipboardData (USER.142) - */ -HANDLE16 WINAPI GetClipboardData16(UINT16 wFormat) -{ - HANDLE16 hData = 0; - CLIPBOARDINFO cbinfo; - - if (!CLIPBOARD_GetClipboardInfo(&cbinfo) || - (~cbinfo.flags & CB_OPEN)) - { - WARN("Clipboard not opened by calling task.\n"); - SetLastError(ERROR_CLIPBOARD_NOT_OPEN); - return 0; - } - - if (!USER_Driver->pGetClipboardData(wFormat, &hData, NULL)) hData = 0; - - return hData; -} - - -/************************************************************************** * GetClipboardData (USER32.@) */ HANDLE WINAPI GetClipboardData(UINT wFormat) diff --git a/dlls/user32/user16.c b/dlls/user32/user16.c index fc2f2e8..51240a1 100644 --- a/dlls/user32/user16.c +++ b/dlls/user32/user16.c @@ -40,9 +40,11 @@ WINE_DEFAULT_DEBUG_CHANNEL(user); /* handle to handle 16 conversions */ #define HANDLE_16(h32) (LOWORD(h32)) +#define HGDIOBJ_16(h32) (LOWORD(h32)) /* handle16 to handle conversions */ #define HANDLE_32(h16) ((HANDLE)(ULONG_PTR)(h16)) +#define HGDIOBJ_32(h16) ((HGDIOBJ)(ULONG_PTR)(h16)) #define HINSTANCE_32(h16) ((HINSTANCE)(ULONG_PTR)(h16)) #define IS_MENU_STRING_ITEM(flags) \ @@ -340,6 +342,52 @@ static void free_module_icons( HINSTANCE16 inst ) } } +/********************************************************************** + * Management of the 16-bit clipboard formats + */ + +struct clipboard_format +{ + struct list entry; + UINT format; + HANDLE16 data; +}; + +static struct list clipboard_formats = LIST_INIT( clipboard_formats ); + +static void set_clipboard_format( UINT format, HANDLE16 data ) +{ + struct clipboard_format *fmt; + + /* replace it if it exists already */ + LIST_FOR_EACH_ENTRY( fmt, &clipboard_formats, struct clipboard_format, entry ) + { + if (fmt->format != format) continue; + GlobalFree16( fmt->data ); + fmt->data = data; + return; + } + + if ((fmt = HeapAlloc( GetProcessHeap(), 0, sizeof(*fmt) ))) + { + fmt->format = format; + fmt->data = data; + list_add_tail( &clipboard_formats, &fmt->entry ); + } +} + +static void free_clipboard_formats(void) +{ + struct list *head; + + while ((head = list_head( &clipboard_formats ))) + { + struct clipboard_format *fmt = LIST_ENTRY( head, struct clipboard_format, entry ); + list_remove( &fmt->entry ); + GlobalFree16( fmt->data ); + HeapFree( GetProcessHeap(), 0, fmt ); + } +} /********************************************************************** * InitApp (USER.5) @@ -679,7 +727,9 @@ void WINAPI MessageBeep16( UINT16 i ) */ BOOL16 WINAPI CloseClipboard16(void) { - return CloseClipboard(); + BOOL ret = CloseClipboard(); + if (ret) free_clipboard_formats(); + return ret; } @@ -688,7 +738,145 @@ BOOL16 WINAPI CloseClipboard16(void) */ BOOL16 WINAPI EmptyClipboard16(void) { - return EmptyClipboard(); + BOOL ret = EmptyClipboard(); + if (ret) free_clipboard_formats(); + return ret; +} + + +/************************************************************************** + * SetClipboardData (USER.141) + */ +HANDLE16 WINAPI SetClipboardData16( UINT16 format, HANDLE16 data16 ) +{ + HANDLE data32 = 0; + + switch (format) + { + case CF_BITMAP: + case CF_PALETTE: + data32 = HGDIOBJ_32( data16 ); + break; + + case CF_METAFILEPICT: + { + METAHEADER *header; + METAFILEPICT *pict32; + METAFILEPICT16 *pict16 = GlobalLock16( data16 ); + + if (pict16) + { + if (!(data32 = GlobalAlloc( GMEM_MOVEABLE, sizeof(*pict32) ))) return 0; + pict32 = GlobalLock( data32 ); + pict32->mm = pict16->mm; + pict32->xExt = pict16->xExt; + pict32->yExt = pict16->yExt; + header = GlobalLock16( pict16->hMF ); + pict32->hMF = SetMetaFileBitsEx( header->mtSize * 2, (BYTE *)header ); + GlobalUnlock16( pict16->hMF ); + GlobalUnlock( data32 ); + } + set_clipboard_format( format, data16 ); + break; + } + + case CF_ENHMETAFILE: + FIXME( "enhmetafile not supported in 16-bit\n" ); + return 0; + + default: + if (format >= CF_GDIOBJFIRST && format <= CF_GDIOBJLAST) + data32 = HGDIOBJ_32( data16 ); + else if (format >= CF_PRIVATEFIRST && format <= CF_PRIVATELAST) + data32 = HANDLE_32( data16 ); + else + { + UINT size = GlobalSize16( data16 ); + void *ptr32, *ptr16 = GlobalLock16( data16 ); + if (ptr16) + { + if (!(data32 = GlobalAlloc( GMEM_MOVEABLE, size ))) return 0; + ptr32 = GlobalLock( data32 ); + memcpy( ptr32, ptr16, size ); + GlobalUnlock( data32 ); + } + set_clipboard_format( format, data16 ); + } + break; + } + + if (!SetClipboardData( format, data32 )) return 0; + return data16; +} + + +/************************************************************************** + * GetClipboardData (USER.142) + */ +HANDLE16 WINAPI GetClipboardData16( UINT16 format ) +{ + HANDLE data32 = GetClipboardData( format ); + HANDLE16 data16 = 0; + UINT size; + void *ptr; + + if (!data32) return 0; + + switch (format) + { + case CF_BITMAP: + case CF_PALETTE: + data16 = HGDIOBJ_16( data32 ); + break; + + case CF_METAFILEPICT: + { + METAFILEPICT16 *pict16; + METAFILEPICT *pict32 = GlobalLock( data32 ); + + if (pict32) + { + if (!(data16 = GlobalAlloc16( GMEM_MOVEABLE, sizeof(*pict16) ))) return 0; + pict16 = GlobalLock16( data16 ); + pict16->mm = pict32->mm; + pict16->xExt = pict32->xExt; + pict16->yExt = pict32->yExt; + size = GetMetaFileBitsEx( pict32->hMF, 0, NULL ); + pict16->hMF = GlobalAlloc16( GMEM_MOVEABLE, size ); + ptr = GlobalLock16( pict16->hMF ); + GetMetaFileBitsEx( pict32->hMF, size, ptr ); + GlobalUnlock16( pict16->hMF ); + GlobalUnlock16( data16 ); + set_clipboard_format( format, data16 ); + } + break; + } + + case CF_ENHMETAFILE: + FIXME( "enhmetafile not supported in 16-bit\n" ); + return 0; + + default: + if (format >= CF_GDIOBJFIRST && format <= CF_GDIOBJLAST) + data16 = HGDIOBJ_16( data32 ); + else if (format >= CF_PRIVATEFIRST && format <= CF_PRIVATELAST) + data16 = HANDLE_16( data32 ); + else + { + void *ptr16, *ptr32 = GlobalLock( data32 ); + if (ptr32) + { + size = GlobalSize( data32 ); + if (!(data16 = GlobalAlloc16( GMEM_MOVEABLE, size ))) return 0; + ptr16 = GlobalLock16( data16 ); + memcpy( ptr16, ptr32, size ); + GlobalUnlock16( data16 ); + set_clipboard_format( format, data16 ); + } + } + break; + } + return data16; }
1
0
0
0
Alexandre Julliard : shell32/tests: Fix the system directory test for old WoW64 platforms.
by Alexandre Julliard
23 Dec '09
23 Dec '09
Module: wine Branch: master Commit: 9d44153273c570eb418c02d5a61565a7c8444d7b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9d44153273c570eb418c02d5a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Dec 23 12:18:37 2009 +0100 shell32/tests: Fix the system directory test for old WoW64 platforms. --- dlls/shell32/tests/shellpath.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/shell32/tests/shellpath.c b/dlls/shell32/tests/shellpath.c index f9f59e1..c035aaf 100644 --- a/dlls/shell32/tests/shellpath.c +++ b/dlls/shell32/tests/shellpath.c @@ -675,7 +675,7 @@ static void testWinDir(void) */ static void testSystemDir(void) { - char systemShellPath[MAX_PATH], systemDir[MAX_PATH] = { 0 }; + char systemShellPath[MAX_PATH], systemDir[MAX_PATH], systemDirx86[MAX_PATH]; if (!pSHGetSpecialFolderPathA) return; @@ -689,13 +689,13 @@ static void testSystemDir(void) systemDir, systemShellPath); } - if (!pGetSystemWow64DirectoryA || !pGetSystemWow64DirectoryA(systemDir, sizeof(systemDir))) - GetSystemDirectoryA(systemDir, sizeof(systemDir)); - myPathRemoveBackslashA(systemDir); + if (!pGetSystemWow64DirectoryA || !pGetSystemWow64DirectoryA(systemDirx86, sizeof(systemDirx86))) + GetSystemDirectoryA(systemDirx86, sizeof(systemDirx86)); + myPathRemoveBackslashA(systemDirx86); if (pSHGetSpecialFolderPathA(NULL, systemShellPath, CSIDL_SYSTEMX86, FALSE)) { myPathRemoveBackslashA(systemShellPath); - ok(!lstrcmpiA(systemDir, systemShellPath), + ok(!lstrcmpiA(systemDirx86, systemShellPath) || broken(!lstrcmpiA(systemDir, systemShellPath)), "GetSystemDirectory returns %s SHGetSpecialFolderPath returns %s\n", systemDir, systemShellPath); }
1
0
0
0
Alexandre Julliard : shlwapi/tests: Remove empty traces.
by Alexandre Julliard
23 Dec '09
23 Dec '09
Module: wine Branch: master Commit: 875f7260777953b0e02dcf42a3bfa75e65ca18db URL:
http://source.winehq.org/git/wine.git/?a=commit;h=875f7260777953b0e02dcf42a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Dec 23 12:13:53 2009 +0100 shlwapi/tests: Remove empty traces. --- dlls/shlwapi/tests/ordinal.c | 24 ------------------------ 1 files changed, 0 insertions(+), 24 deletions(-) diff --git a/dlls/shlwapi/tests/ordinal.c b/dlls/shlwapi/tests/ordinal.c index ac1a223..5227ea7 100644 --- a/dlls/shlwapi/tests/ordinal.c +++ b/dlls/shlwapi/tests/ordinal.c @@ -579,7 +579,6 @@ static HRESULT WINAPI Disp_QueryInterface( REFIID riid, void **ppvObject) { - trace("\n"); *ppvObject = NULL; if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IDispatch)) @@ -618,7 +617,6 @@ static HRESULT WINAPI Disp_GetTypeInfoCount( IDispatch* This, UINT *pctinfo) { - trace("\n"); return ERROR_SUCCESS; } @@ -628,7 +626,6 @@ static HRESULT WINAPI Disp_GetTypeInfo( LCID lcid, ITypeInfo **ppTInfo) { - trace("\n"); return ERROR_SUCCESS; } @@ -640,7 +637,6 @@ static HRESULT WINAPI Disp_GetIDsOfNames( LCID lcid, DISPID *rgDispId) { - trace("\n"); return ERROR_SUCCESS; } @@ -698,7 +694,6 @@ static HRESULT WINAPI Enum_QueryInterface( REFIID riid, void **ppvObject) { - trace("\n"); *ppvObject = NULL; if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IEnumConnections)) @@ -741,7 +736,6 @@ static HRESULT WINAPI Enum_Next( { EnumCon *iface = (EnumCon*)This; - trace("\n"); if (cConnections > 0 && iface->idx < iface->pt->sinkCount) { rgcd->pUnk = iface->pt->sink[iface->idx]; @@ -760,14 +754,12 @@ static HRESULT WINAPI Enum_Skip( IEnumConnections* This, ULONG cConnections) { - trace("\n"); return E_FAIL; } static HRESULT WINAPI Enum_Reset( IEnumConnections* This) { - trace("\n"); return E_FAIL; } @@ -775,7 +767,6 @@ static HRESULT WINAPI Enum_Clone( IEnumConnections* This, IEnumConnections **ppEnum) { - trace("\n"); return E_FAIL; } @@ -795,7 +786,6 @@ static HRESULT WINAPI ConPt_QueryInterface( REFIID riid, void **ppvObject) { - trace("\n"); *ppvObject = NULL; if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IConnectionPoint)) @@ -850,7 +840,6 @@ static HRESULT WINAPI ConPt_GetConnectionInterface( { static int i = 0; ConPt *iface = (ConPt*)This; - trace("\n"); if (i==0) { i++; @@ -866,7 +855,6 @@ static HRESULT WINAPI ConPt_GetConnectionPointContainer( IConnectionPointContainer **ppCPC) { ConPt *iface = (ConPt*)This; - trace("\n"); *ppCPC = (IConnectionPointContainer*)iface->container; return S_OK; @@ -878,7 +866,6 @@ static HRESULT WINAPI ConPt_Advise( DWORD *pdwCookie) { ConPt *iface = (ConPt*)This; - trace("\n"); if (iface->sinkCount == 0) iface->sink = HeapAlloc(GetProcessHeap(),0,sizeof(IUnknown*)); @@ -896,7 +883,6 @@ static HRESULT WINAPI ConPt_Unadvise( DWORD dwCookie) { ConPt *iface = (ConPt*)This; - trace("\n"); if (dwCookie > iface->sinkCount) return E_FAIL; @@ -914,7 +900,6 @@ static HRESULT WINAPI ConPt_EnumConnections( { EnumCon *ec; - trace("\n"); ec = HeapAlloc(GetProcessHeap(),0,sizeof(EnumCon)); ec->vtbl = &enum_vtbl; ec->refCount = 1; @@ -942,7 +927,6 @@ static HRESULT WINAPI EnumPt_QueryInterface( REFIID riid, void **ppvObject) { - trace("\n"); *ppvObject = NULL; if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IEnumConnectionPoints)) @@ -985,7 +969,6 @@ static HRESULT WINAPI EnumPt_Next( { EnumPt *iface = (EnumPt*)This; - trace("\n"); if (cConnections > 0 && iface->idx < iface->container->ptCount) { *rgcd = iface->container->pt[iface->idx]; @@ -1003,14 +986,12 @@ static HRESULT WINAPI EnumPt_Skip( IEnumConnectionPoints* This, ULONG cConnections) { - trace("\n"); return E_FAIL; } static HRESULT WINAPI EnumPt_Reset( IEnumConnectionPoints* This) { - trace("\n"); return E_FAIL; } @@ -1018,7 +999,6 @@ static HRESULT WINAPI EnumPt_Clone( IEnumConnectionPoints* This, IEnumConnectionPoints **ppEnumPt) { - trace("\n"); return E_FAIL; } @@ -1038,7 +1018,6 @@ static HRESULT WINAPI Contain_QueryInterface( REFIID riid, void **ppvObject) { - trace("\n"); *ppvObject = NULL; if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IConnectionPointContainer)) @@ -1090,7 +1069,6 @@ static HRESULT WINAPI Contain_EnumConnectionPoints( { EnumPt *ec; - trace("\n"); ec = HeapAlloc(GetProcessHeap(),0,sizeof(EnumPt)); ec->vtbl = &enumpt_vtbl; ec->refCount = 1; @@ -1108,7 +1086,6 @@ static HRESULT WINAPI Contain_FindConnectionPoint( { Contain *iface = (Contain*)This; ConPt *pt; - trace("\n"); if (!IsEqualIID(riid, &IID_NULL) || iface->ptCount ==0) { @@ -1219,7 +1196,6 @@ static HRESULT WINAPI Prop_QueryInterface( REFIID riid, void **ppvObject) { - trace("\n"); *ppvObject = NULL; if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IPropertyBag))
1
0
0
0
Alexandre Julliard : user32/tests: Fix some last error checks for WoW64.
by Alexandre Julliard
23 Dec '09
23 Dec '09
Module: wine Branch: master Commit: ffe9ace917ede1c83551f1c985b4bcf3bc0a2de7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ffe9ace917ede1c83551f1c98…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Dec 23 12:13:44 2009 +0100 user32/tests: Fix some last error checks for WoW64. --- dlls/user32/tests/clipboard.c | 6 ++++-- dlls/user32/tests/menu.c | 5 +++-- dlls/user32/tests/winstation.c | 15 ++++++++++----- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/dlls/user32/tests/clipboard.c b/dlls/user32/tests/clipboard.c index e2ba2f9..a0d0fe9 100644 --- a/dlls/user32/tests/clipboard.c +++ b/dlls/user32/tests/clipboard.c @@ -56,7 +56,8 @@ static void test_ClipboardOwner(void) SetLastError(0xdeadbeef); ok(!CloseClipboard(), "CloseClipboard should fail if clipboard wasn't open\n"); - test_last_error(ERROR_CLIPBOARD_NOT_OPEN); + ok(GetLastError() == ERROR_CLIPBOARD_NOT_OPEN || broken(GetLastError() == 0xdeadbeef), /* wow64 */ + "wrong error %u\n", GetLastError()); ok(OpenClipboard(0), "OpenClipboard failed\n"); ok(!GetClipboardOwner(), "clipboard should still be not owned\n"); @@ -188,7 +189,8 @@ todo_wine SetLastError(0xdeadbeef); ok(!EmptyClipboard(), "EmptyClipboard should fail if clipboard wasn't open\n"); - test_last_error(ERROR_CLIPBOARD_NOT_OPEN); + ok(GetLastError() == ERROR_CLIPBOARD_NOT_OPEN || broken(GetLastError() == 0xdeadbeef), /* wow64 */ + "Wrong error %u\n", GetLastError()); } static HGLOBAL create_text(void) diff --git a/dlls/user32/tests/menu.c b/dlls/user32/tests/menu.c index 56535ae..88e2753 100644 --- a/dlls/user32/tests/menu.c +++ b/dlls/user32/tests/menu.c @@ -390,8 +390,9 @@ static void test_subpopup_locked_by_menu(void) ok( ret == itemid , "TrackPopupMenu returned %d error is %d\n", ret, gle); } ok( gle == 0 || - broken( gle == ERROR_INVALID_PARAMETER), /* win2k0 */ - "Last error is %d\n", gle); + broken(gle == 0xdeadbeef) || /* wow64 */ + broken(gle == ERROR_INVALID_PARAMETER), /* win2k0 */ + "Last error is %d\n", gle); } /* clean up */ DestroyMenu( hmenu); diff --git a/dlls/user32/tests/winstation.c b/dlls/user32/tests/winstation.c index 596e9ff..7be74f2 100644 --- a/dlls/user32/tests/winstation.c +++ b/dlls/user32/tests/winstation.c @@ -76,7 +76,8 @@ static DWORD CALLBACK thread( LPVOID arg ) ok( GetLastError() == ERROR_INVALID_HANDLE, "bad last error %d\n", GetLastError() ); SetLastError( 0xdeadbeef ); ok( !CloseDesktop( d1 ), "CloseDesktop succeeded\n" ); - ok( GetLastError() == ERROR_BUSY, "bad last error %d\n", GetLastError() ); + ok( GetLastError() == ERROR_BUSY || broken(GetLastError() == 0xdeadbeef), /* wow64 */ + "bad last error %d\n", GetLastError() ); print_object( d1 ); d2 = CreateDesktop( "foobar2", NULL, NULL, 0, DESKTOP_ALL_ACCESS, NULL ); trace( "created desktop %p\n", d2 ); @@ -84,7 +85,8 @@ static DWORD CALLBACK thread( LPVOID arg ) SetLastError( 0xdeadbeef ); ok( !SetThreadDesktop( d2 ), "set thread desktop succeeded with existing window\n" ); - ok( GetLastError() == ERROR_BUSY, "bad last error %d\n", GetLastError() ); + ok( GetLastError() == ERROR_BUSY || broken(GetLastError() == 0xdeadbeef), /* wow64 */ + "bad last error %d\n", GetLastError() ); DestroyWindow( hwnd ); ok( SetThreadDesktop( d2 ), "set thread desktop failed\n" ); @@ -139,7 +141,8 @@ static void test_handles(void) ok( w2 != w1, "CreateWindowStation returned default handle\n" ); SetLastError( 0xdeadbeef ); ok( !CloseDesktop( (HDESK)w2 ), "CloseDesktop succeeded on win station\n" ); - ok( GetLastError() == ERROR_INVALID_HANDLE, "bad last error %d\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_HANDLE || broken(GetLastError() == 0xdeadbeef), /* wow64 */ + "bad last error %d\n", GetLastError() ); ok( CloseWindowStation( w2 ), "CloseWindowStation failed\n" ); w2 = CreateWindowStation("WinSta0", 0, WINSTA_ALL_ACCESS, NULL ); @@ -200,7 +203,8 @@ static void test_handles(void) SetLastError( 0xdeadbeef ); ok( !CloseDesktop(d1), "closing thread desktop succeeded\n" ); - ok( GetLastError() == ERROR_BUSY, "bad last error %d\n", GetLastError() ); + ok( GetLastError() == ERROR_BUSY || broken(GetLastError() == 0xdeadbeef), /* wow64 */ + "bad last error %d\n", GetLastError() ); SetLastError( 0xdeadbeef ); if (CloseHandle( d1 )) /* succeeds on nt4 */ @@ -225,7 +229,8 @@ static void test_handles(void) ok( d2 != 0, "create foobar desktop failed\n" ); SetLastError( 0xdeadbeef ); ok( !CloseWindowStation( (HWINSTA)d2 ), "CloseWindowStation succeeded on desktop\n" ); - ok( GetLastError() == ERROR_INVALID_HANDLE, "bad last error %d\n", GetLastError() ); + ok( GetLastError() == ERROR_INVALID_HANDLE || broken(GetLastError() == 0xdeadbeef), /* wow64 */ + "bad last error %d\n", GetLastError() ); SetLastError( 0xdeadbeef ); d3 = CreateDesktop( "foobar", NULL, NULL, 0, DESKTOP_ALL_ACCESS, NULL );
1
0
0
0
Alexandre Julliard : kernel32/tests: Fix the SetThreadIdealProcessor for WoW64.
by Alexandre Julliard
23 Dec '09
23 Dec '09
Module: wine Branch: master Commit: 89c0b87fad63e28d7ab8cafeaf5383af0f4861ed URL:
http://source.winehq.org/git/wine.git/?a=commit;h=89c0b87fad63e28d7ab8cafea…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Dec 23 12:13:32 2009 +0100 kernel32/tests: Fix the SetThreadIdealProcessor for WoW64. --- dlls/kernel32/tests/thread.c | 32 ++++++++++++++++++++++++++------ 1 files changed, 26 insertions(+), 6 deletions(-) diff --git a/dlls/kernel32/tests/thread.c b/dlls/kernel32/tests/thread.c index 84968ce..dd83399 100644 --- a/dlls/kernel32/tests/thread.c +++ b/dlls/kernel32/tests/thread.c @@ -61,6 +61,7 @@ static DWORD (WINAPI *pSetThreadIdealProcessor)(HANDLE,DWORD); static BOOL (WINAPI *pSetThreadPriorityBoost)(HANDLE,BOOL); static BOOL (WINAPI *pRegisterWaitForSingleObject)(PHANDLE,HANDLE,WAITORTIMERCALLBACK,PVOID,ULONG,ULONG); static BOOL (WINAPI *pUnregisterWait)(HANDLE); +static BOOL (WINAPI *pIsWow64Process)(HANDLE,PBOOL); static HANDLE create_target_process(const char *arg) { @@ -779,6 +780,9 @@ static VOID test_thread_processor(void) DWORD_PTR processMask,systemMask; SYSTEM_INFO sysInfo; int error=0; + BOOL is_wow64; + + if (!pIsWow64Process || !pIsWow64Process( GetCurrentProcess(), &is_wow64 )) is_wow64 = FALSE; sysInfo.dwNumberOfProcessors=0; GetSystemInfo(&sysInfo); @@ -807,12 +811,27 @@ static VOID test_thread_processor(void) } ok(error!=-1, "SetThreadIdealProcessor failed\n"); - SetLastError(0xdeadbeef); - error=pSetThreadIdealProcessor(curthread,MAXIMUM_PROCESSORS+1); - ok(error==-1, - "SetThreadIdealProcessor succeeded with an illegal processor #\n"); - ok(GetLastError()==ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + if (is_wow64) + { + SetLastError(0xdeadbeef); + error=pSetThreadIdealProcessor(curthread,MAXIMUM_PROCESSORS+1); + todo_wine + ok(error!=-1, "SetThreadIdealProcessor failed for %u on Wow64\n", MAXIMUM_PROCESSORS+1); + + SetLastError(0xdeadbeef); + error=pSetThreadIdealProcessor(curthread,65); + ok(error==-1, "SetThreadIdealProcessor succeeded with an illegal processor #\n"); + ok(GetLastError()==ERROR_INVALID_PARAMETER, + "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + } + else + { + SetLastError(0xdeadbeef); + error=pSetThreadIdealProcessor(curthread,MAXIMUM_PROCESSORS+1); + ok(error==-1, "SetThreadIdealProcessor succeeded with an illegal processor #\n"); + ok(GetLastError()==ERROR_INVALID_PARAMETER, + "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); + } error=pSetThreadIdealProcessor(curthread,MAXIMUM_PROCESSORS); ok(error==0, "SetThreadIdealProcessor returned an incorrect value\n"); @@ -1208,6 +1227,7 @@ START_TEST(thread) pSetThreadPriorityBoost=(void *)GetProcAddress(lib,"SetThreadPriorityBoost"); pRegisterWaitForSingleObject=(void *)GetProcAddress(lib,"RegisterWaitForSingleObject"); pUnregisterWait=(void *)GetProcAddress(lib,"UnregisterWait"); + pIsWow64Process=(void *)GetProcAddress(lib,"IsWow64Process"); if (argc >= 3) {
1
0
0
0
Alexandre Julliard : kernel32/tests: Get rid of API function typedefs.
by Alexandre Julliard
23 Dec '09
23 Dec '09
Module: wine Branch: master Commit: 221925ddbf5b5c7941228b6f23b8bb4bf88bfa52 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=221925ddbf5b5c7941228b6f2…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Dec 23 12:02:08 2009 +0100 kernel32/tests: Get rid of API function typedefs. --- dlls/kernel32/tests/thread.c | 41 ++++++++++++++--------------------------- 1 files changed, 14 insertions(+), 27 deletions(-) diff --git a/dlls/kernel32/tests/thread.c b/dlls/kernel32/tests/thread.c index 275f6aa..84968ce 100644 --- a/dlls/kernel32/tests/thread.c +++ b/dlls/kernel32/tests/thread.c @@ -54,26 +54,13 @@ # endif #endif -typedef BOOL (WINAPI *GetThreadPriorityBoost_t)(HANDLE,PBOOL); -static GetThreadPriorityBoost_t pGetThreadPriorityBoost=NULL; - -typedef HANDLE (WINAPI *OpenThread_t)(DWORD,BOOL,DWORD); -static OpenThread_t pOpenThread=NULL; - -typedef BOOL (WINAPI *QueueUserWorkItem_t)(LPTHREAD_START_ROUTINE,PVOID,ULONG); -static QueueUserWorkItem_t pQueueUserWorkItem=NULL; - -typedef DWORD (WINAPI *SetThreadIdealProcessor_t)(HANDLE,DWORD); -static SetThreadIdealProcessor_t pSetThreadIdealProcessor=NULL; - -typedef BOOL (WINAPI *SetThreadPriorityBoost_t)(HANDLE,BOOL); -static SetThreadPriorityBoost_t pSetThreadPriorityBoost=NULL; - -typedef BOOL (WINAPI *RegisterWaitForSingleObject_t)(PHANDLE,HANDLE,WAITORTIMERCALLBACK,PVOID,ULONG,ULONG); -static RegisterWaitForSingleObject_t pRegisterWaitForSingleObject=NULL; - -typedef BOOL (WINAPI *UnregisterWait_t)(HANDLE); -static UnregisterWait_t pUnregisterWait=NULL; +static BOOL (WINAPI *pGetThreadPriorityBoost)(HANDLE,PBOOL); +static HANDLE (WINAPI *pOpenThread)(DWORD,BOOL,DWORD); +static BOOL (WINAPI *pQueueUserWorkItem)(LPTHREAD_START_ROUTINE,PVOID,ULONG); +static DWORD (WINAPI *pSetThreadIdealProcessor)(HANDLE,DWORD); +static BOOL (WINAPI *pSetThreadPriorityBoost)(HANDLE,BOOL); +static BOOL (WINAPI *pRegisterWaitForSingleObject)(PHANDLE,HANDLE,WAITORTIMERCALLBACK,PVOID,ULONG,ULONG); +static BOOL (WINAPI *pUnregisterWait)(HANDLE); static HANDLE create_target_process(const char *arg) { @@ -1214,13 +1201,13 @@ START_TEST(thread) */ lib=GetModuleHandleA("kernel32.dll"); ok(lib!=NULL,"Couldn't get a handle for kernel32.dll\n"); - pGetThreadPriorityBoost=(GetThreadPriorityBoost_t)GetProcAddress(lib,"GetThreadPriorityBoost"); - pOpenThread=(OpenThread_t)GetProcAddress(lib,"OpenThread"); - pQueueUserWorkItem=(QueueUserWorkItem_t)GetProcAddress(lib,"QueueUserWorkItem"); - pSetThreadIdealProcessor=(SetThreadIdealProcessor_t)GetProcAddress(lib,"SetThreadIdealProcessor"); - pSetThreadPriorityBoost=(SetThreadPriorityBoost_t)GetProcAddress(lib,"SetThreadPriorityBoost"); - pRegisterWaitForSingleObject=(RegisterWaitForSingleObject_t)GetProcAddress(lib,"RegisterWaitForSingleObject"); - pUnregisterWait=(UnregisterWait_t)GetProcAddress(lib,"UnregisterWait"); + pGetThreadPriorityBoost=(void *)GetProcAddress(lib,"GetThreadPriorityBoost"); + pOpenThread=(void *)GetProcAddress(lib,"OpenThread"); + pQueueUserWorkItem=(void *)GetProcAddress(lib,"QueueUserWorkItem"); + pSetThreadIdealProcessor=(void *)GetProcAddress(lib,"SetThreadIdealProcessor"); + pSetThreadPriorityBoost=(void *)GetProcAddress(lib,"SetThreadPriorityBoost"); + pRegisterWaitForSingleObject=(void *)GetProcAddress(lib,"RegisterWaitForSingleObject"); + pUnregisterWait=(void *)GetProcAddress(lib,"UnregisterWait"); if (argc >= 3) {
1
0
0
0
Austin English : cmd: Use DOS newlines, not UNIX.
by Alexandre Julliard
23 Dec '09
23 Dec '09
Module: wine Branch: master Commit: cc72c4d346fa0d61ec19f9dbfaf16a9b7ccf81f3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cc72c4d346fa0d61ec19f9dbf…
Author: Austin English <austinenglish(a)gmail.com> Date: Tue Dec 22 21:04:20 2009 -0600 cmd: Use DOS newlines, not UNIX. --- programs/cmd/wcmdmain.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c index 1c55fce..0e25deb 100644 --- a/programs/cmd/wcmdmain.c +++ b/programs/cmd/wcmdmain.c @@ -83,7 +83,7 @@ HINSTANCE hinst; DWORD errorlevel; int echo_mode = 1, verify_mode = 0, defaultColor = 7; static int opt_c, opt_k, opt_s; -const WCHAR newline[] = {'\n','\0'}; +const WCHAR newline[] = {'\r','\n','\0'}; static const WCHAR equalsW[] = {'=','\0'}; static const WCHAR closeBW[] = {')','\0'}; WCHAR anykey[100];
1
0
0
0
← Newer
1
...
20
21
22
23
24
25
26
...
124
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
Results per page:
10
25
50
100
200