943,696 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 412
  • C++ RSS
Aug 27th, 2009
0

Illegal Indirection Error - CertFindChainInStore

Expand Post »
I am getting an Illegal Indirection Error on this code, and I am not quite sure what I am doing wrong.

http://msdn.microsoft.com/en-us/libr...65(VS.85).aspx

That link shows the function and what it should do. Am I on the right track? What do I have to do to fix the error.


C++ Syntax (Toggle Plain Text)
  1. #include <iostream>
  2. #include "windows.h"
  3. #include "Wincrypt.h"
  4.  
  5. int main()
  6. {
  7. PCCERT_CHAIN_CONTEXT chainContext;
  8. HCERTSTORE certStore = "MY";
  9. DWORD dwCertEncodingType = X509_ASN_ENCODING;
  10. DWORD dwFindFlags = CERT_CHAIN_FIND_BY_ISSUER_NO_KEY_FLAG;
  11. DWORD dwFindType = CERT_CHAIN_FIND_BY_ISSUER;
  12. const void *pvFindPara = "MyIssuer";
  13. PCCERT_CHAIN_CONTEXT pPrevChainContext = NULL;
  14.  
  15. while (chainContext = CertFindChainInStore(certStore,
  16. dwCertEncodingType,
  17. dwFindFlags,
  18. dwFindType,
  19. *pvFindPara, //This line contains the error.
  20. pPrevChainContext))
  21. {
  22. printf((const char*)chainContext);
  23. }
  24.  
  25. system("PAUSE");
  26. return 0;
  27. }
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
AceiferMaximus is offline Offline
9 posts
since Aug 2009
Aug 27th, 2009
0

Re: Illegal Indirection Error - CertFindChainInStore

Remove the '*'..Should be just 'pvFindPara'..
Reputation Points: 47
Solved Threads: 69
Posting Whiz
cikara21 is offline Offline
340 posts
since Jul 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Function questions
Next Thread in C++ Forum Timeline: Hex char to string.





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC