' ########################################################################################
' Microsoft Windows
' File: SensAPI.inc
' Contents: Public header file for the SENS Connectivity APIs
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
#IF NOT %DEF(PBX_SensAPI_PBI)
#DEFINE PBX_SensAPI_PBI
%EQUATE `SENSAPI_INC = 1
%EQUATE `NETWORK_ALIVE_LAN = &H00000001
%EQUATE `NETWORK_ALIVE_WAN = &H00000002
%EQUATE `NETWORK_ALIVE_AOL = &H00000004
%EQUATE `NETWORK_ALIVE_INTERNET = &H00000008
' // Size = 16 bytes
TYPE QOCINFO DWORD
 dwSize AS DWORD ' DWORD dwSize
 dwFlags AS DWORD ' DWORD dwFlags
 dwInSpeed AS DWORD ' DWORD dwInSpeed
 dwOutSpeed AS DWORD ' DWORD dwOutSpeed
END TYPE
DECLARE FUNCTION IsDestinationReachableA LIB "sensapi.dll" ALIAS "IsDestinationReachableA" ( BYREF lpszDestination AS ASCIIZ , BYREF lpQOCInfo AS QOCINFO ) AS LONG
DECLARE FUNCTION IsDestinationReachableW LIB "sensapi.dll" ALIAS "IsDestinationReachableW" ( BYREF lpszDestination AS WSTRINGZ
 , BYREF lpQOCInfo AS QOCINFO
 ) AS LONG
#IF %DEF(%UNICODE)
 MACRO IsDestinationReachable = IsDestinationReachableW
#ELSE
 MACRO IsDestinationReachable = IsDestinationReachableA
#ENDIF
DECLARE FUNCTION IsNetworkAlive LIB "sensapi.dll" ALIAS "IsNetworkAlive" ( BYREF lpdwFlags AS QUAD ) AS LONG
#ENDIF
