如何将S / MIME证书分配给MAPI配置文件以与Outlook一起使用? [英] How To Assign an S/MIME Certificate to a MAPI Profile for Use with Outlook?

查看:155
本文介绍了如何将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


SPropValue SecProp ;

 SPropValue SecProp;



LPSPropValue lpSecProp =& SecProp ;

LPSPropValue lpSecProp = &SecProp;

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)))

{


printf " profile.\ n上的错误设置属性; );

printf("Error setting property on profile.\n");

}

THANKS

推荐答案

嗨!我正在尝试做同样的事情,我也有错误消息:访问被拒绝。有人想出来了吗?

Hi ! I'm trying to do the same, and I also have the error message : access is denied. Has someone figured it out ?

谢谢你b $ b


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

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆