用于检索组信息的NetQueryDisplayInformation问题

时间:2011-08-23 11:05:57

标签: windows api

我正在使用:: NetQueryDisplayInformation()API来检索本地计算机组信息。我正在升级程序。 问题是它只返回“无”组名(仅一组)。我已成功使用相同的API从本地计算机和Active Directory检索用户帐户。

我将它用于群组:

unsigned long index = 0, count = 0;
void *buffer = nullptr;
unsigned long result = 0;
result = ::NetQueryDisplayInformation ( 
                                /* serverName */NULL, 
                                /*Level*/ 3,
                                /*Index*/index,
                                /*Entries requested*/100,
                                /*PreferredMaximumLength */MAX_PREFERRED_LENGTH,
                                /*ReturnedEntryCount*/&count,
                                /*SortedBuffer*/&buffer);

计数返回为1。

1 个答案:

答案 0 :(得分:0)

我能够使用NetQueryDisplayInformation检索AD用户组信息,但是......(通过将服务器/名称设置为不同于NULL的smth)

相关问题