IID_IADsGroup IsMember始终返回false [英] IID_IADsGroup IsMember always returned false

查看:95
本文介绍了IID_IADsGroup IsMember始终返回false的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我改编了MSDN示例,https://msdn.microsoft.com/en-us/library/aa706023%28v=vs.85%29.aspx?f = 255& MSPPError = -2147217396,我的环境。 与示例一样,我使用的是带有C ++的WinNT提供程序。 我发现IsMember总是
返回false。 这看起来像这里的讨论:  http://www.archivum.info/microsoft.public.adsi.general/2005-11/00108/IADsGroup-IsMember-always-returning-VARIANT_FALSE.html. 那么,发生了什么,这是一个自2005年以来
以来一直存在的错误。 就像讨论一样,我发现我可以枚举用户的组,该组的IsMember不返回true?

I adapted the MSDN example, https://msdn.microsoft.com/en-us/library/aa706023%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396, to my environment.  Like the example, I am using the WinNT provider with C++.  I find that IsMember always returns false.  This looks a like like the discussion here:  http://www.archivum.info/microsoft.public.adsi.general/2005-11/00108/IADsGroup-IsMember-always-returning-VARIANT_FALSE.html.  So, what's going on, is this a bug that's been here since 2005.  Like the discussion, I find I can enumerate the groups of a user, what doesn't IsMember of the group return true?

推荐答案

感谢您在这里发帖。

>>就像示例,我正在使用带有C ++的WinNT提供程序。 我发现IsMember总是返回false

请提供有关返回值的更多信息。你得到了哪些错误代码?

Please provide more information about your return value. Which error code do you get?

你应该注意的一件事是IADsGroup :: IsMember方法只有在组和对象在同一个域中时才能正常工作。如果对象与组不在同一个域中,则IADsGroup :: IsMember将始终返回VARIANT_FALSE。

One thing you should notice is the IADsGroup::IsMember method will only work correctly if the group and the object are in the same domain. If the object is in a different domain than the group, IADsGroup::IsMember will always return VARIANT_FALSE.

如果您想发布此方法的问题,请在此论坛发布。

If you want to post an issue with this method, please post on this forum below.

https://developercommunity.visualstudio.com/spaces/8/index .html

希望这可以帮到你。

最好的问候,

Baron Bi

Baron Bi


这篇关于IID_IADsGroup IsMember始终返回false的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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