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
July
June
May
April
March
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
November 2008
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
734 discussions
Start a n
N
ew thread
Juan Lang : crypt32: Make a global copy of crypt32's HINSTANCE.
by Alexandre Julliard
07 Nov '08
07 Nov '08
Module: wine Branch: master Commit: ab81dc123eb64f71de319548cf8fc5ee91971000 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ab81dc123eb64f71de319548c…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Fri Oct 31 09:33:58 2008 -0700 crypt32: Make a global copy of crypt32's HINSTANCE. --- dlls/crypt32/crypt32_private.h | 4 +++- dlls/crypt32/main.c | 8 +++++--- dlls/crypt32/oid.c | 15 ++++++++------- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/dlls/crypt32/crypt32_private.h b/dlls/crypt32/crypt32_private.h index 46bc8c5..81dd49e 100644 --- a/dlls/crypt32/crypt32_private.h +++ b/dlls/crypt32/crypt32_private.h @@ -123,7 +123,9 @@ BOOL CRYPT_AsnDecodePKCSDigestedData(const BYTE *pbEncoded, DWORD cbEncoded, */ HCRYPTPROV CRYPT_GetDefaultProvider(void); -void crypt_oid_init(HINSTANCE hinst); +HINSTANCE hInstance; + +void crypt_oid_init(void); void crypt_oid_free(void); void crypt_sip_free(void); void root_store_free(void); diff --git a/dlls/crypt32/main.c b/dlls/crypt32/main.c index 47ce23e..38f7560 100644 --- a/dlls/crypt32/main.c +++ b/dlls/crypt32/main.c @@ -33,14 +33,16 @@ WINE_DEFAULT_DEBUG_CHANNEL(crypt); static HCRYPTPROV hDefProv; +HINSTANCE hInstance; -BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD fdwReason, PVOID pvReserved) +BOOL WINAPI DllMain(HINSTANCE hInst, DWORD fdwReason, PVOID pvReserved) { switch (fdwReason) { case DLL_PROCESS_ATTACH: - DisableThreadLibraryCalls(hInstance); - crypt_oid_init(hInstance); + hInstance = hInst; + DisableThreadLibraryCalls(hInst); + crypt_oid_init(); break; case DLL_PROCESS_DETACH: crypt_oid_free(); diff --git a/dlls/crypt32/oid.c b/dlls/crypt32/oid.c index 69ea7a5..b4aae66 100644 --- a/dlls/crypt32/oid.c +++ b/dlls/crypt32/oid.c @@ -37,13 +37,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(crypt); static const WCHAR DllW[] = { 'D','l','l',0 }; -static void init_oid_info(HINSTANCE hinst); +static void init_oid_info(void); static void free_function_sets(void); static void free_oid_info(void); -void crypt_oid_init(HINSTANCE hinst) +void crypt_oid_init(void) { - init_oid_info(hinst); + init_oid_info(); } void crypt_oid_free(void) @@ -993,7 +993,7 @@ BOOL WINAPI CryptUnregisterDefaultOIDFunction(DWORD dwEncodingType, return ret; } -static void oid_init_localizednames(HINSTANCE hInstance) +static void oid_init_localizednames(void) { unsigned int i; @@ -1367,11 +1367,11 @@ struct OIDInfo { struct list entry; }; -static void init_oid_info(HINSTANCE hinst) +static void init_oid_info(void) { DWORD i; - oid_init_localizednames(hinst); + oid_init_localizednames(); for (i = 0; i < sizeof(oidInfoConstructors) / sizeof(oidInfoConstructors[0]); i++) { @@ -1402,7 +1402,8 @@ static void init_oid_info(HINSTANCE hinst) else { LPCWSTR stringresource; - int len = LoadStringW(hinst, (UINT_PTR)oidInfoConstructors[i].pwszName, + int len = LoadStringW(hInstance, + (UINT_PTR)oidInfoConstructors[i].pwszName, (LPWSTR)&stringresource, 0); if (len)
1
0
0
0
Juan Lang : crypt32: Add base implementation of CryptFormatObject.
by Alexandre Julliard
07 Nov '08
07 Nov '08
Module: wine Branch: master Commit: ba7705ea950a61402b6d76a307a1f6d12acdb9a7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ba7705ea950a61402b6d76a30…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Fri Oct 31 09:32:31 2008 -0700 crypt32: Add base implementation of CryptFormatObject. --- dlls/crypt32/main.c | 10 ------ dlls/crypt32/object.c | 80 +++++++++++++++++++++++++++++++++++++++++++++ dlls/crypt32/tests/main.c | 4 -- 3 files changed, 80 insertions(+), 14 deletions(-) diff --git a/dlls/crypt32/main.c b/dlls/crypt32/main.c index 922dd19..47ce23e 100644 --- a/dlls/crypt32/main.c +++ b/dlls/crypt32/main.c @@ -243,13 +243,3 @@ ASN1encoding_t WINAPI I_CryptGetAsn1Encoder(HCRYPTASN1MODULE x) FIXME("(%08x): stub\n", x); return NULL; } - -BOOL WINAPI CryptFormatObject(DWORD dwCertEncodingType, DWORD dwFormatType, - DWORD dwFormatStrType, void *pFormatStruct, LPCSTR lpszStructType, - const BYTE *pbEncoded, DWORD cbEncoded, void *pbFormat, DWORD *pcbFormat) -{ - FIXME("(%08x, %d, %d, %p, %s, %p, %d, %p, %p): stub\n", - dwCertEncodingType, dwFormatType, dwFormatStrType, pFormatStruct, - debugstr_a(lpszStructType), pbEncoded, cbEncoded, pbFormat, pcbFormat); - return FALSE; -} diff --git a/dlls/crypt32/object.c b/dlls/crypt32/object.c index 05a6c5f..e9590a8 100644 --- a/dlls/crypt32/object.c +++ b/dlls/crypt32/object.c @@ -23,6 +23,7 @@ #include "wincrypt.h" #include "mssip.h" #include "crypt32_private.h" +#include "wine/unicode.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(crypt); @@ -548,3 +549,82 @@ BOOL WINAPI CryptQueryObject(DWORD dwObjectType, const void *pvObject, TRACE("returning %d\n", ret); return ret; } + +static BOOL WINAPI CRYPT_FormatHexString(DWORD dwCertEncodingType, + DWORD dwFormatType, DWORD dwFormatStrType, void *pFormatStruct, + LPCSTR lpszStructType, const BYTE *pbEncoded, DWORD cbEncoded, void *pbFormat, + DWORD *pcbFormat) +{ + BOOL ret; + DWORD bytesNeeded; + + if (cbEncoded) + bytesNeeded = (cbEncoded * 3) * sizeof(WCHAR); + else + bytesNeeded = sizeof(WCHAR); + if (!pbFormat) + { + *pcbFormat = bytesNeeded; + ret = TRUE; + } + else if (*pcbFormat < bytesNeeded) + { + *pcbFormat = bytesNeeded; + SetLastError(ERROR_MORE_DATA); + ret = FALSE; + } + else + { + static const WCHAR fmt[] = { '%','0','2','x',' ',0 }; + static const WCHAR endFmt[] = { '%','0','2','x',0 }; + DWORD i; + LPWSTR ptr = pbFormat; + + *pcbFormat = bytesNeeded; + if (cbEncoded) + { + for (i = 0; i < cbEncoded; i++) + { + if (i < cbEncoded - 1) + ptr += sprintfW(ptr, fmt, pbEncoded[i]); + else + ptr += sprintfW(ptr, endFmt, pbEncoded[i]); + } + } + else + *ptr = 0; + ret = TRUE; + } + return ret; +} + +typedef BOOL (WINAPI *CryptFormatObjectFunc)(DWORD, DWORD, DWORD, void *, + LPCSTR, const BYTE *, DWORD, void *, DWORD *); + +BOOL WINAPI CryptFormatObject(DWORD dwCertEncodingType, DWORD dwFormatType, + DWORD dwFormatStrType, void *pFormatStruct, LPCSTR lpszStructType, + const BYTE *pbEncoded, DWORD cbEncoded, void *pbFormat, DWORD *pcbFormat) +{ + static HCRYPTOIDFUNCSET set = NULL; + CryptFormatObjectFunc format = NULL; + HCRYPTOIDFUNCADDR hFunc = NULL; + BOOL ret = FALSE; + + TRACE("(%08x, %d, %08x, %p, %s, %p, %d, %p, %p)\n", dwCertEncodingType, + dwFormatType, dwFormatStrType, pFormatStruct, debugstr_a(lpszStructType), + pbEncoded, cbEncoded, pbFormat, pcbFormat); + + if (!set) + set = CryptInitOIDFunctionSet(CRYPT_OID_FORMAT_OBJECT_FUNC, 0); + CryptGetOIDFunctionAddress(set, dwCertEncodingType, lpszStructType, 0, + (void **)&format, &hFunc); + if (!format && !(dwFormatStrType & CRYPT_FORMAT_STR_NO_HEX)) + format = CRYPT_FormatHexString; + if (format) + ret = format(dwCertEncodingType, dwFormatType, dwFormatStrType, + pFormatStruct, lpszStructType, pbEncoded, cbEncoded, pbFormat, + pcbFormat); + if (hFunc) + CryptFreeOIDFunctionAddress(hFunc, 0); + return ret; +} diff --git a/dlls/crypt32/tests/main.c b/dlls/crypt32/tests/main.c index 06276ba..fa50327 100644 --- a/dlls/crypt32/tests/main.c +++ b/dlls/crypt32/tests/main.c @@ -414,7 +414,6 @@ static void test_format_object(void) SetLastError(0xdeadbeef); ret = pCryptFormatObject(X509_ASN_ENCODING, 0, 0, NULL, NULL, NULL, 0, NULL, &size); - todo_wine ok(ret, "CryptFormatObject failed: %d\n", GetLastError()); if (ret) { @@ -435,7 +434,6 @@ static void test_format_object(void) } ret = pCryptFormatObject(X509_ASN_ENCODING, 0, 0, NULL, NULL, encodedInt, sizeof(encodedInt), NULL, &size); - todo_wine ok(ret, "CryptFormatObject failed: %d\n", GetLastError()); if (ret) { @@ -448,7 +446,6 @@ static void test_format_object(void) } ret = pCryptFormatObject(X509_ASN_ENCODING, 0, 0, NULL, NULL, encodedBigInt, sizeof(encodedBigInt), NULL, &size); - todo_wine ok(ret, "CryptFormatObject failed: %d\n", GetLastError()); if (ret) { @@ -466,7 +463,6 @@ static void test_format_object(void) SetLastError(0xdeadbeef); ret = pCryptFormatObject(X509_ASN_ENCODING, 0, CRYPT_FORMAT_STR_NO_HEX, NULL, NULL, NULL, 0, NULL, &size); - todo_wine ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, "expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); /* When called to format an AUTHORITY_KEY_ID2_INFO, it fails when no
1
0
0
0
Juan Lang : crypt32: Add tests for CryptFormatObject.
by Alexandre Julliard
07 Nov '08
07 Nov '08
Module: wine Branch: master Commit: 14cb694ff8b3423e544ed1226b8b136c04c47523 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=14cb694ff8b3423e544ed1226…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Oct 30 14:39:36 2008 -0700 crypt32: Add tests for CryptFormatObject. --- dlls/crypt32/tests/main.c | 115 +++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 115 insertions(+), 0 deletions(-) diff --git a/dlls/crypt32/tests/main.c b/dlls/crypt32/tests/main.c index 3d54b3b..06276ba 100644 --- a/dlls/crypt32/tests/main.c +++ b/dlls/crypt32/tests/main.c @@ -366,6 +366,120 @@ static void test_CryptInstallOssGlobal(void) } } +static BOOL (WINAPI *pCryptFormatObject)(DWORD dwEncoding, DWORD dwFormatType, + DWORD dwFormatStrType, void *pFormatStruct, LPCSTR lpszStructType, + const BYTE *pbEncoded, DWORD dwEncoded, void *pbFormat, DWORD *pcbFormat); + +static const BYTE encodedInt[] = { 0x02,0x01,0x01 }; +static const WCHAR encodedIntStr[] = { '0','2',' ','0','1',' ','0','1',0 }; +static const BYTE encodedBigInt[] = { 0x02,0x1f,0x01,0x02,0x03,0x04,0x05,0x06, + 0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,0x14,0x15, + 0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f }; +static const WCHAR encodedBigIntStr[] = { '0','2',' ','1','f',' ','0','1',' ', + '0','2',' ','0','3',' ','0','4',' ','0','5',' ','0','6',' ','0','7',' ','0', + '8',' ','0','9',' ','0','a',' ','0','b',' ','0','c',' ','0','d',' ','0','e', + ' ','0','f',' ','1','0',' ','1','1',' ','1','2',' ','1','3',' ','1','4',' ', + '1','5',' ','1','6',' ','1','7',' ','1','8',' ','1','9',' ','1','a',' ','1', + 'b',' ','1','c',' ','1','d',' ','1','e',' ','1','f',0 }; + +static void test_format_object(void) +{ + BOOL ret; + DWORD size; + LPWSTR str; + + pCryptFormatObject = (void *)GetProcAddress(hCrypt, "CryptFormatObject"); + if (!pCryptFormatObject) + { + skip("No CryptFormatObject\n"); + return; + } + /* Crash */ + if (0) + { + ret = pCryptFormatObject(0, 0, 0, NULL, NULL, NULL, 0, NULL, NULL); + } + /* When called with any but the default encoding, it fails to find a + * formatting function. + */ + SetLastError(0xdeadbeef); + ret = pCryptFormatObject(0, 0, 0, NULL, NULL, NULL, 0, NULL, &size); + todo_wine + ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, + "expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); + /* When called with the default encoding type for any undefined struct type + * (including none), it succeeds: the default encoding is a hex string + * encoding. + */ + SetLastError(0xdeadbeef); + ret = pCryptFormatObject(X509_ASN_ENCODING, 0, 0, NULL, NULL, NULL, 0, + NULL, &size); + todo_wine + ok(ret, "CryptFormatObject failed: %d\n", GetLastError()); + if (ret) + { + ok(size == sizeof(WCHAR), "unexpected size %d\n", size); + str = HeapAlloc(GetProcessHeap(), 0, size); + SetLastError(0xdeadbeef); + size = 0; + ret = pCryptFormatObject(X509_ASN_ENCODING, 0, 0, NULL, NULL, NULL, 0, + str, &size); + ok(!ret && GetLastError() == ERROR_MORE_DATA, + "expected ERROR_MORE_DATA, got %d\n", GetLastError()); + size = sizeof(WCHAR); + ret = pCryptFormatObject(X509_ASN_ENCODING, 0, 0, NULL, NULL, NULL, 0, + str, &size); + ok(ret, "CryptFormatObject failed: %d\n", GetLastError()); + ok(!str[0], "expected empty string\n"); + HeapFree(GetProcessHeap(), 0, str); + } + ret = pCryptFormatObject(X509_ASN_ENCODING, 0, 0, NULL, NULL, encodedInt, + sizeof(encodedInt), NULL, &size); + todo_wine + ok(ret, "CryptFormatObject failed: %d\n", GetLastError()); + if (ret) + { + str = HeapAlloc(GetProcessHeap(), 0, size); + ret = pCryptFormatObject(X509_ASN_ENCODING, 0, 0, NULL, NULL, + encodedInt, sizeof(encodedInt), str, &size); + ok(ret, "CryptFormatObject failed: %d\n", GetLastError()); + ok(!lstrcmpW(str, encodedIntStr), "unexpected format string\n"); + HeapFree(GetProcessHeap(), 0, str); + } + ret = pCryptFormatObject(X509_ASN_ENCODING, 0, 0, NULL, NULL, + encodedBigInt, sizeof(encodedBigInt), NULL, &size); + todo_wine + ok(ret, "CryptFormatObject failed: %d\n", GetLastError()); + if (ret) + { + str = HeapAlloc(GetProcessHeap(), 0, size); + ret = pCryptFormatObject(X509_ASN_ENCODING, 0, 0, NULL, NULL, + encodedBigInt, sizeof(encodedBigInt), str, &size); + ok(ret, "CryptFormatObject failed: %d\n", GetLastError()); + ok(!lstrcmpW(str, encodedBigIntStr), "unexpected format string\n"); + HeapFree(GetProcessHeap(), 0, str); + } + /* When called with the default encoding type for any undefined struct + * type but CRYPT_FORMAT_STR_NO_HEX specified, it fails to find a + * formatting function. + */ + SetLastError(0xdeadbeef); + ret = pCryptFormatObject(X509_ASN_ENCODING, 0, CRYPT_FORMAT_STR_NO_HEX, + NULL, NULL, NULL, 0, NULL, &size); + todo_wine + ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND, + "expected ERROR_FILE_NOT_FOUND, got %d\n", GetLastError()); + /* When called to format an AUTHORITY_KEY_ID2_INFO, it fails when no + * data are given. + */ + SetLastError(0xdeadbeef); + ret = pCryptFormatObject(X509_ASN_ENCODING, 0, 0, NULL, + szOID_AUTHORITY_KEY_IDENTIFIER2, NULL, 0, NULL, &size); + todo_wine + ok(!ret && GetLastError() == E_INVALIDARG, + "expected E_INVALIDARG, got %d\n", GetLastError()); +} + START_TEST(main) { hCrypt = GetModuleHandleA("crypt32.dll"); @@ -379,4 +493,5 @@ START_TEST(main) test_readTrustedPublisherDWORD(); test_getDefaultCryptProv(); test_CryptInstallOssGlobal(); + test_format_object(); }
1
0
0
0
Andrew Talbot : rpcrt4: Sign-compare warnings fix.
by Alexandre Julliard
07 Nov '08
07 Nov '08
Module: wine Branch: master Commit: 99ae980c0df05ed8d640d7295a76c2c1fd6f9a57 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=99ae980c0df05ed8d640d7295…
Author: Andrew Talbot <andrew.talbot(a)talbotville.com> Date: Thu Nov 6 21:17:53 2008 +0000 rpcrt4: Sign-compare warnings fix. --- dlls/rpcrt4/cpsf.c | 4 ++-- dlls/rpcrt4/ndr_fullpointer.c | 6 +++--- dlls/rpcrt4/rpc_transport.c | 9 +++++---- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/dlls/rpcrt4/cpsf.c b/dlls/rpcrt4/cpsf.c index 9449695..22537fd 100644 --- a/dlls/rpcrt4/cpsf.c +++ b/dlls/rpcrt4/cpsf.c @@ -147,7 +147,7 @@ HRESULT WINAPI NdrDllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv, *ppv = NULL; if (!pPSFactoryBuffer->lpVtbl) { const ProxyFileInfo **pProxyFileList2; - int max_delegating_vtbl_size = 0; + DWORD max_delegating_vtbl_size = 0; pPSFactoryBuffer->lpVtbl = &CStdPSFactory_Vtbl; pPSFactoryBuffer->RefCount = 0; pPSFactoryBuffer->pProxyFileList = pProxyFileList; @@ -158,7 +158,7 @@ HRESULT WINAPI NdrDllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv, * async interfaces */ void * const *pSrcRpcStubVtbl = (void * const *)&CStdStubBuffer_Vtbl; void **pRpcStubVtbl = (void **)&(*pProxyFileList2)->pStubVtblList[i]->Vtbl; - int j; + unsigned int j; if ((*pProxyFileList2)->pDelegatedIIDs && (*pProxyFileList2)->pDelegatedIIDs[i]) { pSrcRpcStubVtbl = (void * const *)&CStdStubBuffer_Delegating_Vtbl; diff --git a/dlls/rpcrt4/ndr_fullpointer.c b/dlls/rpcrt4/ndr_fullpointer.c index 307e545..b686683 100644 --- a/dlls/rpcrt4/ndr_fullpointer.c +++ b/dlls/rpcrt4/ndr_fullpointer.c @@ -111,7 +111,7 @@ int WINAPI NdrFullPointerQueryPointer(PFULL_PTR_XLAT_TABLES pXlatTables, ULONG *pRefId ) { ULONG Hash = 0; - int i; + unsigned int i; PFULL_PTR_TO_REFID_ELEMENT XlatTableEntry; TRACE("(%p, %p, %d, %p)\n", pXlatTables, pPointer, QueryType, pRefId); @@ -186,7 +186,7 @@ void WINAPI NdrFullPointerInsertRefId(PFULL_PTR_XLAT_TABLES pXlatTables, ULONG RefId, void *pPointer) { ULONG Hash = 0; - int i; + unsigned int i; PFULL_PTR_TO_REFID_ELEMENT XlatTableEntry; TRACE("(%p, 0x%x, %p)\n", pXlatTables, RefId, pPointer); @@ -211,7 +211,7 @@ void WINAPI NdrFullPointerInsertRefId(PFULL_PTR_XLAT_TABLES pXlatTables, int WINAPI NdrFullPointerFree(PFULL_PTR_XLAT_TABLES pXlatTables, void *Pointer) { ULONG Hash = 0; - int i; + unsigned int i; PFULL_PTR_TO_REFID_ELEMENT XlatTableEntry; ULONG RefId = 0; diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c index 13181b7..3d66740 100644 --- a/dlls/rpcrt4/rpc_transport.c +++ b/dlls/rpcrt4/rpc_transport.c @@ -1326,7 +1326,8 @@ static void rpcrt4_protseq_sock_free_wait_array(RpcServerProtseq *protseq, void static int rpcrt4_protseq_sock_wait_for_new_connection(RpcServerProtseq *protseq, unsigned int count, void *wait_array) { struct pollfd *poll_info = wait_array; - int ret, i; + int ret; + unsigned int i; RpcConnection *cconn; RpcConnection_tcp *conn; @@ -1451,7 +1452,7 @@ static const struct protseq_ops protseq_list[] = const struct protseq_ops *rpcrt4_get_protseq_ops(const char *protseq) { - int i; + unsigned int i; for(i=0; i<ARRAYSIZE(protseq_list); i++) if (!strcmp(protseq_list[i].name, protseq)) return &protseq_list[i]; @@ -1460,7 +1461,7 @@ const struct protseq_ops *rpcrt4_get_protseq_ops(const char *protseq) static const struct connection_ops *rpcrt4_get_conn_protseq_ops(const char *protseq) { - int i; + unsigned int i; for(i=0; i<ARRAYSIZE(conn_protseq_list); i++) if (!strcmp(conn_protseq_list[i].name, protseq)) return &conn_protseq_list[i]; @@ -1614,7 +1615,7 @@ RPC_STATUS RpcTransport_ParseTopOfTower(const unsigned char *tower_data, const twr_empty_floor_t *floor4; const struct connection_ops *protseq_ops = NULL; RPC_STATUS status; - int i; + unsigned int i; if (tower_size < sizeof(*protocol_floor)) return EPT_S_NOT_REGISTERED;
1
0
0
0
Nikolay Sivov : gdiplus: Added TRACE(..) for Pen calls.
by Alexandre Julliard
07 Nov '08
07 Nov '08
Module: wine Branch: master Commit: fa1e0313ee12570469f40369d0f8b0ff86e44ee2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fa1e0313ee12570469f40369d…
Author: Nikolay Sivov <bunglehead(a)gmail.com> Date: Thu Nov 6 20:44:10 2008 +0300 gdiplus: Added TRACE(..) for Pen calls. --- dlls/gdiplus/pen.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 70 insertions(+), 0 deletions(-) diff --git a/dlls/gdiplus/pen.c b/dlls/gdiplus/pen.c index 104d9de..ea41a3a 100644 --- a/dlls/gdiplus/pen.c +++ b/dlls/gdiplus/pen.c @@ -69,6 +69,8 @@ static DWORD gdip_to_gdi_join(GpLineJoin join) GpStatus WINGDIPAPI GdipClonePen(GpPen *pen, GpPen **clonepen) { + TRACE("(%p, %p)\n", pen, clonepen); + if(!pen || !clonepen) return InvalidParameter; @@ -90,6 +92,8 @@ GpStatus WINGDIPAPI GdipCreatePen1(ARGB color, REAL width, GpUnit unit, GpBrush *brush; GpStatus status; + TRACE("(%x, %.2f, %d, %p)\n", color, width, unit, pen); + GdipCreateSolidFill(color, (GpSolidFill **)(&brush)); status = GdipCreatePen2(brush, width, unit, pen); GdipDeleteBrush(brush); @@ -102,6 +106,8 @@ GpStatus WINGDIPAPI GdipCreatePen2(GpBrush *brush, REAL width, GpUnit unit, GpPen *gp_pen; GpBrush *clone_brush; + TRACE("(%p, %.2f, %d, %p)", brush, width, unit, pen); + if(!pen || !brush) return InvalidParameter; @@ -135,6 +141,8 @@ GpStatus WINGDIPAPI GdipCreatePen2(GpBrush *brush, REAL width, GpUnit unit, GpStatus WINGDIPAPI GdipDeletePen(GpPen *pen) { + TRACE("(%p)\n", pen); + if(!pen) return InvalidParameter; GdipDeleteBrush(pen->brush); @@ -148,6 +156,8 @@ GpStatus WINGDIPAPI GdipDeletePen(GpPen *pen) GpStatus WINGDIPAPI GdipGetPenBrushFill(GpPen *pen, GpBrush **brush) { + TRACE("(%p, %p)\n", pen, brush); + if(!pen || !brush) return InvalidParameter; @@ -156,6 +166,8 @@ GpStatus WINGDIPAPI GdipGetPenBrushFill(GpPen *pen, GpBrush **brush) GpStatus WINGDIPAPI GdipGetPenColor(GpPen *pen, ARGB *argb) { + TRACE("(%p, %p)\n", pen, argb); + if(!pen || !argb) return InvalidParameter; @@ -167,6 +179,8 @@ GpStatus WINGDIPAPI GdipGetPenColor(GpPen *pen, ARGB *argb) GpStatus WINGDIPAPI GdipGetPenCustomEndCap(GpPen *pen, GpCustomLineCap** customCap) { + TRACE("(%p, %p)\n", pen, customCap); + if(!pen || !customCap) return InvalidParameter; @@ -180,6 +194,8 @@ GpStatus WINGDIPAPI GdipGetPenCustomEndCap(GpPen *pen, GpCustomLineCap** customC GpStatus WINGDIPAPI GdipGetPenCustomStartCap(GpPen *pen, GpCustomLineCap** customCap) { + TRACE("(%p, %p)\n", pen, customCap); + if(!pen || !customCap) return InvalidParameter; @@ -193,6 +209,8 @@ GpStatus WINGDIPAPI GdipGetPenCustomStartCap(GpPen *pen, GpCustomLineCap** custo GpStatus WINGDIPAPI GdipGetPenDashArray(GpPen *pen, REAL *dash, INT count) { + TRACE("(%p, %p, %d)\n", pen, dash, count); + if(!pen || !dash || count > pen->numdashes) return InvalidParameter; @@ -207,6 +225,8 @@ GpStatus WINGDIPAPI GdipGetPenDashArray(GpPen *pen, REAL *dash, INT count) GpStatus WINGDIPAPI GdipGetPenDashCap197819(GpPen *pen, GpDashCap *dashCap) { + TRACE("(%p, %p)\n", pen, dashCap); + if(!pen || !dashCap) return InvalidParameter; @@ -217,6 +237,8 @@ GpStatus WINGDIPAPI GdipGetPenDashCap197819(GpPen *pen, GpDashCap *dashCap) GpStatus WINGDIPAPI GdipGetPenDashCount(GpPen *pen, INT *count) { + TRACE("(%p, %p)\n", pen, count); + if(!pen || !count) return InvalidParameter; @@ -227,6 +249,8 @@ GpStatus WINGDIPAPI GdipGetPenDashCount(GpPen *pen, INT *count) GpStatus WINGDIPAPI GdipGetPenDashOffset(GpPen *pen, REAL *offset) { + TRACE("(%p, %p)\n", pen, offset); + if(!pen || !offset) return InvalidParameter; @@ -237,6 +261,8 @@ GpStatus WINGDIPAPI GdipGetPenDashOffset(GpPen *pen, REAL *offset) GpStatus WINGDIPAPI GdipGetPenDashStyle(GpPen *pen, GpDashStyle *dash) { + TRACE("(%p, %p)\n", pen, dash); + if(!pen || !dash) return InvalidParameter; @@ -247,6 +273,8 @@ GpStatus WINGDIPAPI GdipGetPenDashStyle(GpPen *pen, GpDashStyle *dash) GpStatus WINGDIPAPI GdipGetPenEndCap(GpPen *pen, GpLineCap *endCap) { + TRACE("(%p, %p)\n", pen, endCap); + if(!pen || !endCap) return InvalidParameter; @@ -257,6 +285,8 @@ GpStatus WINGDIPAPI GdipGetPenEndCap(GpPen *pen, GpLineCap *endCap) GpStatus WINGDIPAPI GdipGetPenLineJoin(GpPen *pen, GpLineJoin *lineJoin) { + TRACE("(%p, %p)\n", pen, lineJoin); + if(!pen || !lineJoin) return InvalidParameter; @@ -267,6 +297,8 @@ GpStatus WINGDIPAPI GdipGetPenLineJoin(GpPen *pen, GpLineJoin *lineJoin) GpStatus WINGDIPAPI GdipGetPenMode(GpPen *pen, GpPenAlignment *mode) { + TRACE("(%p, %p)\n", pen, mode); + if(!pen || !mode) return InvalidParameter; @@ -277,6 +309,8 @@ GpStatus WINGDIPAPI GdipGetPenMode(GpPen *pen, GpPenAlignment *mode) GpStatus WINGDIPAPI GdipGetPenMiterLimit(GpPen *pen, REAL *miterLimit) { + TRACE("(%p, %p)\n", pen, miterLimit); + if(!pen || !miterLimit) return InvalidParameter; @@ -287,6 +321,8 @@ GpStatus WINGDIPAPI GdipGetPenMiterLimit(GpPen *pen, REAL *miterLimit) GpStatus WINGDIPAPI GdipGetPenStartCap(GpPen *pen, GpLineCap *startCap) { + TRACE("(%p, %p)\n", pen, startCap); + if(!pen || !startCap) return InvalidParameter; @@ -297,6 +333,8 @@ GpStatus WINGDIPAPI GdipGetPenStartCap(GpPen *pen, GpLineCap *startCap) GpStatus WINGDIPAPI GdipGetPenUnit(GpPen *pen, GpUnit *unit) { + TRACE("(%p, %p)\n", pen, unit); + if(!pen || !unit) return InvalidParameter; @@ -307,6 +345,8 @@ GpStatus WINGDIPAPI GdipGetPenUnit(GpPen *pen, GpUnit *unit) GpStatus WINGDIPAPI GdipGetPenWidth(GpPen *pen, REAL *width) { + TRACE("(%p, %p)\n", pen, width); + if(!pen || !width) return InvalidParameter; @@ -317,6 +357,8 @@ GpStatus WINGDIPAPI GdipGetPenWidth(GpPen *pen, REAL *width) GpStatus WINGDIPAPI GdipSetPenBrushFill(GpPen *pen, GpBrush *brush) { + TRACE("(%p, %p)\n", pen, brush); + if(!pen || !brush) return InvalidParameter; @@ -326,6 +368,8 @@ GpStatus WINGDIPAPI GdipSetPenBrushFill(GpPen *pen, GpBrush *brush) GpStatus WINGDIPAPI GdipSetPenColor(GpPen *pen, ARGB argb) { + TRACE("(%p, %x)\n", pen, argb); + if(!pen) return InvalidParameter; @@ -340,6 +384,8 @@ GpStatus WINGDIPAPI GdipSetPenCustomEndCap(GpPen *pen, GpCustomLineCap* customCa GpCustomLineCap * cap; GpStatus ret; + TRACE("(%p, %p)\n", pen, customCap); + /* native crashes on pen == NULL, customCap != NULL */ if(!customCap) return InvalidParameter; @@ -357,6 +403,8 @@ GpStatus WINGDIPAPI GdipSetPenCustomStartCap(GpPen *pen, GpCustomLineCap* custom GpCustomLineCap * cap; GpStatus ret; + TRACE("(%p, %p)\n", pen, customCap); + /* native crashes on pen == NULL, customCap != NULL */ if(!customCap) return InvalidParameter; @@ -375,6 +423,8 @@ GpStatus WINGDIPAPI GdipSetPenDashArray(GpPen *pen, GDIPCONST REAL *dash, INT i; REAL sum = 0; + TRACE("(%p, %p, %d)\n", pen, dash, count); + if(!pen || !dash) return InvalidParameter; @@ -409,6 +459,8 @@ GpStatus WINGDIPAPI GdipSetPenDashArray(GpPen *pen, GDIPCONST REAL *dash, GpStatus WINGDIPAPI GdipSetPenDashCap197819(GpPen *pen, GpDashCap dashCap) { + TRACE("(%p, %d)\n", pen, dashCap); + if(!pen) return InvalidParameter; @@ -420,6 +472,8 @@ GpStatus WINGDIPAPI GdipSetPenDashCap197819(GpPen *pen, GpDashCap dashCap) /* FIXME: dash offset not used */ GpStatus WINGDIPAPI GdipSetPenDashOffset(GpPen *pen, REAL offset) { + TRACE("(%p, %.2f)\n", pen, offset); + if(!pen) return InvalidParameter; @@ -430,6 +484,8 @@ GpStatus WINGDIPAPI GdipSetPenDashOffset(GpPen *pen, REAL offset) GpStatus WINGDIPAPI GdipSetPenDashStyle(GpPen *pen, GpDashStyle dash) { + TRACE("(%p, %d)\n", pen, dash); + if(!pen) return InvalidParameter; @@ -449,6 +505,8 @@ GpStatus WINGDIPAPI GdipSetPenDashStyle(GpPen *pen, GpDashStyle dash) GpStatus WINGDIPAPI GdipSetPenEndCap(GpPen *pen, GpLineCap cap) { + TRACE("(%p, %d)\n", pen, cap); + if(!pen) return InvalidParameter; /* The old custom cap gets deleted even if the new style is LineCapCustom. */ @@ -463,6 +521,8 @@ GpStatus WINGDIPAPI GdipSetPenEndCap(GpPen *pen, GpLineCap cap) GpStatus WINGDIPAPI GdipSetPenLineCap197819(GpPen *pen, GpLineCap start, GpLineCap end, GpDashCap dash) { + TRACE("%p, %d, %d, %d)\n", pen, start, end, dash); + if(!pen) return InvalidParameter; @@ -482,6 +542,8 @@ GpStatus WINGDIPAPI GdipSetPenLineCap197819(GpPen *pen, GpLineCap start, * Both kinds of miter joins clip if the angle is less than 11 degrees. */ GpStatus WINGDIPAPI GdipSetPenLineJoin(GpPen *pen, GpLineJoin join) { + TRACE("(%p, %d)\n", pen, join); + if(!pen) return InvalidParameter; pen->join = join; @@ -493,6 +555,8 @@ GpStatus WINGDIPAPI GdipSetPenLineJoin(GpPen *pen, GpLineJoin join) GpStatus WINGDIPAPI GdipSetPenMiterLimit(GpPen *pen, REAL limit) { + TRACE("(%p, %.2f)\n", pen, limit); + if(!pen) return InvalidParameter; @@ -503,6 +567,8 @@ GpStatus WINGDIPAPI GdipSetPenMiterLimit(GpPen *pen, REAL limit) GpStatus WINGDIPAPI GdipSetPenStartCap(GpPen *pen, GpLineCap cap) { + TRACE("(%p, %d)\n", pen, cap); + if(!pen) return InvalidParameter; GdipDeleteCustomLineCap(pen->customstart); @@ -514,6 +580,8 @@ GpStatus WINGDIPAPI GdipSetPenStartCap(GpPen *pen, GpLineCap cap) GpStatus WINGDIPAPI GdipSetPenWidth(GpPen *pen, REAL width) { + TRACE("(%p, %.2f)\n", pen, width); + if(!pen) return InvalidParameter; pen->width = width; @@ -523,6 +591,8 @@ GpStatus WINGDIPAPI GdipSetPenWidth(GpPen *pen, REAL width) GpStatus WINGDIPAPI GdipSetPenMode(GpPen *pen, GpPenAlignment mode) { + TRACE("(%p, %d)\n", pen, mode); + if(!pen) return InvalidParameter; pen->align = mode;
1
0
0
0
Nicolas Le Cam : user32: Partially implement SystemParametersInfo(SPI_{GET/ SET}FOREGROUNDLOCKTIMEOUT).
by Alexandre Julliard
07 Nov '08
07 Nov '08
Module: wine Branch: master Commit: 2de85407511254935940ee03133127345e372ab1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2de85407511254935940ee031…
Author: Nicolas Le Cam <niko.lecam(a)gmail.com> Date: Thu Nov 6 15:03:43 2008 +0100 user32: Partially implement SystemParametersInfo(SPI_{GET/SET}FOREGROUNDLOCKTIMEOUT). --- dlls/user32/sysparams.c | 22 ++++++++++++++++++++-- 1 files changed, 20 insertions(+), 2 deletions(-) diff --git a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c index fc5785a..5662db3 100644 --- a/dlls/user32/sysparams.c +++ b/dlls/user32/sysparams.c @@ -83,6 +83,7 @@ enum spi_index SPI_USERPREFERENCEMASK_IDX, SPI_NONCLIENTMETRICS_IDX, SPI_MINIMIZEDMETRICS_IDX, + SPI_SETFOREGROUNDLOCKTIMEOUT_IDX, SPI_CARETWIDTH_IDX, SPI_INDEX_COUNT }; @@ -216,6 +217,8 @@ static const WCHAR SPI_SETMOUSESCROLLLINES_REGKEY[]= {'C','o','n','t',' static const WCHAR SPI_SETMOUSESCROLLLINES_VALNAME[]= {'W','h','e','e','l','S','c','r','o','l','l','L','i','n','e','s',0}; static const WCHAR SPI_SETMENUSHOWDELAY_REGKEY[]= {'C','o','n','t','r','o','l',' ','P','a','n','e','l','\\','D','e','s','k','t','o','p',0}; static const WCHAR SPI_SETMENUSHOWDELAY_VALNAME[]= {'M','e','n','u','S','h','o','w','D','e','l','a','y',0}; +static const WCHAR SPI_SETFOREGROUNDLOCKTIMEOUT_REGKEY[]= {'C','o','n','t','r','o','l',' ','P','a','n','e','l','\\','D','e','s','k','t','o','p',0}; +static const WCHAR SPI_SETFOREGROUNDLOCKTIMEOUT_VALNAME[]= {'F','o','r','e','g','r','o','u','n','d','L','o','c','k','T','i','m','e','o','u','t',0}; static const WCHAR SPI_CARETWIDTH_REGKEY[]= {'C','o','n','t','r','o','l',' ','P','a','n','e','l','\\','D','e','s','k','t','o','p',0}; static const WCHAR SPI_CARETWIDTH_VALNAME[]= {'C','a','r','e','t','W','i','d','t','h',0}; @@ -307,6 +310,7 @@ static BOOL poweroffactive = FALSE; static BOOL show_sounds = FALSE; static BOOL snap_to_default_button = FALSE; static BOOL swap_buttons = FALSE; +static UINT foreground_lock_timeout = 0; static UINT caret_width = 1; static BYTE user_prefs[4]; @@ -2307,8 +2311,22 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam, ret = set_user_pref_param( 3, 0x80, PtrToUlong(pvParam), fWinIni ); break; - WINE_SPI_FIXME(SPI_GETFOREGROUNDLOCKTIMEOUT);/* 0x2000 _WIN32_WINNT >= 0x500 || _WIN32_WINDOW > 0x400 */ - WINE_SPI_FIXME(SPI_SETFOREGROUNDLOCKTIMEOUT);/* 0x2001 _WIN32_WINNT >= 0x500 || _WIN32_WINDOW > 0x400 */ + case SPI_GETFOREGROUNDLOCKTIMEOUT: /* 0x2000 _WIN32_WINNT >= 0x500 || _WIN32_WINDOW > 0x400 */ + ret = get_uint_param( SPI_SETFOREGROUNDLOCKTIMEOUT_IDX, + SPI_SETFOREGROUNDLOCKTIMEOUT_REGKEY, + SPI_SETFOREGROUNDLOCKTIMEOUT_VALNAME, + &foreground_lock_timeout, pvParam ); + break; + + case SPI_SETFOREGROUNDLOCKTIMEOUT: /* 0x2001 _WIN32_WINNT >= 0x500 || _WIN32_WINDOW > 0x400 */ + /* FIXME: this should check that the calling thread + * is able to change the foreground window */ + ret = set_uint_param( SPI_SETFOREGROUNDLOCKTIMEOUT_IDX, + SPI_SETFOREGROUNDLOCKTIMEOUT_REGKEY, + SPI_SETFOREGROUNDLOCKTIMEOUT_VALNAME, + &foreground_lock_timeout, PtrToUlong(pvParam), fWinIni ); + break; + WINE_SPI_FIXME(SPI_GETACTIVEWNDTRKTIMEOUT); /* 0x2002 _WIN32_WINNT >= 0x500 || _WIN32_WINDOW > 0x400 */ WINE_SPI_FIXME(SPI_SETACTIVEWNDTRKTIMEOUT); /* 0x2003 _WIN32_WINNT >= 0x500 || _WIN32_WINDOW > 0x400 */ WINE_SPI_FIXME(SPI_GETFOREGROUNDFLASHCOUNT);/* 0x2004 _WIN32_WINNT >= 0x500 || _WIN32_WINDOW > 0x400 */
1
0
0
0
Vincent Povirk : setupapi: Add a matching CoUninitialize call.
by Alexandre Julliard
07 Nov '08
07 Nov '08
Module: wine Branch: master Commit: 23f54c939b7ab2a9f405b12b920a76ab9c542a86 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=23f54c939b7ab2a9f405b12b9…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Thu Nov 6 08:22:35 2008 -0600 setupapi: Add a matching CoUninitialize call. Spotted by Rob Shearman. --- dlls/setupapi/install.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/dlls/setupapi/install.c b/dlls/setupapi/install.c index 0a4db4f..133fb33 100644 --- a/dlls/setupapi/install.c +++ b/dlls/setupapi/install.c @@ -789,6 +789,7 @@ static BOOL profile_items_callback( HINF hinf, PCWSTR field, void *arg ) INFCONTEXT name_context, context; IShellLinkW* shelllink=NULL; IPersistFile* persistfile=NULL; + HRESULT initresult=E_FAIL; int attrs=0; static const WCHAR dotlnk[] = {'.','l','n','k',0}; @@ -864,7 +865,7 @@ static BOOL profile_items_callback( HINF hinf, PCWSTR field, void *arg ) if (!cmdline) return TRUE; - CoInitialize(NULL); + initresult = CoInitialize(NULL); if (!SUCCEEDED(CoCreateInstance( &CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, &IID_IShellLinkW, (LPVOID*)&shelllink))) @@ -881,6 +882,7 @@ static BOOL profile_items_callback( HINF hinf, PCWSTR field, void *arg ) IShellLinkW_Release( shelllink ); done: + if (SUCCEEDED(initresult)) CoUninitialize(); HeapFree( GetProcessHeap(), 0, cmdline ); return TRUE; }
1
0
0
0
Alexandre Julliard : kernel32/tests: Fix one more failing test on Win9x.
by Alexandre Julliard
07 Nov '08
07 Nov '08
Module: wine Branch: master Commit: a6ce819ca2278b1b1bcad4b215f4e5cf6afb2cb7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a6ce819ca2278b1b1bcad4b21…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Nov 7 10:50:57 2008 +0100 kernel32/tests: Fix one more failing test on Win9x. --- dlls/kernel32/tests/virtual.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/dlls/kernel32/tests/virtual.c b/dlls/kernel32/tests/virtual.c index 3e09362..d90d846 100644 --- a/dlls/kernel32/tests/virtual.c +++ b/dlls/kernel32/tests/virtual.c @@ -720,7 +720,8 @@ static void test_CreateFileMapping(void) SetLastError(0xdeadbeef); handle2 = OpenFileMappingA( FILE_MAP_ALL_ACCESS, FALSE, "WINE TEST MAPPING"); ok( !handle2, "OpenFileMapping succeeded\n"); - ok( GetLastError() == ERROR_FILE_NOT_FOUND, "wrong error %u\n", GetLastError()); + ok( GetLastError() == ERROR_FILE_NOT_FOUND || GetLastError() == ERROR_INVALID_NAME /* win9x */, + "wrong error %u\n", GetLastError()); CloseHandle( handle ); }
1
0
0
0
Paul Vriens : gdi32/tests: Don't crash on NT4.
by Alexandre Julliard
06 Nov '08
06 Nov '08
Module: wine Branch: master Commit: 3f4333d70c27a813b4d99e0daeeb613e9e941a9a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3f4333d70c27a813b4d99e0da…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Thu Nov 6 13:46:52 2008 +0100 gdi32/tests: Don't crash on NT4. --- dlls/gdi32/tests/metafile.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/gdi32/tests/metafile.c b/dlls/gdi32/tests/metafile.c index 5f295bb..499fd6c 100644 --- a/dlls/gdi32/tests/metafile.c +++ b/dlls/gdi32/tests/metafile.c @@ -2076,9 +2076,11 @@ static void test_gdiis(void) pGdiIsMetaFileDC = (void*) GetProcAddress(hgdi32, "GdiIsMetaFileDC"); pGdiIsPlayMetafileDC = (void*) GetProcAddress(hgdi32, "GdiIsPlayMetafileDC"); - /* they should all exist or none should exist */ - if(!pGdiIsMetaPrintDC) + if(!pGdiIsMetaPrintDC || !pGdiIsMetaFileDC || !pGdiIsPlayMetafileDC) + { + win_skip("Needed GdiIs* functions are not available\n"); return; + } /* try with nothing */ ok(!pGdiIsMetaPrintDC(NULL), "ismetaprint with NULL parameter\n");
1
0
0
0
Paul Vriens : winmm/tests: Fix failure on Win9x and WinMe.
by Alexandre Julliard
06 Nov '08
06 Nov '08
Module: wine Branch: master Commit: 97802ef16bb42e4832bab08c9c766ffde2f91a84 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=97802ef16bb42e4832bab08c9…
Author: Paul Vriens <Paul.Vriens.Wine(a)gmail.com> Date: Thu Nov 6 13:15:33 2008 +0100 winmm/tests: Fix failure on Win9x and WinMe. --- dlls/winmm/tests/mci.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/winmm/tests/mci.c b/dlls/winmm/tests/mci.c index 9138b60..8764b30 100644 --- a/dlls/winmm/tests/mci.c +++ b/dlls/winmm/tests/mci.c @@ -33,7 +33,7 @@ START_TEST(mci) char buf[1024]; HWND hwnd; - hwnd = CreateWindowExA(0, "winmm test", "", WS_POPUP, 0,0,100,100, + hwnd = CreateWindowExA(0, "static", "winmm test", WS_POPUP, 0,0,100,100, 0, 0, 0, NULL); err = mciSendString(command_open, NULL, 0, NULL);
1
0
0
0
← Newer
1
...
56
57
58
59
60
61
62
...
74
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
Results per page:
10
25
50
100
200