PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Connection for the remote network access
  • Various
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Establishes a remote connection with a modem. This function can be used to handle the emails via the POP3 protocol on the remote server.
Note: Then, the remote connection can be closed by NetCloseRemoteAccess.
Example
// Starts the Internet connection on a PC
// The name of the connection to use is the one defined in the list of
// connections of the PC (control panel).

Report is int = NetOpenRemoteAccess("Connection_LiveBox")
IF Report = 0 THEN
        ...
        NetCloseRemoteAccess()
ELSE
        Error("Error during the connection", NetMsgError(Report))
END
// Open the connection on a Smartphone
sConnectionName is string
nCntReturn is int

// The name of the connection is given by the provider
sConnectionName = "Bouygues Internet"

// Open the connection
nCntReturn = NetOpenRemoteAccess(sConnectionName)
IF nCntReturn = 0 THEN
// Requested process
// ...
NetCloseRemoteAccess(sConnectionName)
ELSE
Error("Error during the connection:", NetMsgError(nCntReturn))
END
Syntax
<Result> = NetOpenRemoteAccess(<Access Name> [, <Password>] [, <Automatic Closing>])
<Result>: Integer
  • 0 if the connection was established,
  • an error code otherwise. This error code can be used by NetMsgError to find out the error details and the corresponding message.
<Access Name>: Character string (with quotes)
Name of "Remote network access" connection defined in Windows. The list of remote accesses installed on a computer is returned by NetListRemoteAccess.
If the connection is already enabled (if it was opened manually or by another application), it is automatically retrieved.
Windows Mobile In Windows Mobile 5 and 6, this parameter must correspond to an empty string (""): the connection is automatically found and used.
<Password>: Optional character string (with quotes)
Password associated with the connection.
<Automatic Closing>: Optional boolean
  • True (default value): the connection will be automatically closed at the end of application or during the call to NetCloseRemoteAccess without parameter (valid for the last connection opened by NetOpenRemoteAccess).
  • False: the connection is not closed when the application is closed. Used, for example, to create an application that opens a connection. Similarly, NetCloseRemoteAccess without parameter will not close the connection. To close this connection, the access name must be passed in parameter.
Remarks

Connection for the remote network access

A connection for remote network access is created in the control panel of Windows. The following information is required to create the connection:
  • the caption of the connection (used by NetOpenRemoteAccess),
  • the phone number to dial,
  • the user login,
  • the modem, the protocol, etc.
This information is supplied by the provider.
When the connection is run via a double click performed on the corresponding icon, you have the ability to specify a password for this connection. This password can be stored in order to be used whenever this connection is started.

Various

  • Caution: The connection to a remote network can take quite a long time. The execution of the current application is locked during the entire duration of the connection.
  • A single connection can be opened at a given time.
  • We recommend that you check whether the connection operates properly in Windows before running NetOpenRemoteAccess.
Components
WINDEVReports and Queries wd230com.dll
Windows Mobile wp230com.dll
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment