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
June 2007
----- 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
5 participants
856 discussions
Start a n
N
ew thread
Michael Stefaniuc : kernel32: Remove superfluous casts of void pointers to other pointer types.
by Alexandre Julliard
27 Jun '07
27 Jun '07
Module: wine Branch: master Commit: 7596e3dd91f9f7c327ad5c538002ce4304c14b0d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7596e3dd91f9f7c327ad5c538…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Jun 27 00:12:59 2007 +0200 kernel32: Remove superfluous casts of void pointers to other pointer types. --- dlls/kernel32/tests/pipe.c | 2 +- dlls/kernel32/tests/virtual.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c index 81159ab..1850e77 100644 --- a/dlls/kernel32/tests/pipe.c +++ b/dlls/kernel32/tests/pipe.c @@ -848,7 +848,7 @@ static DWORD CALLBACK named_pipe_client_func(LPVOID p) ret = GetTokenInformation(process_token, TokenPrivileges, NULL, 0, &Size); ok(!ret && GetLastError() == ERROR_INSUFFICIENT_BUFFER, "GetTokenInformation(TokenPrivileges) failed with %d\n", GetLastError()); - Privileges = (TOKEN_PRIVILEGES *)HeapAlloc(GetProcessHeap(), 0, Size); + Privileges = HeapAlloc(GetProcessHeap(), 0, Size); ret = GetTokenInformation(process_token, TokenPrivileges, Privileges, Size, &Size); ok(ret, "GetTokenInformation(TokenPrivileges) failed with %d\n", GetLastError()); diff --git a/dlls/kernel32/tests/virtual.c b/dlls/kernel32/tests/virtual.c index a033096..7727c65 100644 --- a/dlls/kernel32/tests/virtual.c +++ b/dlls/kernel32/tests/virtual.c @@ -81,8 +81,8 @@ static void test_VirtualAllocEx(void) return; } - src = (char *) HeapAlloc( GetProcessHeap(), 0, alloc_size ); - dst = (char *) HeapAlloc( GetProcessHeap(), 0, alloc_size ); + src = HeapAlloc( GetProcessHeap(), 0, alloc_size ); + dst = HeapAlloc( GetProcessHeap(), 0, alloc_size ); for (i = 0; i < alloc_size; i++) src[i] = i & 0xff;
1
0
0
0
Michael Stefaniuc : oleaut32: Remove superfluous casts of void pointers to other pointer types.
by Alexandre Julliard
27 Jun '07
27 Jun '07
Module: wine Branch: master Commit: ab7e33641b36fb1e78d9e9af4851090022dc095e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ab7e33641b36fb1e78d9e9af4…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Jun 27 00:12:48 2007 +0200 oleaut32: Remove superfluous casts of void pointers to other pointer types. --- dlls/oleaut32/tests/tmarshal.c | 4 ++-- dlls/oleaut32/tests/usrmarshal.c | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/oleaut32/tests/tmarshal.c b/dlls/oleaut32/tests/tmarshal.c index f7400e4..c96fb33 100644 --- a/dlls/oleaut32/tests/tmarshal.c +++ b/dlls/oleaut32/tests/tmarshal.c @@ -579,7 +579,7 @@ static HRESULT register_current_module_typelib(void) static IWidget *Widget_Create(void) { - Widget *This = (Widget *)HeapAlloc(GetProcessHeap(), 0, sizeof(*This)); + Widget *This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This)); HRESULT hr; ITypeLib *pTypeLib; @@ -698,7 +698,7 @@ static IKindaEnumWidget *KindaEnumWidget_Create(void) { KindaEnum *This; - This = (KindaEnum *)HeapAlloc(GetProcessHeap(), 0, sizeof(*This)); + This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This)); if (!This) return NULL; This->lpVtbl = &KindaEnumWidget_VTable; This->refs = 1; diff --git a/dlls/oleaut32/tests/usrmarshal.c b/dlls/oleaut32/tests/usrmarshal.c index 21714c4..633a382 100644 --- a/dlls/oleaut32/tests/usrmarshal.c +++ b/dlls/oleaut32/tests/usrmarshal.c @@ -192,7 +192,7 @@ static void test_marshal_LPSAFEARRAY(void) ok(size == 68, "size should be 68 bytes, not %ld\n", size); size = LPSAFEARRAY_UserSize(&umcb.Flags, 0, &lpsa); ok(size == 64, "size should be 64 bytes, not %ld\n", size); - buffer = (unsigned char *)HeapAlloc(GetProcessHeap(), 0, size); + buffer = HeapAlloc(GetProcessHeap(), 0, size); LPSAFEARRAY_UserMarshal(&umcb.Flags, buffer, &lpsa); check_safearray(buffer, lpsa); @@ -215,7 +215,7 @@ static void test_marshal_LPSAFEARRAY(void) size = LPSAFEARRAY_UserSize(&umcb.Flags, 0, &lpsa); ok(size == 4, "size should be 4 bytes, not %ld\n", size); - buffer = (unsigned char *)HeapAlloc(GetProcessHeap(), 0, size); + buffer = HeapAlloc(GetProcessHeap(), 0, size); LPSAFEARRAY_UserMarshal(&umcb.Flags, buffer, &lpsa); check_safearray(buffer, lpsa); @@ -238,7 +238,7 @@ static void test_marshal_LPSAFEARRAY(void) ok(size == 128, "size should be 128 bytes, not %ld\n", size); size = LPSAFEARRAY_UserSize(&umcb.Flags, 0, &lpsa); ok(size == 128, "size should be 128 bytes, not %ld\n", size); - buffer = (unsigned char *)HeapAlloc(GetProcessHeap(), 0, size); + buffer = HeapAlloc(GetProcessHeap(), 0, size); LPSAFEARRAY_UserMarshal(&umcb.Flags, buffer, &lpsa); check_safearray(buffer, lpsa); @@ -260,7 +260,7 @@ static void test_marshal_LPSAFEARRAY(void) size = LPSAFEARRAY_UserSize(&umcb.Flags, 0, &lpsa); ok(size == 432, "size %ld\n", size); - buffer = (unsigned char *)HeapAlloc(GetProcessHeap(), 0, size); + buffer = HeapAlloc(GetProcessHeap(), 0, size); LPSAFEARRAY_UserMarshal(&umcb.Flags, buffer, &lpsa); check_safearray(buffer, lpsa); HeapFree(GetProcessHeap(), 0, buffer); @@ -283,7 +283,7 @@ static void test_marshal_LPSAFEARRAY(void) size = LPSAFEARRAY_UserSize(&umcb.Flags, 0, &lpsa); todo_wine ok(size == 1388, "size %ld\n", size); - buffer = (unsigned char *)HeapAlloc(GetProcessHeap(), 0, size); + buffer = HeapAlloc(GetProcessHeap(), 0, size); LPSAFEARRAY_UserMarshal(&umcb.Flags, buffer, &lpsa); check_safearray(buffer, lpsa); HeapFree(GetProcessHeap(), 0, buffer);
1
0
0
0
Michael Stefaniuc : ole32: Remove superfluous casts of void pointers to other pointer types.
by Alexandre Julliard
27 Jun '07
27 Jun '07
Module: wine Branch: master Commit: d28c3ca60cb4f28a7aaed33d19cc63ff7380544c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d28c3ca60cb4f28a7aaed33d1…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Jun 27 00:12:36 2007 +0200 ole32: Remove superfluous casts of void pointers to other pointer types. --- dlls/ole32/dictionary.c | 4 ++-- dlls/ole32/tests/marshal.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/ole32/dictionary.c b/dlls/ole32/dictionary.c index 6e11478..593a4ff 100644 --- a/dlls/ole32/dictionary.c +++ b/dlls/ole32/dictionary.c @@ -126,8 +126,8 @@ void dictionary_insert(struct dictionary *d, const void *k, const void *v) } else { - struct dictionary_entry *elem = (struct dictionary_entry *) - HeapAlloc(GetProcessHeap(), 0, sizeof(struct dictionary_entry)); + struct dictionary_entry *elem = HeapAlloc(GetProcessHeap(), 0, + sizeof(struct dictionary_entry)); if (!elem) return; diff --git a/dlls/ole32/tests/marshal.c b/dlls/ole32/tests/marshal.c index b089913..ba7793a 100644 --- a/dlls/ole32/tests/marshal.c +++ b/dlls/ole32/tests/marshal.c @@ -1615,7 +1615,7 @@ static void test_proxybuffer(REFIID riid) LPVOID lpvtbl; ULONG refs; CLSID clsid; - HeapUnknown *pUnkOuter = (HeapUnknown *)HeapAlloc(GetProcessHeap(), 0, sizeof(*pUnkOuter)); + HeapUnknown *pUnkOuter = HeapAlloc(GetProcessHeap(), 0, sizeof(*pUnkOuter)); pUnkOuter->lpVtbl = &HeapUnknown_Vtbl; pUnkOuter->refs = 1;
1
0
0
0
Michael Stefaniuc : iccvid: Remove superfluous casts of void pointers to other pointer types.
by Alexandre Julliard
27 Jun '07
27 Jun '07
Module: wine Branch: master Commit: 6644263e36bcefb6cbafd5a74160797293889116 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6644263e36bcefb6cbafd5a74…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Jun 27 00:11:49 2007 +0200 iccvid: Remove superfluous casts of void pointers to other pointer types. --- dlls/iccvid/iccvid.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/iccvid/iccvid.c b/dlls/iccvid/iccvid.c index 1bb9b1d..b3e98bf 100644 --- a/dlls/iccvid/iccvid.c +++ b/dlls/iccvid/iccvid.c @@ -457,13 +457,13 @@ static void decode_cinepak(cinepak_info *cvinfo, unsigned char *buf, int size, for(i = cvinfo->strip_num; i < strips; i++) { - if((cvinfo->v4_codebook[i] = (cvid_codebook *)ICCVID_Alloc(sizeof(cvid_codebook), 260)) == NULL) + if((cvinfo->v4_codebook[i] = ICCVID_Alloc(sizeof(cvid_codebook), 260)) == NULL) { ERR("CVID: codebook v4 alloc err\n"); return; } - if((cvinfo->v1_codebook[i] = (cvid_codebook *)ICCVID_Alloc(sizeof(cvid_codebook), 260)) == NULL) + if((cvinfo->v1_codebook[i] = ICCVID_Alloc(sizeof(cvid_codebook), 260)) == NULL) { ERR("CVID: codebook v1 alloc err\n"); return;
1
0
0
0
Michael Stefaniuc : quartz: Remove superfluous casts of void pointers to other pointer types.
by Alexandre Julliard
27 Jun '07
27 Jun '07
Module: wine Branch: master Commit: f10e6d7e37d348af584944c1c330f022d896d4fb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f10e6d7e37d348af584944c1c…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Jun 27 00:12:07 2007 +0200 quartz: Remove superfluous casts of void pointers to other pointer types. --- dlls/quartz/avidec.c | 4 ++-- dlls/quartz/enumregfilters.c | 4 ++-- dlls/quartz/filtergraph.c | 6 +++--- dlls/quartz/filtermapper.c | 2 +- dlls/quartz/regsvr.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dlls/quartz/avidec.c b/dlls/quartz/avidec.c index 7f32288..9e033c1 100644 --- a/dlls/quartz/avidec.c +++ b/dlls/quartz/avidec.c @@ -196,13 +196,13 @@ static HRESULT AVIDec_ConnectInput(TransformFilterImpl* pTransformFilter, const /* Copy bitmap header from media type to 1 for input and 1 for output */ bih_size = format->bmiHeader.biSize + format->bmiHeader.biClrUsed * 4; - This->pBihIn = (BITMAPINFOHEADER*)CoTaskMemAlloc(bih_size); + This->pBihIn = CoTaskMemAlloc(bih_size); if (!This->pBihIn) { hr = E_OUTOFMEMORY; goto failed; } - This->pBihOut = (BITMAPINFOHEADER*)CoTaskMemAlloc(bih_size); + This->pBihOut = CoTaskMemAlloc(bih_size); if (!This->pBihOut) { hr = E_OUTOFMEMORY; diff --git a/dlls/quartz/enumregfilters.c b/dlls/quartz/enumregfilters.c index 2e93c7b..2816f08 100644 --- a/dlls/quartz/enumregfilters.c +++ b/dlls/quartz/enumregfilters.c @@ -67,7 +67,7 @@ HRESULT IEnumRegFiltersImpl_Construct(REGFILTER* pInRegFilters, const ULONG size for(i = 0; i < size; i++) { pRegFilters[i].Clsid = pInRegFilters[i].Clsid; - pRegFilters[i].Name = (WCHAR*)CoTaskMemAlloc((strlenW(pInRegFilters[i].Name)+1)*sizeof(WCHAR)); + pRegFilters[i].Name = CoTaskMemAlloc((strlenW(pInRegFilters[i].Name)+1)*sizeof(WCHAR)); if (!pRegFilters[i].Name) { while(i) @@ -152,7 +152,7 @@ static HRESULT WINAPI IEnumRegFiltersImpl_Next(IEnumRegFilters * iface, ULONG cF for(i = 0; i < cFetched; i++) { /* The string in the REGFILTER structure must be allocated in the same block as the REGFILTER structure itself */ - ppRegFilter[i] = (REGFILTER*)CoTaskMemAlloc(sizeof(REGFILTER)+(strlenW(This->RegFilters[i].Name)+1)*sizeof(WCHAR)); + ppRegFilter[i] = CoTaskMemAlloc(sizeof(REGFILTER)+(strlenW(This->RegFilters[i].Name)+1)*sizeof(WCHAR)); if (!ppRegFilter[i]) { while(i) diff --git a/dlls/quartz/filtergraph.c b/dlls/quartz/filtergraph.c index 02728d5..df1929d 100644 --- a/dlls/quartz/filtergraph.c +++ b/dlls/quartz/filtergraph.c @@ -327,11 +327,11 @@ static HRESULT WINAPI GraphBuilder_AddFilter(IGraphBuilder *iface, int i,j; WCHAR* wszFilterName = NULL; int duplicate_name = FALSE; - + TRACE("(%p/%p)->(%p, %s (%p))\n", This, iface, pFilter, debugstr_w(pName), pName); - wszFilterName = (WCHAR*) CoTaskMemAlloc( (pName ? strlenW(pName) + 6 : 5) * sizeof(WCHAR) ); - + wszFilterName = CoTaskMemAlloc( (pName ? strlenW(pName) + 6 : 5) * sizeof(WCHAR) ); + if (pName) { /* Check if name already exists */ diff --git a/dlls/quartz/filtermapper.c b/dlls/quartz/filtermapper.c index a45f477..7f36fd2 100644 --- a/dlls/quartz/filtermapper.c +++ b/dlls/quartz/filtermapper.c @@ -706,7 +706,7 @@ static HRESULT WINAPI FilterMapper2_RegisterFilter( regfilter2.dwVersion = 2; regfilter2.dwMerit = prf2->dwMerit; regfilter2.u.s1.cPins2 = prf2->u.s.cPins; - pregfp2 = (REGFILTERPINS2*) CoTaskMemAlloc(prf2->u.s.cPins * sizeof(REGFILTERPINS2)); + pregfp2 = CoTaskMemAlloc(prf2->u.s.cPins * sizeof(REGFILTERPINS2)); regfilter2.u.s1.rgPins2 = pregfp2; for (i = 0; i < prf2->u.s.cPins; i++) { diff --git a/dlls/quartz/regsvr.c b/dlls/quartz/regsvr.c index ced43bc..20bc5c4 100644 --- a/dlls/quartz/regsvr.c +++ b/dlls/quartz/regsvr.c @@ -588,7 +588,7 @@ static HRESULT register_filters(struct regsvr_filter const *list) rf2.dwVersion = 2; rf2.dwMerit = list->merit; rf2.u.s1.cPins2 = i; - rf2.u.s1.rgPins2 = prfp2 = (REGFILTERPINS2*) CoTaskMemAlloc(i*sizeof(REGFILTERPINS2)); + rf2.u.s1.rgPins2 = prfp2 = CoTaskMemAlloc(i*sizeof(REGFILTERPINS2)); if (!prfp2) { hr = E_OUTOFMEMORY; break; @@ -600,7 +600,7 @@ static HRESULT register_filters(struct regsvr_filter const *list) for (nbmt = 0; list->pins[i].mediatypes[nbmt].majortype; nbmt++) ; /* Allocate a single buffer for regpintypes struct and clsids */ - lpMediatype = (REGPINTYPES*) CoTaskMemAlloc(nbmt*(sizeof(REGPINTYPES) + 2*sizeof(CLSID))); + lpMediatype = CoTaskMemAlloc(nbmt*(sizeof(REGPINTYPES) + 2*sizeof(CLSID))); if (!lpMediatype) { hr = E_OUTOFMEMORY; break;
1
0
0
0
Michael Stefaniuc : cmd: Remove superfluous casts of void pointers to other pointer types.
by Alexandre Julliard
27 Jun '07
27 Jun '07
Module: wine Branch: master Commit: 6519a83de405da09c9a11e32699b5f33d5022d01 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6519a83de405da09c9a11e326…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Wed Jun 27 00:12:22 2007 +0200 cmd: Remove superfluous casts of void pointers to other pointer types. --- programs/cmd/builtins.c | 2 +- programs/cmd/directory.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index 2a075c5..482d870 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -487,7 +487,7 @@ BOOL WCMD_delete (WCHAR *command, BOOL expectDir) { WINE_TRACE("Recursive, Adding to search list '%s'\n", wine_dbgstr_w(subParm)); /* Allocate memory, add to list */ - nextDir = (DIRECTORY_STACK *) HeapAlloc(GetProcessHeap(),0,sizeof(DIRECTORY_STACK)); + nextDir = HeapAlloc(GetProcessHeap(),0,sizeof(DIRECTORY_STACK)); if (allDirs == NULL) allDirs = nextDir; if (lastEntry != NULL) lastEntry->next = nextDir; lastEntry = nextDir; diff --git a/programs/cmd/directory.c b/programs/cmd/directory.c index d28421f..0de5bb8 100644 --- a/programs/cmd/directory.c +++ b/programs/cmd/directory.c @@ -342,7 +342,7 @@ void WCMD_directory (WCHAR *cmd) { } WINE_TRACE("Using path '%s'\n", wine_dbgstr_w(path)); - thisEntry = (DIRECTORY_STACK *) HeapAlloc(GetProcessHeap(),0,sizeof(DIRECTORY_STACK)); + thisEntry = HeapAlloc(GetProcessHeap(),0,sizeof(DIRECTORY_STACK)); if (fullParms == NULL) fullParms = thisEntry; if (prevEntry != NULL) prevEntry->next = thisEntry; prevEntry = thisEntry; @@ -370,7 +370,7 @@ void WCMD_directory (WCHAR *cmd) { /* If just 'dir' entered, a '*' parameter is assumed */ if (fullParms == NULL) { WINE_TRACE("Inserting default '*'\n"); - fullParms = (DIRECTORY_STACK *) HeapAlloc(GetProcessHeap(),0, sizeof(DIRECTORY_STACK)); + fullParms = HeapAlloc(GetProcessHeap(),0, sizeof(DIRECTORY_STACK)); fullParms->next = NULL; fullParms->dirName = HeapAlloc(GetProcessHeap(),0,sizeof(WCHAR) * (strlenW(cwd)+1)); strcpyW(fullParms->dirName, cwd); @@ -739,7 +739,7 @@ static DIRECTORY_STACK *WCMD_list_directory (DIRECTORY_STACK *inputparms, int le WINE_TRACE("Recursive, Adding to search list '%s'\n", wine_dbgstr_w(string)); /* Allocate memory, add to list */ - thisDir = (DIRECTORY_STACK *) HeapAlloc(GetProcessHeap(),0,sizeof(DIRECTORY_STACK)); + thisDir = HeapAlloc(GetProcessHeap(),0,sizeof(DIRECTORY_STACK)); if (dirStack == NULL) dirStack = thisDir; if (lastEntry != NULL) lastEntry->next = thisDir; lastEntry = thisDir;
1
0
0
0
James Hawkins : msi: Set the WindowsInstaller value of the UserData product key when publishing the product .
by Alexandre Julliard
27 Jun '07
27 Jun '07
Module: wine Branch: master Commit: c18b77557d60017ef3f3c2eea5782bae17126006 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c18b77557d60017ef3f3c2eea…
Author: James Hawkins <truiken(a)gmail.com> Date: Tue Jun 26 19:22:46 2007 -0700 msi: Set the WindowsInstaller value of the UserData product key when publishing the product. --- dlls/msi/action.c | 17 ++++++++++++++++- dlls/msi/tests/automation.c | 7 ++----- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index a6677bd..b550e54 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -3242,12 +3242,17 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package) /* for registry stuff */ HKEY hkey=0; HKEY hukey=0; + HKEY hudkey=0, props=0; static const WCHAR szProductLanguage[] = {'P','r','o','d','u','c','t','L','a','n','g','u','a','g','e',0}; static const WCHAR szARPProductIcon[] = {'A','R','P','P','R','O','D','U','C','T','I','C','O','N',0}; static const WCHAR szProductVersion[] = {'P','r','o','d','u','c','t','V','e','r','s','i','o','n',0}; + static const WCHAR szInstallProperties[] = + {'I','n','s','t','a','l','l','P','r','o','p','e','r','t','i','e','s',0}; + static const WCHAR szWindowsInstaller[] = + {'W','i','n','d','o','w','s','I','n','s','t','a','l','l','e','r',0}; DWORD langid; LPWSTR buffer; DWORD size; @@ -3272,6 +3277,15 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package) if (rc != ERROR_SUCCESS) goto end; + rc = MSIREG_OpenUserDataProductKey(package->ProductCode,&hudkey,TRUE); + if (rc != ERROR_SUCCESS) + goto end; + + rc = RegCreateKeyW(hudkey, szInstallProperties, &props); + if (rc != ERROR_SUCCESS) + goto end; + + msi_reg_set_val_dword( props, szWindowsInstaller, 1 ); buffer = msi_dup_property( package, INSTALLPROPERTY_PRODUCTNAMEW ); msi_reg_set_val_str( hukey, INSTALLPROPERTY_PRODUCTNAMEW, buffer ); @@ -3335,9 +3349,10 @@ static UINT ACTION_PublishProduct(MSIPACKAGE *package) } end: - RegCloseKey(hkey); RegCloseKey(hukey); + RegCloseKey(hudkey); + RegCloseKey(props); return rc; } diff --git a/dlls/msi/tests/automation.c b/dlls/msi/tests/automation.c index 84c3627..0189062 100644 --- a/dlls/msi/tests/automation.c +++ b/dlls/msi/tests/automation.c @@ -2110,10 +2110,7 @@ static void test_Installer_InstallProduct(LPCWSTR szPath) /* Installer::ProductState for our product code, which has been installed */ hr = Installer_ProductState(szProductCode, &iValue); ok(hr == S_OK, "Installer_ProductState failed, hresult 0x%08x\n", hr); - todo_wine - { - ok(iValue == INSTALLSTATE_DEFAULT, "Installer_ProductState returned %d, expected %d\n", iValue, INSTALLSTATE_DEFAULT); - } + ok(iValue == INSTALLSTATE_DEFAULT, "Installer_ProductState returned %d, expected %d\n", iValue, INSTALLSTATE_DEFAULT); /* Installer::ProductInfo for our product code */ @@ -2218,7 +2215,7 @@ static void test_Installer_InstallProduct(LPCWSTR szPath) ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); res = find_registry_key(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData", "05FA3C1F65B896A40AC00077F34EF203", &hkey); - todo_wine ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); if (res == ERROR_SUCCESS) { res = delete_registry_key(hkey, "05FA3C1F65B896A40AC00077F34EF203");
1
0
0
0
James Hawkins : msi: If the UserData product key exists, but the user product key doesn't, the product is absent.
by Alexandre Julliard
27 Jun '07
27 Jun '07
Module: wine Branch: master Commit: 24ede2f9e602b24080f47134055f9a1e540f487c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=24ede2f9e602b24080f471340…
Author: James Hawkins <truiken(a)gmail.com> Date: Tue Jun 26 19:04:08 2007 -0700 msi: If the UserData product key exists, but the user product key doesn't, the product is absent. --- dlls/msi/msi.c | 15 ++++++++++----- dlls/msi/tests/msi.c | 5 +---- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c index 497083e..5e20ce2 100644 --- a/dlls/msi/msi.c +++ b/dlls/msi/msi.c @@ -765,6 +765,7 @@ INSTALLSTATE WINAPI MsiQueryProductStateW(LPCWSTR szProduct) INSTALLSTATE state = INSTALLSTATE_UNKNOWN; HKEY hkey = 0, props = 0; DWORD sz; + BOOL userkey_exists = FALSE; static const int GUID_LEN = 38; static const WCHAR szInstallProperties[] = { @@ -780,11 +781,12 @@ INSTALLSTATE WINAPI MsiQueryProductStateW(LPCWSTR szProduct) return INSTALLSTATE_INVALIDARG; rc = MSIREG_OpenUserProductsKey(szProduct,&hkey,FALSE); - if (rc != ERROR_SUCCESS) - goto end; - - state = INSTALLSTATE_ADVERTISED; - RegCloseKey(hkey); + if (rc == ERROR_SUCCESS) + { + userkey_exists = TRUE; + state = INSTALLSTATE_ADVERTISED; + RegCloseKey(hkey); + } rc = MSIREG_OpenUserDataProductKey(szProduct,&hkey,FALSE); if (rc != ERROR_SUCCESS) @@ -804,6 +806,9 @@ INSTALLSTATE WINAPI MsiQueryProductStateW(LPCWSTR szProduct) else state = INSTALLSTATE_UNKNOWN; + if (state == INSTALLSTATE_DEFAULT && !userkey_exists) + state = INSTALLSTATE_ABSENT; + end: RegCloseKey(props); RegCloseKey(hkey); diff --git a/dlls/msi/tests/msi.c b/dlls/msi/tests/msi.c index 810992c..08b6620 100644 --- a/dlls/msi/tests/msi.c +++ b/dlls/msi/tests/msi.c @@ -439,10 +439,7 @@ static void test_MsiQueryProductState(void) /* user product key does not exist */ state = MsiQueryProductStateA(prodcode); - todo_wine - { - ok(state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); - } + ok(state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state); LocalFree(usersid); RegDeleteValueA(props, "WindowsInstaller");
1
0
0
0
James Hawkins : msi: Any value of WindowsInstaller besides 0 means the product is installed.
by Alexandre Julliard
27 Jun '07
27 Jun '07
Module: wine Branch: master Commit: 3bf32f27005a0e529d0ef614d407a85fee8f5238 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3bf32f27005a0e529d0ef614d…
Author: James Hawkins <truiken(a)gmail.com> Date: Tue Jun 26 19:01:37 2007 -0700 msi: Any value of WindowsInstaller besides 0 means the product is installed. --- dlls/msi/msi.c | 12 +++--------- dlls/msi/tests/msi.c | 8 ++++++++ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c index fce1bc5..497083e 100644 --- a/dlls/msi/msi.c +++ b/dlls/msi/msi.c @@ -799,17 +799,11 @@ INSTALLSTATE WINAPI MsiQueryProductStateW(LPCWSTR szProduct) if (rc != ERROR_SUCCESS) goto end; - switch (state) - { - case 1: - /* default */ + if (state) state = INSTALLSTATE_DEFAULT; - break; - default: - FIXME("Unknown install state read from registry (%i)\n",state); + else state = INSTALLSTATE_UNKNOWN; - break; - } + end: RegCloseKey(props); RegCloseKey(hkey); diff --git a/dlls/msi/tests/msi.c b/dlls/msi/tests/msi.c index 4e42fea..810992c 100644 --- a/dlls/msi/tests/msi.c +++ b/dlls/msi/tests/msi.c @@ -427,6 +427,14 @@ static void test_MsiQueryProductState(void) state = MsiQueryProductStateA(prodcode); ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state); + data = 2; + res = RegSetValueExA(props, "WindowsInstaller", 0, REG_DWORD, (const BYTE *)&data, sizeof(DWORD)); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + + /* WindowsInstaller value is not 1 */ + state = MsiQueryProductStateA(prodcode); + ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state); + RegDeleteKeyA(userkey, ""); /* user product key does not exist */
1
0
0
0
James Hawkins : msi: Use the correct registry key when detecting a published product.
by Alexandre Julliard
27 Jun '07
27 Jun '07
Module: wine Branch: master Commit: 7da89f48fd44c54e8b963e94b5f69d88b6334c57 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7da89f48fd44c54e8b963e94b…
Author: James Hawkins <truiken(a)gmail.com> Date: Tue Jun 26 19:01:03 2007 -0700 msi: Use the correct registry key when detecting a published product. --- dlls/msi/msi.c | 14 ++++++++-- dlls/msi/msipriv.h | 1 + dlls/msi/registry.c | 59 +++++++++++++++++++++++++++++++++++++++++++ dlls/msi/tests/automation.c | 5 +++- dlls/msi/tests/msi.c | 26 ++++++++++++++++--- 5 files changed, 97 insertions(+), 8 deletions(-) diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c index 7240ea4..fce1bc5 100644 --- a/dlls/msi/msi.c +++ b/dlls/msi/msi.c @@ -763,10 +763,13 @@ INSTALLSTATE WINAPI MsiQueryProductStateW(LPCWSTR szProduct) { UINT rc; INSTALLSTATE state = INSTALLSTATE_UNKNOWN; - HKEY hkey = 0; + HKEY hkey = 0, props = 0; DWORD sz; static const int GUID_LEN = 38; + static const WCHAR szInstallProperties[] = { + 'I','n','s','t','a','l','l','P','r','o','p','e','r','t','i','e','s',0 + }; static const WCHAR szWindowsInstaller[] = { 'W','i','n','d','o','w','s','I','n','s','t','a','l','l','e','r',0 }; @@ -783,12 +786,16 @@ INSTALLSTATE WINAPI MsiQueryProductStateW(LPCWSTR szProduct) state = INSTALLSTATE_ADVERTISED; RegCloseKey(hkey); - rc = MSIREG_OpenUninstallKey(szProduct,&hkey,FALSE); + rc = MSIREG_OpenUserDataProductKey(szProduct,&hkey,FALSE); + if (rc != ERROR_SUCCESS) + goto end; + + rc = RegOpenKeyW(hkey, szInstallProperties, &props); if (rc != ERROR_SUCCESS) goto end; sz = sizeof(state); - rc = RegQueryValueExW(hkey,szWindowsInstaller,NULL,NULL,(LPVOID)&state, &sz); + rc = RegQueryValueExW(props,szWindowsInstaller,NULL,NULL,(LPVOID)&state, &sz); if (rc != ERROR_SUCCESS) goto end; @@ -804,6 +811,7 @@ INSTALLSTATE WINAPI MsiQueryProductStateW(LPCWSTR szProduct) break; } end: + RegCloseKey(props); RegCloseKey(hkey); return state; } diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h index d9c7615..be5f2b1 100644 --- a/dlls/msi/msipriv.h +++ b/dlls/msi/msipriv.h @@ -675,6 +675,7 @@ extern UINT MSIREG_OpenComponents(HKEY* key); extern UINT MSIREG_OpenUserComponentsKey(LPCWSTR szComponent, HKEY* key, BOOL create); extern UINT MSIREG_OpenComponentsKey(LPCWSTR szComponent, HKEY* key, BOOL create); extern UINT MSIREG_OpenProductsKey(LPCWSTR szProduct, HKEY* key, BOOL create); +extern UINT MSIREG_OpenUserDataProductKey(LPCWSTR szProduct, HKEY* key, BOOL create); extern UINT MSIREG_OpenUserFeaturesKey(LPCWSTR szProduct, HKEY* key, BOOL create); extern UINT MSIREG_OpenUserComponentsKey(LPCWSTR szComponent, HKEY* key, BOOL create); extern UINT MSIREG_OpenUpgradeCodesKey(LPCWSTR szProduct, HKEY* key, BOOL create); diff --git a/dlls/msi/registry.c b/dlls/msi/registry.c index 14a4754..21e0804 100644 --- a/dlls/msi/registry.c +++ b/dlls/msi/registry.c @@ -36,6 +36,7 @@ #include "wine/unicode.h" #include "winver.h" #include "winuser.h" +#include "sddl.h" WINE_DEFAULT_DEBUG_CHANNEL(msi); @@ -140,6 +141,15 @@ static const WCHAR szInstaller_UserUpgradeCodes_fmt[] = { 'U','p','g','r','a','d','e','C','o','d','e','s','\\', '%','s',0}; +static const WCHAR szUserDataProd_fmt[] = { +'S','o','f','t','w','a','r','e','\\', +'M','i','c','r','o','s','o','f','t','\\', +'W','i','n','d','o','w','s','\\', +'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\', +'I','n','s','t','a','l','l','e','r','\\', +'U','s','e','r','D','a','t','a','\\', +'%','s','\\','P','r','o','d','u','c','t','s','\\','%','s',0}; + #define SQUISH_GUID_SIZE 33 @@ -501,6 +511,55 @@ UINT MSIREG_OpenUserComponentsKey(LPCWSTR szComponent, HKEY* key, BOOL create) return rc; } +static UINT get_user_sid(LPWSTR *usersid) +{ + HANDLE token; + BYTE buf[1024]; + DWORD size; + PTOKEN_USER user; + + if (!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &token)) + return ERROR_FUNCTION_FAILED; + + size = sizeof(buf); + if (!GetTokenInformation(token, TokenUser, (void *)buf, size, &size)) + return ERROR_FUNCTION_FAILED; + + user = (PTOKEN_USER)buf; + if (!ConvertSidToStringSidW(user->User.Sid, usersid)) + return ERROR_FUNCTION_FAILED; + + return ERROR_SUCCESS; +} + +UINT MSIREG_OpenUserDataProductKey(LPCWSTR szProduct, HKEY *key, BOOL create) +{ + UINT rc; + WCHAR squished_pc[GUID_SIZE]; + WCHAR keypath[0x200]; + LPWSTR usersid; + + TRACE("%s\n", debugstr_w(szProduct)); + squash_guid(szProduct, squished_pc); + TRACE("squished (%s)\n", debugstr_w(squished_pc)); + + rc = get_user_sid(&usersid); + if (rc != ERROR_SUCCESS || !usersid) + { + ERR("Failed to retrieve user SID: %d\n", rc); + return rc; + } + + sprintfW(keypath, szUserDataProd_fmt, usersid, squished_pc); + + if (create) + rc = RegCreateKeyW(HKEY_LOCAL_MACHINE, keypath, key); + else + rc = RegOpenKeyW(HKEY_LOCAL_MACHINE, keypath, key); + + return rc; +} + UINT MSIREG_OpenProducts(HKEY* key) { return RegCreateKeyW(HKEY_LOCAL_MACHINE,szInstaller_Products,key); diff --git a/dlls/msi/tests/automation.c b/dlls/msi/tests/automation.c index 7308671..84c3627 100644 --- a/dlls/msi/tests/automation.c +++ b/dlls/msi/tests/automation.c @@ -2110,7 +2110,10 @@ static void test_Installer_InstallProduct(LPCWSTR szPath) /* Installer::ProductState for our product code, which has been installed */ hr = Installer_ProductState(szProductCode, &iValue); ok(hr == S_OK, "Installer_ProductState failed, hresult 0x%08x\n", hr); - ok(iValue == INSTALLSTATE_DEFAULT, "Installer_ProductState returned %d, expected %d\n", iValue, INSTALLSTATE_DEFAULT); + todo_wine + { + ok(iValue == INSTALLSTATE_DEFAULT, "Installer_ProductState returned %d, expected %d\n", iValue, INSTALLSTATE_DEFAULT); + } /* Installer::ProductInfo for our product code */ diff --git a/dlls/msi/tests/msi.c b/dlls/msi/tests/msi.c index 9afa576..4e42fea 100644 --- a/dlls/msi/tests/msi.c +++ b/dlls/msi/tests/msi.c @@ -379,6 +379,27 @@ static void test_MsiQueryProductState(void) state = MsiQueryProductStateA(prodcode); ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); + lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\"); + lstrcatA(keypath, prodcode); + + res = RegCreateKeyA(HKEY_LOCAL_MACHINE, keypath, &localkey); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + + /* local uninstall key exists */ + state = MsiQueryProductStateA(prodcode); + ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); + + data = 1; + res = RegSetValueExA(localkey, "WindowsInstaller", 0, REG_DWORD, (const BYTE *)&data, sizeof(DWORD)); + ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); + + /* WindowsInstaller value exists */ + state = MsiQueryProductStateA(prodcode); + ok(state == INSTALLSTATE_ADVERTISED, "Expected INSTALLSTATE_ADVERTISED, got %d\n", state); + + RegDeleteValueA(localkey, "WindowsInstaller"); + RegDeleteKeyA(localkey, ""); + lstrcpyA(keypath, "Software\\Microsoft\\Windows\\CurrentVersion\\Installer\\UserData\\"); lstrcatA(keypath, usersid); lstrcatA(keypath, "\\Products\\"); @@ -404,10 +425,7 @@ static void test_MsiQueryProductState(void) /* WindowsInstaller value exists */ state = MsiQueryProductStateA(prodcode); - todo_wine - { - ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state); - } + ok(state == INSTALLSTATE_DEFAULT, "Expected INSTALLSTATE_DEFAULT, got %d\n", state); RegDeleteKeyA(userkey, "");
1
0
0
0
← Newer
1
...
7
8
9
10
11
12
13
...
86
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
Results per page:
10
25
50
100
200