Juan Lang : crypt32: Implement CertDuplicateStore.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Mar 3 08:47:18 CST 2006


Module: wine
Branch: refs/heads/master
Commit: 8949d29de2c31ce4839d3ae4d9588b2fb0320406
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=8949d29de2c31ce4839d3ae4d9588b2fb0320406

Author: Juan Lang <juan_lang at yahoo.com>
Date:   Thu Mar  2 06:55:45 2006 -0800

crypt32: Implement CertDuplicateStore.

---

 dlls/crypt32/crypt32.spec |    2 +-
 dlls/crypt32/store.c      |   10 ++++++++++
 include/wincrypt.h        |    2 ++
 3 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/dlls/crypt32/crypt32.spec b/dlls/crypt32/crypt32.spec
index abeff35..7d40394 100644
--- a/dlls/crypt32/crypt32.spec
+++ b/dlls/crypt32/crypt32.spec
@@ -26,7 +26,7 @@
 @ stub CertDuplicateCRLContext
 @ stub CertDuplicateCTLContext
 @ stdcall CertDuplicateCertificateContext(ptr)
-@ stub CertDuplicateStore
+@ stdcall CertDuplicateStore(ptr)
 @ stub CertEnumCRLContextProperties
 @ stdcall CertEnumCRLsInStore(ptr ptr)
 @ stub CertEnumCTLContextProperties
diff --git a/dlls/crypt32/store.c b/dlls/crypt32/store.c
index 47e595c..b8a3d0f 100644
--- a/dlls/crypt32/store.c
+++ b/dlls/crypt32/store.c
@@ -2626,6 +2626,16 @@ PCCTL_CONTEXT WINAPI CertEnumCTLsInStore
     return NULL;
 }
 
+HCERTSTORE WINAPI CertDuplicateStore(HCERTSTORE hCertStore)
+{
+    WINECRYPT_CERTSTORE *hcs = (WINECRYPT_CERTSTORE *)hCertStore;
+
+    TRACE("(%p)\n", hCertStore);
+
+    if (hcs && hcs->dwMagic == WINE_CRYPTCERTSTORE_MAGIC)
+        InterlockedIncrement(&hcs->ref);
+    return hCertStore;
+}
 
 BOOL WINAPI CertCloseStore(HCERTSTORE hCertStore, DWORD dwFlags)
 {
diff --git a/include/wincrypt.h b/include/wincrypt.h
index 678f466..9784223 100644
--- a/include/wincrypt.h
+++ b/include/wincrypt.h
@@ -2605,6 +2605,8 @@ BOOL WINAPI CertSetStoreProperty(HCERTST
 BOOL WINAPI CertControlStore(HCERTSTORE hCertStore, DWORD dwFlags,
  DWORD dwCtrlType, void const *pvCtrlPara);
 
+HCERTSTORE WINAPI CertDuplicateStore(HCERTSTORE hCertStore);
+
 BOOL WINAPI CertCloseStore( HCERTSTORE hCertStore, DWORD dwFlags );
 
 BOOL WINAPI CertFreeCertificateContext( PCCERT_CONTEXT pCertContext );




More information about the wine-cvs mailing list