PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Parameters of server
  • User name and password
  • WINDEV RPC server for a remote access to a HFSQL database
  • Receiving messages
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
Starts an FTP server (File Transfer Protocol) or a RPC server (Remote Procedure Call) powered by WINDEV.
Example
ConnectRPC is int
// Connects to a RPC server on port 5010
ConnectRPC = NetStartServer(RPCServer, False, 5010)
Syntax
<Result> = NetStartServer(<Server> [, <Encryption> [, <Port Number> [, <Key> [, <IP Address of Server>]]]])
<Result>: Integer
  • Identifier of the server,
  • 0 if the connection failed.
<Server>: Constant
Type of server:
FTPServerA WINDEV FTP server is used. The functions for file management are allowed (NetSendFile and NetGetFile for example).
RPCServerA WINDEV RPC server is used.
<Encryption>: Optional boolean
  • True to encrypt the transmitted data,
  • False (default value) for no encryption.
If the server is started with the encryption option set to True, the client computers must connect with NetConnect by using <Encryption> = True.
If an encryption is requested, the connection key (<Key>) will also be encrypted.
<Port Number>: Optional integer
Number of the port on which the server will be run. By default, the client tries to connect to the server:
  • on port 2000 for WINDEV RPC.
  • on port 2001 for WINDEV FTP.
To create a custom RPC server on HFSQL, use port 5001. See "WINDEV RPC server for a remote access to a HFSQL database" (below) for more details.
<Key>: Optional character string (with quotes)
Used to secure the access to the server. Each client trying to connect to the server must use the same key as the one defined by NetStartServer. The connection is refused if the keys are different.
If the <Encryption> parameter is set to True, the key is encrypted.
<IP Address of Server>: Optional character string (with quotes)
IP address of the server. This parameter must be specified if the server has several IP addresses (server using several network cards for example). This IP address can have the following format:
  • IP address in XXX.XXX.XXX.XXX format (125.5.110.100 for example).
  • IP address containing the server name (pop3.freesbee.eu for example). This syntax is recommended.
  • IP address returned by NetIPAddress.
Remarks

Parameters of server

The server parameters are required before a connection is established:
  • If the port number is specified, the client will have to use the same port number in NetConnect.
  • If the server is started with <Encryption> set to True, the clients must connect with <Encryption> set to True in NetConnect.
  • If the server is started with a specific <Key>, the clients must connect by specifying the same <Key> in NetConnect.

User name and password

The <UserName> and <Password> parameters allow the server to check whether the user is authorized or not. The list of authorizations and passwords for the users is available in the WDRPCSRV.INI file found in the directory of the server project. Example of file content:
[Passwords]
USERNAME1 = PASS1
USERNAME2 = PASS2
USERNAME3 = PASS3

WINDEV RPC server for a remote access to a HFSQL database

A RPC server used to access a HFSQL database is available in the program directory of WINDEV (WDRemoteAccessServer.EXE). See Remote access to a HFSQL database for more details.
During a remote access to a HFSQL database, the data is accessible via a WINDEV RPC server program. This program must use:
  • NetStartServer to start the RPC server.
  • NetEndServer to stop this server.
Note: By default, the RPC server is using port 5001. Furthermore, the WINDEV RPC server requires:
  • the wdxxxcom.dll library in order to use the communication functions of WINDEV
  • the wdxxxhf.dll library in order to access the functions for HFSQL management
  • the description file of the analysis (".WDD" file) in order to access the relevant database
  • the WdRpcsrv.ini file that contains the connection rights granted to the users. This is a text file that is found in the same directory as the RPC server. It must contain a "password" section in which each entry point is a user name:
    [PassWords]
    UserName1=Password1
    UserName2=Password2
    UserName3=Password3
    ...
  • a specific section in the "Win.ini" file. This section must have the same name as the description file of the analysis. It contains entry points used to locate the data files and the description file of the analysis.
    [AnalysisName.wdd]
    REM Directory of the files defined in the analysis
    REM in the program directory (<?>)
    REPPROG=D:\AppDir\RpcApp\HFData
    REM Full name of the description file
    REM of the analysis (.wdd)
    SUBSTWDD=D:\AppDir\RpcApp\HFData\AnalysisName.wdd
    REM Equivalent to SubtDir, for the files whose
    REM the directory is specified
    REPFIC_C:\WDProject\AppName\Dir1=D:\AppDir\RpcApp\HFData\Dir1

    Note: The lines starting with "REM" are comments and they are useless.
Note: From version 19, HFSQL is the new name of HyperFileSQL.

Receiving messages

The messages are received via events whose number is chosen by the developer.
Components
WINDEVReports and Queries wd230com.dll
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment