Article ID: 103185
Article Last Modified on 5/6/2003
'***************************************************************
' Declarations section of the module
'***************************************************************
Option Explicit
Const WNNC_NET_MultiNet = &H8000
Const WNNC_SUBNET_WinWorkgroups = 4
Const WNNC_NET_TYPE = 2
Declare Function WNetGetCaps% Lib "User" (ByVal nIndex%)
'================================================================
'This function returns True if Windows for Workgroups is running,
'or False if it is not (generic Windows). It accomplishes this by:
' - Calling WNetGetCaps and retrieving the net type flag.
' - Inspecting the low word of the flag to see if the Windows for
' Workgroups bit is set.
'================================================================
Function IsWFW% ()
Dim wNetType As Integer
wNetType = WNetGetCaps(WNNC_NET_TYPE)
IsWFW = False
If (wNetType And WNNC_NET_MultiNet) Then
IsWFW = ((wNetType And &HFFFF) And _
WNNC_SUBNET_WinWorkgroups) <> 0
End If
End Function
Keywords: kbhowto kbprogramming KB103185