Click here to Skip to main content
15,885,546 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionA program in task bar Pin
kk.tvm7-Feb-10 19:02
kk.tvm7-Feb-10 19:02 
AnswerRe: A program in task bar Pin
«_Superman_»7-Feb-10 19:39
professional«_Superman_»7-Feb-10 19:39 
QuestionHelp - Some Registry Settings not Applicable on Server. Pin
Le@rner7-Feb-10 18:11
Le@rner7-Feb-10 18:11 
AnswerRe: Help - Some Registry Settings not Applicable on Server. Pin
Kushagra Tiwari7-Feb-10 19:13
Kushagra Tiwari7-Feb-10 19:13 
GeneralRe: Help - Some Registry Settings not Applicable on Server. Pin
Le@rner7-Feb-10 22:14
Le@rner7-Feb-10 22:14 
QuestionHOWTO: how to add watermark to bitmap/jpg file? Pin
Symfund7-Feb-10 15:03
Symfund7-Feb-10 15:03 
AnswerRe: HOWTO: how to add watermark to bitmap/jpg file? Pin
CPallini7-Feb-10 21:00
mveCPallini7-Feb-10 21:00 
Question[Solved]Loading a certificate and creating a PCCERT_CONTEXT returns 2148086027 [modified] Pin
mmavipc37-Feb-10 11:55
mmavipc37-Feb-10 11:55 
Edit: looks like the cert cant be base-64 encoded
cacert.cer is a X509 base64 encoded certificate
ifstream file ("cacert.cer", ios::in|ios::binary|ios::ate);
char * memblock;
int size;
if (file.is_open())
{
    size = file.tellg();
    memblock = new char [size+1];
    file.seekg (0, ios::beg);
    file.read (memblock, size);
    memblock[size]=0;
    file.close();

    cout << "Certificate file has been loaded!\n";
}
byte* byteblock = new byte;
byteblock = (byte*)memblock;
//cout << *byteblock[30] << "\n";
mycert = CertCreateCertificateContext(X509_ASN_ENCODING,byteblock,size);
if (!mycert){
    cout << "error: " << GetLastError() << "\n";
}else{
    cout << mycert->pbCertEncoded << " encoded cert\n";
}

What am I doing wrong?
modified on Sunday, February 7, 2010 6:03 PM

QuestionFormatting text based on delimeter Pin
gregarion7-Feb-10 9:22
gregarion7-Feb-10 9:22 
AnswerRe: Formatting text based on delimeter Pin
Garth J Lancaster7-Feb-10 9:47
professionalGarth J Lancaster7-Feb-10 9:47 
QuestionHow do you type the &quot;or&quot; Pin
fudgemaster7-Feb-10 5:15
fudgemaster7-Feb-10 5:15 
AnswerRe: How do you type the &quot;or&quot; Pin
CPallini7-Feb-10 5:53
mveCPallini7-Feb-10 5:53 
GeneralRe: How do you type the &amp;quot;or&amp;quot; Pin
Tim Craig7-Feb-10 13:47
Tim Craig7-Feb-10 13:47 
AnswerRe: How do you type the &amp;amp;quot;or&amp;amp;quot; Pin
Luc Pattyn7-Feb-10 14:47
sitebuilderLuc Pattyn7-Feb-10 14:47 
GeneralRe: How do you type the &amp;amp;amp;quot;or&amp;amp;amp;quot; Pin
Tim Craig7-Feb-10 18:12
Tim Craig7-Feb-10 18:12 
GeneralRe: How do you type the &amp;amp;quot;or&amp;amp;quot; Pin
CPallini7-Feb-10 20:46
mveCPallini7-Feb-10 20:46 
AnswerRe: How do you type the &amp;amp;quot;or&amp;amp;quot; Pin
David Crow8-Feb-10 5:10
David Crow8-Feb-10 5:10 
GeneralRe: How do you type the &amp;amp;quot;or&amp;amp;quot; Pin
CPallini8-Feb-10 6:48
mveCPallini8-Feb-10 6:48 
GeneralRe: How do you type the &amp;quot;or&amp;quot; Pin
Tim Craig8-Feb-10 14:13
Tim Craig8-Feb-10 14:13 
GeneralRe: How do you type the "or" Pin
CPallini9-Feb-10 20:33
mveCPallini9-Feb-10 20:33 
AnswerRe: How do you type the OR Pin
Luc Pattyn7-Feb-10 5:55
sitebuilderLuc Pattyn7-Feb-10 5:55 
AnswerRe: How do you type the &amp;quot;or&amp;quot; Pin
Abhi Lahare7-Feb-10 16:44
Abhi Lahare7-Feb-10 16:44 
Questionusb driver to my simple hardware Pin
ammeer_a7-Feb-10 5:00
ammeer_a7-Feb-10 5:00 
AnswerRe: usb driver to my simple hardware Pin
Code-o-mat7-Feb-10 6:07
Code-o-mat7-Feb-10 6:07 
GeneralRe: usb driver to my simple hardware Pin
ammeer_a7-Feb-10 6:30
ammeer_a7-Feb-10 6:30 

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.