如何以另一个(更有特权的)用户身份启动进程外 COM 服务器

发布于 2024-07-20 05:38:01 字数 113 浏览 8 评论 0原文

我想创建一个 COM 对象,该对象作为另一个用户在进程外 COM 服务器中运行。 我怎么做?

我可以控制 COM 服务器源代码,而我的 COM 客户端是唯一创建这些 COM 对象的客户端。

I would like to create a COM object that runs in an out of process COM server as another user. How do I do that?

I have control over the COM server source code and my COM client is the only one that will be creating these COM objects.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

极度宠爱 2024-07-27 05:38:01

我们使用 COM+ 以网络用户身份运行对象,该用户拥有我们赋予它的某些权限(大多数是对 SQL 服务器的 Windows 身份验证)。这并不能控制谁可以调用这些对象,以利用我们赋予它的安全性。

在 Vista 和未来版本中,COM 提升功能可以完全满足您的需求。 哦,好像刚刚有人发过这个帖子。 按照他们留下的链接进行操作。

We use COM+ to run objects as a network user that has certain rights we have given it (most to Windows Authentication to a SQL server.) What this doesn't do is control who can call these objects to untilize the security we have given it.

In Vista and future, there is a COM elevation capability that does exactly what you are looking for. Oh, looks like someone just posted that. Follow the link they left.

月竹挽风 2024-07-27 05:38:01

你是为 Vista 写的吗? 如果是这样,您可以使用特殊的 COM 调用在提升状态下运行 COM 对象。 有关更多详细信息,请参阅本文文章。

如果您不是在谈论 UAC,您可以查看 CoInitializeSecurity 函数。

Are you writing this for Vista? If so, you can use a special COM invokation that runs the COM object in an elevated state. See this article for more details.

If you are not talking about UAC, you might checkout the CoInitializeSecurity function.

梦醒时光 2024-07-27 05:38:01

使用 RunAs - 请参阅 http://msdn.microsoft。 com/en-us/library/ms680046(VS.85).aspx

注意:此设置也可以通过“DCOM 配置”下的 dcomcnfg (Win2000) 或 comexp.msc (WinXP+) 进行配置。

如果您的对象是作为 InProc 服务器实现的,则可以将其与 DLL 代理项结合起来(请参阅 http://msdn.microsoft.com/en-us/library/ms691260(VS .85).aspx)。

Use RunAs -- see http://msdn.microsoft.com/en-us/library/ms680046(VS.85).aspx.

N.B. This setting can also be configured via dcomcnfg (Win2000) or comexp.msc (WinXP+) under "DCOM config"

If your object is implemented as an InProc server, you may combine this with a DLL surrogate (see http://msdn.microsoft.com/en-us/library/ms691260(VS.85).aspx).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文