Using Win32 functions in Visual FoxPro Image Gallery
Cryptography Reference
..msdn
CertCloseStore
CertFindCertificateInStore
CertFreeCertificateContext
CertOpenSystemStore
CryptAcquireContext
CryptBinaryToString
CryptCreateHash
CryptDecrypt
CryptDeriveKey
CryptDestroyHash
CryptDestroyKey
CryptEncrypt
CryptEnumProviders
CryptEnumProviderTypes
CryptExportKey
CryptGenKey
CryptGenRandom
CryptGetDefaultProvider
CryptGetHashParam
CryptGetKeyParam
CryptGetProvParam
CryptHashData
CryptImportKey
CryptProtectData
CryptReleaseContext
CryptStringToBinary
CryptUnprotectData
WinVerifyTrust
Code examples:
CertFindCertificateInStore
..msdn    Add comment     W32 Constants      Translate this page
Finds the first or next certificate context in a certificate store that matches a search criteria established by the dwFindType and its associated pvFindPara.
Code examples:
Declaration:
PCCERT_CONTEXT WINAPI CertFindCertificateInStore(
    HCERTSTORE hCertStore,
    DWORD dwCertEncodingType,
    DWORD dwFindFlags,
    DWORD dwFindType,
    const void* pvFindPara,
    PCCERT_CONTEXT pPrevCertContext
);


FoxPro declaration:
DECLARE INTEGER CertFindCertificateInStore IN crypt32;
    INTEGER hCertStore,;
    LONG dwCertEncodingType,;
    LONG dwFindFlags,;
    LONG dwFindType,;
    INTEGER pvFindPara,;
    INTEGER pPrevCertContext
Parameters:
hCertStore
[in] A handle of the certificate store to be searched. See CertOpenSystemStore, CertOpenStore.

dwCertEncodingType
[in] Specifies the type of encoding used. Both the certificate and message encoding types must be specified by combining them with a bitwise-OR operation.

dwFindFlags
[in] Used with some dwFindType values to modify the search criteria.

dwFindType
[in] Specifies the type of search being made.

pvFindPara
[in] Points to a data item or structure used with dwFindType.

pPrevCertContext
[in] A pointer to the last CERT_CONTEXT structure returned by this function (previous call). This parameter must be NULL on the first call of the function.
Return value:
If the function succeeds, the function returns a pointer to a read-only CERT_CONTEXT structure.
My comment:
A non-NULLCERT_CONTEXT that CertFindCertificateInStore returns must be freed by CertFreeCertificateContext or by being passed as the pPrevCertContext parameter on a subsequent call to CertFindCertificateInStore.

#DEFINE PKCS_7_ASN_ENCODING 0x00010000
#DEFINE X509_ASN_ENCODING 1
#DEFINE CERT_FIND_ANY 0

LOCAL hBuffer
hBuffer = 0

hBuffer = CertFindCertificateInStore(hStore,;
        BITOR(PKCS_7_ASN_ENCODING, X509_ASN_ENCODING),;
        0, CERT_FIND_ANY, 0, 0)

? "Pointer to CERT_CONTEXT structure:", hBuffer

IF hBuffer <> 0
        = CertFreeCertificateContext(hBuffer)
ENDIF
Word Index links for the CertFindCertificateInStore :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2007-01-11 16:50:23
Modified: 2007-01-11 16:55:53
Visited in last 7 days: 16
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.37), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.161.73.123)
15 sec.Function: 'CeCreateProcess'
30 sec.
Function group: 'Multilingual User Interface'
44 sec.Function: 'CryptGenRandom'
55 sec.
Function group: 'Bitmap'
1.13 min.
Function group: 'Security'
1.35 min.Function: 'FreeEnvironmentStrings'
1.6 min.Function: 'GdipDeleteMatrix'
1.8 min.
Function group: 'HTTP Functions (WinHTTP)'
2.02 min.Function: 'GetFileVersionInfo'
2.22 min.Function: 'FtpRenameFile'
Google
Advertise here!