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
July 2008
----- 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
1114 discussions
Start a n
N
ew thread
Roy Shea : mstask: Implemented DllUnregisterServer.
by Alexandre Julliard
29 Jul '08
29 Jul '08
Module: wine Branch: master Commit: 152ba903b85b5be950a8e69add824b205b4172e7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=152ba903b85b5be950a8e69ad…
Author: Roy Shea <royshea(a)gmail.com> Date: Mon Jul 28 12:15:16 2008 -0700 mstask: Implemented DllUnregisterServer. --- dlls/mstask/mstask.spec | 1 + dlls/mstask/mstask_main.c | 5 +++++ 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/dlls/mstask/mstask.spec b/dlls/mstask/mstask.spec index 5c4f208..0b6c23b 100644 --- a/dlls/mstask/mstask.spec +++ b/dlls/mstask/mstask.spec @@ -25,3 +25,4 @@ @ stub _SASetNSAccountInformation@12 @ stub _SetNetScheduleAccountInformation@12 @ stdcall -private DllRegisterServer() +@ stdcall -private DllUnregisterServer() diff --git a/dlls/mstask/mstask_main.c b/dlls/mstask/mstask_main.c index 53c3449..c7b3dea 100644 --- a/dlls/mstask/mstask_main.c +++ b/dlls/mstask/mstask_main.c @@ -155,3 +155,8 @@ HRESULT WINAPI DllRegisterServer(void) { return register_mstask(TRUE); } + +HRESULT WINAPI DllUnregisterServer(void) +{ + return register_mstask(FALSE); +}
1
0
0
0
Roy Shea : mstask: Implemented DllRegisterServer.
by Alexandre Julliard
29 Jul '08
29 Jul '08
Module: wine Branch: master Commit: 6e5bfbfe17d71605973f16ed25d30934948ea1b6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6e5bfbfe17d71605973f16ed2…
Author: Roy Shea <royshea(a)gmail.com> Date: Mon Jul 28 12:06:24 2008 -0700 mstask: Implemented DllRegisterServer. --- dlls/mstask/Makefile.in | 2 + dlls/mstask/mstask.inf | 16 +++++++ dlls/mstask/mstask.spec | 1 + dlls/mstask/mstask_main.c | 98 +++++++++++++++++++++++++++++++++++++++++++++ dlls/mstask/rsrc.rc | 20 +++++++++ tools/wine.inf.in | 1 + 6 files changed, 138 insertions(+), 0 deletions(-) diff --git a/dlls/mstask/Makefile.in b/dlls/mstask/Makefile.in index 2202e22..ae6a99f 100644 --- a/dlls/mstask/Makefile.in +++ b/dlls/mstask/Makefile.in @@ -10,6 +10,8 @@ C_SRCS = \ mstask_main.c \ task_scheduler.c +RC_SRCS = rsrc.rc + IDL_I_SRCS = mstask_local.idl @MAKE_DLL_RULES@ diff --git a/dlls/mstask/mstask.inf b/dlls/mstask/mstask.inf new file mode 100644 index 0000000..1056093 --- /dev/null +++ b/dlls/mstask/mstask.inf @@ -0,0 +1,16 @@ +[version] +Signature="$CHICAGO$" + +[RegisterDll] +AddReg=Classes.Reg + +[UnregisterDll] +DelReg=Classes.Reg + +[Classes.Reg] +HKCR,"CLSID\%CLSID_CTaskScheduler%",,,"CTaskScheduler" +HKCR,"CLSID\%CLSID_CTaskScheduler%\InProcServer32",,,"mstask.dll" +HKCR,"CLSID\%CLSID_CTaskScheduler%\InProcServer32","ThreadingModel",,"Both" +HKCR,"CLSID\%CLSID_CTask%",,,"CTask" +HKCR,"CLSID\%CLSID_CTask%\InProcServer32",,,"mstask.dll" +HKCR,"CLSID\%CLSID_CTask%\InProcServer32","ThreadingModel",,"Both" diff --git a/dlls/mstask/mstask.spec b/dlls/mstask/mstask.spec index 24d5af5..5c4f208 100644 --- a/dlls/mstask/mstask.spec +++ b/dlls/mstask/mstask.spec @@ -24,3 +24,4 @@ @ stub _SASetAccountInformation@20 @ stub _SASetNSAccountInformation@12 @ stub _SetNetScheduleAccountInformation@12 +@ stdcall -private DllRegisterServer() diff --git a/dlls/mstask/mstask_main.c b/dlls/mstask/mstask_main.c index 61e0a99..53c3449 100644 --- a/dlls/mstask/mstask_main.c +++ b/dlls/mstask/mstask_main.c @@ -16,11 +16,18 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include <stdio.h> + #include "mstask_private.h" +#include "winreg.h" +#include "advpub.h" + #include "wine/debug.h" + WINE_DEFAULT_DEBUG_CHANNEL(mstask); +static HINSTANCE hInst; LONG dll_ref = 0; BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) @@ -33,6 +40,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) return FALSE; case DLL_PROCESS_ATTACH: DisableThreadLibraryCalls(hinstDLL); + hInst = hinstDLL; break; case DLL_PROCESS_DETACH: break; @@ -57,3 +65,93 @@ HRESULT WINAPI DllCanUnloadNow(void) { return dll_ref != 0 ? S_FALSE : S_OK; } + +static inline char *mstask_strdup(const char *s) +{ + size_t n = strlen(s) + 1; + char *d = HeapAlloc(GetProcessHeap(), 0, n); + return d ? memcpy(d, s, n) : NULL; +} + +static HRESULT init_register_strtable(STRTABLEA *strtable) +{ +#define CLSID_EXPANSION_ENTRY(id) { "CLSID_" #id, &CLSID_ ## id } + static const struct + { + const char *name; + const CLSID *clsid; + } + expns[] = + { + CLSID_EXPANSION_ENTRY(CTaskScheduler), + CLSID_EXPANSION_ENTRY(CTask) + }; +#undef CLSID_EXPANSION_ENTRY + static STRENTRYA pse[sizeof expns / sizeof expns[0]]; + int i; + + strtable->cEntries = sizeof pse / sizeof pse[0]; + strtable->pse = pse; + for (i = 0; i < strtable->cEntries; i++) + { + static const char dummy_sample[] = + "{12345678-1234-1234-1234-123456789012}"; + const CLSID *clsid = expns[i].clsid; + pse[i].pszName = mstask_strdup(expns[i].name); + pse[i].pszValue = HeapAlloc(GetProcessHeap(), 0, sizeof dummy_sample); + if (!pse[i].pszName || !pse[i].pszValue) + return E_OUTOFMEMORY; + sprintf(pse[i].pszValue, + "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}", + clsid->Data1, clsid->Data2, clsid->Data3, clsid->Data4[0], + clsid->Data4[1], clsid->Data4[2], clsid->Data4[3], + clsid->Data4[4], clsid->Data4[5], clsid->Data4[6], + clsid->Data4[7]); + } + + return S_OK; +} + +static void cleanup_register_strtable(STRTABLEA *strtable) +{ + int i; + for (i = 0; i < strtable->cEntries; i++) + { + HeapFree(GetProcessHeap(), 0, strtable->pse[i].pszName); + HeapFree(GetProcessHeap(), 0, strtable->pse[i].pszValue); + if (!strtable->pse[i].pszName || !strtable->pse[i].pszValue) + return; + } +} + +static HRESULT register_mstask(BOOL do_register) +{ + HRESULT hr; + STRTABLEA strtable; + HMODULE hAdvpack; + HRESULT (WINAPI *pRegInstall)(HMODULE hm, + LPCSTR pszSection, const STRTABLEA* pstTable); + static const WCHAR wszAdvpack[] = + {'a','d','v','p','a','c','k','.','d','l','l',0}; + + TRACE("(%x)\n", do_register); + + hAdvpack = LoadLibraryW(wszAdvpack); + pRegInstall = (void *)GetProcAddress(hAdvpack, "RegInstall"); + + hr = init_register_strtable(&strtable); + if (SUCCEEDED(hr)) + hr = pRegInstall(hInst, do_register ? "RegisterDll" : "UnregisterDll", + &strtable); + cleanup_register_strtable(&strtable); + + if (FAILED(hr)) + WINE_ERR("RegInstall failed: %08x\n", hr); + + return hr; +} + +HRESULT WINAPI DllRegisterServer(void) +{ + return register_mstask(TRUE); +} diff --git a/dlls/mstask/rsrc.rc b/dlls/mstask/rsrc.rc new file mode 100644 index 0000000..9915e02 --- /dev/null +++ b/dlls/mstask/rsrc.rc @@ -0,0 +1,20 @@ +/* + * Copyright 2008 Google (Roy Shea) + * + * 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 + */ + +/* @makedep: mstask.inf */ +REGINST REGINST mstask.inf diff --git a/tools/wine.inf.in b/tools/wine.inf.in index e8e4df6..0d116df 100644 --- a/tools/wine.inf.in +++ b/tools/wine.inf.in @@ -2213,6 +2213,7 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G" 11,,msi.dll,1 11,,msiexec.exe,1 11,,msimtf.dll,1 +11,,mstask.dll,1 11,,msxml3.dll,1 11,,objsel.dll,1 11,,qcap.dll,1
1
0
0
0
David Adam : d3dx8: Only the points in the positive ray are taken in account in D3DXSphereBoundProbe .
by Alexandre Julliard
29 Jul '08
29 Jul '08
Module: wine Branch: master Commit: 170023e30d0b8e7e636524f22405508a8e6b1c95 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=170023e30d0b8e7e636524f22…
Author: David Adam <david.adam.cnrs(a)gmail.com> Date: Mon Jul 28 18:32:55 2008 +0200 d3dx8: Only the points in the positive ray are taken in account in D3DXSphereBoundProbe. --- dlls/d3dx8/mesh.c | 5 +++-- dlls/d3dx8/tests/mesh.c | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/d3dx8/mesh.c b/dlls/d3dx8/mesh.c index db490d4..6846d5d 100644 --- a/dlls/d3dx8/mesh.c +++ b/dlls/d3dx8/mesh.c @@ -27,13 +27,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3dx); BOOL WINAPI D3DXSphereBoundProbe(CONST D3DXVECTOR3 *pcenter, FLOAT radius, CONST D3DXVECTOR3 *prayposition, CONST D3DXVECTOR3 *praydirection) { D3DXVECTOR3 difference; - FLOAT a, b, c; + FLOAT a, b, c, d; a = D3DXVec3LengthSq(praydirection); if (!D3DXVec3Subtract(&difference, prayposition, pcenter)) return FALSE; b = D3DXVec3Dot(&difference, praydirection); c = D3DXVec3LengthSq(&difference) - radius * radius; + d = b * b - a * c; - if ( b * b - a * c <= 0.0f ) return FALSE; + if ( ( d <= 0.0f ) || ( sqrt(d) <= b ) ) return FALSE; return TRUE; } diff --git a/dlls/d3dx8/tests/mesh.c b/dlls/d3dx8/tests/mesh.c index 8f07b07..5a5eb67 100644 --- a/dlls/d3dx8/tests/mesh.c +++ b/dlls/d3dx8/tests/mesh.c @@ -36,6 +36,10 @@ static void D3DXBoundProbeTest(void) result = D3DXSphereBoundProbe(¢er, radius, &rayposition, &raydirection); ok(result == TRUE, "expected TRUE, received FALSE\n"); + rayposition.x = 45.0f; rayposition.y = -75.0f; rayposition.z = 49.0f; + result = D3DXSphereBoundProbe(¢er, radius, &rayposition, &raydirection); + ok(result == FALSE, "expected FALSE, received TRUE\n"); + rayposition.x = 5.0f; rayposition.y = 7.0f; rayposition.z = 9.0f; result = D3DXSphereBoundProbe(¢er, radius, &rayposition, &raydirection); ok(result == FALSE, "expected FALSE, received TRUE\n");
1
0
0
0
Juan Lang : crypt32: Add test showing only file header is checked for cabinet files.
by Alexandre Julliard
29 Jul '08
29 Jul '08
Module: wine Branch: master Commit: 278f806ab7250338b30fa5ad098d9a7bac7def6d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=278f806ab7250338b30fa5ad0…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Mon Jul 28 09:47:38 2008 -0700 crypt32: Add test showing only file header is checked for cabinet files. --- dlls/crypt32/sip.c | 2 +- dlls/crypt32/tests/sip.c | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletions(-) diff --git a/dlls/crypt32/sip.c b/dlls/crypt32/sip.c index f8e8be4..171165a 100644 --- a/dlls/crypt32/sip.c +++ b/dlls/crypt32/sip.c @@ -332,7 +332,7 @@ BOOL WINAPI CryptSIPRetrieveSubjectGuid bRet = TRUE; goto cleanup1; } - /* Quick-n-dirty check for a cab file. FIXME: use FDIIsCabinet instead? */ + /* Quick-n-dirty check for a cab file. */ if (!memcmp(pMapped, cabHdr, sizeof(cabHdr))) { *pgSubject = cabGUID; diff --git a/dlls/crypt32/tests/sip.c b/dlls/crypt32/tests/sip.c index d5d2a50..80a1323 100644 --- a/dlls/crypt32/tests/sip.c +++ b/dlls/crypt32/tests/sip.c @@ -266,6 +266,24 @@ static void test_SIPRetrieveSubjectGUID(void) /* Clean up */ DeleteFileA(tempfile); + /* Create a file with just the .cab header 'MSCF' */ + SetLastError(0xdeadbeef); + file = CreateFileA(tempfile, GENERIC_WRITE, 0, NULL, CREATE_NEW, 0, NULL); + ok(file != INVALID_HANDLE_VALUE, "failed with %u\n", GetLastError()); + WriteFile(file, cabFileData, 4, &written, NULL); + CloseHandle(file); + + SetLastError(0xdeadbeef); + memset(&subject, 1, sizeof(GUID)); + ret = CryptSIPRetrieveSubjectGuid(tempfileW, NULL, &subject); + ok( ret, "CryptSIPRetrieveSubjectGuid failed: %d (0x%08x)\n", + GetLastError(), GetLastError() ); + ok ( !memcmp(&subject, &cabGUID, sizeof(GUID)), + "Expected GUID %s for cabinet file, not %s\n", show_guid(&cabGUID, guid1), show_guid(&subject, guid2)); + + /* Clean up */ + DeleteFileA(tempfile); + /* Create a .cab file */ SetLastError(0xdeadbeef); file = CreateFileA(tempfile, GENERIC_WRITE, 0, NULL, CREATE_NEW, 0, NULL);
1
0
0
0
Juan Lang : rsaenh: Test and correct the maximum allowable salt length.
by Alexandre Julliard
29 Jul '08
29 Jul '08
Module: wine Branch: master Commit: 408f3d96c5bbc84e5a1e32255364ed9fc78b1bad URL:
http://source.winehq.org/git/wine.git/?a=commit;h=408f3d96c5bbc84e5a1e32255…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Mon Jul 28 20:15:37 2008 -0700 rsaenh: Test and correct the maximum allowable salt length. --- dlls/rsaenh/rsaenh.c | 6 +++--- dlls/rsaenh/tests/rsaenh.c | 30 ++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/dlls/rsaenh/rsaenh.c b/dlls/rsaenh/rsaenh.c index f957a1f..e681d69 100644 --- a/dlls/rsaenh/rsaenh.c +++ b/dlls/rsaenh/rsaenh.c @@ -2826,10 +2826,10 @@ BOOL WINAPI RSAENH_CPSetKeyParam(HCRYPTPROV hProv, HCRYPTKEY hKey, DWORD dwParam { CRYPT_INTEGER_BLOB *blob = (CRYPT_INTEGER_BLOB *)pbData; - /* salt length can't be greater than 128 bits = 16 bytes */ - if (blob->cbData > 16) + /* salt length can't be greater than 184 bits = 24 bytes */ + if (blob->cbData > 24) { - SetLastError(ERROR_INVALID_PARAMETER); + SetLastError(NTE_BAD_DATA); return FALSE; } memcpy(pCryptKey->abKeyValue + pCryptKey->dwKeyLen, blob->pbData, diff --git a/dlls/rsaenh/tests/rsaenh.c b/dlls/rsaenh/tests/rsaenh.c index 479b428..4f25831 100644 --- a/dlls/rsaenh/tests/rsaenh.c +++ b/dlls/rsaenh/tests/rsaenh.c @@ -749,6 +749,8 @@ static void test_rc2(void) if (!result) { ok(GetLastError()==NTE_BAD_ALGID, "%08x\n", GetLastError()); } else { + CRYPT_INTEGER_BLOB salt; + result = CryptHashData(hHash, (BYTE*)pbData, sizeof(pbData), 0); ok(result, "%08x\n", GetLastError()); @@ -812,6 +814,19 @@ static void test_rc2(void) result = CryptDecrypt(hKey, (HCRYPTHASH)NULL, TRUE, 0, pbData, &dwDataLen); ok(result, "%08x\n", GetLastError()); + /* What sizes salt can I set? */ + salt.pbData = pbData; + for (i=0; i<24; i++) + { + salt.cbData = i; + result = CryptSetKeyParam(hKey, KP_SALT_EX, (BYTE *)&salt, 0); + ok(result, "setting salt failed for size %d: %08x\n", i, GetLastError()); + } + salt.cbData = 25; + SetLastError(0xdeadbeef); + result = CryptSetKeyParam(hKey, KP_SALT_EX, (BYTE *)&salt, 0); + ok(!result && GetLastError() == NTE_BAD_DATA, "%08x\n", GetLastError()); + result = CryptDestroyKey(hKey); ok(result, "%08x\n", GetLastError()); } @@ -901,6 +916,8 @@ static void test_rc4(void) /* rsaenh compiled without OpenSSL */ ok(GetLastError() == NTE_BAD_ALGID, "%08x\n", GetLastError()); } else { + CRYPT_INTEGER_BLOB salt; + result = CryptHashData(hHash, (BYTE*)pbData, sizeof(pbData), 0); ok(result, "%08x\n", GetLastError()); @@ -949,6 +966,19 @@ static void test_rc4(void) result = CryptDecrypt(hKey, (HCRYPTHASH)NULL, TRUE, 0, pbData, &dwDataLen); ok(result, "%08x\n", GetLastError()); + /* What sizes salt can I set? */ + salt.pbData = pbData; + for (i=0; i<24; i++) + { + salt.cbData = i; + result = CryptSetKeyParam(hKey, KP_SALT_EX, (BYTE *)&salt, 0); + ok(result, "setting salt failed for size %d: %08x\n", i, GetLastError()); + } + salt.cbData = 25; + SetLastError(0xdeadbeef); + result = CryptSetKeyParam(hKey, KP_SALT_EX, (BYTE *)&salt, 0); + ok(!result && GetLastError() == NTE_BAD_DATA, "%08x\n", GetLastError()); + result = CryptDestroyKey(hKey); ok(result, "%08x\n", GetLastError()); }
1
0
0
0
James Hawkins : msi: Directly register the typelib if it' s not embedded in a PE module.
by Alexandre Julliard
29 Jul '08
29 Jul '08
Module: wine Branch: master Commit: 469e4a5c944e910fc8b36aba96ad2de09c66f756 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=469e4a5c944e910fc8b36aba9…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Mon Jul 28 22:19:47 2008 -0500 msi: Directly register the typelib if it's not embedded in a PE module. --- dlls/msi/action.c | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 68dd6f3..6662945 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -2994,7 +2994,10 @@ static UINT ITERATE_RegisterTypeLibraries(MSIRECORD *row, LPVOID param) MSICOMPONENT *comp; MSIFILE *file; typelib_struct tl_struct; + ITypeLib *tlib; HMODULE module; + HRESULT hr; + static const WCHAR szTYPELIB[] = {'T','Y','P','E','L','I','B',0}; component = MSI_RecordGetString(row,3); @@ -3063,7 +3066,16 @@ static UINT ITERATE_RegisterTypeLibraries(MSIRECORD *row, LPVOID param) msi_free(tl_struct.source); } else - ERR("Could not load file! %s\n", debugstr_w(file->TargetPath)); + { + hr = LoadTypeLibEx(file->TargetPath, REGKIND_REGISTER, &tlib); + if (FAILED(hr)) + { + ERR("Failed to load type library: %08x\n", hr); + return ERROR_FUNCTION_FAILED; + } + + ITypeLib_Release(tlib); + } return ERROR_SUCCESS; }
1
0
0
0
James Hawkins : msi: Add tests for MsiConfigureProductEx.
by Alexandre Julliard
29 Jul '08
29 Jul '08
Module: wine Branch: master Commit: dfec94c15786874cda8b421c4010f1414e6c256d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dfec94c15786874cda8b421c4…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Mon Jul 28 18:50:31 2008 -0500 msi: Add tests for MsiConfigureProductEx. --- dlls/msi/tests/install.c | 156 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 156 insertions(+), 0 deletions(-) diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index 4748831..6e91adc 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -705,6 +705,27 @@ static const CHAR sp_directory_dat[] = "Directory\tDirectory_Parent\tDefaultDir\ "ONEDIR\tMSITESTDIR\t.:shortone|longone\n" "TWODIR\tONEDIR\t.:shorttwo|longtwo"; +static const CHAR mcp_component_dat[] = "Component\tComponentId\tDirectory_\tAttributes\tCondition\tKeyPath\n" + "s72\tS38\ts72\ti2\tS255\tS72\n" + "Component\tComponent\n" + "hydrogen\t{C844BD1E-1907-4C00-8BC9-150BD70DF0A1}\tMSITESTDIR\t2\t\thydrogen\n" + "helium\t{5AD3C142-CEF8-490D-B569-784D80670685}\tMSITESTDIR\t2\t\thelium\n" + "lithium\t{4AF28FFC-71C7-4307-BDE4-B77C5338F56F}\tMSITESTDIR\t2\tPROPVAR=42\tlithium\n"; + +static const CHAR mcp_feature_dat[] = "Feature\tFeature_Parent\tTitle\tDescription\tDisplay\tLevel\tDirectory_\tAttributes\n" + "s38\tS38\tL64\tL255\tI2\ti2\tS72\ti2\n" + "Feature\tFeature\n" + "hydroxyl\t\thydroxyl\thydroxyl\t2\t1\tTARGETDIR\t0\n" + "heliox\t\theliox\theliox\t2\t5\tTARGETDIR\t0\n" + "lithia\t\tlithia\tlithia\t2\t10\tTARGETDIR\t0"; + +static const CHAR mcp_feature_comp_dat[] = "Feature_\tComponent_\n" + "s38\ts72\n" + "FeatureComponents\tFeature_\tComponent_\n" + "hydroxyl\thydrogen\n" + "heliox\thelium\n" + "lithia\tlithium"; + typedef struct _msi_table { const CHAR *filename; @@ -1067,6 +1088,18 @@ static const msi_table sp_tables[] = ADD_TABLE(property), }; +static const msi_table mcp_tables[] = +{ + ADD_TABLE(mcp_component), + ADD_TABLE(directory), + ADD_TABLE(mcp_feature), + ADD_TABLE(mcp_feature_comp), + ADD_TABLE(rem_file), + ADD_TABLE(rem_install_exec_seq), + ADD_TABLE(rof_media), + ADD_TABLE(property), +}; + /* cabinet definitions */ /* make the max size large so there is only one cab file */ @@ -4951,6 +4984,128 @@ static void test_sourcepath(void) DeleteFileA(msifile); } +static void test_MsiConfigureProductEx(void) +{ + UINT r; + + CreateDirectoryA("msitest", NULL); + create_file("msitest\\hydrogen", 500); + create_file("msitest\\helium", 500); + create_file("msitest\\lithium", 500); + + create_database(msifile, mcp_tables, sizeof(mcp_tables) / sizeof(msi_table)); + + MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); + + /* NULL szProduct */ + r = MsiConfigureProductExA(NULL, INSTALLLEVEL_DEFAULT, + INSTALLSTATE_DEFAULT, "PROPVAR=42"); + ok(r == ERROR_INVALID_PARAMETER, + "Expected ERROR_INVALID_PARAMETER, got %d\n", r); + + /* empty szProduct */ + r = MsiConfigureProductExA("", INSTALLLEVEL_DEFAULT, + INSTALLSTATE_DEFAULT, "PROPVAR=42"); + ok(r == ERROR_INVALID_PARAMETER, + "Expected ERROR_INVALID_PARAMETER, got %d\n", r); + + /* garbage szProduct */ + r = MsiConfigureProductExA("garbage", INSTALLLEVEL_DEFAULT, + INSTALLSTATE_DEFAULT, "PROPVAR=42"); + ok(r == ERROR_INVALID_PARAMETER, + "Expected ERROR_INVALID_PARAMETER, got %d\n", r); + + /* guid without brackets */ + r = MsiConfigureProductExA("6700E8CF-95AB-4D9C-BC2C-15840DEA7A5D", + INSTALLLEVEL_DEFAULT, INSTALLSTATE_DEFAULT, + "PROPVAR=42"); + ok(r == ERROR_INVALID_PARAMETER, + "Expected ERROR_INVALID_PARAMETER, got %d\n", r); + + /* guid with brackets */ + r = MsiConfigureProductExA("{6700E8CF-95AB-4D9C-BC2C-15840DEA7A5D}", + INSTALLLEVEL_DEFAULT, INSTALLSTATE_DEFAULT, + "PROPVAR=42"); + ok(r == ERROR_UNKNOWN_PRODUCT, + "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); + + /* same length as guid, but random */ + r = MsiConfigureProductExA("A938G02JF-2NF3N93-VN3-2NNF-3KGKALDNF93", + INSTALLLEVEL_DEFAULT, INSTALLSTATE_DEFAULT, + "PROPVAR=42"); + ok(r == ERROR_UNKNOWN_PRODUCT, + "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); + + /* product not installed yet */ + r = MsiConfigureProductExA("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", + INSTALLLEVEL_DEFAULT, INSTALLSTATE_DEFAULT, + "PROPVAR=42"); + ok(r == ERROR_UNKNOWN_PRODUCT, + "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r); + + /* install the product, per-user unmanaged */ + r = MsiInstallProductA(msifile, "INSTALLLEVEL=10 PROPVAR=42"); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + ok(pf_exists("msitest\\hydrogen"), "File not installed\n"); + ok(pf_exists("msitest\\helium"), "File not installed\n"); + ok(pf_exists("msitest\\lithium"), "File not installed\n"); + ok(pf_exists("msitest"), "File not installed\n"); + + /* product is installed per-user managed, remove it */ + r = MsiConfigureProductExA("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", + INSTALLLEVEL_DEFAULT, INSTALLSTATE_ABSENT, + "PROPVAR=42"); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + todo_wine + { + ok(!delete_pf("msitest\\hydrogen", TRUE), "File not removed\n"); + ok(!delete_pf("msitest\\helium", TRUE), "File not removed\n"); + ok(!delete_pf("msitest\\lithium", TRUE), "File not removed\n"); + ok(!delete_pf("msitest", FALSE), "File not removed\n"); + } + + /* product has been removed */ + r = MsiConfigureProductExA("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", + INSTALLLEVEL_DEFAULT, INSTALLSTATE_DEFAULT, + "PROPVAR=42"); + ok(r == ERROR_UNKNOWN_PRODUCT, + "Expected ERROR_UNKNOWN_PRODUCT, got %u\n", r); + + /* install the product, machine */ + r = MsiInstallProductA(msifile, "ALLUSERS=1 INSTALLLEVEL=10 PROPVAR=42"); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); + ok(pf_exists("msitest\\hydrogen"), "File not installed\n"); + ok(pf_exists("msitest\\helium"), "File not installed\n"); + ok(pf_exists("msitest\\lithium"), "File not installed\n"); + ok(pf_exists("msitest"), "File not installed\n"); + + /* product is installed machine, remove it */ + r = MsiConfigureProductExA("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", + INSTALLLEVEL_DEFAULT, INSTALLSTATE_ABSENT, + "PROPVAR=42"); + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + todo_wine + { + ok(!delete_pf("msitest\\hydrogen", TRUE), "File not removed\n"); + ok(!delete_pf("msitest\\helium", TRUE), "File not removed\n"); + ok(!delete_pf("msitest\\lithium", TRUE), "File not removed\n"); + ok(!delete_pf("msitest", FALSE), "File not removed\n"); + } + + /* product has been removed */ + r = MsiConfigureProductExA("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", + INSTALLLEVEL_DEFAULT, INSTALLSTATE_DEFAULT, + "PROPVAR=42"); + ok(r == ERROR_UNKNOWN_PRODUCT, + "Expected ERROR_UNKNOWN_PRODUCT, got %u\n", r); + + DeleteFileA(msifile); + DeleteFileA("msitest\\hydrogen"); + DeleteFileA("msitest\\helium"); + DeleteFileA("msitest\\lithium"); + RemoveDirectoryA("msitest"); +} + START_TEST(install) { DWORD len; @@ -5003,6 +5158,7 @@ START_TEST(install) test_customaction51(); test_installstate(); test_sourcepath(); + test_MsiConfigureProductEx(); SetCurrentDirectoryA(prev_path); }
1
0
0
0
James Hawkins : msi: Set the ALLUSERS property for the machine context.
by Alexandre Julliard
29 Jul '08
29 Jul '08
Module: wine Branch: master Commit: cbf32ff28a29fcaaf74064eee6bbc24bcd58045a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cbf32ff28a29fcaaf74064eee…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Mon Jul 28 18:49:47 2008 -0500 msi: Set the ALLUSERS property for the machine context. --- dlls/msi/msi.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c index c7b111b..359698a 100644 --- a/dlls/msi/msi.c +++ b/dlls/msi/msi.c @@ -379,6 +379,8 @@ UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel, ' ','I','n','s','t','a','l','l','e','d','=','1',0}; static const WCHAR szRemoveAll[] = { ' ','R','E','M','O','V','E','=','A','L','L',0}; + static const WCHAR szMachine[] = { + ' ','A','L','L','U','S','E','R','S','=','1',0}; TRACE("%s %d %d %s\n",debugstr_w(szProduct), iInstallLevel, eInstallState, debugstr_w(szCommandLine)); @@ -421,6 +423,9 @@ UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel, if (eInstallState == INSTALLSTATE_ABSENT) sz += lstrlenW(szRemoveAll); + if (context == MSIINSTALLCONTEXT_MACHINE) + sz += lstrlenW(szMachine); + commandline = msi_alloc(sz * sizeof(WCHAR)); if (!commandline) { @@ -438,6 +443,9 @@ UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel, if (eInstallState == INSTALLSTATE_ABSENT) lstrcatW(commandline, szRemoveAll); + if (context == MSIINSTALLCONTEXT_MACHINE) + lstrcatW(commandline, szMachine); + r = MSI_InstallPackage( package, sourcepath, commandline ); msi_free(commandline);
1
0
0
0
James Hawkins : msi: Handle the INSTALLSTATE_ABSENT state in MsiConfigureProductEx.
by Alexandre Julliard
29 Jul '08
29 Jul '08
Module: wine Branch: master Commit: 0b240c7aa3c2a62c53087adde6cbf306cfcd8684 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0b240c7aa3c2a62c53087adde…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Mon Jul 28 18:48:56 2008 -0500 msi: Handle the INSTALLSTATE_ABSENT state in MsiConfigureProductEx. --- dlls/msi/msi.c | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c index a2da999..c7b111b 100644 --- a/dlls/msi/msi.c +++ b/dlls/msi/msi.c @@ -373,9 +373,12 @@ UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel, DWORD sz; WCHAR sourcepath[MAX_PATH]; WCHAR filename[MAX_PATH]; + LPWSTR commandline; + static const WCHAR szInstalled[] = { ' ','I','n','s','t','a','l','l','e','d','=','1',0}; - LPWSTR commandline; + static const WCHAR szRemoveAll[] = { + ' ','R','E','M','O','V','E','=','A','L','L',0}; TRACE("%s %d %d %s\n",debugstr_w(szProduct), iInstallLevel, eInstallState, debugstr_w(szCommandLine)); @@ -383,10 +386,10 @@ UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel, if (!szProduct || lstrlenW(szProduct) != GUID_SIZE - 1) return ERROR_INVALID_PARAMETER; - if (eInstallState != INSTALLSTATE_LOCAL && - eInstallState != INSTALLSTATE_DEFAULT) + if (eInstallState == INSTALLSTATE_ADVERTISED || + eInstallState == INSTALLSTATE_SOURCE) { - FIXME("Not implemented for anything other than local installs\n"); + FIXME("State %d not implemented\n", eInstallState); return ERROR_CALL_NOT_IMPLEMENTED; } @@ -415,6 +418,9 @@ UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel, if (szCommandLine) sz += lstrlenW(szCommandLine); + if (eInstallState == INSTALLSTATE_ABSENT) + sz += lstrlenW(szRemoveAll); + commandline = msi_alloc(sz * sizeof(WCHAR)); if (!commandline) { @@ -429,6 +435,9 @@ UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel, if (MsiQueryProductStateW(szProduct) != INSTALLSTATE_UNKNOWN) lstrcatW(commandline,szInstalled); + if (eInstallState == INSTALLSTATE_ABSENT) + lstrcatW(commandline, szRemoveAll); + r = MSI_InstallPackage( package, sourcepath, commandline ); msi_free(commandline);
1
0
0
0
James Hawkins : msi: Properly locate the published product in MsiConfigureProductEx.
by Alexandre Julliard
29 Jul '08
29 Jul '08
Module: wine Branch: master Commit: 9518d7f8c70f71f5e1bb22be5b76971ca604fb65 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9518d7f8c70f71f5e1bb22be5…
Author: James Hawkins <jhawkins(a)codeweavers.com> Date: Mon Jul 28 18:48:13 2008 -0500 msi: Properly locate the published product in MsiConfigureProductEx. --- dlls/msi/msi.c | 53 +++++++++++++++++++++++++++++++++++++---------------- 1 files changed, 37 insertions(+), 16 deletions(-) diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c index f3d6090..a2da999 100644 --- a/dlls/msi/msi.c +++ b/dlls/msi/msi.c @@ -45,6 +45,28 @@ WINE_DEFAULT_DEBUG_CHANNEL(msi); static const WCHAR installerW[] = {'\\','I','n','s','t','a','l','l','e','r',0}; +/* FIXME: user-managed installs not located */ +static UINT msi_locate_product(LPCWSTR szProduct, MSIINSTALLCONTEXT *context) +{ + HKEY hkey = NULL; + UINT r; + + *context = MSIINSTALLCONTEXT_NONE; + + r = MSIREG_OpenLocalClassesProductKey(szProduct, &hkey, FALSE); + if (r == ERROR_SUCCESS) + *context = MSIINSTALLCONTEXT_MACHINE; + else + { + r = MSIREG_OpenUserProductsKey(szProduct, &hkey, FALSE); + if (r == ERROR_SUCCESS) + *context = MSIINSTALLCONTEXT_USERUNMANAGED; + } + + RegCloseKey(hkey); + return ERROR_SUCCESS; +} + UINT WINAPI MsiOpenProductA(LPCSTR szProduct, MSIHANDLE *phProduct) { UINT r; @@ -346,6 +368,7 @@ UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel, INSTALLSTATE eInstallState, LPCWSTR szCommandLine) { MSIPACKAGE* package = NULL; + MSIINSTALLCONTEXT context; UINT r; DWORD sz; WCHAR sourcepath[MAX_PATH]; @@ -367,25 +390,23 @@ UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel, return ERROR_CALL_NOT_IMPLEMENTED; } - sz = sizeof(sourcepath); - MsiSourceListGetInfoW(szProduct, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_LASTUSEDSOURCEW, sourcepath, - &sz); + r = msi_locate_product(szProduct, &context); + if (r != ERROR_SUCCESS) + return r; - sz = sizeof(filename); - MsiSourceListGetInfoW(szProduct, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, - MSICODE_PRODUCT, INSTALLPROPERTY_PACKAGENAMEW, filename, &sz); + if (context == MSIINSTALLCONTEXT_NONE) + return ERROR_UNKNOWN_PRODUCT; - lstrcatW(sourcepath,filename); + sz = sizeof(sourcepath); + MsiSourceListGetInfoW(szProduct, NULL, context, MSICODE_PRODUCT, + INSTALLPROPERTY_LASTUSEDSOURCEW, sourcepath, &sz); - /* - * ok 1, we need to find the msi file for this product. - * 2, find the source dir for the files - * 3, do the configure/install. - * 4, cleanupany runonce entry. - */ + sz = sizeof(filename); + MsiSourceListGetInfoW(szProduct, NULL, context, MSICODE_PRODUCT, + INSTALLPROPERTY_PACKAGENAMEW, filename, &sz); - r = MSI_OpenProductW( szProduct, &package ); + lstrcatW(sourcepath, filename); + r = MSI_OpenPackageW(sourcepath, &package); if (r != ERROR_SUCCESS) return r; @@ -395,7 +416,7 @@ UINT WINAPI MsiConfigureProductExW(LPCWSTR szProduct, int iInstallLevel, sz += lstrlenW(szCommandLine); commandline = msi_alloc(sz * sizeof(WCHAR)); - if (!commandline ) + if (!commandline) { r = ERROR_OUTOFMEMORY; goto end;
1
0
0
0
← Newer
1
...
5
6
7
8
9
10
11
...
112
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
Results per page:
10
25
50
100
200