作者在 2009-01-04 17:34:57 发布以下内容
void CFVImpCert::ShowCertMoreInfo(unsigned char *pCert, unsigned long ulCertLen)
{
char tempStr[MAX_PATH] = {0}, runString[512] = {0};
STARTUPINFO sSTARTUPINFO;
PROCESS_INFORMATION sPROCESS_INFORMATION;
GetTempPath(MAX_PATH,tempStr);
strcat(tempStr,“~SECTEC~.cer“);
FILE * fp=fopen(tempStr,“wb“);
fwrite(pCert, 1, ulCertLen, fp);
fclose(fp);
memset(&sSTARTUPINFO,0,sizeof(sSTARTUPINFO));
sSTARTUPINFO.cb = sizeof(sSTARTUPINFO);
sprintf(runString,“rundll32 CryptExt.dll,CryptExtOpenCER %s“,tempStr);
CreateProcess(NULL, runString, NULL,NULL, TRUE, NORMAL_PRIORITY_CLASS, NULL,NULL, &sSTARTUPINFO, &sPROCESS_INFORMATION);
}
{
char tempStr[MAX_PATH] = {0}, runString[512] = {0};
STARTUPINFO sSTARTUPINFO;
PROCESS_INFORMATION sPROCESS_INFORMATION;
GetTempPath(MAX_PATH,tempStr);
strcat(tempStr,“~SECTEC~.cer“);
FILE * fp=fopen(tempStr,“wb“);
fwrite(pCert, 1, ulCertLen, fp);
fclose(fp);
memset(&sSTARTUPINFO,0,sizeof(sSTARTUPINFO));
sSTARTUPINFO.cb = sizeof(sSTARTUPINFO);
sprintf(runString,“rundll32 CryptExt.dll,CryptExtOpenCER %s“,tempStr);
CreateProcess(NULL, runString, NULL,NULL, TRUE, NORMAL_PRIORITY_CLASS, NULL,NULL, &sSTARTUPINFO, &sPROCESS_INFORMATION);
}