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
August 2007
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
1085 discussions
Start a n
N
ew thread
Juan Lang : crypt32: Where possible, pass a pointer rather than an offset, it's less confusing.
by Alexandre Julliard
17 Aug '07
17 Aug '07
Module: wine Branch: master Commit: f3128c92446663329fac703fff8c6ae24a6c31e3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f3128c92446663329fac703ff…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Aug 16 10:45:02 2007 -0700 crypt32: Where possible, pass a pointer rather than an offset, it's less confusing. --- dlls/crypt32/store.c | 29 ++++++++++++++++++----------- 1 files changed, 18 insertions(+), 11 deletions(-) diff --git a/dlls/crypt32/store.c b/dlls/crypt32/store.c index aaecf11..df2053f 100644 --- a/dlls/crypt32/store.c +++ b/dlls/crypt32/store.c @@ -477,13 +477,11 @@ static BOOL CRYPT_CollectionAddContext(PWINE_COLLECTIONSTORE store, * Assumes the collection store's lock is held. */ static void *CRYPT_CollectionAdvanceEnum(PWINE_COLLECTIONSTORE store, - PWINE_STORE_LIST_ENTRY storeEntry, size_t contextFuncsOffset, + PWINE_STORE_LIST_ENTRY storeEntry, PCONTEXT_FUNCS contextFuncs, PCWINE_CONTEXT_INTERFACE contextInterface, void *pPrev, size_t contextSize) { void *ret, *child; struct list *storeNext = list_next(&store->stores, &storeEntry->entry); - PCONTEXT_FUNCS contextFuncs = (PCONTEXT_FUNCS)((LPBYTE)storeEntry->store + - contextFuncsOffset); TRACE("(%p, %p, %p)\n", store, storeEntry, pPrev); @@ -506,9 +504,19 @@ static void *CRYPT_CollectionAdvanceEnum(PWINE_COLLECTIONSTORE store, else { if (storeNext) - ret = CRYPT_CollectionAdvanceEnum(store, LIST_ENTRY(storeNext, - WINE_STORE_LIST_ENTRY, entry), contextFuncsOffset, - contextInterface, NULL, contextSize); + { + /* We always want the same function pointers (from certs, crls) + * in the next store, so use the same offset into the next store. + */ + size_t offset = (LPBYTE)contextFuncs - (LPBYTE)storeEntry->store; + PWINE_STORE_LIST_ENTRY storeNextEntry = + LIST_ENTRY(storeNext, WINE_STORE_LIST_ENTRY, entry); + PCONTEXT_FUNCS storeNextContexts = + (PCONTEXT_FUNCS)((LPBYTE)storeNextEntry->store + offset); + + ret = CRYPT_CollectionAdvanceEnum(store, storeNextEntry, + storeNextContexts, contextInterface, NULL, contextSize); + } else { SetLastError(CRYPT_E_NOT_FOUND); @@ -559,7 +567,7 @@ static void *CRYPT_CollectionEnumCert(PWINECRYPT_CERTSTORE store, void *pPrev) sizeof(CERT_CONTEXT)); ret = CRYPT_CollectionAdvanceEnum(cs, storeEntry, - offsetof(WINECRYPT_CERTSTORE, certs), pCertInterface, pPrev, + &storeEntry->store->certs, pCertInterface, pPrev, sizeof(CERT_CONTEXT)); } else @@ -570,7 +578,7 @@ static void *CRYPT_CollectionEnumCert(PWINECRYPT_CERTSTORE store, void *pPrev) WINE_STORE_LIST_ENTRY, entry); ret = CRYPT_CollectionAdvanceEnum(cs, storeEntry, - offsetof(WINECRYPT_CERTSTORE, certs), pCertInterface, NULL, + &storeEntry->store->certs, pCertInterface, NULL, sizeof(CERT_CONTEXT)); } else @@ -638,8 +646,7 @@ static void *CRYPT_CollectionEnumCRL(PWINECRYPT_CERTSTORE store, void *pPrev) sizeof(CRL_CONTEXT)); ret = CRYPT_CollectionAdvanceEnum(cs, storeEntry, - offsetof(WINECRYPT_CERTSTORE, crls), pCRLInterface, pPrev, - sizeof(CRL_CONTEXT)); + &storeEntry->store->crls, pCRLInterface, pPrev, sizeof(CRL_CONTEXT)); } else { @@ -649,7 +656,7 @@ static void *CRYPT_CollectionEnumCRL(PWINECRYPT_CERTSTORE store, void *pPrev) WINE_STORE_LIST_ENTRY, entry); ret = CRYPT_CollectionAdvanceEnum(cs, storeEntry, - offsetof(WINECRYPT_CERTSTORE, crls), pCRLInterface, NULL, + &storeEntry->store->crls, pCRLInterface, NULL, sizeof(CRL_CONTEXT)); } else
1
0
0
0
Juan Lang : crypt32: Use externed vars for context variables.
by Alexandre Julliard
17 Aug '07
17 Aug '07
Module: wine Branch: master Commit: 2a8aa8787863f688b1e31325ff19fcac2ea3c034 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2a8aa8787863f688b1e31325f…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Aug 16 10:44:09 2007 -0700 crypt32: Use externed vars for context variables. --- dlls/crypt32/store.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/crypt32/store.c b/dlls/crypt32/store.c index 14a6631..aaecf11 100644 --- a/dlls/crypt32/store.c +++ b/dlls/crypt32/store.c @@ -1036,13 +1036,13 @@ static void CRYPT_RegReadSerializedFromReg(const WINE_REGSTOREINFO *store, HKEY switch (addedType) { case CERT_STORE_CERTIFICATE_CONTEXT: - contextInterface = &gCertInterface; + contextInterface = pCertInterface; break; case CERT_STORE_CRL_CONTEXT: - contextInterface = &gCRLInterface; + contextInterface = pCRLInterface; break; case CERT_STORE_CTL_CONTEXT: - contextInterface = &gCTLInterface; + contextInterface = pCTLInterface; break; default: contextInterface = NULL; @@ -1175,8 +1175,8 @@ static BOOL CRYPT_SerializeContextsToReg(HKEY key, static BOOL CRYPT_RegWriteToReg(PWINE_REGSTOREINFO store) { static const WCHAR * const subKeys[] = { CertsW, CRLsW, CTLsW }; - static const WINE_CONTEXT_INTERFACE * const interfaces[] = { &gCertInterface, - &gCRLInterface, &gCTLInterface }; + const WINE_CONTEXT_INTERFACE * const interfaces[] = { pCertInterface, + pCRLInterface, pCTLInterface }; struct list *listToDelete[] = { &store->certsToDelete, &store->crlsToDelete, NULL }; BOOL ret = TRUE;
1
0
0
0
Juan Lang : crypt32: Use public APIs to empty a store.
by Alexandre Julliard
17 Aug '07
17 Aug '07
Module: wine Branch: master Commit: 6aa10439a9b0dcf28f02097f47b2a9f7ee01abc1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6aa10439a9b0dcf28f02097f4…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Aug 16 10:43:35 2007 -0700 crypt32: Use public APIs to empty a store. --- dlls/crypt32/store.c | 21 ++++++++++++++++----- 1 files changed, 16 insertions(+), 5 deletions(-) diff --git a/dlls/crypt32/store.c b/dlls/crypt32/store.c index 07b5448..14a6631 100644 --- a/dlls/crypt32/store.c +++ b/dlls/crypt32/store.c @@ -317,10 +317,21 @@ static BOOL CRYPT_MemDeleteCrl(PWINECRYPT_CERTSTORE store, void *pCrlContext) return TRUE; } -static void CRYPT_MemEmptyStore(PWINE_MEMSTORE store) +static void CRYPT_EmptyStore(HCERTSTORE store) { - ContextList_Empty(store->certs); - ContextList_Empty(store->crls); + PCCERT_CONTEXT cert; + PCCRL_CONTEXT crl; + + do { + cert = CertEnumCertificatesInStore(store, NULL); + if (cert) + CertDeleteCertificateFromStore(cert); + } while (cert); + do { + crl = CertEnumCRLsInStore(store, NULL); + if (crl) + CertDeleteCRLFromStore(crl); + } while (crl); } static void WINAPI CRYPT_MemCloseStore(HCERTSTORE hCertStore, DWORD dwFlags) @@ -1359,7 +1370,7 @@ static BOOL WINAPI CRYPT_RegControl(HCERTSTORE hCertStore, DWORD dwFlags, { case CERT_STORE_CTRL_RESYNC: CRYPT_RegFlushStore(store, FALSE); - CRYPT_MemEmptyStore((PWINE_MEMSTORE)store->memStore); + CRYPT_EmptyStore(store->memStore); CRYPT_RegReadFromReg(store); ret = TRUE; break; @@ -1758,7 +1769,7 @@ static BOOL WINAPI CRYPT_FileControl(HCERTSTORE hCertStore, DWORD dwFlags, switch (dwCtrlType) { case CERT_STORE_CTRL_RESYNC: - CRYPT_MemEmptyStore((PWINE_MEMSTORE)store->memStore); + CRYPT_EmptyStore(store->memStore); CRYPT_ReadSerializedFile(store->file, store); ret = TRUE; break;
1
0
0
0
Juan Lang : crypt32: Use public type and APIs for memory stores wherever possible.
by Alexandre Julliard
17 Aug '07
17 Aug '07
Module: wine Branch: master Commit: bc37988dff3c8071fdbcb25f84c52f6d39a2d232 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bc37988dff3c8071fdbcb25f8…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Aug 16 10:42:07 2007 -0700 crypt32: Use public type and APIs for memory stores wherever possible. --- dlls/crypt32/store.c | 43 +++++++++++++++++++++++-------------------- 1 files changed, 23 insertions(+), 20 deletions(-) diff --git a/dlls/crypt32/store.c b/dlls/crypt32/store.c index cc5fccd..07b5448 100644 --- a/dlls/crypt32/store.c +++ b/dlls/crypt32/store.c @@ -156,31 +156,31 @@ typedef struct _WINE_HASH_TO_DELETE typedef struct _WINE_REGSTOREINFO { - DWORD dwOpenFlags; - HCRYPTPROV cryptProv; - PWINECRYPT_CERTSTORE memStore; - HKEY key; - BOOL dirty; - CRITICAL_SECTION cs; - struct list certsToDelete; - struct list crlsToDelete; + DWORD dwOpenFlags; + HCRYPTPROV cryptProv; + HCERTSTORE memStore; + HKEY key; + BOOL dirty; + CRITICAL_SECTION cs; + struct list certsToDelete; + struct list crlsToDelete; } WINE_REGSTOREINFO, *PWINE_REGSTOREINFO; typedef struct _WINE_FILESTOREINFO { - DWORD dwOpenFlags; - HCRYPTPROV cryptProv; - PWINECRYPT_CERTSTORE memStore; - HANDLE file; - BOOL dirty; + DWORD dwOpenFlags; + HCRYPTPROV cryptProv; + HCERTSTORE memStore; + HANDLE file; + BOOL dirty; } WINE_FILESTOREINFO, *PWINE_FILESTOREINFO; typedef struct _WINE_MSGSTOREINFO { - DWORD dwOpenFlags; - HCRYPTPROV cryptProv; - PWINECRYPT_CERTSTORE memStore; - HCRYPTMSG msg; + DWORD dwOpenFlags; + HCRYPTPROV cryptProv; + HCERTSTORE memStore; + HCRYPTMSG msg; } WINE_MSGSTOREINFO, *PWINE_MSGSTOREINFO; typedef struct _WINE_STORE_LIST_ENTRY @@ -1421,7 +1421,8 @@ static WINECRYPT_CERTSTORE *CRYPT_RegOpenStore(HCRYPTPROV hCryptProv, { PWINECRYPT_CERTSTORE memStore; - memStore = CRYPT_MemOpenStore(hCryptProv, dwFlags, NULL); + memStore = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, hCryptProv, + CERT_STORE_CREATE_NEW_FLAG, NULL); if (memStore) { PWINE_REGSTOREINFO regInfo = CryptMemAlloc( @@ -1827,7 +1828,8 @@ static PWINECRYPT_CERTSTORE CRYPT_FileOpenStore(HCRYPTPROV hCryptProv, { PWINECRYPT_CERTSTORE memStore; - memStore = CRYPT_MemOpenStore(hCryptProv, dwFlags, NULL); + memStore = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, hCryptProv, + CERT_STORE_CREATE_NEW_FLAG, NULL); if (memStore) { if (CRYPT_ReadSerializedFile(file, memStore)) @@ -1963,7 +1965,8 @@ static PWINECRYPT_CERTSTORE CRYPT_MsgOpenStore(HCRYPTPROV hCryptProv, TRACE("(%ld, %08x, %p)\n", hCryptProv, dwFlags, pvPara); - memStore = CRYPT_MemOpenStore(hCryptProv, dwFlags, NULL); + memStore = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, hCryptProv, + CERT_STORE_CREATE_NEW_FLAG, NULL); if (memStore) { BOOL ret;
1
0
0
0
Juan Lang : crypt32: Rename a confusing type.
by Alexandre Julliard
17 Aug '07
17 Aug '07
Module: wine Branch: master Commit: f68036cebd370e3d1ccd44df0c3cdf1988e55439 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f68036cebd370e3d1ccd44df0…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Aug 16 10:40:54 2007 -0700 crypt32: Rename a confusing type. --- dlls/crypt32/store.c | 40 ++++++++++++++++++++-------------------- 1 files changed, 20 insertions(+), 20 deletions(-) diff --git a/dlls/crypt32/store.c b/dlls/crypt32/store.c index 2c09335..1b92ee4 100644 --- a/dlls/crypt32/store.c +++ b/dlls/crypt32/store.c @@ -107,12 +107,12 @@ typedef BOOL (*AddFunc)(struct WINE_CRYPTCERTSTORE *store, void *context, typedef BOOL (*DeleteFunc)(struct WINE_CRYPTCERTSTORE *store, void *context); -typedef struct _CONTEXT_STORE +typedef struct _CONTEXT_FUNCS { AddFunc addContext; EnumFunc enumContext; DeleteFunc deleteContext; -} CONTEXT_STORE, *PCONTEXT_STORE; +} CONTEXT_FUNCS, *PCONTEXT_FUNCS; typedef enum _CertStoreType { StoreTypeMem, @@ -135,8 +135,8 @@ typedef struct WINE_CRYPTCERTSTORE HCRYPTPROV cryptProv; CertStoreType type; PFN_CERT_STORE_PROV_CLOSE closeStore; - CONTEXT_STORE certs; - CONTEXT_STORE crls; + CONTEXT_FUNCS certs; + CONTEXT_FUNCS crls; PFN_CERT_STORE_PROV_CONTROL control; /* optional */ PCONTEXT_PROPERTY_LIST properties; } WINECRYPT_CERTSTORE, *PWINECRYPT_CERTSTORE; @@ -406,28 +406,28 @@ static void *CRYPT_CollectionCreateContextFromChild(PWINE_COLLECTIONSTORE store, } static BOOL CRYPT_CollectionAddContext(PWINE_COLLECTIONSTORE store, - unsigned int contextStoreOffset, void *context, void *toReplace, unsigned int contextSize, + unsigned int contextFuncsOffset, void *context, void *toReplace, unsigned int contextSize, void **pChildContext) { BOOL ret; void *childContext = NULL; PWINE_STORE_LIST_ENTRY storeEntry = NULL; - TRACE("(%p, %d, %p, %p, %d)\n", store, contextStoreOffset, context, + TRACE("(%p, %d, %p, %p, %d)\n", store, contextFuncsOffset, context, toReplace, contextSize); ret = FALSE; if (toReplace) { void *existingLinked = Context_GetLinkedContext(toReplace, contextSize); - PCONTEXT_STORE contextStore; + PCONTEXT_FUNCS contextFuncs; storeEntry = *(PWINE_STORE_LIST_ENTRY *)Context_GetExtra(toReplace, contextSize); - contextStore = (PCONTEXT_STORE)((LPBYTE)storeEntry->store + - contextStoreOffset); - ret = contextStore->addContext(storeEntry->store, context, - existingLinked, (const void **)&childContext); + contextFuncs = (PCONTEXT_FUNCS)((LPBYTE)storeEntry->store + + contextFuncsOffset); + ret = contextFuncs->addContext(storeEntry->store, context, + existingLinked, childContext); } else { @@ -439,11 +439,11 @@ static BOOL CRYPT_CollectionAddContext(PWINE_COLLECTIONSTORE store, { if (entry->dwUpdateFlags & CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG) { - PCONTEXT_STORE contextStore = (PCONTEXT_STORE)( - (LPBYTE)entry->store + contextStoreOffset); + PCONTEXT_FUNCS contextFuncs = (PCONTEXT_FUNCS)( + (LPBYTE)entry->store + contextFuncsOffset); storeEntry = entry; - ret = contextStore->addContext(entry->store, context, NULL, + ret = contextFuncs->addContext(entry->store, context, NULL, (const void **)&childContext); break; } @@ -466,13 +466,13 @@ static BOOL CRYPT_CollectionAddContext(PWINE_COLLECTIONSTORE store, * Assumes the collection store's lock is held. */ static void *CRYPT_CollectionAdvanceEnum(PWINE_COLLECTIONSTORE store, - PWINE_STORE_LIST_ENTRY storeEntry, size_t contextStoreOffset, + PWINE_STORE_LIST_ENTRY storeEntry, size_t contextFuncsOffset, PCWINE_CONTEXT_INTERFACE contextInterface, void *pPrev, size_t contextSize) { void *ret, *child; struct list *storeNext = list_next(&store->stores, &storeEntry->entry); - PCONTEXT_STORE contextStore = (PCONTEXT_STORE)((LPBYTE)storeEntry->store + - contextStoreOffset); + PCONTEXT_FUNCS contextFuncs = (PCONTEXT_FUNCS)((LPBYTE)storeEntry->store + + contextFuncsOffset); TRACE("(%p, %p, %p)\n", store, storeEntry, pPrev); @@ -483,12 +483,12 @@ static void *CRYPT_CollectionAdvanceEnum(PWINE_COLLECTIONSTORE store, */ child = Context_GetLinkedContext(pPrev, contextSize); contextInterface->duplicate(child); - child = contextStore->enumContext(storeEntry->store, child); + child = contextFuncs->enumContext(storeEntry->store, child); contextInterface->free(pPrev); pPrev = NULL; } else - child = contextStore->enumContext(storeEntry->store, NULL); + child = contextFuncs->enumContext(storeEntry->store, NULL); if (child) ret = CRYPT_CollectionCreateContextFromChild(store, storeEntry, child, contextSize, FALSE); @@ -496,7 +496,7 @@ static void *CRYPT_CollectionAdvanceEnum(PWINE_COLLECTIONSTORE store, { if (storeNext) ret = CRYPT_CollectionAdvanceEnum(store, LIST_ENTRY(storeNext, - WINE_STORE_LIST_ENTRY, entry), contextStoreOffset, + WINE_STORE_LIST_ENTRY, entry), contextFuncsOffset, contextInterface, NULL, contextSize); else {
1
0
0
0
Juan Lang : crypt32: Remove some unnecessary casts.
by Alexandre Julliard
17 Aug '07
17 Aug '07
Module: wine Branch: master Commit: afc50ce3fe99fef60a1b2a62f6b36efe6fdda238 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=afc50ce3fe99fef60a1b2a62f…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Aug 16 10:41:31 2007 -0700 crypt32: Remove some unnecessary casts. --- dlls/crypt32/store.c | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/dlls/crypt32/store.c b/dlls/crypt32/store.c index 1b92ee4..cc5fccd 100644 --- a/dlls/crypt32/store.c +++ b/dlls/crypt32/store.c @@ -722,7 +722,7 @@ static BOOL CRYPT_ProvAddCert(PWINECRYPT_CERTSTORE store, void *cert, if (toReplace) ret = ps->memStore->certs.addContext(ps->memStore, cert, toReplace, - (const void **)ppStoreContext); + ppStoreContext); else { ret = TRUE; @@ -731,7 +731,7 @@ static BOOL CRYPT_ProvAddCert(PWINECRYPT_CERTSTORE store, void *cert, CERT_STORE_PROV_WRITE_ADD_FLAG); if (ret) ret = ps->memStore->certs.addContext(ps->memStore, cert, NULL, - (const void **)ppStoreContext); + ppStoreContext); } /* dirty trick: replace the returned context's hCertStore with * store. @@ -781,7 +781,7 @@ static BOOL CRYPT_ProvAddCRL(PWINECRYPT_CERTSTORE store, void *crl, if (toReplace) ret = ps->memStore->crls.addContext(ps->memStore, crl, toReplace, - (const void **)ppStoreContext); + ppStoreContext); else { if (ps->hdr.dwOpenFlags & CERT_STORE_READONLY_FLAG) @@ -797,7 +797,7 @@ static BOOL CRYPT_ProvAddCRL(PWINECRYPT_CERTSTORE store, void *crl, CERT_STORE_PROV_WRITE_ADD_FLAG); if (ret) ret = ps->memStore->crls.addContext(ps->memStore, crl, NULL, - (const void **)ppStoreContext); + ppStoreContext); } } /* dirty trick: replace the returned context's hCertStore with @@ -856,8 +856,7 @@ static BOOL WINAPI CRYPT_ProvControl(HCERTSTORE hCertStore, DWORD dwFlags, static PWINECRYPT_CERTSTORE CRYPT_ProvCreateStore(HCRYPTPROV hCryptProv, DWORD dwFlags, PWINECRYPT_CERTSTORE memStore, const CERT_STORE_PROV_INFO *pProvInfo) { - PWINE_PROVIDERSTORE ret = (PWINE_PROVIDERSTORE)CryptMemAlloc( - sizeof(WINE_PROVIDERSTORE)); + PWINE_PROVIDERSTORE ret = CryptMemAlloc(sizeof(WINE_PROVIDERSTORE)); if (ret) {
1
0
0
0
Vitaliy Margolen : dinput: Properly increment sequence number for X only movement.
by Alexandre Julliard
17 Aug '07
17 Aug '07
Module: wine Branch: master Commit: c78b8a17fda474e34db5ab7dcb82db382907b50b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c78b8a17fda474e34db5ab7dc…
Author: Vitaliy Margolen <wine-patches(a)kievinfo.com> Date: Thu Aug 16 23:51:32 2007 -0600 dinput: Properly increment sequence number for X only movement. --- dlls/dinput/mouse.c | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/dlls/dinput/mouse.c b/dlls/dinput/mouse.c index eeada11..4564673 100644 --- a/dlls/dinput/mouse.c +++ b/dlls/dinput/mouse.c @@ -279,11 +279,16 @@ static void dinput_mouse_hook( LPDIRECTINPUTDEVICE8A iface, WPARAM wparam, LPARA pt1 = pt; if (pt.x) - queue_event((LPDIRECTINPUTDEVICE8A)This, id_to_offset(&This->base.data_format, - DIDFT_MAKEINSTANCE(WINE_MOUSE_X_AXIS_INSTANCE) | DIDFT_RELAXIS), - pt1.x, hook->time, This->base.dinput->evsequence); + { + inst_id = DIDFT_MAKEINSTANCE(WINE_MOUSE_X_AXIS_INSTANCE) | DIDFT_RELAXIS; + wdata = pt1.x; + } if (pt.y) { + /* Already have X, need to queue it */ + if (inst_id != -1) + queue_event((LPDIRECTINPUTDEVICE8A)This, id_to_offset(&This->base.data_format, inst_id), + wdata, hook->time, This->base.dinput->evsequence); inst_id = DIDFT_MAKEINSTANCE(WINE_MOUSE_Y_AXIS_INSTANCE) | DIDFT_RELAXIS; wdata = pt1.y; }
1
0
0
0
Jason Edmeades : comctl32: Listview fails to add a column if mask=0.
by Alexandre Julliard
17 Aug '07
17 Aug '07
Module: wine Branch: master Commit: f6631265f32a57a4e247aad7efde8ce668ef7e8b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f6631265f32a57a4e247aad7e…
Author: Jason Edmeades <jason.edmeades(a)googlemail.com> Date: Thu Aug 16 23:45:41 2007 +0100 comctl32: Listview fails to add a column if mask=0. --- dlls/comctl32/listview.c | 11 ++++++++++- dlls/comctl32/tests/listview.c | 23 +++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletions(-) diff --git a/dlls/comctl32/listview.c b/dlls/comctl32/listview.c index 7602217..ab60d23 100644 --- a/dlls/comctl32/listview.c +++ b/dlls/comctl32/listview.c @@ -6659,7 +6659,16 @@ static INT LISTVIEW_InsertColumnT(LISTVIEW_INFO *infoPtr, INT nColumn, ZeroMemory(&hdi, sizeof(HDITEMW)); column_fill_hditem(infoPtr, &hdi, nColumn, lpColumn, isW); - + + /* + * A mask not including LVCF_WIDTH turns into a mask of width, width 10 + * (can be seen in SPY) otherwise column never gets added. + */ + if (!(lpColumn->mask & LVCF_WIDTH)) { + hdi.mask |= HDI_WIDTH; + hdi.cxy = 10; + } + /* * when the iSubItem is available Windows copies it to the header lParam. It seems * to happen only in LVM_INSERTCOLUMN - not in LVM_SETCOLUMN diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c index a64d4d3..9138442 100644 --- a/dlls/comctl32/tests/listview.c +++ b/dlls/comctl32/tests/listview.c @@ -676,6 +676,28 @@ static void test_items(void) DestroyWindow(hwnd); } +static void test_columns(void) +{ + HWND hwnd; + LVCOLUMN column; + DWORD rc; + + hwnd = CreateWindowEx(0, "SysListView32", "foo", LVS_REPORT, + 10, 10, 100, 200, hwndparent, NULL, NULL, NULL); + ok(hwnd != NULL, "failed to create listview window\n"); + + /* Add a column with no mask */ + memset(&column, 0xaa, sizeof(column)); + column.mask = 0; + rc = ListView_InsertColumn(hwnd, 0, &column); + ok(rc==0, "Inserting column with no mask failed with %d\n", rc); + + /* Check its width */ + rc = ListView_GetColumnWidth(hwnd, 0); + ok(rc==10, "Inserting column with no mask failed to set width to 10 with %d\n", rc); + + DestroyWindow(hwnd); +} /* test setting imagelist between WM_NCCREATE and WM_CREATE */ static WNDPROC listviewWndProc; static HIMAGELIST test_create_imagelist; @@ -1041,4 +1063,5 @@ START_TEST(listview) test_color(); test_item_count(); test_item_position(); + test_columns(); }
1
0
0
0
Andrew Talbot : riched20: Constify some variables.
by Alexandre Julliard
17 Aug '07
17 Aug '07
Module: wine Branch: master Commit: b150ea67a91fbd70781af13ca2258eb3f3ebea4c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b150ea67a91fbd70781af13ca…
Author: Andrew Talbot <andrew.talbot(a)talbotville.com> Date: Thu Aug 16 21:57:12 2007 +0100 riched20: Constify some variables. --- dlls/riched20/editor.h | 8 ++++---- dlls/riched20/style.c | 12 ++++++------ dlls/riched20/undo.c | 2 +- dlls/riched20/wrap.c | 2 +- dlls/riched20/writer.c | 8 ++++---- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h index f0f664c..83dee76 100644 --- a/dlls/riched20/editor.h +++ b/dlls/riched20/editor.h @@ -71,8 +71,8 @@ CHARFORMAT2W *ME_ToCF2W(CHARFORMAT2W *to, CHARFORMAT2W *from); void ME_CopyToCF2W(CHARFORMAT2W *to, CHARFORMAT2W *from); CHARFORMAT2W *ME_ToCFAny(CHARFORMAT2W *to, CHARFORMAT2W *from); void ME_CopyToCFAny(CHARFORMAT2W *to, CHARFORMAT2W *from); -void ME_CopyCharFormat(CHARFORMAT2W *pDest, CHARFORMAT2W *pSrc); /* only works with 2W structs */ -void ME_CharFormatFromLogFont(HDC hDC, LOGFONTW *lf, CHARFORMAT2W *fmt); /* ditto */ +void ME_CopyCharFormat(CHARFORMAT2W *pDest, const CHARFORMAT2W *pSrc); /* only works with 2W structs */ +void ME_CharFormatFromLogFont(HDC hDC, const LOGFONTW *lf, CHARFORMAT2W *fmt); /* ditto */ /* list.c */ void ME_InsertBefore(ME_DisplayItem *diWhere, ME_DisplayItem *diWhat); @@ -213,7 +213,7 @@ BOOL ME_UpdateSelection(ME_TextEditor *editor, const ME_Cursor *pTempCursor); /* wrap.c */ void ME_PrepareParagraphForWrapping(ME_Context *c, ME_DisplayItem *tp); ME_DisplayItem *ME_MakeRow(int height, int baseline, int width); -void ME_InsertRowStart(ME_WrapContext *wc, ME_DisplayItem *pEnd); +void ME_InsertRowStart(ME_WrapContext *wc, const ME_DisplayItem *pEnd); void ME_WrapTextParagraph(ME_Context *c, ME_DisplayItem *tp); BOOL ME_WrapMarkedParagraphs(ME_TextEditor *editor); void ME_InvalidateMarkedParagraphs(ME_TextEditor *editor); @@ -268,7 +268,7 @@ ME_TextEditor *ME_MakeEditor(HWND hWnd); void ME_DestroyEditor(ME_TextEditor *editor); void ME_SendOldNotify(ME_TextEditor *editor, int nCode); void ME_LinkNotify(ME_TextEditor *editor, UINT msg, WPARAM wParam, LPARAM lParam); -ME_UndoItem *ME_AddUndoItem(ME_TextEditor *editor, ME_DIType type, ME_DisplayItem *di); +ME_UndoItem *ME_AddUndoItem(ME_TextEditor *editor, ME_DIType type, const ME_DisplayItem *pdi); void ME_CommitUndo(ME_TextEditor *editor); void ME_Undo(ME_TextEditor *editor); void ME_Redo(ME_TextEditor *editor); diff --git a/dlls/riched20/style.c b/dlls/riched20/style.c index 1dfdef1..48e29b5 100644 --- a/dlls/riched20/style.c +++ b/dlls/riched20/style.c @@ -181,7 +181,7 @@ ME_Style *ME_ApplyStyle(ME_Style *sSrc, CHARFORMAT2W *style) return s; } -void ME_CopyCharFormat(CHARFORMAT2W *pDest, CHARFORMAT2W *pSrc) +void ME_CopyCharFormat(CHARFORMAT2W *pDest, const CHARFORMAT2W *pSrc) { /* using this with non-2W structs is forbidden */ assert(pSrc->cbSize == sizeof(CHARFORMAT2W)); @@ -189,7 +189,7 @@ void ME_CopyCharFormat(CHARFORMAT2W *pDest, CHARFORMAT2W *pSrc) CopyMemory(pDest, pSrc, sizeof(CHARFORMAT2W)); } -static void ME_DumpStyleEffect(char **p, const char *name, CHARFORMAT2W *fmt, int mask) +static void ME_DumpStyleEffect(char **p, const char *name, const CHARFORMAT2W *fmt, int mask) { *p += sprintf(*p, "%-22s%s\n", name, (fmt->dwMask & mask) ? ((fmt->dwEffects & mask) ? "YES" : "no") : "N/A"); } @@ -253,7 +253,7 @@ void ME_DumpStyleToBuf(CHARFORMAT2W *pFmt, char buf[2048]) static void -ME_LogFontFromStyle(HDC hDC, LOGFONTW *lf, ME_Style *s, int nZoomNumerator, int nZoomDenominator) +ME_LogFontFromStyle(HDC hDC, LOGFONTW *lf, const ME_Style *s, int nZoomNumerator, int nZoomDenominator) { int rx, ry; rx = GetDeviceCaps(hDC, LOGPIXELSX); @@ -286,10 +286,10 @@ ME_LogFontFromStyle(HDC hDC, LOGFONTW *lf, ME_Style *s, int nZoomNumerator, int lf->lfCharSet = s->fmt.bCharSet; } -void ME_CharFormatFromLogFont(HDC hDC, LOGFONTW *lf, CHARFORMAT2W *fmt) +void ME_CharFormatFromLogFont(HDC hDC, const LOGFONTW *lf, CHARFORMAT2W *fmt) { int rx, ry; - + ME_InitCharFormat2W(fmt); rx = GetDeviceCaps(hDC, LOGPIXELSX); ry = GetDeviceCaps(hDC, LOGPIXELSY); @@ -308,7 +308,7 @@ void ME_CharFormatFromLogFont(HDC hDC, LOGFONTW *lf, CHARFORMAT2W *fmt) fmt->bCharSet = lf->lfCharSet; } -static BOOL ME_IsFontEqual(LOGFONTW *p1, LOGFONTW *p2) +static BOOL ME_IsFontEqual(const LOGFONTW *p1, const LOGFONTW *p2) { if (memcmp(p1, p2, sizeof(LOGFONTW)-sizeof(p1->lfFaceName))) return FALSE; diff --git a/dlls/riched20/undo.c b/dlls/riched20/undo.c index 2a9d915..d277e26 100644 --- a/dlls/riched20/undo.c +++ b/dlls/riched20/undo.c @@ -48,7 +48,7 @@ void ME_EmptyUndoStack(ME_TextEditor *editor) } } -ME_UndoItem *ME_AddUndoItem(ME_TextEditor *editor, ME_DIType type, ME_DisplayItem *pdi) { +ME_UndoItem *ME_AddUndoItem(ME_TextEditor *editor, ME_DIType type, const ME_DisplayItem *pdi) { if (editor->nUndoMode == umIgnore) return NULL; else if (editor->nUndoLimit == 0) diff --git a/dlls/riched20/wrap.c b/dlls/riched20/wrap.c index c8b5710..946aa73 100644 --- a/dlls/riched20/wrap.c +++ b/dlls/riched20/wrap.c @@ -51,7 +51,7 @@ static void ME_BeginRow(ME_WrapContext *wc) wc->pt.x = 0; } -void ME_InsertRowStart(ME_WrapContext *wc, ME_DisplayItem *pEnd) +void ME_InsertRowStart(ME_WrapContext *wc, const ME_DisplayItem *pEnd) { ME_DisplayItem *p, *row, *para; int ascent = 0, descent = 0, width=0, shift = 0, align = 0; diff --git a/dlls/riched20/writer.c b/dlls/riched20/writer.c index e964ce7..fa9efa0 100644 --- a/dlls/riched20/writer.c +++ b/dlls/riched20/writer.c @@ -25,7 +25,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(richedit); static BOOL -ME_StreamOutRTFText(ME_OutStream *pStream, WCHAR *text, LONG nChars); +ME_StreamOutRTFText(ME_OutStream *pStream, const WCHAR *text, LONG nChars); static ME_OutStream* @@ -192,7 +192,7 @@ ME_StreamOutRTFHeader(ME_OutStream *pStream, int dwFormat) static BOOL -ME_StreamOutRTFFontAndColorTbl(ME_OutStream *pStream, ME_DisplayItem *pFirstRun, ME_DisplayItem *pLastRun) +ME_StreamOutRTFFontAndColorTbl(ME_OutStream *pStream, ME_DisplayItem *pFirstRun, const ME_DisplayItem *pLastRun) { ME_DisplayItem *item = pFirstRun; ME_FontTableItem *table = pStream->fonttbl; @@ -282,7 +282,7 @@ ME_StreamOutRTFFontAndColorTbl(ME_OutStream *pStream, ME_DisplayItem *pFirstRun, static BOOL -ME_StreamOutRTFParaProps(ME_OutStream *pStream, ME_DisplayItem *para) +ME_StreamOutRTFParaProps(ME_OutStream *pStream, const ME_DisplayItem *para) { PARAFORMAT2 *fmt = para->member.para.pFmt; char props[STREAMOUT_BUFFER_SIZE] = ""; @@ -579,7 +579,7 @@ ME_StreamOutRTFCharProps(ME_OutStream *pStream, CHARFORMAT2W *fmt) static BOOL -ME_StreamOutRTFText(ME_OutStream *pStream, WCHAR *text, LONG nChars) +ME_StreamOutRTFText(ME_OutStream *pStream, const WCHAR *text, LONG nChars) { char buffer[STREAMOUT_BUFFER_SIZE]; int pos = 0;
1
0
0
0
Alexandre Julliard : mscms/tests: Allocate the profile buffer dynamically to make sure it's large enough.
by Alexandre Julliard
17 Aug '07
17 Aug '07
Module: wine Branch: master Commit: 106b900113c95716b2b7e23c1da5d33f84db9812 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=106b900113c95716b2b7e23c1…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Aug 17 11:52:29 2007 +0200 mscms/tests: Allocate the profile buffer dynamically to make sure it's large enough. --- dlls/mscms/tests/profile.c | 30 +++++++++++++++++++++--------- 1 files changed, 21 insertions(+), 9 deletions(-) diff --git a/dlls/mscms/tests/profile.c b/dlls/mscms/tests/profile.c index e5a7e81..1055faa 100644 --- a/dlls/mscms/tests/profile.c +++ b/dlls/mscms/tests/profile.c @@ -760,13 +760,12 @@ static void test_GetStandardColorSpaceProfileW(void) static void test_EnumColorProfilesA(void) { BOOL ret; - DWORD size, number; + DWORD total, size, number; ENUMTYPEA record; - BYTE buffer[MAX_PATH]; + BYTE *buffer; /* Parameter checks */ - size = sizeof(buffer); memset( &record, 0, sizeof(ENUMTYPEA) ); record.dwSize = sizeof(ENUMTYPEA); @@ -774,6 +773,12 @@ static void test_EnumColorProfilesA(void) record.dwFields |= ET_DATACOLORSPACE; record.dwDataColorSpace = SPACE_RGB; + total = 0; + ret = pEnumColorProfilesA( NULL, &record, NULL, &total, &number ); + ok( !ret, "EnumColorProfilesA() failed (%d)\n", GetLastError() ); + buffer = HeapAlloc( GetProcessHeap(), 0, total ); + + size = total; ret = pEnumColorProfilesA( machine, &record, buffer, &size, &number ); ok( !ret, "EnumColorProfilesA() succeeded (%d)\n", GetLastError() ); @@ -798,23 +803,23 @@ static void test_EnumColorProfilesA(void) if (standardprofile) { - size = sizeof(buffer); + size = total; ret = pEnumColorProfilesA( NULL, &record, buffer, &size, &number ); ok( ret, "EnumColorProfilesA() failed (%d)\n", GetLastError() ); } + HeapFree( GetProcessHeap(), 0, buffer ); } static void test_EnumColorProfilesW(void) { BOOL ret; - DWORD size, number; + DWORD total, size, number; ENUMTYPEW record; - BYTE buffer[MAX_PATH * sizeof(WCHAR)]; + BYTE *buffer; /* Parameter checks */ - size = sizeof(buffer); memset( &record, 0, sizeof(ENUMTYPEW) ); record.dwSize = sizeof(ENUMTYPEW); @@ -822,6 +827,12 @@ static void test_EnumColorProfilesW(void) record.dwFields |= ET_DATACOLORSPACE; record.dwDataColorSpace = SPACE_RGB; + total = 0; + ret = pEnumColorProfilesW( NULL, &record, NULL, &total, &number ); + ok( !ret, "EnumColorProfilesW() failed (%d)\n", GetLastError() ); + buffer = HeapAlloc( GetProcessHeap(), 0, total * sizeof(WCHAR) ); + + size = total; ret = pEnumColorProfilesW( machineW, &record, buffer, &size, &number ); ok( !ret, "EnumColorProfilesW() succeeded (%d)\n", GetLastError() ); @@ -833,7 +844,7 @@ static void test_EnumColorProfilesW(void) if (standardprofileW) { - ret = pEnumColorProfilesW( NULL, &record, buffer, &size, NULL ); + ret = pEnumColorProfilesW( NULL, &record, buffer, &size, &number ); ok( ret, "EnumColorProfilesW() failed (%d)\n", GetLastError() ); } @@ -846,11 +857,12 @@ static void test_EnumColorProfilesW(void) if (standardprofileW) { - size = sizeof(buffer); + size = total; ret = pEnumColorProfilesW( NULL, &record, buffer, &size, &number ); ok( ret, "EnumColorProfilesW() failed (%d)\n", GetLastError() ); } + HeapFree( GetProcessHeap(), 0, buffer ); } static void test_InstallColorProfileA(void)
1
0
0
0
← Newer
1
...
42
43
44
45
46
47
48
...
109
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
Results per page:
10
25
50
100
200