Windows 用于检索组信息的NetQueryDisplayInformation问题
我正在使用::NetQueryDisplayInformation API检索本地计算机组信息。我正在运行这个程序。 问题是它只返回“无组名”“仅一个组”。我已经成功地使用相同的API从本地计算机和Active Directory检索用户帐户 我将其用于以下组:Windows 用于检索组信息的NetQueryDisplayInformation问题,windows,api,Windows,Api,我正在使用::NetQueryDisplayInformation API检索本地计算机组信息。我正在运行这个程序。 问题是它只返回“无组名”“仅一个组”。我已经成功地使用相同的API从本地计算机和Active Directory检索用户帐户 我将其用于以下组: unsigned long index = 0, count = 0; void *buffer = nullptr; unsigned long result = 0; result = ::NetQueryDisplayInform
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。我可以使用NetQueryDisplayInformation检索广告用户组信息,不过。。。通过将server/name设置为不同于NULL的smthSo,在仅检索本地计算机组信息时,此选项似乎无法按预期工作。