Trail: PROIV Documentation > Developer > PROIV Developer > Developing Functions > Events and Logic > LINK_CLIENT_VAR

 

 

Purpose

LINK_CLIENT_VAR calls an external procedural language routine from within PROIV. and supports keywords on the call that indicate the parameter is input to the DLL, is an output parameter from the DLL, or both. 
 

Syntax

variable= LINK_CLIENT_VAR (name, param1, {direction}…)
 

Operation

name is an alpha variable used to indicate the DLL name and the entry point.  
param1...
is the p
arameter (or parameters) to be passed to the subroutine
variable
is the return code

direction
 is optional indicating whether the parameter is input to the DLL, output from the DLL, or both.
 

Remarks

The name is in the format of “DLL Name.Entry point" (e.g. to call the MyFunc function of a DLL MyDLL, $name = "MyDLL.MyFunc")..

The
direction
 is optional indicating whether the parameter is input to the DLL, output from the DLL, or both.  Where:
%IN% = a parameter is an input to the DLL.  Its value is passed to the DLL, but any changes to the parameter by the DLL are not passed back.
%OUT% = a parameter is an output from the DLL.  The initial value is ignored.  Its value is passed back to the DLL.
%BOTH% = a parameter is both input to the DLL and output from the DLL.  Its value is passed to the DLL and any changes to the parameter by the DLL are passed back.

The developer of the DLL needs to fill up, for the %OUT% and %BOTH% parameters, the current length of the parameter.  The maximum length should remain intact.  The memory area for the parameters are allocated by the PROIV Client, up to the maximum length and the DLL should not attempt to free this area.

Binary data (Data with control characters) cannot be passed back as %OUTPUT% or %BOTH% type to the kernel in LINK_CLIENT_VAR (however they may be passed as %INPUT%).  Attempt to pass back may result in connection loss between kernel and the client.

Writing beyond the area specified by MAXLEN in the DLL code could cause PROIV Client to generate an application error (General protection fault).

By default %BOTH% is assumed.

The maximum number of parameters (255) is limited by the PROIV logic compiler workspace.
 

See also LINK and  LINK-CRT.
 

Comment on this topic

Topic ID: 520079

 
 
 

Table of Contents

Index

Glossary

-Search-

Back