Using external functions

Table 2. 

Data types of external function arguments

Supported

Array

Boolean

Blob

Char

Date

DateTime

Decimal*

Integer

Long

Real

String*

Structure

Void

     

String

The length of an argument or return value as String data type can not be larger than 512 characters.

Decimal

The precision of Decimal argument is the same as the precision of Double data type.

Unsupported

LongLong

Object

UInt

UsignedInt

UnsignedInteger

UnsignedLong

   

Data types of external function return values

Supported

Array

Boolean

Blob

Char

Date

DateTime

Double

Decimal*

Integer

Long

Real

String*

Unsigned Integer

Unsigned Long

Void

 

String

The length of an argument or return value as String data type can not be larger than 512 characters.

Decimal

The precision of Decimal argument is the same as the precision of Double data type.

Unsupported

LongLong

Structure

Object

 

DLLs or shared libraries Location

Supported

When your application calls an external function, it must be able to find the DLL (Dynamic link library) or the shared library in which that function resides. To ensure this, you must update the library path environment variable on the client machine to include the directory where that DLL or shared library is stored. The directory is searched in the following order of precedence:

  1. Windows system directory: The 32-bit Windows system directory. Use the GetSystemDirectory function to get the path of this directory. The name of this directory is SYSTEM32.

  2. The Windows directory uses the GetWindowsDirectory function to get the path of this directory.

  3. The directories that are listed in the PATH environment variable.

    When you make changes to the environment variables, the environment variables take effect only after you restart the machine.

Ensuring the resource file in an external function when running Web application

Supported

  1. If the file is an Image, directly specify the file name. When you deploy the application with PowerServer Toolkit, you need to deploy the Image file with the application files to the Web server. For instructions, refer to the section called “Additional Files” in PowerServer Toolkit User Guide.

  2. If the file is a DLL or OCX, to ensure the resource file in an external function, directly specify the file name. When you deploy the application with PowerServer Toolkit, you need to deploy the DLL or OCX file with the application files to the Web server. For instructions, refer to the section called “Additional Files” in PowerServer Toolkit User Guide.

  3. If the file type is not Image, DLL, or OCX, specify the file name and the absolute file path. The client that runs the application must have the file ready in the same path before executing the external function.

Others

Supported

Calling external functions in Win32-based DLLs (including both the system DLLs and the user-defined DLLs) is supported.

API for file and directory access operations is supported.

Unsupported

Graphs created by Windows API function may not be displayed on the Web.

Calling external functions in the Timer event will result in unexpected errors on the Web if the external functions are called in other places of the application.