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
March 2012
----- 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
710 discussions
Start a n
N
ew thread
Huw Davies : gdi32: Add a helper to create a new FreeType face.
by Alexandre Julliard
29 Mar '12
29 Mar '12
Module: wine Branch: master Commit: 7ac623f380354244a7f068ce22e1f4780508ee5a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7ac623f380354244a7f068ce2…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Mar 28 14:49:23 2012 +0100 gdi32: Add a helper to create a new FreeType face. --- dlls/gdi32/freetype.c | 140 +++++++++++++++++++++++++++---------------------- 1 files changed, 78 insertions(+), 62 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 8a077a9..44222cf 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -1789,11 +1789,85 @@ static void AddFaceToList(FT_Face ft_face, const char *file, void *font_data_ptr debugstr_w(face->StyleName)); } +static FT_Face new_ft_face( const char *file, void *font_data_ptr, DWORD font_data_size, + FT_Long face_index, BOOL allow_bitmap ) +{ + FT_Error err; + TT_OS2 *pOS2; + FT_Face ft_face; + + if (file) + { + TRACE("Loading font file %s index %ld\n", debugstr_a(file), face_index); + err = pFT_New_Face(library, file, face_index, &ft_face); + } + else + { + TRACE("Loading font from ptr %p size %d, index %ld\n", font_data_ptr, font_data_size, face_index); + err = pFT_New_Memory_Face(library, font_data_ptr, font_data_size, face_index, &ft_face); + } + + if (err != 0) + { + WARN("Unable to load font %s/%p err = %x\n", debugstr_a(file), font_data_ptr, err); + return NULL; + } + + /* There are too many bugs in FreeType < 2.1.9 for bitmap font support */ + if (!FT_IS_SCALABLE( ft_face ) && FT_SimpleVersion < ((2 << 16) | (1 << 8) | (9 << 0))) + { + WARN("FreeType version < 2.1.9, skipping bitmap font %s/%p\n", debugstr_a(file), font_data_ptr); + goto fail; + } + + if (!FT_IS_SFNT( ft_face )) + { + if (FT_IS_SCALABLE( ft_face ) || !allow_bitmap ) + { + WARN("Ignoring font %s/%p\n", debugstr_a(file), font_data_ptr); + goto fail; + } + } + else + { + if (!(pOS2 = pFT_Get_Sfnt_Table( ft_face, ft_sfnt_os2 )) || + !pFT_Get_Sfnt_Table( ft_face, ft_sfnt_hhea ) || + !pFT_Get_Sfnt_Table( ft_face, ft_sfnt_head )) + { + TRACE("Font %s/%p lacks either an OS2, HHEA or HEAD table.\n" + "Skipping this font.\n", debugstr_a(file), font_data_ptr); + goto fail; + } + + /* Wine uses ttfs as an intermediate step in building its bitmap fonts; + we don't want to load these. */ + if (!memcmp( pOS2->achVendID, "Wine", sizeof(pOS2->achVendID) )) + { + FT_ULong len = 0; + + if (!pFT_Load_Sfnt_Table( ft_face, FT_MAKE_TAG('E','B','S','C'), 0, NULL, &len )) + { + TRACE("Skipping Wine bitmap-only TrueType font %s\n", debugstr_a(file)); + goto fail; + } + } + } + + if (!ft_face->family_name || !ft_face->style_name) + { + TRACE("Font %s/%p lacks either a family or style name\n", debugstr_a(file), font_data_ptr); + goto fail; + } + + return ft_face; +fail: + pFT_Done_Face( ft_face ); + return NULL; +} + static INT AddFontToList(const char *file, void *font_data_ptr, DWORD font_data_size, DWORD flags) { FT_Face ft_face; - TT_OS2 *pOS2; - FT_Error err; FT_Long face_index = 0, num_faces; INT ret = 0; @@ -1822,66 +1896,8 @@ static INT AddFontToList(const char *file, void *font_data_ptr, DWORD font_data_ #endif /* HAVE_CARBON_CARBON_H */ do { - if (file) - { - TRACE("Loading font file %s index %ld\n", debugstr_a(file), face_index); - err = pFT_New_Face(library, file, face_index, &ft_face); - } else - { - TRACE("Loading font from ptr %p size %d, index %ld\n", font_data_ptr, font_data_size, face_index); - err = pFT_New_Memory_Face(library, font_data_ptr, font_data_size, face_index, &ft_face); - } - - if(err != 0) { - WARN("Unable to load font %s/%p err = %x\n", debugstr_a(file), font_data_ptr, err); - return 0; - } - - if(!FT_IS_SFNT(ft_face) && (FT_IS_SCALABLE(ft_face) || !(flags & ADDFONT_FORCE_BITMAP))) { /* for now we'll accept TT/OT or bitmap fonts*/ - WARN("Ignoring font %s/%p\n", debugstr_a(file), font_data_ptr); - pFT_Done_Face(ft_face); - return 0; - } - - /* There are too many bugs in FreeType < 2.1.9 for bitmap font support */ - if(!FT_IS_SCALABLE(ft_face) && FT_SimpleVersion < ((2 << 16) | (1 << 8) | (9 << 0))) { - WARN("FreeType version < 2.1.9, skipping bitmap font %s/%p\n", debugstr_a(file), font_data_ptr); - pFT_Done_Face(ft_face); - return 0; - } - - if(FT_IS_SFNT(ft_face)) - { - if(!(pOS2 = pFT_Get_Sfnt_Table(ft_face, ft_sfnt_os2)) || - !pFT_Get_Sfnt_Table(ft_face, ft_sfnt_hhea) || - !pFT_Get_Sfnt_Table(ft_face, ft_sfnt_head)) - { - TRACE("Font %s/%p lacks either an OS2, HHEA or HEAD table.\n" - "Skipping this font.\n", debugstr_a(file), font_data_ptr); - pFT_Done_Face(ft_face); - return 0; - } - - /* Wine uses ttfs as an intermediate step in building its bitmap fonts; - we don't want to load these. */ - if(!memcmp(pOS2->achVendID, "Wine", sizeof(pOS2->achVendID))) - { - FT_ULong len = 0; - - if(!pFT_Load_Sfnt_Table(ft_face, FT_MAKE_TAG('E','B','S','C'), 0, NULL, &len)) - { - TRACE("Skipping Wine bitmap-only TrueType font %s\n", debugstr_a(file)); - pFT_Done_Face(ft_face); - return 0; - } - } - } - - if(!ft_face->family_name || !ft_face->style_name) { - TRACE("Font %s/%p lacks either a family or style name\n", debugstr_a(file), font_data_ptr); - pFT_Done_Face(ft_face); - return 0; - } + ft_face = new_ft_face( file, font_data_ptr, font_data_size, face_index, flags & ADDFONT_FORCE_BITMAP ); + if (!ft_face) return 0; if(ft_face->family_name[0] == '.') /* Ignore fonts with names beginning with a dot */ {
1
0
0
0
Aric Stewart : strmbase: Add beginnings of BaseWindow.
by Alexandre Julliard
28 Mar '12
28 Mar '12
Module: wine Branch: master Commit: a179b50c9b694c8965c353f8f3b377e79292e347 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a179b50c9b694c8965c353f8f…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Wed Mar 28 07:29:06 2012 -0500 strmbase: Add beginnings of BaseWindow. --- dlls/strmbase/Makefile.in | 3 +- dlls/strmbase/window.c | 146 +++++++++++++++++++++++++++++++++++++++++++++ include/wine/strmbase.h | 38 ++++++++++++ 3 files changed, 186 insertions(+), 1 deletions(-) diff --git a/dlls/strmbase/Makefile.in b/dlls/strmbase/Makefile.in index 07ac5a0..06654ab 100644 --- a/dlls/strmbase/Makefile.in +++ b/dlls/strmbase/Makefile.in @@ -10,6 +10,7 @@ C_SRCS = \ pospass.c \ qualitycontrol.c \ seeking.c \ - transform.c + transform.c \ + window.c @MAKE_IMPLIB_RULES@ diff --git a/dlls/strmbase/window.c b/dlls/strmbase/window.c new file mode 100644 index 0000000..3a90e78 --- /dev/null +++ b/dlls/strmbase/window.c @@ -0,0 +1,146 @@ +/* + * Generic Implementation of strmbase window classes + * + * Copyright 2012 Aric Stewart, 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 + */ + +#define COBJMACROS + +#include "dshow.h" +#include "wine/debug.h" +#include "wine/unicode.h" +#include "wine/strmbase.h" +#include "uuids.h" +#include "vfwmsgs.h" +#include <assert.h> + +WINE_DEFAULT_DEBUG_CHANNEL(strmbase); + +static LRESULT CALLBACK WndProcW(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + BaseWindow* This = (BaseWindow*)GetWindowLongPtrW(hwnd, 0); + + if (!This) + return DefWindowProcW(hwnd, uMsg, wParam, lParam); + + if (This->pFuncsTable->pfnOnReceiveMessage) + return This->pFuncsTable->pfnOnReceiveMessage(This, hwnd, uMsg, wParam, lParam); + else + return BaseWindowImpl_OnReceiveMessage(This, hwnd, uMsg, wParam, lParam); +} + +LRESULT WINAPI BaseWindowImpl_OnReceiveMessage(BaseWindow *This, HWND hwnd, INT uMsg, WPARAM wParam, LPARAM lParam) +{ + if (This->pFuncsTable->pfnPossiblyEatMessage && This->pFuncsTable->pfnPossiblyEatMessage(This, uMsg, wParam, lParam)) + return 0; + + switch (uMsg) + { + case WM_SIZE: + if (This->pFuncsTable->pfnOnSize) + return This->pFuncsTable->pfnOnSize(This, LOWORD(lParam), HIWORD(lParam)); + else + return BaseWindowImpl_OnSize(This, LOWORD(lParam), HIWORD(lParam)); + } + + return DefWindowProcW(hwnd, uMsg, wParam, lParam); +} + +BOOL WINAPI BaseWindowImpl_OnSize(BaseWindow *This, LONG Width, LONG Height) +{ + This->Width = Width; + This->Height = Height; + return TRUE; +} + +HRESULT WINAPI BaseWindow_Init(BaseWindow *pBaseWindow, const BaseWindowFuncTable* pFuncsTable) +{ + if (!pFuncsTable) + return E_INVALIDARG; + + ZeroMemory(pBaseWindow,sizeof(BaseWindow)); + pBaseWindow->pFuncsTable = pFuncsTable; + + return S_OK; +} + +HRESULT WINAPI BaseWindow_Destroy(BaseWindow *This) +{ + if (This->hWnd) + BaseWindowImpl_DoneWithWindow(This); + + HeapFree(GetProcessHeap(), 0, This); + return S_OK; +} + +HRESULT WINAPI BaseWindowImpl_PrepareWindow(BaseWindow *This) +{ + WNDCLASSW winclass; + static const WCHAR windownameW[] = { 'A','c','t','i','v','e','M','o','v','i','e',' ','W','i','n','d','o','w',0 }; + + This->pClassName = This->pFuncsTable->pfnGetClassWindowStyles(This, &This->ClassStyles, &This->WindowStyles, &This->WindowStylesEx); + + winclass.style = This->ClassStyles; + winclass.lpfnWndProc = WndProcW; + winclass.cbClsExtra = 0; + winclass.cbWndExtra = sizeof(BaseWindow*); + winclass.hInstance = This->hInstance; + winclass.hIcon = NULL; + winclass.hCursor = NULL; + winclass.hbrBackground = GetStockObject(BLACK_BRUSH); + winclass.lpszMenuName = NULL; + winclass.lpszClassName = This->pClassName; + if (!RegisterClassW(&winclass) && GetLastError() != ERROR_CLASS_ALREADY_EXISTS) + { + ERR("Unable to register window class: %u\n", GetLastError()); + return E_FAIL; + } + + This->hWnd = CreateWindowExW(This->WindowStylesEx, + This->pClassName, windownameW, + This->WindowStyles, + CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, + CW_USEDEFAULT, NULL, NULL, This->hInstance, + NULL); + + if (!This->hWnd) + { + ERR("Unable to create window\n"); + return E_FAIL; + } + + SetWindowLongPtrW(This->hWnd, 0, (LONG_PTR)This); + + This->hDC = GetDC(This->hWnd); + + return S_OK; +} + +HRESULT WINAPI BaseWindowImpl_DoneWithWindow(BaseWindow *This) +{ + if (!This->hWnd) + return S_OK; + + if (This->hDC) + ReleaseDC(This->hWnd, This->hDC); + This->hDC = NULL; + + DestroyWindow(This->hWnd); + This->hWnd = NULL; + + return S_OK; +} diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h index 4944e34..f5aac5c 100644 --- a/include/wine/strmbase.h +++ b/include/wine/strmbase.h @@ -391,6 +391,44 @@ VOID WINAPI OutputQueue_EOS(OutputQueue *pOutputQueue); VOID WINAPI OutputQueue_SendAnyway(OutputQueue *pOutputQueue); DWORD WINAPI OutputQueueImpl_ThreadProc(OutputQueue *pOutputQueue); +typedef struct tagBaseWindow +{ + HWND hWnd; + LONG Width; + LONG Height; + HINSTANCE hInstance; + LPWSTR pClassName; + DWORD ClassStyles; + DWORD WindowStyles; + DWORD WindowStylesEx; + HDC hDC; + + const struct BaseWindowFuncTable* pFuncsTable; +} BaseWindow; + +typedef LPWSTR (WINAPI *BaseWindow_GetClassWindowStyles)(BaseWindow *This, DWORD *pClassStyles, DWORD *pWindowStyles, DWORD *pWindowStylesEx); +typedef BOOL (WINAPI *BaseWindow_PossiblyEatMessage)(BaseWindow *This, UINT uMsg, WPARAM wParam, LPARAM lParam); +typedef LRESULT (WINAPI *BaseWindow_OnReceiveMessage)(BaseWindow *This, HWND hwnd, INT uMsg, WPARAM wParam, LPARAM lParam); +typedef BOOL (WINAPI *BaseWindow_OnSize)(BaseWindow *This, LONG Height, LONG Width); + +typedef struct BaseWindowFuncTable +{ + /* Required */ + BaseWindow_GetClassWindowStyles pfnGetClassWindowStyles; + /* Optional, WinProc Related */ + BaseWindow_OnReceiveMessage pfnOnReceiveMessage; + BaseWindow_PossiblyEatMessage pfnPossiblyEatMessage; + BaseWindow_OnSize pfnOnSize; +} BaseWindowFuncTable; + +HRESULT WINAPI BaseWindow_Init(BaseWindow *pBaseWindow, const BaseWindowFuncTable* pFuncsTable); +HRESULT WINAPI BaseWindow_Destroy(BaseWindow *pBaseWindow); + +HRESULT WINAPI BaseWindowImpl_PrepareWindow(BaseWindow *This); +HRESULT WINAPI BaseWindowImpl_DoneWithWindow(BaseWindow *This); +LRESULT WINAPI BaseWindowImpl_OnReceiveMessage(BaseWindow *This, HWND hwnd, INT uMsg, WPARAM wParam, LPARAM lParam); +BOOL WINAPI BaseWindowImpl_OnSize(BaseWindow *This, LONG Height, LONG Width); + /* Dll Functions */ BOOL WINAPI STRMBASE_DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv); HRESULT WINAPI STRMBASE_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv);
1
0
0
0
Andrew Eikum : mmdevapi: TRACE all COM method calls.
by Alexandre Julliard
28 Mar '12
28 Mar '12
Module: wine Branch: master Commit: edab3b13f75afc69cae1d04f7ca3f9b5c1d34493 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=edab3b13f75afc69cae1d04f7…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Wed Mar 28 08:56:26 2012 -0500 mmdevapi: TRACE all COM method calls. --- dlls/mmdevapi/devenum.c | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/dlls/mmdevapi/devenum.c b/dlls/mmdevapi/devenum.c index ba55368..6f55c7c 100644 --- a/dlls/mmdevapi/devenum.c +++ b/dlls/mmdevapi/devenum.c @@ -649,6 +649,7 @@ static HRESULT WINAPI MMDevice_GetId(IMMDevice *iface, WCHAR **itemid) wsprintfW( str, formatW, id->Data1, id->Data2, id->Data3, id->Data4[0], id->Data4[1], id->Data4[2], id->Data4[3], id->Data4[4], id->Data4[5], id->Data4[6], id->Data4[7] ); + TRACE("returning %s\n", wine_dbgstr_w(str)); return S_OK; } @@ -682,24 +683,28 @@ static inline MMDevice *impl_from_IMMEndpoint(IMMEndpoint *iface) static HRESULT WINAPI MMEndpoint_QueryInterface(IMMEndpoint *iface, REFIID riid, void **ppv) { MMDevice *This = impl_from_IMMEndpoint(iface); + TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppv); return IMMDevice_QueryInterface(&This->IMMDevice_iface, riid, ppv); } static ULONG WINAPI MMEndpoint_AddRef(IMMEndpoint *iface) { MMDevice *This = impl_from_IMMEndpoint(iface); + TRACE("(%p)\n", This); return IMMDevice_AddRef(&This->IMMDevice_iface); } static ULONG WINAPI MMEndpoint_Release(IMMEndpoint *iface) { MMDevice *This = impl_from_IMMEndpoint(iface); + TRACE("(%p)\n", This); return IMMDevice_Release(&This->IMMDevice_iface); } static HRESULT WINAPI MMEndpoint_GetDataFlow(IMMEndpoint *iface, EDataFlow *flow) { MMDevice *This = impl_from_IMMEndpoint(iface); + TRACE("(%p)->(%p)\n", This, flow); if (!flow) return E_POINTER; *flow = This->flow; @@ -738,6 +743,7 @@ static void MMDevCol_Destroy(MMDevColImpl *This) static HRESULT WINAPI MMDevCol_QueryInterface(IMMDeviceCollection *iface, REFIID riid, void **ppv) { MMDevColImpl *This = impl_from_IMMDeviceCollection(iface); + TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppv); if (!ppv) return E_POINTER; @@ -860,6 +866,7 @@ void MMDevEnum_Free(void) static HRESULT WINAPI MMDevEnum_QueryInterface(IMMDeviceEnumerator *iface, REFIID riid, void **ppv) { MMDevEnumImpl *This = impl_from_IMMDeviceEnumerator(iface); + TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppv); if (!ppv) return E_POINTER; @@ -1090,6 +1097,7 @@ static void MMDevPropStore_Destroy(MMDevPropStore *This) static HRESULT WINAPI MMDevPropStore_QueryInterface(IPropertyStore *iface, REFIID riid, void **ppv) { MMDevPropStore *This = impl_from_IPropertyStore(iface); + TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppv); if (!ppv) return E_POINTER; @@ -1181,7 +1189,7 @@ static HRESULT WINAPI MMDevPropStore_GetAt(IPropertyStore *iface, DWORD prop, PR static HRESULT WINAPI MMDevPropStore_GetValue(IPropertyStore *iface, REFPROPERTYKEY key, PROPVARIANT *pv) { MMDevPropStore *This = impl_from_IPropertyStore(iface); - TRACE("(%p)->(\"%s,%u\", %p\n", This, debugstr_guid(&key->fmtid), key ? key->pid : 0, pv); + TRACE("(%p)->(\"%s,%u\", %p)\n", This, key ? debugstr_guid(&key->fmtid) : NULL, key ? key->pid : 0, pv); if (!key || !pv) return E_POINTER; @@ -1206,6 +1214,7 @@ static HRESULT WINAPI MMDevPropStore_GetValue(IPropertyStore *iface, REFPROPERTY static HRESULT WINAPI MMDevPropStore_SetValue(IPropertyStore *iface, REFPROPERTYKEY key, REFPROPVARIANT pv) { MMDevPropStore *This = impl_from_IPropertyStore(iface); + TRACE("(%p)->(\"%s,%u\", %p)\n", This, key ? debugstr_guid(&key->fmtid) : NULL, key ? key->pid : 0, pv); if (!key || !pv) return E_POINTER; @@ -1348,6 +1357,7 @@ static ULONG WINAPI info_device_Release(IMMDevice *iface) static HRESULT WINAPI info_device_OpenPropertyStore(IMMDevice *iface, DWORD access, IPropertyStore **ppv) { + TRACE("(static)->(%x, %p)\n", access, ppv); *ppv = &info_device_ps; return S_OK; }
1
0
0
0
Hans Leidekker : msi/tests: Reduce code duplication in the feature/ component state tests.
by Alexandre Julliard
28 Mar '12
28 Mar '12
Module: wine Branch: master Commit: ccad8e9d804bada5740ba742da7e572da96910bf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ccad8e9d804bada5740ba742d…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Mar 28 15:34:41 2012 +0200 msi/tests: Reduce code duplication in the feature/component state tests. --- dlls/msi/tests/package.c | 5134 +++------------------------------------------- 1 files changed, 302 insertions(+), 4832 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=ccad8e9d804bada5740ba…
1
0
0
0
Hans Leidekker : msi: Clear the cert pointer in MsiGetFileSignatureInformation.
by Alexandre Julliard
28 Mar '12
28 Mar '12
Module: wine Branch: master Commit: 3f1e3008ea9027d3982fb3d0175f119bc32154f4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3f1e3008ea9027d3982fb3d01…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Mar 28 15:34:26 2012 +0200 msi: Clear the cert pointer in MsiGetFileSignatureInformation. --- dlls/msi/msi.c | 1 + dlls/msi/tests/msi.c | 2 ++ 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c index 4022b3a..53ae641 100644 --- a/dlls/msi/msi.c +++ b/dlls/msi/msi.c @@ -2580,6 +2580,7 @@ HRESULT WINAPI MsiGetFileSignatureInformationW( LPCWSTR path, DWORD flags, PCCER data.dwProvFlags = 0; data.dwUIContext = WTD_UICONTEXT_INSTALL; hr = WinVerifyTrustEx( INVALID_HANDLE_VALUE, &generic_verify_v2, &data ); + *cert = NULL; if (FAILED(hr)) goto done; if (!(signer = WTHelperGetProvSignerFromChain( data.hWVTStateData, 0, FALSE, 0 ))) diff --git a/dlls/msi/tests/msi.c b/dlls/msi/tests/msi.c index 59f996a..aaf1f42 100644 --- a/dlls/msi/tests/msi.c +++ b/dlls/msi/tests/msi.c @@ -11794,8 +11794,10 @@ static void test_MsiGetFileSignatureInformation(void) hr = MsiGetFileSignatureInformationA( "signature.bin", 0, NULL, NULL, &len ); ok(hr == E_INVALIDARG, "expected E_INVALIDARG got 0x%08x\n", hr); + cert = (const CERT_CONTEXT *)0xdeadbeef; hr = MsiGetFileSignatureInformationA( "signature.bin", 0, &cert, NULL, &len ); todo_wine ok(hr == HRESULT_FROM_WIN32(ERROR_FUNCTION_FAILED), "got 0x%08x\n", hr); + ok(cert == NULL, "got %p\n", cert); DeleteFileA( "signature.bin" ); }
1
0
0
0
Hans Leidekker : msi: Also set the Intel property on 64-bit processors.
by Alexandre Julliard
28 Mar '12
28 Mar '12
Module: wine Branch: master Commit: d351a9999e33bfedbaf8160007ad6ebbc33cb038 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d351a9999e33bfedbaf816000…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Mar 28 15:34:06 2012 +0200 msi: Also set the Intel property on 64-bit processors. --- dlls/msi/package.c | 3 +-- dlls/msi/tests/package.c | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/dlls/msi/package.c b/dlls/msi/package.c index 43c6ff9..834467f 100644 --- a/dlls/msi/package.c +++ b/dlls/msi/package.c @@ -884,10 +884,9 @@ static VOID set_installer_properties(MSIPACKAGE *package) GetNativeSystemInfo( &sys_info ); sprintfW( bufstr, szIntFormat, sys_info.wProcessorLevel ); + msi_set_property( package->db, szIntel, bufstr ); if (sys_info.u.s.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL) { - msi_set_property( package->db, szIntel, bufstr ); - GetSystemDirectoryW( pth, MAX_PATH ); PathAddBackslashW( pth ); msi_set_property( package->db, szSystemFolder, pth ); diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c index 5a2ce9e..6c53827 100644 --- a/dlls/msi/tests/package.c +++ b/dlls/msi/tests/package.c @@ -10181,6 +10181,12 @@ static void test_installprops(void) { buf[0] = 0; size = MAX_PATH; + r = MsiGetProperty(hpkg, "Intel", buf, &size); + ok(r == ERROR_SUCCESS, "failed to get property: %d\n", r); + ok(buf[0], "property not set\n"); + + buf[0] = 0; + size = MAX_PATH; r = MsiGetProperty(hpkg, "MsiAMD64", buf, &size); ok(r == ERROR_SUCCESS, "failed to get property: %d\n", r); ok(buf[0], "property not set\n"); @@ -10251,6 +10257,12 @@ static void test_installprops(void) { buf[0] = 0; size = MAX_PATH; + r = MsiGetProperty(hpkg, "Intel", buf, &size); + ok(r == ERROR_SUCCESS, "failed to get property: %d\n", r); + ok(buf[0], "property not set\n"); + + buf[0] = 0; + size = MAX_PATH; r = MsiGetProperty(hpkg, "MsiAMD64", buf, &size); ok(r == ERROR_SUCCESS, "failed to get property: %d\n", r); ok(!buf[0], "property set\n"); @@ -10313,6 +10325,12 @@ static void test_installprops(void) { buf[0] = 0; size = MAX_PATH; + r = MsiGetProperty(hpkg, "Intel", buf, &size); + ok(r == ERROR_SUCCESS, "failed to get property: %d\n", r); + ok(buf[0], "property not set\n"); + + buf[0] = 0; + size = MAX_PATH; r = MsiGetProperty(hpkg, "MsiAMD64", buf, &size); ok(r == ERROR_SUCCESS, "failed to get property: %d\n", r); ok(buf[0], "property not set\n");
1
0
0
0
Hans Leidekker : sxs/tests: Add tests for CreateAssemblyNameObject.
by Alexandre Julliard
28 Mar '12
28 Mar '12
Module: wine Branch: master Commit: 456961548e5f4e6920d50fc0b19ea3678969e98b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=456961548e5f4e6920d50fc0b…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Mar 28 15:33:44 2012 +0200 sxs/tests: Add tests for CreateAssemblyNameObject. --- configure | 3 +- configure.ac | 3 +- dlls/sxs/Makefile.in | 1 + dlls/sxs/tests/Makefile.in | 7 ++ dlls/sxs/tests/name.c | 228 ++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 240 insertions(+), 2 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=456961548e5f4e6920d50…
1
0
0
0
Hans Leidekker : sxs: Parse the display name in CreateAssemblyNameObject.
by Alexandre Julliard
28 Mar '12
28 Mar '12
Module: wine Branch: master Commit: 5a6b9ec329e852345599d5f18cd5461c8eff48fc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5a6b9ec329e852345599d5f18…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Mar 28 15:33:30 2012 +0200 sxs: Parse the display name in CreateAssemblyNameObject. --- dlls/sxs/name.c | 196 ++++++++++++++++++++++++++++++++++++++++++++++-- dlls/sxs/sxs_private.h | 38 +++++++++ 2 files changed, 227 insertions(+), 7 deletions(-) diff --git a/dlls/sxs/name.c b/dlls/sxs/name.c index 1adeebd..9ca911b 100644 --- a/dlls/sxs/name.c +++ b/dlls/sxs/name.c @@ -28,6 +28,8 @@ #include "winsxs.h" #include "wine/debug.h" +#include "wine/unicode.h" +#include "sxs_private.h" WINE_DEFAULT_DEBUG_CHANNEL(sxs); @@ -35,8 +37,18 @@ struct name { IAssemblyName IAssemblyName_iface; LONG refs; + WCHAR *name; + WCHAR *arch; + WCHAR *token; + WCHAR *type; + WCHAR *version; }; +static const WCHAR archW[] = {'p','r','o','c','e','s','s','o','r','A','r','c','h','i','t','e','c','t','u','r','e',0}; +static const WCHAR tokenW[] = {'p','u','b','l','i','c','K','e','y','T','o','k','e','n',0}; +static const WCHAR typeW[] = {'t','y','p','e',0}; +static const WCHAR versionW[] = {'v','e','r','s','i','o','n',0}; + static inline struct name *impl_from_IAssemblyName( IAssemblyName *iface ) { return CONTAINING_RECORD( iface, struct name, IAssemblyName_iface ); @@ -79,6 +91,11 @@ static ULONG WINAPI name_Release( IAssemblyName *iface ) if (!refs) { TRACE("destroying %p\n", name); + HeapFree( GetProcessHeap(), 0, name->name ); + HeapFree( GetProcessHeap(), 0, name->arch ); + HeapFree( GetProcessHeap(), 0, name->token ); + HeapFree( GetProcessHeap(), 0, name->type ); + HeapFree( GetProcessHeap(), 0, name->version ); HeapFree( GetProcessHeap(), 0, name ); } return refs; @@ -117,8 +134,32 @@ static HRESULT WINAPI name_GetDisplayName( LPDWORD buflen, DWORD flags ) { - FIXME("%p, %p, %p, 0x%08x\n", iface, buffer, buflen, flags); - return E_NOTIMPL; + static const WCHAR fmtW[] = {',','%','s','=','\"','%','s','\"',0}; + struct name *name = impl_from_IAssemblyName( iface ); + WCHAR version[30]; + unsigned int len; + + TRACE("%p, %p, %p, 0x%08x\n", iface, buffer, buflen, flags); + + if (!buflen || flags) return E_INVALIDARG; + + len = strlenW( name->name ) + 1; + if (name->arch) len += strlenW( archW ) + strlenW( name->arch ) + 4; + if (name->token) len += strlenW( tokenW ) + strlenW( name->token ) + 4; + if (name->type) len += strlenW( typeW ) + strlenW( name->type ) + 4; + if (name->version) len += strlenW( versionW ) + strlenW( version ) + 4; + if (len > *buflen) + { + *buflen = len; + return HRESULT_FROM_WIN32( ERROR_INSUFFICIENT_BUFFER ); + } + strcpyW( buffer, name->name ); + len = strlenW( buffer ); + if (name->arch) len += sprintfW( buffer + len, fmtW, archW, name->arch ); + if (name->token) len += sprintfW( buffer + len, fmtW, tokenW, name->token ); + if (name->type) len += sprintfW( buffer + len, fmtW, typeW, name->type ); + if (name->version) len += sprintfW( buffer + len, fmtW, versionW, name->version ); + return S_OK; } static HRESULT WINAPI name_Reserved( @@ -139,22 +180,85 @@ static HRESULT WINAPI name_Reserved( return E_NOTIMPL; } +const WCHAR *get_name_attribute( IAssemblyName *iface, enum name_attr_id id ) +{ + struct name *name = impl_from_IAssemblyName( iface ); + + switch (id) + { + case NAME_ATTR_ID_NAME: return name->name; + case NAME_ATTR_ID_ARCH: return name->arch; + case NAME_ATTR_ID_TOKEN: return name->token; + case NAME_ATTR_ID_TYPE: return name->type; + case NAME_ATTR_ID_VERSION: return name->version; + default: + ERR("unhandled name attribute %u\n", id); + break; + } + return NULL; +} + static HRESULT WINAPI name_GetName( IAssemblyName *iface, LPDWORD buflen, WCHAR *buffer ) { - FIXME("%p, %p, %p\n", iface, buflen, buffer); - return E_NOTIMPL; + const WCHAR *name; + int len; + + TRACE("%p, %p, %p\n", iface, buflen, buffer); + + if (!buflen || !buffer) return E_INVALIDARG; + + name = get_name_attribute( iface, NAME_ATTR_ID_NAME ); + len = strlenW( name ) + 1; + if (len > *buflen) + { + *buflen = len; + return HRESULT_FROM_WIN32( ERROR_INSUFFICIENT_BUFFER ); + } + strcpyW( buffer, name ); + *buflen = len + 3; + return S_OK; +} + +static HRESULT parse_version( WCHAR *version, DWORD *high, DWORD *low ) +{ + WORD ver[4]; + WCHAR *p, *q; + unsigned int i; + + memset( ver, 0, sizeof(ver) ); + for (i = 0, p = version; i < 4; i++) + { + if (!*p) break; + q = strchrW( p, '.' ); + if (q) *q = 0; + ver[i] = atolW( p ); + if (!q && i < 3) break; + p = q + 1; + } + *high = (ver[0] << 16) + ver[1]; + *low = (ver[2] << 16) + ver[3]; + return S_OK; } static HRESULT WINAPI name_GetVersion( IAssemblyName *iface, - LPDWORD hi, + LPDWORD high, LPDWORD low ) { - FIXME("%p, %p, %p\n", iface, hi, low); - return E_NOTIMPL; + struct name *name = impl_from_IAssemblyName( iface ); + WCHAR *version; + HRESULT hr; + + TRACE("%p, %p, %p\n", iface, high, low); + + if (!name->version) return HRESULT_FROM_WIN32( ERROR_NOT_FOUND ); + if (!(version = strdupW( name->version ))) return E_OUTOFMEMORY; + hr = parse_version( version, high, low ); + HeapFree( GetProcessHeap(), 0, version ); + return hr; } static HRESULT WINAPI name_IsEqual( @@ -190,6 +294,72 @@ static const IAssemblyNameVtbl name_vtbl = name_Clone }; +static WCHAR *parse_value( const WCHAR *str, unsigned int *len ) +{ + WCHAR *ret; + const WCHAR *p = str; + + if (*p++ != '\"') return NULL; + while (*p && *p != '\"') p++; + if (!*p) return NULL; + + *len = p - str; + if (!(ret = HeapAlloc( GetProcessHeap(), 0, *len * sizeof(WCHAR) ))) return NULL; + memcpy( ret, str + 1, (*len - 1) * sizeof(WCHAR) ); + ret[*len - 1] = 0; + return ret; +} + +static HRESULT parse_displayname( struct name *name, const WCHAR *displayname ) +{ + const WCHAR *p, *q; + unsigned int len; + + p = q = displayname; + while (*q && *q != ',') q++; + len = q - p; + if (!(name->name = HeapAlloc( GetProcessHeap(), 0, (len + 1) * sizeof(WCHAR) ))) return E_OUTOFMEMORY; + memcpy( name->name, p, len * sizeof(WCHAR) ); + name->name[len] = 0; + if (!*q) return S_OK; + + for (;;) + { + p = ++q; + while (*q && *q != '=') q++; + if (!*q) return E_INVALIDARG; + len = q - p; + if (len == sizeof(archW)/sizeof(archW[0]) - 1 && !memcmp( p, archW, len * sizeof(WCHAR) )) + { + p = ++q; + if (!(name->arch = parse_value( p, &len ))) return E_INVALIDARG; + q += len; + } + else if (len == sizeof(tokenW)/sizeof(tokenW[0]) - 1 && !memcmp( p, tokenW, len * sizeof(WCHAR) )) + { + p = ++q; + if (!(name->token = parse_value( p, &len ))) return E_INVALIDARG; + q += len; + } + else if (len == sizeof(typeW)/sizeof(typeW[0]) - 1 && !memcmp( p, typeW, len * sizeof(WCHAR) )) + { + p = ++q; + if (!(name->type = parse_value( p, &len ))) return E_INVALIDARG; + q += len; + } + else if (len == sizeof(versionW)/sizeof(versionW[0]) - 1 && !memcmp( p, versionW, len * sizeof(WCHAR) )) + { + p = ++q; + if (!(name->version = parse_value( p, &len ))) return E_INVALIDARG; + q += len; + } + else return HRESULT_FROM_WIN32( ERROR_SXS_INVALID_ASSEMBLY_IDENTITY_ATTRIBUTE_NAME ); + while (*q && *q != ',') q++; + if (!*q) break; + } + return S_OK; +} + /****************************************************************** * CreateAssemblyNameObject (SXS.@) */ @@ -200,6 +370,7 @@ HRESULT WINAPI CreateAssemblyNameObject( LPVOID reserved ) { struct name *name; + HRESULT hr; TRACE("%p, %s, 0x%08x, %p\n", obj, debugstr_w(assembly), flags, reserved); @@ -215,6 +386,17 @@ HRESULT WINAPI CreateAssemblyNameObject( name->IAssemblyName_iface.lpVtbl = &name_vtbl; name->refs = 1; + hr = parse_displayname( name, assembly ); + if (hr != S_OK) + { + HeapFree( GetProcessHeap(), 0, name->name ); + HeapFree( GetProcessHeap(), 0, name->arch ); + HeapFree( GetProcessHeap(), 0, name->token ); + HeapFree( GetProcessHeap(), 0, name->type ); + HeapFree( GetProcessHeap(), 0, name->version ); + HeapFree( GetProcessHeap(), 0, name ); + return hr; + } *obj = &name->IAssemblyName_iface; return S_OK; } diff --git a/dlls/sxs/sxs_private.h b/dlls/sxs/sxs_private.h new file mode 100644 index 0000000..8ff9920 --- /dev/null +++ b/dlls/sxs/sxs_private.h @@ -0,0 +1,38 @@ +/* + * Copyright 2012 Hans Leidekker 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 + */ + +enum name_attr_id +{ + NAME_ATTR_ID_NAME, + NAME_ATTR_ID_ARCH, + NAME_ATTR_ID_TOKEN, + NAME_ATTR_ID_TYPE, + NAME_ATTR_ID_VERSION +}; + +const WCHAR *get_name_attribute( IAssemblyName *, enum name_attr_id ); + +static inline WCHAR *strdupW( const WCHAR *src ) +{ + WCHAR *dst; + + if (!src) return NULL; + dst = HeapAlloc( GetProcessHeap(), 0, (strlenW( src ) + 1) * sizeof(WCHAR) ); + if (dst) strcpyW( dst, src ); + return dst; +}
1
0
0
0
Jacek Caban : jscript: Properly handle NULL bstr in str_to_number.
by Alexandre Julliard
28 Mar '12
28 Mar '12
Module: wine Branch: master Commit: 8f36daa4229389bfbbf10801381f6f9c3a643e57 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8f36daa4229389bfbbf108013…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Mar 28 15:04:28 2012 +0200 jscript: Properly handle NULL bstr in str_to_number. --- dlls/jscript/jsutils.c | 5 +++++ dlls/jscript/tests/lang.js | 4 +++- dlls/jscript/tests/run.c | 28 ++++++++++++++++++++++++---- 3 files changed, 32 insertions(+), 5 deletions(-) diff --git a/dlls/jscript/jsutils.c b/dlls/jscript/jsutils.c index 31c471f..040ec58 100644 --- a/dlls/jscript/jsutils.c +++ b/dlls/jscript/jsutils.c @@ -320,6 +320,11 @@ static HRESULT str_to_number(BSTR str, double *ret) static const WCHAR infinityW[] = {'I','n','f','i','n','i','t','y'}; + if(!ptr) { + *ret = 0; + return S_OK; + } + while(isspaceW(*ptr)) ptr++; diff --git a/dlls/jscript/tests/lang.js b/dlls/jscript/tests/lang.js index b6fe821..8f5e5d5 100644 --- a/dlls/jscript/tests/lang.js +++ b/dlls/jscript/tests/lang.js @@ -1238,7 +1238,9 @@ for(var i=0; i<2; i++) tmp[i] = /b/; ok(tmp[0] != tmp[1], "tmp[0] == tmp [1]"); -ok(createNullBSTR() === '', "createNullBSTR() !== ''"); +ok(isNullBSTR(getNullBSTR()), "isNullBSTR(getNullBSTR()) failed\n"); +ok(getNullBSTR() === '', "getNullBSTR() !== ''"); +ok(+getNullBSTR() === 0 , "+getNullBTR() !=== 0"); ok(getVT(nullDisp) === "VT_DISPATCH", "getVT(nullDisp) = " + getVT(nullDisp)); ok(typeof(nullDisp) === "object", "typeof(nullDisp) = " + typeof(nullDisp)); diff --git a/dlls/jscript/tests/run.c b/dlls/jscript/tests/run.c index dbf83e6..e6f0009 100644 --- a/dlls/jscript/tests/run.c +++ b/dlls/jscript/tests/run.c @@ -84,7 +84,7 @@ DEFINE_EXPECT(DeleteMemberByDispID); #define DISPID_GLOBAL_OK 0x1004 #define DISPID_GLOBAL_GETVT 0x1005 #define DISPID_GLOBAL_TESTOBJ 0x1006 -#define DISPID_GLOBAL_NULL_BSTR 0x1007 +#define DISPID_GLOBAL_GETNULLBSTR 0x1007 #define DISPID_GLOBAL_NULL_DISP 0x1008 #define DISPID_GLOBAL_TESTTHIS 0x1009 #define DISPID_GLOBAL_TESTTHIS2 0x100a @@ -95,6 +95,7 @@ DEFINE_EXPECT(DeleteMemberByDispID); #define DISPID_GLOBAL_ISWIN64 0x100f #define DISPID_GLOBAL_PUREDISP 0x1010 #define DISPID_GLOBAL_TESTPROPDELETE 0x1010 +#define DISPID_GLOBAL_ISNULLBSTR 0x1011 #define DISPID_TESTOBJ_PROP 0x2000 #define DISPID_TESTOBJ_ONLYDISPID 0x2001 @@ -438,8 +439,12 @@ static HRESULT WINAPI Global_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD *pid = DISPID_GLOBAL_TESTOBJ; return S_OK; } - if(!strcmp_wa(bstrName, "createNullBSTR")) { - *pid = DISPID_GLOBAL_NULL_BSTR; + if(!strcmp_wa(bstrName, "getNullBSTR")) { + *pid = DISPID_GLOBAL_GETNULLBSTR; + return S_OK; + } + if(!strcmp_wa(bstrName, "isNullBSTR")) { + *pid = DISPID_GLOBAL_ISNULLBSTR; return S_OK; } if(!strcmp_wa(bstrName, "nullDisp")) { @@ -663,13 +668,28 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid, V_DISPATCH(pvarRes) = (IDispatch*)&pureDisp; return S_OK; - case DISPID_GLOBAL_NULL_BSTR: + case DISPID_GLOBAL_GETNULLBSTR: if(pvarRes) { V_VT(pvarRes) = VT_BSTR; V_BSTR(pvarRes) = NULL; } return S_OK; + case DISPID_GLOBAL_ISNULLBSTR: + ok(pdp != NULL, "pdp == NULL\n"); + ok(pdp->rgvarg != NULL, "rgvarg == NULL\n"); + ok(!pdp->rgdispidNamedArgs, "rgdispidNamedArgs != NULL\n"); + ok(pdp->cArgs == 1, "cArgs = %d\n", pdp->cArgs); + ok(!pdp->cNamedArgs, "cNamedArgs = %d\n", pdp->cNamedArgs); + ok(pvarRes != NULL, "pvarRes == NULL\n"); + ok(V_VT(pvarRes) == VT_EMPTY, "V_VT(pvarRes) = %d\n", V_VT(pvarRes)); + ok(pei != NULL, "pei == NULL\n"); + ok(V_VT(pdp->rgvarg) == VT_BSTR, "V_VT(pdp->rgvarg) = %d\n", V_VT(pdp->rgvarg)); + + V_VT(pvarRes) = VT_BOOL; + V_BOOL(pvarRes) = V_BSTR(pdp->rgvarg) ? VARIANT_FALSE : VARIANT_TRUE; + return S_OK; + case DISPID_GLOBAL_ISWIN64: if(pvarRes) { V_VT(pvarRes) = VT_BOOL;
1
0
0
0
Hwang YunSong : po: Update Korean translation.
by Alexandre Julliard
28 Mar '12
28 Mar '12
Module: wine Branch: master Commit: 1528d9021f174875ecda0af1ed0458deba3a7a26 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1528d9021f174875ecda0af1e…
Author: Hwang YunSong <hys545(a)dreamwiz.com> Date: Tue Mar 27 21:19:44 2012 +0900 po: Update Korean translation. --- po/ko.po | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/po/ko.po b/po/ko.po index 474cc9c..7f4ae51 100644 --- a/po/ko.po +++ b/po/ko.po @@ -3440,10 +3440,8 @@ msgid "Expected ')'" msgstr "')' 가 필요합니다" #: jscript.rc:37 -#, fuzzy -#| msgid "Invalid parameter.\n" msgid "Invalid character" -msgstr "잘못된 매개변수.\n" +msgstr "잘못된 문자" #: jscript.rc:38 msgid "Unterminated string constant"
1
0
0
0
← Newer
1
...
5
6
7
8
9
10
11
...
71
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
Results per page:
10
25
50
100
200