本文介绍了如何将S / MIME证书分配给MAPI配置文件以与Outlook一起使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将S / MIME证书分配给MAPI配置文件以用于Outlook?

How To Assign an S/MIME Certificate to a MAPI Profile for Use with Outlook?

我使用的是原生c ++ Mapi,但仍未找到方法

I am using native c++ Mapi but still havent found the way


我看到这篇文章,但它没有多大帮助
http://support.microsoft.com/?kbid=312900

我正在尝试上面的例子,但总是得到ACCESSDENIED。也许问题出在设置但我找不到

I was trying the example from above but always get ACCESSDENIED . maybe the problem is in setting but i cant find it


SBinary sbCert ;

SBinary sbCert;

LPBYTE lpbCertBlob = NULL ;

LPBYTE lpbCertBlob = NULL;

ULONG cbCertBlob = 0;

ULONG cbCertBlob = 0;

//执行生成lpbCertBlob的工作(步骤3)并打开GUID_Dilkie配置文件部分。

// Do the work to generate lpbCertBlob (step 3) and open GUID_Dilkie profile section.

///这里是证书设置的代码

///HERE IS THE CODE WHERE THE CERTIFICATE IS SET

//为PR_SECURITY_PROFILES设置属性标签结构。

// Set up property tag structure for PR_SECURITY_PROFILES.

SecProp ulPropTag = PR_SECURITY_PROFILES ;

SecProp.ulPropTag = PR_SECURITY_PROFILES;

SecProp Value MVbin cValues = 1;

SecProp.Value.MVbin.cValues = 1;

SecProp MVbin lpbin =& sbCert ;

SecProp.Value.MVbin.lpbin = &sbCert;

SecProp MVbin lpbin - > cb = m_pCertContext - > cbCertEncoded ; // cbCertBlob;

SecProp.Value.MVbin.lpbin->cb =m_pCertContext->cbCertEncoded; //cbCertBlob;

SecProp Value MVbin lpbin - > lpb = m_pCertContext - > pbCertEncoded ; // lpbCertBlob;

SecProp.Value.MVbin.lpbin->lpb = m_pCertContext->pbCertEncoded; //lpbCertBlob;

//在配置文件部分设置属性。

// Set properties on the profile section.

if FAILED hr = lpProfSect - > ; SetProps (1, lpSecProp NULL )))

if (FAILED(hr = lpProfSect->SetProps(1, lpSecProp, NULL)))

{

}

THANKS

推荐答案

谢谢你b $ b


这篇关于如何将S / MIME证书分配给MAPI配置文件以与Outlook一起使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-22 03:16