NetServerEnum() is not showing false value for UNIX/MAC

Aditya Sonway 1 Reputation point
2020-12-07T12:14:56.933+00:00

Hi Team,

I am using the NetServerEnum function to enumerate the network and printing all records. But I'm getting the same SV type for MAC OS system and Windows10 system. Also, sv101_version_major and sv101_version_minor are wrong. Kindly let me know how this function works, and from where I am getting these values. What is the limitation of this API.

printed logs using the provided example is:

NetServerEnum(pszServerName,
dwLevel,
(LPBYTE *) & pBuf,
dwPrefMaxLen,
&dwEntriesRead,
&dwTotalEntries,
dwServerType,
pszDomainName,
&dwResumeHandle);

//Printing logs:
printf("\tPlatform: %d\n", pTmpBuf->sv101_platform_id);
wprintf(L"\tName: %s\n", pTmpBuf->sv101_name);
printf("\tVersion: %d.%d\n",
pTmpBuf->sv101_version_major,
pTmpBuf->sv101_version_minor);
printf("\tType: %d", pTmpBuf->sv101_type);

Output=>
Platform: 500
Name: MACMINI-558088
Version: 6.1
Type: 4099

    Platform: 500
    Name:     MAILSRV
    Version:  6.1
    Type:     8493571

    Platform: 500
    Name:     WIN1019H2X64
    Version:  10.0
    Type:     4099

Where macmini is MAC and mailsrv is unix system. sv_type of macmini and WIN1019H2X64 is the same. sv101_version_major and sv101_version_minor is same for UNIX and MAC system, which use SAMBA. Kindly let me know why it is? So I can differentiate these systems using predefined macros in lmserver.h.

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,472 questions
{count} votes