Simon,
This is an except from a Windows Management Instrumentation class I have.
define class SesWMI as session
oWMI = .NULL.
function Init
local llretval
llretval = .T.
With THIS
.oWMI = getobject('winmgmts:')
llretval = vartype(.oWMI) = "O"
Endwith
return llretval
endfunc
function Destroy
THIS.oWMI = .NULL.
endfunc
function Release
release THIS
endfunc
function ListNetworkClients
local locolcli, locli
clear
With THIS
locolcli = .oWMI.InstancesOf('Win32_NetworkClient')
for each locli in locolcli
? locli.Name, locli.Status
endfor
Endwith
endfunc
enddefine
This works on Windows NT/2000/XP. Since the WMI taps into the underlying WinAPI, you may be able to use this as a generic solution.
Caveat: Haven't tested this with the Novell client loaded. It does work with the MS Client for Netware loaded.
HTH.
>I need to know how to find the type of network installed (Netware, Windows, possibly the version of Windows server involved).
>
>Having got that information, I then want to know in the case of Netware, the version of the client shell being used.
>
>(As some of you may know, there are issues with some of these shells causing data corruption with VFP, so I want to display a message/cancel my app with these.)
>
>I have found some example code on the news2news site. However the code to identify network type doesn't work for me on Netware.
>
>We are currently using GPLIB, which has a function called N_ShellVer(), however I really want to use a Win API call to make this network-type independant.
>
>Any suggestions please?
>
>Regards
>Simon
>Auckland, NZ
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao