Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15229

Please Please help with this API : CertFindCertificateInStore

$
0
0
@dimsumZ, @Merrion,
long time passed since this post was first posted (20 years actually...)

Due to technical contraints, I am forced to use Excel and VBA.
Trying to run the code you did, but when calling "i = CertFindCertificateInStoreByLong..." Excel simply crashes.

this is my call:
Dim i As LongPtr
Dim j As CERT_CONTEXT

' https://referencesource.microsoft.co...18d2a75444cd00
' internal const uint PKCS_7_ASN_ENCODING = 0x00010000;

Dim X509_ASN_ENCODING As LongPtr
Dim CERT_FIND_ANY As LongPtr

' internal const uint X509_ASN_ENCODING = 0x00000001;
X509_ASN_ENCODING = 1

'internal const uint CERT_COMPARE_SHIFT = 16;
'internal const uint CERT_COMPARE_ANY = 0;
'internal const uint CERT_FIND_ANY = ((int)CERT_COMPARE_ANY << (int)CERT_COMPARE_SHIFT);
CERT_FIND_ANY = 0

i = CertFindCertificateInStoreByLong( _
CLngPtr(system_Store_Handler), _
X509_ASN_ENCODING, _
0, _
CERT_FIND_ANY, _
vbNull, _
vbNull) '<--This must be null the first time...


If you guys have running code, I would love to see the full example.

Thanks and god bless you...

Viewing all articles
Browse latest Browse all 15229

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>