<div dir="ltr">Thanks for look into this,<div><div><br></div><div>void * pKey = LockResource(hHandle);</div></div><div><br></div><div>The code works most of the time, only occasionally generates exception and Not sure why on DSA_free(pDSA);</div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 11, 2017 at 2:57 PM, Salz, Rich <span dir="ltr"><<a href="mailto:rsalz@akamai.com" target="_blank">rsalz@akamai.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> DSA *pDSA = d2i_DSA_PUBKEY(NULL, (const unsigned char **) &pKey, dwKeySize);<br>
<br>
Where and how is pKey set?  Not that the manpage says it's incremented to point *past* the object, so you need something like<br>
        unsigned char data = .....whatever your data source is .....<br>
        unsigned char *pKey = data<br>
and then use &pKey in your call<br>
<br>
</blockquote></div><br></div>