>I have a VFP6 app running, and was wondering if there is a way
>through code to know if the workstation (95/NT) is accessing
>a Netware or NT or Linux server through code without a 3rd
>party add-on.
The API call NetServerGetInfo() can return a SERVER_INFO_101 structure; the
sv101_type member of the structure gives you sufficient information to id the server type, and the operating system version is identified in the
sv101_version_major and
sv101_version_minor members.
The API call is declared as:
DECLARE INTEGER NetServerGetInfo IN NETAPI32.DLL ;
STRING servername, ;
INTEGER level, ;
STRING bufptr
You need to preallocate the buffer, and it really should be allocated and released with the NetAPI buffer API calls. Pass 101 as the value for level to get back the SERVER_INFO_101 structure. No special privileges are needed to make the call.
Under Win95, use SVRAPI.DLL instead of NETAPI32.DLL