COM+运行时信息

Alwin_Lee 2001-09-13 04:10:24
当COM+运行时,如果我想在服务器端得到一些信息,
如:当前有多少客户使用服务器组件,每个客户的
名字,连接时间等等,应该使用哪些函数,怎么做?
谢谢!
...全文
129 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
Alwin_Lee 2001-09-14
  • 打赏
  • 举报
回复
好了,终于给上了,帮我解决问题,我不有点表示,是很不好意思的。
谢谢!希望得到你更多的帮助。
XT2 2001-09-14
  • 打赏
  • 举报
回复
never mind
Alwin_Lee 2001-09-14
  • 打赏
  • 举报
回复
to XT2:
Sorry,我想给你分,可不知为什么给不上。
XT2 2001-09-14
  • 打赏
  • 举报
回复
ok, here is some code snippet. Basically you can subscribe IComObjectEvents event interface, which can give you information about a method call/method return, etc.

besides, you can use ISecurityCallContext checking role member ship

ISecurityCallContext* pscc;
hr = ::CoGetCallContext(IID_ISecurityCallContext, (void**)&pscc);
if(hr == S_OK)
{
VARIANT_BOOL bInRole;
hr = pscc->IsCallerInRole(L"xxxxx",&bInRole);

if(hr == S_OK)
{
pvResult->boolVal = bInRole;
}
pscc->Release();
}

use ISecurityIdentityColl to check account information
Alwin_Lee 2001-09-13
  • 打赏
  • 举报
回复
可否再详细点,最好是能有几条语句。
谢谢!
XT2 2001-09-13
  • 打赏
  • 举报
回复
client's name, role membership

GetCallSecurityContext

============================================
connection time

use IComObjectEvents gathers method call time, plus the security context information, you can get the component usage statistics by some specific users.

3,245

社区成员

发帖
与我相关
我的任务
社区描述
ATL,Active Template Library活动(动态)模板库,是一种微软程序库,支持利用C++语言编写ASP代码以及其它ActiveX程序。
社区管理员
  • ATL/ActiveX/COM社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧