Illegal Indirection Error - CertFindChainInStore

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Aug 2009
Posts: 9
Reputation: AceiferMaximus is an unknown quantity at this point 
Solved Threads: 0
AceiferMaximus AceiferMaximus is offline Offline
Newbie Poster

Illegal Indirection Error - CertFindChainInStore

 
0
  #1
Aug 27th, 2009
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.


  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. }
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 320
Reputation: cikara21 is an unknown quantity at this point 
Solved Threads: 63
cikara21's Avatar
cikara21 cikara21 is offline Offline
Posting Whiz

Re: Illegal Indirection Error - CertFindChainInStore

 
0
  #2
Aug 27th, 2009
Remove the '*'..Should be just 'pvFindPara'..
.:-cikara21-:.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC