ifndef __LIBC_INC
 include libc.inc
endif
ifndef _WINNETWK_
define _WINNETWK_
.pragma list(push, 0)

.pragma comment(lib, mpr)

WNNC_NET_MSNET		equ 0x00010000
WNNC_NET_LANMAN		equ 0x00020000
WNNC_NET_NETWARE	equ 0x00030000
WNNC_NET_VINES		equ 0x00040000
WNNC_NET_10NET		equ 0x00050000
WNNC_NET_LOCUS		equ 0x00060000
WNNC_NET_SUN_PC_NFS	equ 0x00070000
WNNC_NET_LANSTEP	equ 0x00080000
WNNC_NET_9TILES		equ 0x00090000
WNNC_NET_LANTASTIC	equ 0x000A0000
WNNC_NET_AS400		equ 0x000B0000
WNNC_NET_FTP_NFS	equ 0x000C0000
WNNC_NET_PATHWORKS	equ 0x000D0000
WNNC_NET_LIFENET	equ 0x000E0000
WNNC_NET_POWERLAN	equ 0x000F0000
WNNC_NET_BWNFS		equ 0x00100000
WNNC_NET_COGENT		equ 0x00110000
WNNC_NET_FARALLON	equ 0x00120000
WNNC_NET_APPLETALK	equ 0x00130000
WNNC_NET_INTERGRAPH	equ 0x00140000
WNNC_NET_SYMFONET	equ 0x00150000
WNNC_NET_CLEARCASE	equ 0x00160000
WNNC_NET_FRONTIER	equ 0x00170000
WNNC_NET_BMC		equ 0x00180000
WNNC_NET_DCE		equ 0x00190000
WNNC_NET_DECORB		equ 0x00200000
WNNC_NET_PROTSTOR	equ 0x00210000
WNNC_NET_FJ_REDIR	equ 0x00220000
WNNC_NET_DISTINCT	equ 0x00230000
WNNC_NET_TWINS		equ 0x00240000
WNNC_NET_RDR2SAMPLE	equ 0x00250000


RESOURCE_CONNECTED	equ 0x00000001
RESOURCE_GLOBALNET	equ 0x00000002
RESOURCE_REMEMBERED	equ 0x00000003
if(WINVER GE 0x0400)
RESOURCE_RECENT		equ 0x00000004
RESOURCE_CONTEXT	equ 0x00000005
endif

RESOURCETYPE_ANY	equ 0x00000000
RESOURCETYPE_DISK	equ 0x00000001
RESOURCETYPE_PRINT	equ 0x00000002
if(WINVER GE 0x0400)
RESOURCETYPE_RESERVED	equ 0x00000008
endif
RESOURCETYPE_UNKNOWN	equ 0xFFFFFFFF

RESOURCEUSAGE_CONNECTABLE equ 0x00000001
RESOURCEUSAGE_CONTAINER equ 0x00000002
if(WINVER GE 0x0400)
RESOURCEUSAGE_NOLOCALDEVICE equ 0x00000004
RESOURCEUSAGE_SIBLING	equ 0x00000008
RESOURCEUSAGE_ATTACHED	equ 0x00000010
RESOURCEUSAGE_ALL	equ RESOURCEUSAGE_CONNECTABE OR RESOURCEUSAGE_CONTAINER OR RESOURCEUSAGE_ATTACHED
endif
RESOURCEUSAGE_RESERVED	equ 0x80000000

RESOURCEDISPLAYTYPE_GENERIC	equ 0x00000000
RESOURCEDISPLAYTYPE_DOMAIN	equ 0x00000001
RESOURCEDISPLAYTYPE_SERVER	equ 0x00000002
RESOURCEDISPLAYTYPE_SHARE	equ 0x00000003
RESOURCEDISPLAYTYPE_FILE	equ 0x00000004
RESOURCEDISPLAYTYPE_GROUP	equ 0x00000005
if(WINVER GE 0x0400)
RESOURCEDISPLAYTYPE_NETWORK	equ 0x00000006
RESOURCEDISPLAYTYPE_ROOT	equ 0x00000007
RESOURCEDISPLAYTYPE_SHAREADMIN	equ 0x00000008
RESOURCEDISPLAYTYPE_DIRECTORY	equ 0x00000009
endif
RESOURCEDISPLAYTYPE_TREE	equ 0x0000000A
if(WINVER GE 0x0400)
RESOURCEDISPLAYTYPE_NDSCONTAINER equ 0x0000000B
endif

NETRESOURCEA		STRUC
dwScope			dd ?
dwType			dd ?
dwDisplayType		dd ?
dwUsage			dd ?
lpLocalName		LPSTR ?
lpRemoteName		LPSTR ?
lpComment		LPSTR ?
lpProvider		LPSTR ?
NETRESOURCEA		ENDS
LPNETRESOURCEA		typedef ptr NETRESOURCEA
NETRESOURCEW		STRUC
dwScope			dd ?
dwType			dd ?
dwDisplayType		dd ?
dwUsage			dd ?
lpLocalName		LPWSTR ?
lpRemoteName		LPWSTR ?
lpComment		LPWSTR ?
lpProvider		LPWSTR ?
NETRESOURCEW		ENDS
LPNETRESOURCEW		typedef ptr NETRESOURCEW
ifdef _UNICODE
NETRESOURCE		typedef NETRESOURCEW
LPNETRESOURCE		typedef LPNETRESOURCEW
else
NETRESOURCE		typedef NETRESOURCEA
LPNETRESOURCE		typedef LPNETRESOURCEA
endif


NETPROPERTY_PERSISTENT	equ 1

CONNECT_UPDATE_PROFILE	equ 0x00000001
CONNECT_UPDATE_RECENT	equ 0x00000002
CONNECT_TEMPORARY	equ 0x00000004
CONNECT_INTERACTIVE	equ 0x00000008
CONNECT_PROMPT		equ 0x00000010
CONNECT_NEED_DRIVE	equ 0x00000020
if(WINVER GE 0x0400)
CONNECT_REFCOUNT	equ 0x00000040
CONNECT_REDIRECT	equ 0x00000080
CONNECT_LOCALDRIVE	equ 0x00000100
CONNECT_CURRENT_MEDIA	equ 0x00000200
CONNECT_DEFERRED	equ 0x00000400
CONNECT_RESERVED	equ 0xFF000000
endif

WNetAddConnectionA proto WINAPI :LPCSTR, :LPCSTR, :LPCSTR
WNetAddConnectionW proto WINAPI :LPCWSTR, :LPCWSTR, :LPCWSTR
ifdef _UNICODE
WNetAddConnection	equ <WNetAddConnectionW>
else
WNetAddConnection	equ <WNetAddConnectionA>
endif

WNetAddConnection2A proto WINAPI :LPNETRESOURCEA, :LPCSTR, :LPCSTR, :DWORD
WNetAddConnection2W proto WINAPI :LPNETRESOURCEW, :LPCWSTR, :LPCWSTR, :DWORD
ifdef _UNICODE
WNetAddConnection2	equ <WNetAddConnection2W>
else
WNetAddConnection2	equ <WNetAddConnection2A>
endif

WNetAddConnection3A proto WINAPI :HWND, :LPNETRESOURCEA, :LPCSTR, :LPCSTR, :DWORD
WNetAddConnection3W proto WINAPI :HWND, :LPNETRESOURCEW, :LPCWSTR, :LPCWSTR, :DWORD
ifdef _UNICODE
WNetAddConnection3	equ <WNetAddConnection3W>
else
WNetAddConnection3	equ <WNetAddConnection3A>
endif

WNetCancelConnectionA proto WINAPI :LPCSTR, :BOOL
WNetCancelConnectionW proto WINAPI :LPCWSTR, :BOOL
ifdef _UNICODE
WNetCancelConnection	equ <WNetCancelConnectionW>
else
WNetCancelConnection	equ <WNetCancelConnectionA>
endif

WNetCancelConnection2A proto WINAPI :LPCSTR, :DWORD, :BOOL
WNetCancelConnection2W proto WINAPI :LPCWSTR, :DWORD, :BOOL
ifdef _UNICODE
WNetCancelConnection2	equ <WNetCancelConnection2W>
else
WNetCancelConnection2	equ <WNetCancelConnection2A>
endif

WNetGetConnectionA proto WINAPI :LPCSTR, :LPSTR, :LPDWORD
WNetGetConnectionW proto WINAPI :LPCWSTR, :LPWSTR, :LPDWORD
ifdef _UNICODE
WNetGetConnection	equ <WNetGetConnectionW>
else
WNetGetConnection	equ <WNetGetConnectionA>
endif

if(WINVER GE 0x0400)
WNetUseConnectionA proto WINAPI :HWND, :LPNETRESOURCEA, :LPCSTR, :LPCSTR, :DWORD, :LPSTR, :LPDWORD, :LPDWORD
WNetUseConnectionW proto WINAPI :HWND, :LPNETRESOURCEW, :LPCWSTR, :LPCWSTR, :DWORD, :LPWSTR, :LPDWORD, :LPDWORD
ifdef _UNICODE
WNetUseConnection	equ <WNetUseConnectionW>
else
WNetUseConnection	equ <WNetUseConnectionA>
endif
endif

WNetConnectionDialog proto WINAPI :HWND, :DWORD
WNetDisconnectDialog proto WINAPI :HWND, :DWORD

if(WINVER GE 0x0400)
CONNECTDLGSTRUCTA	STRUC
cbStructure		dd ?
hwndOwner		HWND ?
lpConnRes		LPNETRESOURCEA ?
dwFlags			dd ?
dwDevNum		dd ?
CONNECTDLGSTRUCTA	ENDS
LPCONNECTDLGSTRUCTA	typedef ptr CONNECTDLGSTRUCTA
CONNECTDLGSTRUCTW	STRUC
cbStructure		dd ?
hwndOwner		HWND ?
lpConnRes		LPNETRESOURCEW ?
dwFlags			dd ?
dwDevNum		dd ?
CONNECTDLGSTRUCTW	ENDS
LPCONNECTDLGSTRUCTW	typedef ptr CONNECTDLGSTRUCTW
ifdef _UNICODE
CONNECTDLGSTRUCT	typedef CONNECTDLGSTRUCTW
LPCONNECTDLGSTRUCT	typedef LPCONNECTDLGSTRUCTW
else
CONNECTDLGSTRUCT	typedef CONNECTDLGSTRUCTA
LPCONNECTDLGSTRUCT	typedef LPCONNECTDLGSTRUCTA
endif

CONNDLG_RO_PATH		equ 0x00000001
CONNDLG_CONN_POINT	equ 0x00000002
CONNDLG_USE_MRU		equ 0x00000004
CONNDLG_HIDE_BOX	equ 0x00000008

CONNDLG_PERSIST		equ 0x00000010
CONNDLG_NOT_PERSIST	equ 0x00000020

WNetConnectionDialog1A proto WINAPI :LPCONNECTDLGSTRUCTA
WNetConnectionDialog1W proto WINAPI :LPCONNECTDLGSTRUCTW
ifdef _UNICODE
WNetConnectionDialog1	equ <WNetConnectionDialog1W>
else
WNetConnectionDialog1	equ <WNetConnectionDialog1A>
endif

DISCDLGSTRUCTA		STRUC
cbStructure		dd ?
hwndOwner		HWND ?
lpLocalName		LPSTR ?
lpRemoteName		LPSTR ?
dwFlags			dd ?
DISCDLGSTRUCTA		ENDS
LPDISCDLGSTRUCTA	typedef ptr DISCDLGSTRUCTA
DISCDLGSTRUCTW		STRUC
cbStructure		dd ?
hwndOwner		HWND ?
lpLocalName		LPWSTR ?
lpRemoteName		LPWSTR ?
dwFlags			dd ?
DISCDLGSTRUCTW		ENDS
LPDISCDLGSTRUCTW	typedef ptr DISCDLGSTRUCTW
ifdef _UNICODE
DISCDLGSTRUCT		typedef DISCDLGSTRUCTW
LPDISCDLGSTRUCT		typedef LPDISCDLGSTRUCTW
else
DISCDLGSTRUCT		typedef DISCDLGSTRUCTA
LPDISCDLGSTRUCT		typedef LPDISCDLGSTRUCTA
endif

DISC_UPDATE_PROFILE	equ 0x00000001
DISC_NO_FORCE		equ 0x00000040

WNetDisconnectDialog1A proto WINAPI :LPDISCDLGSTRUCTA
WNetDisconnectDialog1W proto WINAPI :LPDISCDLGSTRUCTW
ifdef _UNICODE
WNetDisconnectDialog1	equ <WNetDisconnectDialog1W>
else
WNetDisconnectDialog1	equ <WNetDisconnectDialog1A>
endif
endif

WNetOpenEnumA proto WINAPI :DWORD, :DWORD, :DWORD, :LPNETRESOURCEA, :LPHANDLE
WNetOpenEnumW proto WINAPI :DWORD, :DWORD, :DWORD, :LPNETRESOURCEW, :LPHANDLE
ifdef _UNICODE
WNetOpenEnum		equ <WNetOpenEnumW>
else
WNetOpenEnum		equ <WNetOpenEnumA>
endif

WNetEnumResourceA proto WINAPI :HANDLE, :LPDWORD, :ptr, :LPDWORD
WNetEnumResourceW proto WINAPI :HANDLE, :LPDWORD, :ptr, :LPDWORD
ifdef _UNICODE
WNetEnumResource	equ <WNetEnumResourceW>
else
WNetEnumResource	equ <WNetEnumResourceA>
endif

WNetCloseEnum proto WINAPI :HANDLE

UNIVERSAL_NAME_INFO_LEVEL equ 0x00000001
REMOTE_NAME_INFO_LEVEL	equ 0x00000002

UNIVERSAL_NAME_INFOA	STRUC
lpUniversalName		LPSTR ?
UNIVERSAL_NAME_INFOA	ENDS
LPUNIVERSAL_NAME_INFOA	typedef ptr UNIVERSAL_NAME_INFOA
UNIVERSAL_NAME_INFOW	STRUC
lpUniversalName		LPWSTR ?
UNIVERSAL_NAME_INFOW	ENDS
LPUNIVERSAL_NAME_INFOW	typedef ptr UNIVERSAL_NAME_INFOW
ifdef _UNICODE
UNIVERSAL_NAME_INFO	typedef UNIVERSAL_NAME_INFOW
LPUNIVERSAL_NAME_INFO	typedef LPUNIVERSAL_NAME_INFOW
else
UNIVERSAL_NAME_INFO	typedef UNIVERSAL_NAME_INFOA
LPUNIVERSAL_NAME_INFO	typedef LPUNIVERSAL_NAME_INFOA
endif

REMOTE_NAME_INFOA	STRUC
lpUniversalName		LPSTR ?
lpConnectionName	LPSTR ?
lpRemainingPath		LPSTR ?
REMOTE_NAME_INFOA	ENDS
LPREMOTE_NAME_INFOA	typedef ptr REMOTE_NAME_INFOA
REMOTE_NAME_INFOW	STRUC
lpUniversalName		LPWSTR ?
lpConnectionName	LPWSTR ?
lpRemainingPath		LPWSTR ?
REMOTE_NAME_INFOW	ENDS
LPREMOTE_NAME_INFOW	typedef ptr REMOTE_NAME_INFOW
ifdef _UNICODE
REMOTE_NAME_INFO	typedef REMOTE_NAME_INFOW
LPREMOTE_NAME_INFO	typedef LPREMOTE_NAME_INFOW
else
REMOTE_NAME_INFO	typedef REMOTE_NAME_INFOA
LPREMOTE_NAME_INFO	typedef LPREMOTE_NAME_INFOA
endif

WNetGetUniversalNameA proto WINAPI :LPCSTR, :DWORD, :ptr, :LPDWORD
WNetGetUniversalNameW proto WINAPI :LPCWSTR, :DWORD, :ptr, :LPDWORD
ifdef _UNICODE
WNetGetUniversalName	equ <WNetGetUniversalNameW>
else
WNetGetUniversalName	equ <WNetGetUniversalNameA>
endif

WNetGetUserA proto WINAPI :LPCSTR, :LPSTR, :LPDWORD
WNetGetUserW proto WINAPI :LPCWSTR, :LPWSTR, :LPDWORD
ifdef _UNICODE
WNetGetUser		equ <WNetGetUserW>
else
WNetGetUser		equ <WNetGetUserA>
endif

if(WINVER GE 0x0400)
WNFMT_MULTILINE		equ 0x01
WNFMT_ABBREVIATED	equ 0x02
WNFMT_INENUM		equ 0x10
WNFMT_CONNECTION	equ 0x20
endif

if(WINVER GE 0x0400)
WNetGetProviderNameA proto WINAPI :DWORD, :LPSTR, :LPDWORD
WNetGetProviderNameW proto WINAPI :DWORD, :LPWSTR, :LPDWORD
ifdef _UNICODE
WNetGetProviderName	equ <WNetGetProviderNameW>
else
WNetGetProviderName	equ <WNetGetProviderNameA>
endif

NETINFOSTRUCT		STRUC
cbStructure		dd ?
dwProviderVersion	dd ?
dwStatus		dd ?
dwCharacteristics	dd ?
dwHandle		dd ?
wNetType		dw ?
dwPrinters		dd ?
dwDrives		dd ?
NETINFOSTRUCT		ENDS
LPNETINFOSTRUCT		typedef ptr NETINFOSTRUCT

NETINFO_DLL16		equ 0x00000001
NETINFO_DISKRED		equ 0x00000004
NETINFO_PRINTERRED	equ 0x00000008

WNetGetNetworkInformationA proto WINAPI :LPCSTR, :LPNETINFOSTRUCT
WNetGetNetworkInformationW proto WINAPI :LPCWSTR, :LPNETINFOSTRUCT
ifdef _UNICODE
WNetGetNetworkInformation equ <WNetGetNetworkInformationW>
else
WNetGetNetworkInformation equ <WNetGetNetworkInformationA>
endif

CALLBACK(PFNGETPROFILEPATHA, :LPCSTR, :LPSTR, :UINT)
CALLBACK(PFNGETPROFILEPATHW, :LPCWSTR, :LPWSTR, :UINT)
ifdef _UNICODE
PFNGETPROFILEPATH	equ <PFNGETPROFILEPATHW>
else
PFNGETPROFILEPATH	equ <PFNGETPROFILEPATHA>
endif

CALLBACK(PFNRECONCILEPROFILEA, :LPCSTR, :LPCSTR, :DWORD)
CALLBACK(PFNRECONCILEPROFILEW, :LPCWSTR, :LPCWSTR, :DWORD)
ifdef _UNICODE
PFNRECONCILEPROFILE	equ <PFNRECONCILEPROFILEW>
else
PFNRECONCILEPROFILE	equ <PFNRECONCILEPROFILEA>
endif

RP_LOGON		equ 0x01
RP_INIFILE		equ 0x02

CALLBACK(PFNPROCESSPOLICIESA, :HWND, :LPCSTR, :LPCSTR, :LPCSTR, :DWORD)
CALLBACK(PFNPROCESSPOLICIESW, :HWND, :LPCWSTR, :LPCWSTR, :LPCWSTR, :DWORD)
ifdef _UNICODE
PFNPROCESSPOLICIES	equ <PFNPROCESSPOLICIESW>
else
PFNPROCESSPOLICIES	equ <PFNPROCESSPOLICIESA>
endif

PP_DISPLAYERRORS	equ 0x01
endif

WNetGetLastErrorA proto WINAPI :LPDWORD, :LPSTR, :DWORD, :LPSTR, :DWORD
WNetGetLastErrorW proto WINAPI :LPDWORD, :LPWSTR, :DWORD, :LPWSTR, :DWORD
ifdef _UNICODE
WNetGetLastError	equ <WNetGetLastErrorW>
else
WNetGetLastError	equ <WNetGetLastErrorA>
endif

WN_SUCCESS		equ NO_ERROR
WN_NO_ERROR		equ NO_ERROR
WN_NOT_SUPPORTED	equ ERROR_NOT_SUPPORTED
WN_CANCEL		equ ERROR_CANCELLED
WN_RETRY		equ ERROR_RETRY
WN_NET_ERROR		equ ERROR_UNEXP_NET_ERR
WN_MORE_DATA		equ ERROR_MORE_DATA
WN_BAD_POINTER		equ ERROR_INVAID_ADDRESS
WN_BAD_VALUE		equ ERROR_INVAID_PARAMETER
WN_BAD_USER		equ ERROR_BAD_USERNAME
WN_BAD_PASSWORD		equ ERROR_INVAID_PASSWORD
WN_ACCESS_DENIED	equ ERROR_ACCESS_DENIED
WN_FUNCTION_BUSY	equ ERROR_BUSY
WN_WINDOWS_ERROR	equ ERROR_UNEXP_NET_ERR
WN_OUT_OF_MEMORY	equ ERROR_NOT_ENOUGH_MEMORY
WN_NO_NETWORK		equ ERROR_NO_NETWORK
WN_EXTENDED_ERROR	equ ERROR_EXTENDED_ERROR
WN_BAD_LEVEL		equ ERROR_INVALID_LEVE
WN_BAD_HANDLE		equ ERROR_INVALID_HANDE
if(WINVER GE 0x0400)
WN_NOT_INITIALIZING	equ ERROR_ALREADY_INITIAIZED
WN_NO_MORE_DEVICES	equ ERROR_NO_MORE_DEVICES
endif

WN_NOT_CONNECTED	equ ERROR_NOT_CONNECTED
WN_OPEN_FILES		equ ERROR_OPEN_FILES
WN_DEVICE_IN_USE	equ ERROR_DEVICE_IN_USE
WN_BAD_NETNAME		equ ERROR_BAD_NET_NAME
WN_BAD_LOCALNAME	equ ERROR_BAD_DEVICE
WN_ALREADY_CONNECTED	equ ERROR_AREADY_ASSIGNED
WN_DEVICE_ERROR		equ ERROR_GEN_FAILURE
WN_CONNECTION_CLOSED	equ ERROR_CONNECTION_UNAVAIL
WN_NO_NET_OR_BAD_PATH	equ ERROR_NO_NET_OR_BAD_PATH
WN_BAD_PROVIDER		equ ERROR_BAD_PROVIDER
WN_CANNOT_OPEN_PROFILE	equ ERROR_CANNOT_OPEN_PROFILE
WN_BAD_PROFILE		equ ERROR_BAD_PROFILE
WN_BAD_DEV_TYPE		equ ERROR_BAD_DEV_TYPE
WN_DEVICE_ALREADY_REMEMBERED equ ERROR_DEVICE_AREADY_REMEMBERED
WN_CONNECTED_OTHER_PASSWORD equ ERROR_CONNECTED_OTHER_PASSWORD

WN_NO_MORE_ENTRIES	equ ERROR_NO_MORE_ITEMS
WN_NOT_CONTAINER	equ ERROR_NOT_CONTAINER
if(WINVER GE 0x0400)
WN_NOT_AUTHENTICATED	equ ERROR_NOT_AUTHENTICATED
WN_NOT_LOGGED_ON	equ ERROR_NOT_LOGGED_ON
WN_NOT_VALIDATED	equ ERROR_NO_LOGON_SERVERS
endif

if(WINVER GE 0x0400)
NETCONNECTINFOSTRUCT	STRUC
cbStructure		dd ?
dwFlags			dd ?
dwSpeed			dd ?
dwDelay			dd ?
dwOptDataSize		dd ?
NETCONNECTINFOSTRUCT	ENDS
LPNETCONNECTINFOSTRUCT	typedef ptr NETCONNECTINFOSTRUCT

WNCON_FORNETCARD	equ 0x00000001
WNCON_NOTROUTED		equ 0x00000002
WNCON_SLOWLINK		equ 0x00000004
WNCON_DYNAMIC		equ 0x00000008

MultinetGetConnectionPerformanceA proto WINAPI :LPNETRESOURCEA, :LPNETCONNECTINFOSTRUCT
MultinetGetConnectionPerformanceW proto WINAPI :LPNETRESOURCEW, :LPNETCONNECTINFOSTRUCT
ifdef _UNICODE
MultinetGetConnectionPerformance equ <MultinetGetConnectionPerformanceW>
else
MultinetGetConnectionPerformance equ <MultinetGetConnectionPerformanceA>
endif
endif

.pragma list(pop)
endif
