求助,关于函数CryptDecodeObject——100块 (100分)

X

xmmpgg

Unregistered / Unconfirmed
GUEST, unregistred user!
我的源代码如下:<br>其中用到的变量和他要求的都一致<br><br>&nbsp; pCertContext:=CertEnumCertificatesInStore(hSysStore,pCertContext);<br>&nbsp; pNewCertContext := CertCreateCertificateContext(MY_ENCODING_TYPE,<br>&nbsp; &nbsp; &nbsp; pCertContext.pbCertEncoded,pCertContext.cbCertEncoded);<br><br>&nbsp; if boolean(pNewCertContext) then<br>&nbsp; begin<br>&nbsp; &nbsp; cbData := pNewCertContext.pCertInfo.Issuer.cbData<br>&nbsp; &nbsp; pbData := pNewCertContext.pCertInfo.Issuer.pbData;<br><br>&nbsp; //就是这里函数出问题了 &nbsp;<br>&nbsp; if CryptDecodeObject(MY_ENCODING_TYPE,X509_NAME,<br>&nbsp; &nbsp; &nbsp; &nbsp; pbData,cbData,CRYPT_DECODE_NOCOPY_FLAG,nil,cbDedata) then<br>&nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; pbDedata := Allocmem(cbDeData^);<br>&nbsp; &nbsp; &nbsp; if CryptDecodeObject(MY_ENCODING_TYPE,X509_NAME,<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;pbData,cbData,CRYPT_DECODE_NOCOPY_FLAG,pbDedata,cbDedata) then<br>&nbsp; &nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; &nbsp; //<br>&nbsp; &nbsp; &nbsp; end;<br>&nbsp; &nbsp; end;<br><br>&nbsp; &nbsp; end;<br>
 
B

BBQOLDCAT

Unregistered / Unconfirmed
GUEST, unregistred user!
学习学习,给点分吧。哈哈。
 
X

xmmpgg

Unregistered / Unconfirmed
GUEST, unregistred user!
居然没有人理,<br><br>不过我倒是有答案了。
 
I

illcat

Unregistered / Unconfirmed
GUEST, unregistred user!
hehe,我知道了,<br>是要得到证书的信息,可是在这里,应该<br>用不到CryptDecodeObject这个函数啊,<br>再仔细看看MSDN中的介绍。
 
X

xmmpgg

Unregistered / Unconfirmed
GUEST, unregistred user!
接受答案了.
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
666
import
I
顶部