ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Communication / Net functions
  • Connection for the remote network access
  • Miscellaneous
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Warning
From version 2024, this feature is no longer available.
Establishes a remote connection. This function can be used to handle the emails via the POP3 protocol on the remote server.
Note The remote connection can then be closed using the NetCloseRemoteAccess function.
Example
// Lance la connexion Internet sur un PC
// Le nom de la connexion à utiliser est celui défini dans la liste des 
// connexions du PC (Panneau de configuration).
Rapport is int = NetOpenRemoteAccess("Connexion_LiveBox")
IF Rapport = 0 THEN
	...
	NetCloseRemoteAccess()
ELSE
	Error("Erreur lors de la connexion", NetMsgError(Rapport))
END
// Ouverture de la connexion sur un Smartphone
sNomConnexion is string 
nRetourCnx is int
// Le nom de la connexion est fourni par l'opérateur
sNomConnexion = "Bouygues Internet "
// Ouverture de la connexion
nRetourCnx = NetOpenRemoteAccess(sNomConnexion) 
IF nRetourCnx = 0 THEN
	// Traitement souhaité
	// ...
	NetCloseRemoteAccess(sNomConnexion)
ELSE
	Error("Erreur lors de la connexion :", NetMsgError(nRetourCnx))
END
Syntax
<Result> = NetOpenRemoteAccess(<Access name> [, <Password>] [, <Close automatically>])
<Result>: Integer
  • 0 if the connection was established,
  • an error code otherwise. This error code can be used with NetMsgError to get the error details and the corresponding message.
<Access name>: Character string
Name of the "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.
<Password>: Optional character string
Password associated with the connection.
<Close automatically>: Optional boolean
  • True (default): connection closure will be automatic at the end of the application or when calling function NetCloseRemoteAccess without parameters (valid only for the last connection opened by function NetOpenRemoteAccess FUNCTION).
  • False closing the application does not close the connection. 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 as parameter.
Remarks

Connection for the remote network access

A connection for remote network access is created in the Windows control panel. The following information is required to create the connection:
  • the caption of the connection (used by NetOpenRemoteAccess),
  • the phone number to dial,
  • the username,
  • 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.

Miscellaneous

  • Warning: Connecting to a remote network may take some 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.
Business / UI classification: Business Logic
Component: wd300com.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/28/2025

Send a report | Local help