佚名通过本文主要向大家介绍了
为何所有ActiveEXE对象无法创建,均提示“没有权限Permissiondenied”等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
问题: 为何所有ActiveEXE 对象无法创建,均提示“没有权限Permission denied”
描述:
解决方案1:
描述:
我是用管理员权限的账号登陆和操作的。
是不是COM的配置有问题?如何解决啊?
解决方案1:
在ATL 的CAtlServiceModuleT< Ct1Module, IDS_SERVICENAME >的派生类的InitializeSecurity里初始化安全属性:
HRESULT InitializeSecurity() throw()
{
// TODO : Call CoInitializeSecurity and provide the appropriate security settings for
// your service
// Suggested - PKT Level Authentication,
// Impersonation Level of RPC_C_IMP_LEVEL_IDENTIFY
// and an appropiate Non NULL Security Descriptor.
return CoInitializeSecurity(NULL, -1, NULL, NULL,
RPC_C_AUTHN_LEVEL_NONE, RPC_C_IMP_LEVEL_ANONYMOUS, NULL, EOAC_NONE, NULL);
}