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
May 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
2 participants
737 discussions
Start a n
N
ew thread
Józef Kucia : d3dx9: Implement D3DXSaveTextureToFileInMemory.
by Alexandre Julliard
31 May '12
31 May '12
Module: wine Branch: master Commit: 38b8949fea926a0afce627537f29df413397f34f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=38b8949fea926a0afce627537…
Author: Józef Kucia <joseph.kucia(a)gmail.com> Date: Tue May 29 11:29:24 2012 +0200 d3dx9: Implement D3DXSaveTextureToFileInMemory. --- dlls/d3dx9_36/texture.c | 34 ++++++++++++++++++++++++++++++++-- 1 files changed, 32 insertions(+), 2 deletions(-) diff --git a/dlls/d3dx9_36/texture.c b/dlls/d3dx9_36/texture.c index 97d26d9..1e87a00 100644 --- a/dlls/d3dx9_36/texture.c +++ b/dlls/d3dx9_36/texture.c @@ -1660,10 +1660,40 @@ HRESULT WINAPI D3DXSaveTextureToFileW(const WCHAR *dst_filename, D3DXIMAGE_FILEF HRESULT WINAPI D3DXSaveTextureToFileInMemory(ID3DXBuffer **dst_buffer, D3DXIMAGE_FILEFORMAT file_format, IDirect3DBaseTexture9 *src_texture, const PALETTEENTRY *src_palette) { - FIXME("(%p, %#x, %p, %p): stub\n", + HRESULT hr; + D3DRESOURCETYPE type; + IDirect3DSurface9 *surface; + + TRACE("(%p, %#x, %p, %p)\n", dst_buffer, file_format, src_texture, src_palette); if (!dst_buffer || !src_texture) return D3DERR_INVALIDCALL; - return E_NOTIMPL; + if (file_format == D3DXIFF_DDS) + { + FIXME("DDS file format isn't supported yet\n"); + return E_NOTIMPL; + } + + type = IDirect3DBaseTexture9_GetType(src_texture); + switch (type) + { + case D3DRTYPE_TEXTURE: + case D3DRTYPE_CUBETEXTURE: + hr = get_surface(type, src_texture, D3DCUBEMAP_FACE_POSITIVE_X, 0, &surface); + break; + case D3DRTYPE_VOLUMETEXTURE: + FIXME("Volume textures aren't supported yet\n"); + return E_NOTIMPL; + default: + return D3DERR_INVALIDCALL; + } + + if (SUCCEEDED(hr)) + { + hr = D3DXSaveSurfaceToFileInMemory(dst_buffer, file_format, surface, src_palette, NULL); + IDirect3DSurface9_Release(surface); + } + + return hr; }
1
0
0
0
Józef Kucia : d3dx9: Forward D3DXSaveTextureToFile to D3DXSaveTextureToFileInMemory.
by Alexandre Julliard
31 May '12
31 May '12
Module: wine Branch: master Commit: dfc5ab140c3211d73239352253ee0f80a960dfd7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dfc5ab140c3211d7323935225…
Author: Józef Kucia <joseph.kucia(a)gmail.com> Date: Tue May 29 11:29:23 2012 +0200 d3dx9: Forward D3DXSaveTextureToFile to D3DXSaveTextureToFileInMemory. --- dlls/d3dx9_36/d3dx9_36.spec | 6 ++-- dlls/d3dx9_36/texture.c | 61 +++++++++++++++++++++++++++++++++++++++++++ include/d3dx9tex.h | 5 +++ 3 files changed, 69 insertions(+), 3 deletions(-) diff --git a/dlls/d3dx9_36/d3dx9_36.spec b/dlls/d3dx9_36/d3dx9_36.spec index 44efaf5..aec2a5c 100644 --- a/dlls/d3dx9_36/d3dx9_36.spec +++ b/dlls/d3dx9_36/d3dx9_36.spec @@ -266,9 +266,9 @@ @ stdcall D3DXSaveSurfaceToFileA(ptr long ptr ptr ptr) @ stdcall D3DXSaveSurfaceToFileInMemory(ptr long ptr ptr ptr) @ stdcall D3DXSaveSurfaceToFileW(ptr long ptr ptr ptr) -@ stub D3DXSaveTextureToFileA(ptr long ptr ptr) -@ stub D3DXSaveTextureToFileInMemory(ptr long ptr ptr) -@ stub D3DXSaveTextureToFileW(ptr long ptr ptr) +@ stdcall D3DXSaveTextureToFileA(ptr long ptr ptr) +@ stdcall D3DXSaveTextureToFileInMemory(ptr long ptr ptr) +@ stdcall D3DXSaveTextureToFileW(ptr long ptr ptr) @ stub D3DXSaveVolumeToFileA(ptr long ptr ptr ptr) @ stub D3DXSaveVolumeToFileInMemory(ptr long ptr ptr ptr) @ stub D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) diff --git a/dlls/d3dx9_36/texture.c b/dlls/d3dx9_36/texture.c index c17a327..97d26d9 100644 --- a/dlls/d3dx9_36/texture.c +++ b/dlls/d3dx9_36/texture.c @@ -1606,3 +1606,64 @@ HRESULT WINAPI D3DXFillVolumeTexture(LPDIRECT3DVOLUMETEXTURE9 texture, return D3D_OK; } + +HRESULT WINAPI D3DXSaveTextureToFileA(const char *dst_filename, D3DXIMAGE_FILEFORMAT file_format, + IDirect3DBaseTexture9 *src_texture, const PALETTEENTRY *src_palette) +{ + int len; + WCHAR *filename; + HRESULT hr; + ID3DXBuffer *buffer; + + TRACE("(%s, %#x, %p, %p): relay\n", + wine_dbgstr_a(dst_filename), file_format, src_texture, src_palette); + + if (!dst_filename) return D3DERR_INVALIDCALL; + + len = MultiByteToWideChar(CP_ACP, 0, dst_filename, -1, NULL, 0); + filename = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)); + if (!filename) return E_OUTOFMEMORY; + MultiByteToWideChar(CP_ACP, 0, dst_filename, -1, filename, len); + + hr = D3DXSaveTextureToFileInMemory(&buffer, file_format, src_texture, src_palette); + if (SUCCEEDED(hr)) + { + hr = write_buffer_to_file(filename, buffer); + ID3DXBuffer_Release(buffer); + } + + HeapFree(GetProcessHeap(), 0, filename); + return hr; +} + +HRESULT WINAPI D3DXSaveTextureToFileW(const WCHAR *dst_filename, D3DXIMAGE_FILEFORMAT file_format, + IDirect3DBaseTexture9 *src_texture, const PALETTEENTRY *src_palette) +{ + HRESULT hr; + ID3DXBuffer *buffer; + + TRACE("(%s, %#x, %p, %p): relay\n", + wine_dbgstr_w(dst_filename), file_format, src_texture, src_palette); + + if (!dst_filename) return D3DERR_INVALIDCALL; + + hr = D3DXSaveTextureToFileInMemory(&buffer, file_format, src_texture, src_palette); + if (SUCCEEDED(hr)) + { + hr = write_buffer_to_file(dst_filename, buffer); + ID3DXBuffer_Release(buffer); + } + + return hr; +} + +HRESULT WINAPI D3DXSaveTextureToFileInMemory(ID3DXBuffer **dst_buffer, D3DXIMAGE_FILEFORMAT file_format, + IDirect3DBaseTexture9 *src_texture, const PALETTEENTRY *src_palette) +{ + FIXME("(%p, %#x, %p, %p): stub\n", + dst_buffer, file_format, src_texture, src_palette); + + if (!dst_buffer || !src_texture) return D3DERR_INVALIDCALL; + + return E_NOTIMPL; +} diff --git a/include/d3dx9tex.h b/include/d3dx9tex.h index 0e89021..38441ce 100644 --- a/include/d3dx9tex.h +++ b/include/d3dx9tex.h @@ -638,6 +638,11 @@ HRESULT WINAPI D3DXCreateVolumeTextureFromFileInMemoryEx(LPDIRECT3DDEVICE9 devic PALETTEENTRY *palette, LPDIRECT3DVOLUMETEXTURE9 *volume); +HRESULT WINAPI D3DXSaveTextureToFileInMemory(LPD3DXBUFFER *destbuffer, + D3DXIMAGE_FILEFORMAT destformat, + LPDIRECT3DBASETEXTURE9 srctexture, + CONST PALETTEENTRY *srcpalette); + HRESULT WINAPI D3DXSaveTextureToFileA(LPCSTR destfile, D3DXIMAGE_FILEFORMAT destformat, LPDIRECT3DBASETEXTURE9 srctexture,
1
0
0
0
Józef Kucia : d3dx9: Implement D3DXSaveSurfaceToFileInMemory.
by Alexandre Julliard
31 May '12
31 May '12
Module: wine Branch: master Commit: 70b1bff69520c2ba82bb54b12338a76664c9e60a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=70b1bff69520c2ba82bb54b12…
Author: Józef Kucia <joseph.kucia(a)gmail.com> Date: Tue May 29 11:29:22 2012 +0200 d3dx9: Implement D3DXSaveSurfaceToFileInMemory. --- dlls/d3dx9_36/d3dx9_36.spec | 2 +- dlls/d3dx9_36/d3dx9_36_private.h | 2 + dlls/d3dx9_36/surface.c | 96 +++++++++++++++++++++++++++++--------- dlls/d3dx9_36/tests/surface.c | 27 +++++++++++ dlls/d3dx9_36/util.c | 19 ++++++++ include/d3dx9tex.h | 6 ++ 6 files changed, 128 insertions(+), 24 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=70b1bff69520c2ba82bb5…
1
0
0
0
Józef Kucia : windowscodecs: Implement IWICStream:: InitializeFromIStream.
by Alexandre Julliard
31 May '12
31 May '12
Module: wine Branch: master Commit: d770297c37ec46bbff395e156464080f24da6f6f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d770297c37ec46bbff395e156…
Author: Józef Kucia <joseph.kucia(a)gmail.com> Date: Tue May 29 11:29:21 2012 +0200 windowscodecs: Implement IWICStream::InitializeFromIStream. --- dlls/windowscodecs/stream.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/windowscodecs/stream.c b/dlls/windowscodecs/stream.c index cd235a3..a123b9d 100644 --- a/dlls/windowscodecs/stream.c +++ b/dlls/windowscodecs/stream.c @@ -735,8 +735,13 @@ static HRESULT WINAPI IWICStreamImpl_Clone(IWICStream *iface, static HRESULT WINAPI IWICStreamImpl_InitializeFromIStream(IWICStream *iface, IStream *pIStream) { - FIXME("(%p): stub\n", iface); - return E_NOTIMPL; + ULARGE_INTEGER offset, size; + TRACE("(%p): relay\n", iface); + + offset.QuadPart = 0; + size.u.LowPart = 0xffffffff; + size.u.HighPart = 0xffffffff; + return IWICStream_InitializeFromIStreamRegion(iface, pIStream, offset, size); } static HRESULT WINAPI IWICStreamImpl_InitializeFromFilename(IWICStream *iface,
1
0
0
0
Detlef Riekenberg : kernel32/tests: Add tests for GetProductInfo.
by Alexandre Julliard
31 May '12
31 May '12
Module: wine Branch: master Commit: 64fbf5cac2d1c09e7c4dd25f42c74350f324ab19 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=64fbf5cac2d1c09e7c4dd25f4…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Wed May 30 18:40:34 2012 +0200 kernel32/tests: Add tests for GetProductInfo. --- dlls/kernel32/tests/version.c | 100 ++++++++++++++++++++++++++++++++++++++--- 1 files changed, 94 insertions(+), 6 deletions(-) diff --git a/dlls/kernel32/tests/version.c b/dlls/kernel32/tests/version.c index 9f9b72e..bb71cf8 100644 --- a/dlls/kernel32/tests/version.c +++ b/dlls/kernel32/tests/version.c @@ -18,31 +18,118 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +/* Needed for PRODUCT_* defines and GetProductInfo() */ +#define _WIN32_WINNT 0x0600 + #include <assert.h> #include "wine/test.h" #include "winbase.h" +static BOOL (WINAPI * pGetProductInfo)(DWORD, DWORD, DWORD, DWORD, DWORD *); static BOOL (WINAPI * pVerifyVersionInfoA)(LPOSVERSIONINFOEXA, DWORD, DWORDLONG); static ULONGLONG (WINAPI * pVerSetConditionMask)(ULONGLONG, DWORD, BYTE); #define KERNEL32_GET_PROC(func) \ - p##func = (void *)GetProcAddress(hKernel32, #func); \ - if(!p##func) trace("GetProcAddress(hKernel32, '%s') failed\n", #func); + p##func = (void *)GetProcAddress(hKernel32, #func); static void init_function_pointers(void) { HMODULE hKernel32; - pVerifyVersionInfoA = NULL; - pVerSetConditionMask = NULL; - hKernel32 = GetModuleHandleA("kernel32.dll"); - assert(hKernel32); + + KERNEL32_GET_PROC(GetProductInfo); KERNEL32_GET_PROC(VerifyVersionInfoA); KERNEL32_GET_PROC(VerSetConditionMask); } +#define PRODUCT2NAME(x) case x:\ + return #x; + +static const char * product_to_name(DWORD product) +{ + switch (product) + { + PRODUCT2NAME(PRODUCT_PROFESSIONAL) + PRODUCT2NAME(PRODUCT_STANDARD_SERVER) + PRODUCT2NAME(PRODUCT_BUSINESS) + PRODUCT2NAME(PRODUCT_ULTIMATE) + PRODUCT2NAME(PRODUCT_ULTIMATE_N) + PRODUCT2NAME(PRODUCT_HOME_PREMIUM) + } + return ""; +} +#undef PRODUCT2NAME + +static void test_GetProductInfo(void) +{ + OSVERSIONINFOEXA os; + DWORD product; + DWORD res; + DWORD table[] = {9,8,7,6, + 7,0,0,0, + 6,2,0,0, + 6,1,2,0, + 6,1,1,0, + 6,1,0,2, + 6,1,0,0, + 6,0,3,0, + 6,0,2,0, + 6,0,1,5, + 6,0,1,0, + 6,0,0,0, + 5,3,0,0, + 5,2,0,0, + 5,1,0,0, + 5,0,0,0, + 0}; + + DWORD *entry = table; + + if (!pGetProductInfo) + { + /* Not present before Vista */ + win_skip("GetProductInfo() not available\n"); + return; + } + + memset(&os, 0, sizeof(OSVERSIONINFOEXA)); + os.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEXA); + res = GetVersionExA((OSVERSIONINFOA *)&os); + ok(res, "got %d (expected TRUE)\n", res); + + trace("%s %u.%u (SP: %u.%u)\n", os.wProductType == VER_NT_WORKSTATION ? "Workstation" : "Server", + os.dwMajorVersion, os.dwMinorVersion, os.wServicePackMajor, os.wServicePackMinor); + + while (*entry) + { + /* SetLastError() / GetLastError(): value is untouched */ + product = 0xdeadbeef; + SetLastError(0xdeadbeef); + res = pGetProductInfo(entry[0], entry[1], entry[2], entry[3], &product); + trace("%d.%d / %d.%d: got %d and 0x%x %s\n", + entry[0], entry[1], entry[2], entry[3], res, product, product_to_name(product)); + + if (entry[0] >= 6) + ok(res && (product > PRODUCT_UNDEFINED) && (product <= PRODUCT_EMBEDDED) && (GetLastError() == 0xdeadbeef), + "got %d and 0x%x with 0x%x (expected TRUE and a valid PRODUCT_* value with LastError untouched)\n", + res, product, GetLastError()); + else + ok(!res && !product && (GetLastError() == 0xdeadbeef), + "got %d and 0x%x with 0x%x (expected FALSE and PRODUCT_UNDEFINED with LastError untouched)\n", + res, product, GetLastError()); + + entry+= 4; + } + + /* NULL pointer is not a problem */ + SetLastError(0xdeadbeef); + res = pGetProductInfo(6, 1, 0, 0, NULL); + ok( (!res) && (GetLastError() == 0xdeadbeef), + "got %d with 0x%x (expected FALSE with LastError untouched\n", res, GetLastError()); +} + static void test_GetVersionEx(void) { OSVERSIONINFOA infoA; @@ -292,6 +379,7 @@ START_TEST(version) { init_function_pointers(); + test_GetProductInfo(); test_GetVersionEx(); test_VerifyVersionInfo(); }
1
0
0
0
Detlef Riekenberg : ntdll: Implement RtlGetProductInfo.
by Alexandre Julliard
31 May '12
31 May '12
Module: wine Branch: master Commit: 0f4e9ffc22f32affcd6fb92c9e1925883c208de1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0f4e9ffc22f32affcd6fb92c9…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Wed May 30 18:40:33 2012 +0200 ntdll: Implement RtlGetProductInfo. --- dlls/ntdll/version.c | 18 +++++++++++++++--- include/winnt.h | 5 ++++- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/dlls/ntdll/version.c b/dlls/ntdll/version.c index 0185d7f..745ee5d 100644 --- a/dlls/ntdll/version.c +++ b/dlls/ntdll/version.c @@ -544,7 +544,7 @@ done: } /*********************************************************************** - * GetProductInfo (NTDLL.@) + * RtlGetProductInfo (NTDLL.@) * * Gives info about the current Windows product type, in a format compatible * with the given Windows version @@ -554,10 +554,22 @@ done: BOOLEAN WINAPI RtlGetProductInfo(DWORD dwOSMajorVersion, DWORD dwOSMinorVersion, DWORD dwSpMajorVersion, DWORD dwSpMinorVersion, PDWORD pdwReturnedProductType) { - FIXME("(%d,%d,%d,%d,%p): stub\n", dwOSMajorVersion, dwOSMinorVersion, + TRACE("(%d, %d, %d, %d, %p)\n", dwOSMajorVersion, dwOSMinorVersion, dwSpMajorVersion, dwSpMinorVersion, pdwReturnedProductType); - *pdwReturnedProductType = PRODUCT_ULTIMATE_N; + if (!pdwReturnedProductType) + return FALSE; + + if (dwOSMajorVersion < 6) + { + *pdwReturnedProductType = PRODUCT_UNDEFINED; + return FALSE; + } + + if (current_version->wProductType == VER_NT_WORKSTATION) + *pdwReturnedProductType = PRODUCT_ULTIMATE_N; + else + *pdwReturnedProductType = PRODUCT_STANDARD_SERVER; return TRUE; } diff --git a/include/winnt.h b/include/winnt.h index 02c92e6..bed2a19 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -1976,7 +1976,7 @@ NTSYSAPI void WINAPI RtlCaptureContext(CONTEXT*); #define PRODUCT_DATACENTER_SERVER 0x00000008 #define PRODUCT_DATACENTER_SERVER_CORE 0x0000000C #define PRODUCT_DATACENTER_SERVER_CORE_V 0x00000027 -#define PRODUCT_SERVER_V 0x00000025 +#define PRODUCT_EMBEDDED 0x00000041 #define PRODUCT_ENTERPRISE 0x00000004 #define PRODUCT_ENTERPRISE_N 0x0000001B #define PRODUCT_ENTERPRISE_SERVER 0x0000000A @@ -1992,8 +1992,11 @@ NTSYSAPI void WINAPI RtlCaptureContext(CONTEXT*); #define PRODUCT_MEDIUMBUSINESS_SERVER_MANAGEMENT 0x0000001E #define PRODUCT_MEDIUMBUSINESS_SERVER_MESSAGING 0x00000020 #define PRODUCT_MEDIUMBUSINESS_SERVER_SECURITY 0x0000001F +#define PRODUCT_PROFESSIONAL 0x00000030 +#define PRODUCT_PROFESSIONAL_N 0x00000031 #define PRODUCT_SERVER_FOR_SMALLBUSINESS 0x00000018 #define PRODUCT_SERVER_FOR_SMALLBUSINESS_V 0x00000023 +#define PRODUCT_SERVER_V 0x00000025 #define PRODUCT_SMALLBUSINESS_SERVER 0x00000009 #define PRODUCT_STANDARD_SERVER 0x00000007 #define PRODUCT_STANDARD_SERVER_CORE 0x0000000D
1
0
0
0
Stefan Leichter : kernel32: Fix OutputDebugStringA called with NULL pointer .
by Alexandre Julliard
31 May '12
31 May '12
Module: wine Branch: master Commit: 68aa42a4191c50bb9bf2767c51a4b9c7b7aaef5e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=68aa42a4191c50bb9bf2767c5…
Author: Stefan Leichter <Stefan.Leichter(a)camline.com> Date: Wed May 30 22:47:34 2012 +0200 kernel32: Fix OutputDebugStringA called with NULL pointer. --- dlls/kernel32/debugger.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/kernel32/debugger.c b/dlls/kernel32/debugger.c index 7e1a860..528ba76 100644 --- a/dlls/kernel32/debugger.c +++ b/dlls/kernel32/debugger.c @@ -245,6 +245,8 @@ void WINAPI OutputDebugStringA( LPCSTR str ) static HANDLE DBWinMutex = NULL; static BOOL mutex_inited = FALSE; + if (!str) str = ""; + /* send string to attached debugger */ SERVER_START_REQ( output_debug_string ) {
1
0
0
0
Hans Leidekker : msi: Don' t create empty values for special registry entries.
by Alexandre Julliard
31 May '12
31 May '12
Module: wine Branch: master Commit: e16bcda4862e7df0f266a42630030ad8c393c72b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e16bcda4862e7df0f266a4263…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Thu May 31 10:06:02 2012 +0200 msi: Don't create empty values for special registry entries. --- dlls/msi/action.c | 49 +++++++++++++++++++++++++--------------------- dlls/msi/tests/action.c | 12 ++++++++-- 2 files changed, 36 insertions(+), 25 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index efdc79c..ec00886 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -2578,6 +2578,11 @@ static WCHAR *get_keypath( MSIPACKAGE *package, HKEY root, const WCHAR *path ) return strdupW( path ); } +static BOOL is_special_entry( const WCHAR *name, const WCHAR *value ) +{ + return (name && (name[0] == '*' || name[0] == '+') && !name[1] && !value); +} + static UINT ITERATE_WriteRegistryValues(MSIRECORD *row, LPVOID param) { MSIPACKAGE *package = param; @@ -2612,10 +2617,8 @@ static UINT ITERATE_WriteRegistryValues(MSIRECORD *row, LPVOID param) /* null values can have special meanings */ if (name[0]=='-' && name[1] == 0) return ERROR_SUCCESS; - else if ((name[0]=='+' && name[1] == 0) || - (name[0] == '*' && name[1] == 0)) - name = NULL; - check_first = TRUE; + if ((name[0] == '+' || name[0] == '*') && !name[1]) + check_first = TRUE; } root = MSI_RecordGetInteger(row,2); @@ -2652,28 +2655,30 @@ static UINT ITERATE_WriteRegistryValues(MSIRECORD *row, LPVOID param) } deformat_string(package, name, &deformated); - - if (!check_first) - { - TRACE("Setting value %s of %s\n",debugstr_w(deformated), - debugstr_w(uikey)); - RegSetValueExW(hkey, deformated, 0, type, (LPBYTE)value_data, size); - } - else + if (!is_special_entry( name , value )) { - DWORD sz = 0; - rc = RegQueryValueExW(hkey, deformated, NULL, NULL, NULL, &sz); - if (rc == ERROR_SUCCESS || rc == ERROR_MORE_DATA) + if (!check_first) { - TRACE("value %s of %s checked already exists\n", - debugstr_w(deformated), debugstr_w(uikey)); + TRACE("Setting value %s of %s\n", debugstr_w(deformated), + debugstr_w(uikey)); + RegSetValueExW(hkey, deformated, 0, type, (LPBYTE)value_data, size); } else { - TRACE("Checked and setting value %s of %s\n", - debugstr_w(deformated), debugstr_w(uikey)); - if (deformated || size) - RegSetValueExW(hkey, deformated, 0, type, (LPBYTE) value_data, size); + DWORD sz = 0; + rc = RegQueryValueExW(hkey, deformated, NULL, NULL, NULL, &sz); + if (rc == ERROR_SUCCESS || rc == ERROR_MORE_DATA) + { + TRACE("value %s of %s checked already exists\n", debugstr_w(deformated), + debugstr_w(uikey)); + } + else + { + TRACE("Checked and setting value %s of %s\n", debugstr_w(deformated), + debugstr_w(uikey)); + if (deformated || size) + RegSetValueExW(hkey, deformated, 0, type, (LPBYTE)value_data, size); + } } } RegCloseKey(hkey); @@ -2773,7 +2778,7 @@ static UINT ITERATE_RemoveRegistryValuesOnUninstall( MSIRECORD *row, LPVOID para { if (name[0] == '+' && !name[1]) return ERROR_SUCCESS; - else if ((name[0] == '-' && !name[1]) || (name[0] == '*' && !name[1])) + if ((name[0] == '-' || name[0] == '*') && !name[1]) { delete_key = TRUE; name = NULL; diff --git a/dlls/msi/tests/action.c b/dlls/msi/tests/action.c index 2b482df..0bd65a0 100644 --- a/dlls/msi/tests/action.c +++ b/dlls/msi/tests/action.c @@ -487,7 +487,10 @@ static const char wrv_registry_dat[] = "Registry\tRoot\tKey\tName\tValue\tComponent_\n" "s72\ti2\tl255\tL255\tL0\ts72\n" "Registry\tRegistry\n" - "regdata\t2\tSOFTWARE\\Wine\\msitest\tValue\t[~]one[~]two[~]three\taugustus"; + "regdata\t2\tSOFTWARE\\Wine\\msitest\tValue\t[~]one[~]two[~]three\taugustus\n" + "regdata1\t2\tSOFTWARE\\Wine\\msitest\t*\t\taugustus\n" + "regdata2\t2\tSOFTWARE\\Wine\\msitest\t*\t#%\taugustus\n" + "regdata3\t2\tSOFTWARE\\Wine\\msitest\t*\t#x\taugustus\n"; static const char cf_directory_dat[] = "Directory\tDirectory_Parent\tDefaultDir\n" @@ -4572,7 +4575,7 @@ static void test_write_registry_values(void) ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); size = MAX_PATH; - type = REG_MULTI_SZ; + type = 0xdeadbeef; memset(path, 'a', MAX_PATH); res = RegQueryValueExA(hkey, "Value", NULL, &type, (LPBYTE)path, &size); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); @@ -4580,9 +4583,12 @@ static void test_write_registry_values(void) ok(size == 15, "Expected 15, got %d\n", size); ok(type == REG_MULTI_SZ, "Expected REG_MULTI_SZ, got %d\n", type); + res = RegQueryValueExA(hkey, "", NULL, NULL, NULL, NULL); + ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res); + RegDeleteValueA(hkey, "Value"); RegCloseKey(hkey); - RegDeleteKeyA(HKEY_CURRENT_USER, "SOFTWARE\\Wine\\msitest"); + RegDeleteKeyA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Wine\\msitest"); error: DeleteFile(msifile);
1
0
0
0
Hans Leidekker : msi: Don't terminate the string in msi_id2stringA.
by Alexandre Julliard
31 May '12
31 May '12
Module: wine Branch: master Commit: c959e38625ee3c72310f91e995ffdad19b21e450 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c959e38625ee3c72310f91e99…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Thu May 31 10:05:14 2012 +0200 msi: Don't terminate the string in msi_id2stringA. This makes sure that the last string can be fully written when saving the string table. --- dlls/msi/string.c | 32 ++++++++------------------------ dlls/msi/tests/db.c | 2 +- 2 files changed, 9 insertions(+), 25 deletions(-) diff --git a/dlls/msi/string.c b/dlls/msi/string.c index 4185c15..065c04a 100644 --- a/dlls/msi/string.c +++ b/dlls/msi/string.c @@ -357,14 +357,12 @@ const WCHAR *msi_string_lookup_id( const string_table *st, UINT id ) * [in/out] sz - number of bytes available in the buffer on input * number of bytes used on output * - * The size includes the terminating nul character. Short buffers - * will be filled, but not nul terminated. + * Returned string is not nul terminated. */ static UINT msi_id2stringA( const string_table *st, UINT id, LPSTR buffer, UINT *sz ) { - UINT len; + UINT len, lenW; const WCHAR *str; - int n; TRACE("Finding string %d of %d\n", id, st->maxcount); @@ -372,26 +370,14 @@ static UINT msi_id2stringA( const string_table *st, UINT id, LPSTR buffer, UINT if( !str ) return ERROR_FUNCTION_FAILED; - len = WideCharToMultiByte( st->codepage, 0, str, -1, NULL, 0, NULL, NULL ); - - if( !buffer ) + lenW = strlenW( str ); + len = WideCharToMultiByte( st->codepage, 0, str, lenW, NULL, 0, NULL, NULL ); + if( *sz < len ) { *sz = len; - return ERROR_SUCCESS; - } - - if( len > *sz ) - { - n = strlenW( str ) + 1; - while( n && (len > *sz) ) - len = WideCharToMultiByte( st->codepage, 0, - str, --n, NULL, 0, NULL, NULL ); + return ERROR_MORE_DATA; } - else - n = -1; - - *sz = WideCharToMultiByte( st->codepage, 0, str, n, buffer, len, NULL, NULL ); - + *sz = WideCharToMultiByte( st->codepage, 0, str, lenW, buffer, *sz, NULL, NULL ); return ERROR_SUCCESS; } @@ -588,7 +574,7 @@ UINT msi_save_string_table( const string_table *st, IStorage *storage, UINT *byt data = msi_alloc( datasize ); if( ! data ) { - WARN("Failed to alloc data %d bytes\n", poolsize ); + WARN("Failed to alloc data %d bytes\n", datasize ); goto err; } @@ -622,8 +608,6 @@ UINT msi_save_string_table( const string_table *st, IStorage *storage, UINT *byt ERR("failed to fetch string\n"); sz = 0; } - if( sz && (sz < (datasize - used ) ) ) - sz--; if (sz) pool[ n*2 + 1 ] = st->strings[i].persistent_refcount; diff --git a/dlls/msi/tests/db.c b/dlls/msi/tests/db.c index 7a2fd7c..8b62c39 100644 --- a/dlls/msi/tests/db.c +++ b/dlls/msi/tests/db.c @@ -9345,7 +9345,7 @@ static void test_createtable(void) size = sizeof(buffer); res = MsiRecordGetString(hrec, 1, buffer, &size ); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); - todo_wine ok(!strcmp(buffer,"b"), "b != %s\n", buffer); + ok(!strcmp(buffer,"b"), "b != %s\n", buffer); res = MsiCloseHandle( hrec ); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
1
0
0
0
Juan Lang : crypt32: Initialize key spec correctly.
by Alexandre Julliard
31 May '12
31 May '12
Module: wine Branch: master Commit: f86ab49be2a3f8ce778fb6ed5fa3e91e9ccfad75 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f86ab49be2a3f8ce778fb6ed5…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Wed May 30 14:26:56 2012 -0700 crypt32: Initialize key spec correctly. --- dlls/crypt32/cert.c | 4 ++-- dlls/crypt32/tests/cert.c | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/dlls/crypt32/cert.c b/dlls/crypt32/cert.c index 2d6697c..478fff3 100644 --- a/dlls/crypt32/cert.c +++ b/dlls/crypt32/cert.c @@ -3139,7 +3139,7 @@ PCCERT_CONTEXT WINAPI CertCreateSelfSignCertificate(HCRYPTPROV_OR_NCRYPT_KEY_HAN PCCERT_CONTEXT context = NULL; BOOL ret, releaseContext = FALSE; PCERT_PUBLIC_KEY_INFO pubKey = NULL; - DWORD pubKeySize = 0,dwKeySpec = AT_SIGNATURE; + DWORD pubKeySize = 0, dwKeySpec; TRACE("(%08lx, %p, %08x, %p, %p, %p, %p, %p)\n", hProv, pSubjectIssuerBlob, dwFlags, pKeyProvInfo, pSignatureAlgorithm, pStartTime, @@ -3151,6 +3151,7 @@ PCCERT_CONTEXT WINAPI CertCreateSelfSignCertificate(HCRYPTPROV_OR_NCRYPT_KEY_HAN return NULL; } + dwKeySpec = pKeyProvInfo ? pKeyProvInfo->dwKeySpec : AT_SIGNATURE; if (!hProv) { if (!pKeyProvInfo) @@ -3181,7 +3182,6 @@ PCCERT_CONTEXT WINAPI CertCreateSelfSignCertificate(HCRYPTPROV_OR_NCRYPT_KEY_HAN if (!ret) return NULL; } - dwKeySpec = pKeyProvInfo->dwKeySpec; /* check if the key is here */ ret = CryptGetUserKey(hProv,dwKeySpec,&hKey); if(!ret) diff --git a/dlls/crypt32/tests/cert.c b/dlls/crypt32/tests/cert.c index 5d95711..f31236a 100644 --- a/dlls/crypt32/tests/cert.c +++ b/dlls/crypt32/tests/cert.c @@ -2156,7 +2156,6 @@ static void testCreateSelfSignCert(void) SetLastError(0xdeadbeef); context = pCertCreateSelfSignCertificate(csp, &name, 0, &info, NULL, NULL, NULL, NULL); - todo_wine ok(context == NULL, "expected failure\n"); if (context != NULL) CertFreeCertificateContext(context); @@ -2278,7 +2277,6 @@ static void testCreateSelfSignCert(void) SetLastError(0xdeadbeef); context = pCertCreateSelfSignCertificate(csp, &name, 0, &info, NULL, NULL, NULL, NULL); - todo_wine ok(context == NULL, "expected failure\n"); if (context != NULL) CertFreeCertificateContext(context);
1
0
0
0
← Newer
1
2
3
4
5
...
74
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
Results per page:
10
25
50
100
200