C++ DLL and CertFindCertificateInStore

I have been struggling to read a certificate in windows store from C++ DLL, but its not happening. from console application I can but when same code built as a DLL and tried to access from a separate console application. I think its not going to windows store to read the cert.

Can any body help me here, please.

Thanks.

pCertContext = CertFindCertificateInStore((HCERTSTORE)*pCertStore, X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, 0, CERT_FIND_ISSUER_OF, operator PCCERT_CONTEXT(), pCertContext);

int Error = GetLastError();

if (Error == 0)
LINFO << "\nSigntuare is valid\n";
else
LINFO << std::hex << Error << '\n' << "GetLastErrorStdStr=\n" << GetLastErrorStdStr();

it returns 80092004
GetLastErrorStdStr= C a n n o t f i n d o b j e c. Any idea or hint ??
Topic archived. No new replies allowed.