Click here to Skip to main content
15,892,005 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Using GetThreadContext to get the Program Counter of a thread Pin
Code-o-mat27-Aug-09 20:19
Code-o-mat27-Aug-09 20:19 
Questionraw input only to an application Pin
Manikandan27-Aug-09 7:47
Manikandan27-Aug-09 7:47 
QuestionIllegal Indirection Error - CertFindChainInStore Pin
mypicturefaded27-Aug-09 6:24
mypicturefaded27-Aug-09 6:24 
AnswerRe: Illegal Indirection Error - CertFindChainInStore Pin
Rajesh R Subramanian27-Aug-09 6:42
professionalRajesh R Subramanian27-Aug-09 6:42 
GeneralRe: Illegal Indirection Error - CertFindChainInStore Pin
mypicturefaded27-Aug-09 6:50
mypicturefaded27-Aug-09 6:50 
GeneralRe: Illegal Indirection Error - CertFindChainInStore Pin
Rajesh R Subramanian27-Aug-09 9:52
professionalRajesh R Subramanian27-Aug-09 9:52 
GeneralRe: Illegal Indirection Error - CertFindChainInStore Pin
David Crow27-Aug-09 10:05
David Crow27-Aug-09 10:05 
GeneralRe: Illegal Indirection Error - CertFindChainInStore Pin
mypicturefaded27-Aug-09 10:06
mypicturefaded27-Aug-09 10:06 
I am aware that it is a horrible thing to do.
But for this example I highly doubt it is messing with anything I am doing.
I need to be able to get the Certificate Chain so I can plug it into an Adobe app.

I don't know why you feel the need to pick apart my wording.
The code complies, and runs, but I am not getting the expected results.

The while loop is failing and going to the end of the program. So it isn't picking up the certificates.

#include <iostream>
#include "windows.h"
#include "Wincrypt.h"
#pragma comment(lib, "Crypt32") 

int main()
{
	PCCERT_CHAIN_CONTEXT chainContext;
	HCERTSTORE certStore = "MY";
	DWORD dwCertEncodingType = X509_ASN_ENCODING;
	DWORD dwFindFlags = CERT_CHAIN_FIND_BY_ISSUER_NO_KEY_FLAG;
	DWORD dwFindType = CERT_CHAIN_FIND_BY_ISSUER;
	const void *pvFindPara = "MyIssuer";
	PCCERT_CHAIN_CONTEXT pPrevChainContext = NULL;

	while (chainContext = CertFindChainInStore(certStore,
		dwCertEncodingType,
		dwFindFlags,
		dwFindType,
		pvFindPara,
		pPrevChainContext))
	{
		printf((const char*)chainContext);
	}

	system("PAUSE");
	return 0;
}


Yes David you are right, that is the correct link.
QuestionRe: Illegal Indirection Error - CertFindChainInStore Pin
David Crow27-Aug-09 10:40
David Crow27-Aug-09 10:40 
AnswerRe: Illegal Indirection Error - CertFindChainInStore Pin
mypicturefaded28-Aug-09 4:33
mypicturefaded28-Aug-09 4:33 
GeneralRe: Illegal Indirection Error - CertFindChainInStore Pin
Randor 28-Aug-09 5:07
professional Randor 28-Aug-09 5:07 
QuestionMaximize window Pin
zhenek9127-Aug-09 4:49
zhenek9127-Aug-09 4:49 
AnswerRe: Maximize window Pin
«_Superman_»27-Aug-09 16:40
professional«_Superman_»27-Aug-09 16:40 
AnswerRe: Maximize window Pin
ThatsAlok28-Aug-09 0:40
ThatsAlok28-Aug-09 0:40 
QuestionI have many errors but I don't know why? Pin
moh.hijjawi27-Aug-09 3:41
moh.hijjawi27-Aug-09 3:41 
AnswerRe: I have many errors but I don't know why? Pin
Code-o-mat27-Aug-09 3:44
Code-o-mat27-Aug-09 3:44 
GeneralRe: I have many errors but I don't know why? Pin
moh.hijjawi27-Aug-09 4:35
moh.hijjawi27-Aug-09 4:35 
AnswerRe: I have many errors but I don't know why? Pin
Luc Pattyn27-Aug-09 7:44
sitebuilderLuc Pattyn27-Aug-09 7:44 
GeneralRe: I have many errors but I don't know why? Pin
moh.hijjawi29-Aug-09 4:37
moh.hijjawi29-Aug-09 4:37 
Questionfix data in virtual listctrl Pin
yiyinkuang27-Aug-09 2:42
yiyinkuang27-Aug-09 2:42 
QuestionRe: fix data in virtual listctrl Pin
David Crow27-Aug-09 3:05
David Crow27-Aug-09 3:05 
AnswerRe: fix data in virtual listctrl Pin
yiyinkuang27-Aug-09 3:46
yiyinkuang27-Aug-09 3:46 
QuestionRe: fix data in virtual listctrl Pin
David Crow27-Aug-09 4:10
David Crow27-Aug-09 4:10 
AnswerRe: fix data in virtual listctrl Pin
yiyinkuang27-Aug-09 4:25
yiyinkuang27-Aug-09 4:25 
GeneralRe: fix data in virtual listctrl Pin
David Crow27-Aug-09 4:58
David Crow27-Aug-09 4:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.