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
October 2020
----- 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
1 participants
796 discussions
Start a n
N
ew thread
Hans Leidekker : dssenh: Implement CPGetHashParam.
by Alexandre Julliard
09 Oct '20
09 Oct '20
Module: wine Branch: master Commit: 8ff5c52b14388e2d84f67a3a6c6f17b89d50100d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8ff5c52b14388e2d84f67a3a…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Oct 9 12:45:59 2020 +0200 dssenh: Implement CPGetHashParam. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dssenh/main.c | 40 +++++++++++++++++++++++++++++++++++++++- dlls/dssenh/tests/dssenh.c | 5 ----- 2 files changed, 39 insertions(+), 6 deletions(-) diff --git a/dlls/dssenh/main.c b/dlls/dssenh/main.c index 44912ed498..a3a4e1b2c3 100644 --- a/dlls/dssenh/main.c +++ b/dlls/dssenh/main.c @@ -431,7 +431,45 @@ BOOL WINAPI CPHashData( HCRYPTPROV hprov, HCRYPTHASH hhash, const BYTE *data, DW BOOL WINAPI CPGetHashParam( HCRYPTPROV hprov, HCRYPTHASH hhash, DWORD param, BYTE *data, DWORD *len, DWORD flags ) { - return FALSE; + struct hash *hash = (struct hash *)hhash; + + TRACE( "%p, %p, %08x, %p, %p, %08x\n", (void *)hprov, (void *)hhash, param, data, len, flags ); + + if (hash->magic != MAGIC_HASH) return FALSE; + + switch (param) + { + case HP_HASHSIZE: + if (sizeof(hash->len) > *len) + { + *len = sizeof(hash->len); + SetLastError( ERROR_MORE_DATA ); + return FALSE; + } + *(DWORD *)data = hash->len; + *len = sizeof(hash->len); + return TRUE; + + case HP_HASHVAL: + if (!hash->finished) + { + if (BCryptFinishHash( hash->handle, hash->value, hash->len, 0 )) return FALSE; + hash->finished = TRUE; + } + if (hash->len > *len) + { + *len = hash->len; + SetLastError( ERROR_MORE_DATA ); + return FALSE; + } + memcpy( data, hash->value, hash->len ); + *len = hash->len; + return TRUE; + + default: + SetLastError( NTE_BAD_TYPE ); + return FALSE; + } } BOOL WINAPI CPDeriveKey( HCRYPTPROV hprov, ALG_ID algid, HCRYPTHASH hhash, DWORD flags, HCRYPTKEY *ret_key ) diff --git a/dlls/dssenh/tests/dssenh.c b/dlls/dssenh/tests/dssenh.c index cc4650b2c8..3bd546524f 100644 --- a/dlls/dssenh/tests/dssenh.c +++ b/dlls/dssenh/tests/dssenh.c @@ -453,11 +453,6 @@ static void test_hash(const struct hash_test *tests, int testLen) dataLen = sizeof(DWORD); result = CryptGetHashParam(hHash, HP_HASHSIZE, (BYTE *)&hashLen, &dataLen, 0); - if (!result) - { - skip("skipping hash tests\n"); - return; - } ok(result && (hashLen == tests[i].hashLen), "Expected %d hash len, got %d.Error: %x\n", tests[i].hashLen, hashLen, GetLastError());
1
0
0
0
Hans Leidekker : dssenh: Implement CPHashData.
by Alexandre Julliard
09 Oct '20
09 Oct '20
Module: wine Branch: master Commit: d5688169a8798790753a1578bbda22ae1345c4de URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d5688169a8798790753a1578…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Oct 9 12:45:58 2020 +0200 dssenh: Implement CPHashData. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dssenh/main.c | 10 +++++++++- dlls/dssenh/tests/dssenh.c | 24 ++++++++++++------------ 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/dlls/dssenh/main.c b/dlls/dssenh/main.c index 66f3456d78..44912ed498 100644 --- a/dlls/dssenh/main.c +++ b/dlls/dssenh/main.c @@ -1,5 +1,6 @@ /* * Copyright 2008 Maarten Lankhorst + * Copyright 2020 Hans Leidekker for CodeWeavers * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -418,7 +419,14 @@ BOOL WINAPI CPDestroyHash( HCRYPTPROV hprov, HCRYPTHASH hhash ) BOOL WINAPI CPHashData( HCRYPTPROV hprov, HCRYPTHASH hhash, const BYTE *data, DWORD len, DWORD flags ) { - return FALSE; + struct hash *hash = (struct hash *)hhash; + + TRACE("%p, %p, %p, %u, %08x\n", (void *)hprov, (void *)hhash, data, len, flags ); + + if (hash->magic != MAGIC_HASH) return FALSE; + + if (hash->finished || BCryptHashData( hash->handle, (UCHAR *)data, len, 0 )) return FALSE; + return TRUE; } BOOL WINAPI CPGetHashParam( HCRYPTPROV hprov, HCRYPTHASH hhash, DWORD param, BYTE *data, DWORD *len, DWORD flags ) diff --git a/dlls/dssenh/tests/dssenh.c b/dlls/dssenh/tests/dssenh.c index f06cdd1433..cc4650b2c8 100644 --- a/dlls/dssenh/tests/dssenh.c +++ b/dlls/dssenh/tests/dssenh.c @@ -449,15 +449,15 @@ static void test_hash(const struct hash_test *tests, int testLen) ok(result, "Expected creation of a hash.\n"); result = CryptHashData(hHash, data, dataLen, 0); + ok(result, "Expected data to be added to hash.\n"); + + dataLen = sizeof(DWORD); + result = CryptGetHashParam(hHash, HP_HASHSIZE, (BYTE *)&hashLen, &dataLen, 0); if (!result) { skip("skipping hash tests\n"); return; } - ok(result, "Expected data to be added to hash.\n"); - - dataLen = sizeof(DWORD); - result = CryptGetHashParam(hHash, HP_HASHSIZE, (BYTE *)&hashLen, &dataLen, 0); ok(result && (hashLen == tests[i].hashLen), "Expected %d hash len, got %d.Error: %x\n", tests[i].hashLen, hashLen, GetLastError()); @@ -608,15 +608,15 @@ static void test_data_encryption(const struct encrypt_test *tests, int testLen) ok(result, "Expected creation of a MD5 hash for key derivation.\n"); result = CryptHashData(hHash, (BYTE *)dataToHash, sizeof(dataToHash), 0); + ok(result, "Expected data to be added to hash for key derivation.\n"); + + /* Derive key */ + result = CryptDeriveKey(hProv, tests[i].algid, hHash, tests[i].keyLength, &pKey); if (!result) { skip("skipping encryption tests\n"); return; } - ok(result, "Expected data to be added to hash for key derivation.\n"); - - /* Derive key */ - result = CryptDeriveKey(hProv, tests[i].algid, hHash, tests[i].keyLength, &pKey); ok(result, "Expected a derived key.\n"); result = CryptDestroyHash(hHash); @@ -698,15 +698,15 @@ static void test_cipher_modes(const struct ciphermode_test *tests, int testLen) ok(result, "Expected creation of a MD5 hash for key derivation.\n"); result = CryptHashData(hHash, (BYTE *)dataToHash, sizeof(dataToHash), 0); + ok(result, "Expected data to be added to hash for key derivation.\n"); + + /* Derive a CALG_RC2 key, but could be any other encryption cipher */ + result = CryptDeriveKey(hProv, CALG_RC2, hHash, 40 << 16, &pKey); if (!result) { skip("skipping ciper modes tests\n"); return; } - ok(result, "Expected data to be added to hash for key derivation.\n"); - - /* Derive a CALG_RC2 key, but could be any other encryption cipher */ - result = CryptDeriveKey(hProv, CALG_RC2, hHash, 40 << 16, &pKey); ok(result, "Expected a derived key.\n"); result = CryptDestroyHash(hHash);
1
0
0
0
Hans Leidekker : dssenh: Implement CPCreateHash and CPDestroyHash.
by Alexandre Julliard
09 Oct '20
09 Oct '20
Module: wine Branch: master Commit: e7a79ce4266751a44234da1f657015eae17106b6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e7a79ce4266751a44234da1f…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Oct 9 12:45:57 2020 +0200 dssenh: Implement CPCreateHash and CPDestroyHash. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dssenh/main.c | 90 ++++++++++++++++++++++++++++++++++++++++++++-- dlls/dssenh/tests/dssenh.c | 18 +++++----- 2 files changed, 97 insertions(+), 11 deletions(-) diff --git a/dlls/dssenh/main.c b/dlls/dssenh/main.c index 32c31a48a8..66f3456d78 100644 --- a/dlls/dssenh/main.c +++ b/dlls/dssenh/main.c @@ -54,6 +54,17 @@ struct container char name[MAX_PATH]; }; +#define MAGIC_HASH (('H' << 24) | ('A' << 16) | ('S' << 8) | 'H') +struct hash +{ + DWORD magic; + BCRYPT_ALG_HANDLE alg_handle; + BCRYPT_HASH_HANDLE handle; + DWORD len; + UCHAR value[64]; + BOOL finished; +}; + static const char dss_path_fmt[] = "Software\\Wine\\Crypto\\DSS\\%s"; static BOOL create_container_regkey( struct container *container, REGSAM sam, HKEY *hkey ) @@ -320,14 +331,89 @@ BOOL WINAPI CPExportKey( HCRYPTPROV hprov, HCRYPTKEY hkey, HCRYPTKEY hexpkey, DW return FALSE; } +static struct hash *create_hash( ALG_ID algid ) +{ + struct hash *ret; + const WCHAR *alg; + DWORD len; + + switch (algid) + { + case CALG_MD5: + alg = BCRYPT_MD5_ALGORITHM; + len = 16; + break; + + case CALG_SHA1: + alg = BCRYPT_SHA1_ALGORITHM; + len = 20; + break; + + default: + FIXME( "unhandled algorithm %u\n", algid ); + return 0; + } + + if (!(ret = heap_alloc_zero( sizeof(*ret) ))) return 0; + + ret->magic = MAGIC_HASH; + ret->len = len; + if (BCryptOpenAlgorithmProvider( &ret->alg_handle, alg, MS_PRIMITIVE_PROVIDER, 0 )) + { + heap_free( ret ); + return 0; + } + if (BCryptCreateHash( ret->alg_handle, &ret->handle, NULL, 0, NULL, 0, 0 )) + { + BCryptCloseAlgorithmProvider( ret->alg_handle, 0 ); + heap_free( ret ); + return 0; + } + return ret; +} + BOOL WINAPI CPCreateHash( HCRYPTPROV hprov, ALG_ID algid, HCRYPTKEY hkey, DWORD flags, HCRYPTHASH *ret_hash ) { - return FALSE; + struct hash *hash; + + TRACE( "%p, %08x, %p, %08x, %p\n", (void *)hprov, algid, (void *)hkey, flags, ret_hash ); + + switch (algid) + { + case CALG_MD5: + case CALG_SHA1: + break; + + default: + FIXME( "algorithm %u not supported\n", algid ); + SetLastError( NTE_BAD_ALGID ); + return FALSE; + } + + if (!(hash = create_hash( algid ))) return FALSE; + + *ret_hash = (HCRYPTHASH)hash; + return TRUE; } BOOL WINAPI CPDestroyHash( HCRYPTPROV hprov, HCRYPTHASH hhash ) { - return FALSE; + struct hash *hash = (struct hash *)hhash; + + TRACE( "%p, %p\n", (void *)hprov, (void *)hhash); + + if (hash->magic != MAGIC_HASH) + { + SetLastError( NTE_BAD_HASH ); + return FALSE; + } + + BCryptDestroyHash( hash->handle ); + BCryptCloseAlgorithmProvider( hash->alg_handle, 0 ); + + hash->magic = 0; + heap_free( hash ); + return TRUE; } BOOL WINAPI CPHashData( HCRYPTPROV hprov, HCRYPTHASH hhash, const BYTE *data, DWORD len, DWORD flags ) diff --git a/dlls/dssenh/tests/dssenh.c b/dlls/dssenh/tests/dssenh.c index d549b985d6..f06cdd1433 100644 --- a/dlls/dssenh/tests/dssenh.c +++ b/dlls/dssenh/tests/dssenh.c @@ -446,14 +446,14 @@ static void test_hash(const struct hash_test *tests, int testLen) /* test algid hash */ result = CryptCreateHash(hProv, tests[i].algid, 0, 0, &hHash); + ok(result, "Expected creation of a hash.\n"); + + result = CryptHashData(hHash, data, dataLen, 0); if (!result) { skip("skipping hash tests\n"); return; } - ok(result, "Expected creation of a hash.\n"); - - result = CryptHashData(hHash, data, dataLen, 0); ok(result, "Expected data to be added to hash.\n"); dataLen = sizeof(DWORD); @@ -605,14 +605,14 @@ static void test_data_encryption(const struct encrypt_test *tests, int testLen) SetLastError(0xdeadbeef); result = CryptCreateHash(hProv, CALG_MD5, 0, 0, &hHash); + ok(result, "Expected creation of a MD5 hash for key derivation.\n"); + + result = CryptHashData(hHash, (BYTE *)dataToHash, sizeof(dataToHash), 0); if (!result) { skip("skipping encryption tests\n"); return; } - ok(result, "Expected creation of a MD5 hash for key derivation.\n"); - - result = CryptHashData(hHash, (BYTE *)dataToHash, sizeof(dataToHash), 0); ok(result, "Expected data to be added to hash for key derivation.\n"); /* Derive key */ @@ -695,14 +695,14 @@ static void test_cipher_modes(const struct ciphermode_test *tests, int testLen) SetLastError(0xdeadbeef); result = CryptCreateHash(hProv, CALG_MD5, 0, 0, &hHash); + ok(result, "Expected creation of a MD5 hash for key derivation.\n"); + + result = CryptHashData(hHash, (BYTE *)dataToHash, sizeof(dataToHash), 0); if (!result) { skip("skipping ciper modes tests\n"); return; } - ok(result, "Expected creation of a MD5 hash for key derivation.\n"); - - result = CryptHashData(hHash, (BYTE *)dataToHash, sizeof(dataToHash), 0); ok(result, "Expected data to be added to hash for key derivation.\n"); /* Derive a CALG_RC2 key, but could be any other encryption cipher */
1
0
0
0
Hans Leidekker : dssenh: Implement CPAcquireContext and CPReleaseContext.
by Alexandre Julliard
09 Oct '20
09 Oct '20
Module: wine Branch: master Commit: 0b8a12f39a4f0302bf0e8c670bdfd52d3b618c89 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0b8a12f39a4f0302bf0e8c67…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Fri Oct 9 12:45:56 2020 +0200 dssenh: Implement CPAcquireContext and CPReleaseContext. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dssenh/Makefile.in | 1 + dlls/dssenh/main.c | 256 ++++++++++++++++++++++++++++++++++++++++++++- dlls/dssenh/tests/dssenh.c | 42 ++++++++ 3 files changed, 297 insertions(+), 2 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=0b8a12f39a4f0302bf0e…
1
0
0
0
Nikolay Sivov : comctl32/tests: Fix loop bounds.
by Alexandre Julliard
09 Oct '20
09 Oct '20
Module: wine Branch: master Commit: c11fca37de27b6f7afc3487d99b69dd8ce422493 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c11fca37de27b6f7afc3487d…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Oct 9 13:35:18 2020 +0300 comctl32/tests: Fix loop bounds. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/tests/ipaddress.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/tests/ipaddress.c b/dlls/comctl32/tests/ipaddress.c index 2df25a5a65..5c4db5adc8 100644 --- a/dlls/comctl32/tests/ipaddress.c +++ b/dlls/comctl32/tests/ipaddress.c @@ -98,7 +98,7 @@ static void test_IPM_SETFOCUS(void) EnumChildWindows(hwnd, test_child_enum_proc, (LPARAM)&child_enum); ok(child_enum.count == 4, "Unexpected child count %u.\n", child_enum.count); - for (i = 0; i < 3; ++i) + for (i = 0; i < 4; ++i) SendMessageA(child_enum.fields[i], EM_SETSEL, -1, 0); SendMessageA(child_enum.fields[0], EM_GETSEL, (WPARAM)&from, (LPARAM)&to); @@ -130,7 +130,7 @@ static void test_WM_SETFOCUS(void) SetFocus(child_enum.fields[3]); - for (i = 0; i < 3; ++i) + for (i = 0; i < 4; ++i) SendMessageA(child_enum.fields[i], EM_SETSEL, -1, 0); SendMessageA(child_enum.fields[0], EM_GETSEL, (WPARAM)&from, (LPARAM)&to);
1
0
0
0
Nikolay Sivov : comctl32/ipaddress: Fix IPM_CLEARADDRESS return value.
by Alexandre Julliard
09 Oct '20
09 Oct '20
Module: wine Branch: master Commit: 573b3eb432fb56dd949da48275f3d0162c8424eb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=573b3eb432fb56dd949da482…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Oct 9 13:35:17 2020 +0300 comctl32/ipaddress: Fix IPM_CLEARADDRESS return value. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/comctl32/ipaddress.c | 7 ++++--- dlls/comctl32/tests/ipaddress.c | 43 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 3 deletions(-) diff --git a/dlls/comctl32/ipaddress.c b/dlls/comctl32/ipaddress.c index 32816561e3..82d47d4e57 100644 --- a/dlls/comctl32/ipaddress.c +++ b/dlls/comctl32/ipaddress.c @@ -354,7 +354,7 @@ static BOOL IPADDRESS_SetRange (IPADDRESS_INFO *infoPtr, int index, WORD range) } -static void IPADDRESS_ClearAddress (const IPADDRESS_INFO *infoPtr) +static LRESULT IPADDRESS_ClearAddress (const IPADDRESS_INFO *infoPtr) { int i; @@ -362,6 +362,8 @@ static void IPADDRESS_ClearAddress (const IPADDRESS_INFO *infoPtr) for (i = 0; i < 4; i++) SetWindowTextW (infoPtr->Part[i].EditHwnd, L""); + + return 1; } @@ -614,8 +616,7 @@ IPADDRESS_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) return 0; case IPM_CLEARADDRESS: - IPADDRESS_ClearAddress (infoPtr); - break; + return IPADDRESS_ClearAddress (infoPtr); case IPM_SETADDRESS: return IPADDRESS_SetAddress (infoPtr, (DWORD)lParam); diff --git a/dlls/comctl32/tests/ipaddress.c b/dlls/comctl32/tests/ipaddress.c index c87d0f5664..2df25a5a65 100644 --- a/dlls/comctl32/tests/ipaddress.c +++ b/dlls/comctl32/tests/ipaddress.c @@ -144,6 +144,47 @@ static void test_WM_SETFOCUS(void) DestroyWindow(hwnd); } +static void test_IPM_CLEARADDRESS(void) +{ + struct child_enum child_enum = {{ 0 }}; + char buff[16]; + int i, ret; + HWND hwnd; + + hwnd = create_ipaddress_control(); + ok(!!hwnd, "Failed to create control.\n"); + + ret = SendMessageA(hwnd, IPM_SETADDRESS, 0, MAKEIPADDRESS(0, 1, 2, 3)); + ok(ret == 1, "Unexpected return value %d.\n", ret); + + EnumChildWindows(hwnd, test_child_enum_proc, (LPARAM)&child_enum); + ok(child_enum.count == 4, "Unexpected child count %u.\n", child_enum.count); + + ret = SendMessageA(hwnd, IPM_SETADDRESS, 0, MAKEIPADDRESS(1, 2, 3, 4)); + ok(ret == 1, "Unexpected return value %d.\n", ret); + + ret = GetWindowTextA(hwnd, buff, ARRAY_SIZE(buff)); + ok(ret == 7, "Unexpected return value %d.\n", ret); + ok(!strcmp(buff, "1.2.3.4"), "Unexpected address %s.\n", buff); + + ret = SendMessageA(hwnd, IPM_CLEARADDRESS, 0, 0); + ok(ret, "Unexpected return value %d.\n", ret); + + ret = GetWindowTextA(hwnd, buff, ARRAY_SIZE(buff)); + ok(ret == 7, "Unexpected return value %d.\n", ret); + ok(!strcmp(buff, "0.0.0.0"), "Unexpected address %s.\n", buff); + + for (i = 0; i < 4; ++i) + { + buff[0] = 1; + ret = GetWindowTextA(child_enum.fields[i], buff, ARRAY_SIZE(buff)); + ok(ret == 0, "Unexpected return value %d.\n", ret); + ok(!*buff, "Unexpected field text %s.\n", buff); + } + + DestroyWindow(hwnd); +} + START_TEST(ipaddress) { ULONG_PTR cookie; @@ -152,6 +193,7 @@ START_TEST(ipaddress) test_get_set_text(); test_IPM_SETFOCUS(); test_WM_SETFOCUS(); + test_IPM_CLEARADDRESS(); if (!load_v6_module(&cookie, &ctxt)) return; @@ -159,6 +201,7 @@ START_TEST(ipaddress) test_get_set_text(); test_IPM_SETFOCUS(); test_WM_SETFOCUS(); + test_IPM_CLEARADDRESS(); unload_v6_module(cookie, ctxt); }
1
0
0
0
Alistair Leslie-Hughes : msado15: Implement _Command get/putref ActiveConnection.
by Alexandre Julliard
09 Oct '20
09 Oct '20
Module: wine Branch: master Commit: aff59389658461630206c3683d84bd754555bc30 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=aff59389658461630206c368…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Fri Oct 9 18:57:15 2020 +1100 msado15: Implement _Command get/putref ActiveConnection. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msado15/command.c | 20 ++++++++++++++++---- dlls/msado15/tests/msado15.c | 9 +++++++++ 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/dlls/msado15/command.c b/dlls/msado15/command.c index eb7b3a035e..d19108a1a2 100644 --- a/dlls/msado15/command.c +++ b/dlls/msado15/command.c @@ -35,6 +35,7 @@ struct command LONG ref; CommandTypeEnum type; BSTR text; + _Connection *connection; }; static inline struct command *impl_from_Command( _Command *iface ) @@ -80,6 +81,7 @@ static ULONG WINAPI command_Release( _Command *iface ) if (!ref) { TRACE( "destroying %p\n", command ); + if (command->connection) _Connection_Release(command->connection); heap_free( command->text ); heap_free( command ); } @@ -121,14 +123,23 @@ static HRESULT WINAPI command_get_Properties( _Command *iface, Properties **prop static HRESULT WINAPI command_get_ActiveConnection( _Command *iface, _Connection **connection ) { - FIXME( "%p, %p\n", iface, connection ); - return E_NOTIMPL; + struct command *command = impl_from_Command( iface ); + TRACE( "%p, %p\n", iface, connection ); + + *connection = command->connection; + if (command->connection) _Connection_AddRef(command->connection); + return S_OK; } static HRESULT WINAPI command_putref_ActiveConnection( _Command *iface, _Connection *connection ) { - FIXME( "%p, %p\n", iface, connection ); - return E_NOTIMPL; + struct command *command = impl_from_Command( iface ); + TRACE( "%p, %p\n", iface, connection ); + + if (command->connection) _Connection_Release(command->connection); + command->connection = connection; + if (command->connection) _Connection_AddRef(command->connection); + return S_OK; } static HRESULT WINAPI command_put_ActiveConnection( _Command *iface, VARIANT connection ) @@ -343,6 +354,7 @@ HRESULT Command_create( void **obj ) command->Command_iface.lpVtbl = &command_vtbl; command->type = adCmdUnknown; command->text = NULL; + command->connection = NULL; command->ref = 1; *obj = &command->Command_iface; diff --git a/dlls/msado15/tests/msado15.c b/dlls/msado15/tests/msado15.c index efcee58c56..378c2eb918 100644 --- a/dlls/msado15/tests/msado15.c +++ b/dlls/msado15/tests/msado15.c @@ -850,6 +850,7 @@ static void test_Command(void) Command25 *command25; CommandTypeEnum cmd_type = adCmdUnspecified; BSTR cmd_text = (BSTR)"test"; + _Connection *connection; hr = CoCreateInstance( &CLSID_Command, NULL, CLSCTX_INPROC_SERVER, &IID__Command, (void **)&command ); ok( hr == S_OK, "got %08x\n", hr ); @@ -903,6 +904,14 @@ static void test_Command(void) ok( hr == S_OK, "got %08x\n", hr ); ok( !wcscmp( L"test", cmd_text ), "got %p\n", wine_dbgstr_w( cmd_text ) ); + connection = (_Connection*)0xdeadbeef; + hr = _Command_get_ActiveConnection( command, &connection ); + ok( hr == S_OK, "got %08x\n", hr ); + ok( connection == NULL, "got %p\n", connection ); + + hr = _Command_putref_ActiveConnection( command, NULL ); + ok( hr == S_OK, "got %08x\n", hr ); + _Command_Release( command ); }
1
0
0
0
Alistair Leslie-Hughes : msado15: Implement _Connection get/put CursorLocation.
by Alexandre Julliard
09 Oct '20
09 Oct '20
Module: wine Branch: master Commit: 4a987b30e7b5b3f0934c86ddd4790762c2351f37 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4a987b30e7b5b3f0934c86dd…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Fri Oct 9 18:57:14 2020 +1100 msado15: Implement _Connection get/put CursorLocation. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msado15/connection.c | 18 ++++++++++++++---- dlls/msado15/tests/msado15.c | 17 +++++++++++++++++ 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/dlls/msado15/connection.c b/dlls/msado15/connection.c index 357834a95f..2773850236 100644 --- a/dlls/msado15/connection.c +++ b/dlls/msado15/connection.c @@ -55,6 +55,7 @@ struct connection WCHAR *datasource; WCHAR *provider; ConnectModeEnum mode; + CursorLocationEnum location; struct connection_point cp_connev; }; @@ -325,14 +326,22 @@ static HRESULT WINAPI connection_put_Attributes( _Connection *iface, LONG attr ) static HRESULT WINAPI connection_get_CursorLocation( _Connection *iface, CursorLocationEnum *cursor_loc ) { - FIXME( "%p, %p\n", iface, cursor_loc ); - return E_NOTIMPL; + struct connection *connection = impl_from_Connection( iface ); + + TRACE( "%p, %p\n", iface, cursor_loc ); + + *cursor_loc = connection->location; + return S_OK; } static HRESULT WINAPI connection_put_CursorLocation( _Connection *iface, CursorLocationEnum cursor_loc ) { - FIXME( "%p, %u\n", iface, cursor_loc ); - return E_NOTIMPL; + struct connection *connection = impl_from_Connection( iface ); + + TRACE( "%p, %u\n", iface, cursor_loc ); + + connection->location = cursor_loc; + return S_OK; } static HRESULT WINAPI connection_get_Mode( _Connection *iface, ConnectModeEnum *mode ) @@ -674,6 +683,7 @@ HRESULT Connection_create( void **obj ) connection->datasource = NULL; connection->provider = SysAllocString(L"MSDASQL"); connection->mode = adModeUnknown; + connection->location = adUseServer; connection->cp_connev.conn = connection; connection->cp_connev.riid = &DIID_ConnectionEvents; diff --git a/dlls/msado15/tests/msado15.c b/dlls/msado15/tests/msado15.c index 8e8553c3b8..efcee58c56 100644 --- a/dlls/msado15/tests/msado15.c +++ b/dlls/msado15/tests/msado15.c @@ -676,6 +676,7 @@ static void test_Connection(void) LONG state, timeout; BSTR str, str2, str3; ConnectModeEnum mode; + CursorLocationEnum location; hr = CoCreateInstance(&CLSID_Connection, NULL, CLSCTX_INPROC_SERVER, &IID__Connection, (void**)&connection); ok( hr == S_OK, "got %08x\n", hr ); @@ -719,6 +720,22 @@ if (0) /* Crashes on windows */ ok(hr == S_OK, "Failed to get state, hr 0x%08x\n", hr); ok(timeout == 300, "Unexpected timeout value %d\n", timeout); + location = 0; + hr = _Connection_get_CursorLocation(connection, &location); + ok(hr == S_OK, "Failed, hr 0x%08x\n", hr); + ok(location == adUseServer, "Unexpected location value %d\n", location); + + hr = _Connection_put_CursorLocation(connection, adUseClient); + ok(hr == S_OK, "Failed, hr 0x%08x\n", hr); + + location = 0; + hr = _Connection_get_CursorLocation(connection, &location); + ok(hr == S_OK, "Failed, hr 0x%08x\n", hr); + ok(location == adUseClient, "Unexpected location value %d\n", location); + + hr = _Connection_put_CursorLocation(connection, adUseServer); + ok(hr == S_OK, "Failed, hr 0x%08x\n", hr); + mode = 0xdeadbeef; hr = _Connection_get_Mode(connection, &mode); ok(hr == S_OK, "Failed to get state, hr 0x%08x\n", hr);
1
0
0
0
Louis Lenders : kernelbase: Return S_OK in WerSetFlags.
by Alexandre Julliard
09 Oct '20
09 Oct '20
Module: wine Branch: master Commit: 3d2add846cc69f2b218352d6808a58998540d85f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3d2add846cc69f2b218352d6…
Author: Louis Lenders <xerox.xerox2000x(a)gmail.com> Date: Fri Oct 9 10:20:02 2020 +0200 kernelbase: Return S_OK in WerSetFlags. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=49966
Signed-off-by: Louis Lenders <xerox.xerox2000x(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernelbase/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/kernelbase/debug.c b/dlls/kernelbase/debug.c index 6acdf0f1ea..0382ea9f95 100644 --- a/dlls/kernelbase/debug.c +++ b/dlls/kernelbase/debug.c @@ -819,7 +819,7 @@ HRESULT WINAPI /* DECLSPEC_HOTPATCH */ WerRegisterRuntimeExceptionModule( const HRESULT WINAPI /* DECLSPEC_HOTPATCH */ WerSetFlags( DWORD flags ) { FIXME("(%d) stub\n", flags); - return E_NOTIMPL; + return S_OK; }
1
0
0
0
Myah Caron : ntoskrnl.exe: Stub MmProtectMdlSystemAddress.
by Alexandre Julliard
09 Oct '20
09 Oct '20
Module: wine Branch: master Commit: c6d0d7f02a49afc85e00a451d0947b185d1bc55c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c6d0d7f02a49afc85e00a451…
Author: Myah Caron <qsniyg(a)protonmail.com> Date: Thu Oct 8 20:50:04 2020 +0000 ntoskrnl.exe: Stub MmProtectMdlSystemAddress. Signed-off-by: Myah Caron <qsniyg(a)protonmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/ntoskrnl.c | 9 +++++++++ dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index e94feabc82..4092e33db4 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -3145,6 +3145,15 @@ BOOLEAN WINAPI MmIsThisAnNtAsSystem(void) return FALSE; } +/*********************************************************************** + * MmProtectMdlSystemAddress (NTOSKRNL.EXE.@) + */ +NTSTATUS WINAPI MmProtectMdlSystemAddress(PMDL MemoryDescriptorList, ULONG NewProtect) +{ + FIXME("(%p, %u) stub\n", MemoryDescriptorList, NewProtect); + return STATUS_SUCCESS; +} + /*********************************************************************** * MmQuerySystemSize (NTOSKRNL.EXE.@) */ diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec index 8892fde505..6ac70c718f 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec +++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec @@ -733,7 +733,7 @@ @ stdcall MmProbeAndLockPages(ptr long long) @ stub MmProbeAndLockProcessPages @ stub MmProbeAndLockSelectedPages -@ stub MmProtectMdlSystemAddress +@ stdcall MmProtectMdlSystemAddress(ptr long) @ stdcall MmQuerySystemSize() @ stub MmRemovePhysicalMemory @ stdcall MmResetDriverPaging(ptr)
1
0
0
0
← Newer
1
...
49
50
51
52
53
54
55
...
80
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
Results per page:
10
25
50
100
200