NetWkstaGetInfo函数到底以那个为准?
我想获取局域网内某台机器(通过IP或者机器名称)属于哪个工作组,NetWkstaGetInfo函数来实现,但是发现
MSDN上NetWkstaGetInfo函数原形为
NET_API_STATUS NetWkstaGetInfo(
LPWSTR servername,
DWORD level,
LPBYTE *bufptr
);
servername:要传unicode string
msdn上描述:Pointer to a Unicode string containing the name of the remote server on which the function is to execute. A NULL pointer or string specifies the local computer
但是在vc的lmwksta.h中却为
NET_API_STATUS NET_API_FUNCTION
NetWkstaGetInfo (
IN LPTSTR servername OPTIONAL,
IN DWORD level,
OUT LPBYTE *bufptr
);
servername传字符串即可
这是microsoft的错吗?