"Fossies" - the Fresh Open Source Software Archive

Member "FreeBASIC-1.05.0-linux-x86_64/include/freebasic/win/rassapi.bi" (31 Jan 2016, 7270 Bytes) of package /linux/privat/FreeBASIC-1.05.0-linux-x86_64.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Visual Basic source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 '' FreeBASIC binding for mingw-w64-v4.0.4
    2 ''
    3 '' based on the C header files:
    4 ''   DISCLAIMER
    5 ''   This file has no copyright assigned and is placed in the Public Domain.
    6 ''   This file is part of the mingw-w64 runtime package.
    7 ''
    8 ''   The mingw-w64 runtime package and its code is distributed in the hope that it 
    9 ''   will be useful but WITHOUT ANY WARRANTY.  ALL WARRANTIES, EXPRESSED OR 
   10 ''   IMPLIED ARE HEREBY DISCLAIMED.  This includes but is not limited to 
   11 ''   warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
   12 ''
   13 '' translated to FreeBASIC by:
   14 ''   Copyright © 2015 FreeBASIC development team
   15 
   16 #pragma once
   17 
   18 #inclib "mprapi"
   19 
   20 extern "Windows"
   21 
   22 #define _RASSAPI_H_
   23 const RASSAPI_MAX_PHONENUMBER_SIZE = 128
   24 const RASSAPI_MAX_MEDIA_NAME = 16
   25 const RASSAPI_MAX_PORT_NAME = 16
   26 const RASSAPI_MAX_DEVICE_NAME = 128
   27 const RASSAPI_MAX_DEVICETYPE_NAME = 16
   28 const RASSAPI_MAX_PARAM_KEY_SIZE = 32
   29 const RASPRIV_NoCallback = &h01
   30 const RASPRIV_AdminSetCallback = &h02
   31 const RASPRIV_CallerSetCallback = &h04
   32 const RASPRIV_DialinPrivilege = &h08
   33 #define RASPRIV_CallbackType ((RASPRIV_AdminSetCallback or RASPRIV_CallerSetCallback) or RASPRIV_NoCallback)
   34 const RAS_MODEM_OPERATIONAL = 1
   35 const RAS_MODEM_NOT_RESPONDING = 2
   36 const RAS_MODEM_HARDWARE_FAILURE = 3
   37 const RAS_MODEM_INCORRECT_RESPONSE = 4
   38 const RAS_MODEM_UNKNOWN = 5
   39 const RAS_PORT_NON_OPERATIONAL = 1
   40 const RAS_PORT_DISCONNECTED = 2
   41 const RAS_PORT_CALLING_BACK = 3
   42 const RAS_PORT_LISTENING = 4
   43 const RAS_PORT_AUTHENTICATING = 5
   44 const RAS_PORT_AUTHENTICATED = 6
   45 const RAS_PORT_INITIALIZING = 7
   46 
   47 type RAS_PARAMS_FORMAT as long
   48 enum
   49     ParamNumber = 0
   50     ParamString = 1
   51 end enum
   52 
   53 type RAS_PARAMS_VALUE_String
   54     Length as DWORD
   55     Data as PCHAR
   56 end type
   57 
   58 union RAS_PARAMS_VALUE
   59     Number as DWORD
   60     String as RAS_PARAMS_VALUE_String
   61 end union
   62 
   63 type RAS_PARAMETERS
   64     P_Key as zstring * 32
   65     P_Type as RAS_PARAMS_FORMAT
   66     P_Attributes as UBYTE
   67     P_Value as RAS_PARAMS_VALUE
   68 end type
   69 
   70 type _RAS_USER_0
   71     bfPrivilege as UBYTE
   72     szPhoneNumber as wstring * 128 + 1
   73 end type
   74 
   75 type RAS_USER_0 as _RAS_USER_0
   76 type PRAS_USER_0 as _RAS_USER_0 ptr
   77 
   78 type _RAS_PORT_0
   79     wszPortName as wstring * 16
   80     wszDeviceType as wstring * 16
   81     wszDeviceName as wstring * 128
   82     wszMediaName as wstring * 16
   83     reserved as DWORD
   84     Flags as DWORD
   85     wszUserName as wstring * 256 + 1
   86     wszComputer as wstring * 16
   87     dwStartSessionTime as DWORD
   88     wszLogonDomain as wstring * 15 + 1
   89     fAdvancedServer as WINBOOL
   90 end type
   91 
   92 type RAS_PORT_0 as _RAS_PORT_0
   93 type PRAS_PORT_0 as _RAS_PORT_0 ptr
   94 const MEDIA_UNKNOWN = 0
   95 const MEDIA_SERIAL = 1
   96 const MEDIA_RAS10_SERIAL = 2
   97 const MEDIA_X25 = 3
   98 const MEDIA_ISDN = 4
   99 const USER_AUTHENTICATED = &h0001
  100 const MESSENGER_PRESENT = &h0002
  101 const PPP_CLIENT = &h0004
  102 const GATEWAY_ACTIVE = &h0008
  103 const REMOTE_LISTEN = &h0010
  104 const PORT_MULTILINKED = &h0020
  105 type IPADDR as ULONG
  106 const RAS_IPADDRESSLEN = 15
  107 const RAS_IPXADDRESSLEN = 22
  108 const RAS_ATADDRESSLEN = 32
  109 
  110 type _RAS_PPP_NBFCP_RESULT
  111     dwError as DWORD
  112     dwNetBiosError as DWORD
  113     szName as zstring * 16 + 1
  114     wszWksta as wstring * 16 + 1
  115 end type
  116 
  117 type RAS_PPP_NBFCP_RESULT as _RAS_PPP_NBFCP_RESULT
  118 
  119 type _RAS_PPP_IPCP_RESULT
  120     dwError as DWORD
  121     wszAddress as wstring * 15 + 1
  122 end type
  123 
  124 type RAS_PPP_IPCP_RESULT as _RAS_PPP_IPCP_RESULT
  125 
  126 type _RAS_PPP_IPXCP_RESULT
  127     dwError as DWORD
  128     wszAddress as wstring * 22 + 1
  129 end type
  130 
  131 type RAS_PPP_IPXCP_RESULT as _RAS_PPP_IPXCP_RESULT
  132 
  133 type _RAS_PPP_ATCP_RESULT
  134     dwError as DWORD
  135     wszAddress as wstring * 32 + 1
  136 end type
  137 
  138 type RAS_PPP_ATCP_RESULT as _RAS_PPP_ATCP_RESULT
  139 
  140 type _RAS_PPP_PROJECTION_RESULT
  141     nbf as RAS_PPP_NBFCP_RESULT
  142     ip as RAS_PPP_IPCP_RESULT
  143     ipx as RAS_PPP_IPXCP_RESULT
  144     at as RAS_PPP_ATCP_RESULT
  145 end type
  146 
  147 type RAS_PPP_PROJECTION_RESULT as _RAS_PPP_PROJECTION_RESULT
  148 
  149 type _RAS_PORT_1
  150     rasport0 as RAS_PORT_0
  151     LineCondition as DWORD
  152     HardwareCondition as DWORD
  153     LineSpeed as DWORD
  154     NumStatistics as WORD
  155     NumMediaParms as WORD
  156     SizeMediaParms as DWORD
  157     ProjResult as RAS_PPP_PROJECTION_RESULT
  158 end type
  159 
  160 type RAS_PORT_1 as _RAS_PORT_1
  161 type PRAS_PORT_1 as _RAS_PORT_1 ptr
  162 
  163 type _RAS_PORT_STATISTICS
  164     dwBytesXmited as DWORD
  165     dwBytesRcved as DWORD
  166     dwFramesXmited as DWORD
  167     dwFramesRcved as DWORD
  168     dwCrcErr as DWORD
  169     dwTimeoutErr as DWORD
  170     dwAlignmentErr as DWORD
  171     dwHardwareOverrunErr as DWORD
  172     dwFramingErr as DWORD
  173     dwBufferOverrunErr as DWORD
  174     dwBytesXmitedUncompressed as DWORD
  175     dwBytesRcvedUncompressed as DWORD
  176     dwBytesXmitedCompressed as DWORD
  177     dwBytesRcvedCompressed as DWORD
  178     dwPortBytesXmited as DWORD
  179     dwPortBytesRcved as DWORD
  180     dwPortFramesXmited as DWORD
  181     dwPortFramesRcved as DWORD
  182     dwPortCrcErr as DWORD
  183     dwPortTimeoutErr as DWORD
  184     dwPortAlignmentErr as DWORD
  185     dwPortHardwareOverrunErr as DWORD
  186     dwPortFramingErr as DWORD
  187     dwPortBufferOverrunErr as DWORD
  188     dwPortBytesXmitedUncompressed as DWORD
  189     dwPortBytesRcvedUncompressed as DWORD
  190     dwPortBytesXmitedCompressed as DWORD
  191     dwPortBytesRcvedCompressed as DWORD
  192 end type
  193 
  194 type RAS_PORT_STATISTICS as _RAS_PORT_STATISTICS
  195 type PRAS_PORT_STATISTICS as _RAS_PORT_STATISTICS ptr
  196 const RASDOWNLEVEL = 10
  197 const RASADMIN_35 = 35
  198 const RASADMIN_CURRENT = 40
  199 
  200 type _RAS_SERVER_0
  201     TotalPorts as WORD
  202     PortsInUse as WORD
  203     RasVersion as DWORD
  204 end type
  205 
  206 type RAS_SERVER_0 as _RAS_SERVER_0
  207 type PRAS_SERVER_0 as _RAS_SERVER_0 ptr
  208 declare function RasAdminServerGetInfo(byval lpszServer as const wstring ptr, byval pRasServer0 as PRAS_SERVER_0) as DWORD
  209 declare function RasAdminGetUserAccountServer(byval lpszDomain as const wstring ptr, byval lpszServer as const wstring ptr, byval lpszUserAccountServer as LPWSTR) as DWORD
  210 declare function RasAdminUserGetInfo(byval lpszUserAccountServer as const wstring ptr, byval lpszUser as const wstring ptr, byval pRasUser0 as PRAS_USER_0) as DWORD
  211 declare function RasAdminUserSetInfo(byval lpszUserAccountServer as const wstring ptr, byval lpszUser as const wstring ptr, byval pRasUser0 as const PRAS_USER_0) as DWORD
  212 declare function RasAdminPortEnum(byval lpszServer as const wstring ptr, byval ppRasPort0 as PRAS_PORT_0 ptr, byval pcEntriesRead as WORD ptr) as DWORD
  213 declare function RasAdminPortGetInfo(byval lpszServer as const wstring ptr, byval lpszPort as const wstring ptr, byval pRasPort1 as RAS_PORT_1 ptr, byval pRasStats as RAS_PORT_STATISTICS ptr, byval ppRasParams as RAS_PARAMETERS ptr ptr) as DWORD
  214 declare function RasAdminPortClearStatistics(byval lpszServer as const wstring ptr, byval lpszPort as const wstring ptr) as DWORD
  215 declare function RasAdminPortDisconnect(byval lpszServer as const wstring ptr, byval lpszPort as const wstring ptr) as DWORD
  216 declare function RasAdminFreeBuffer(byval Pointer as PVOID) as DWORD
  217 declare function RasAdminAcceptNewConnection(byval pRasPort1 as RAS_PORT_1 ptr, byval pRasStats as RAS_PORT_STATISTICS ptr, byval pRasParams as RAS_PARAMETERS ptr) as WINBOOL
  218 declare sub RasAdminConnectionHangupNotification(byval pRasPort1 as RAS_PORT_1 ptr, byval pRasStats as RAS_PORT_STATISTICS ptr, byval pRasParams as RAS_PARAMETERS ptr)
  219 declare function RasAdminGetIpAddressForUser(byval lpszUserName as wstring ptr, byval lpszPortName as wstring ptr, byval pipAddress as IPADDR ptr, byval bNotifyRelease as WINBOOL ptr) as DWORD
  220 declare sub RasAdminReleaseIpAddress(byval lpszUserName as wstring ptr, byval lpszPortName as wstring ptr, byval pipAddress as IPADDR ptr)
  221 
  222 end extern