Extern Object

Description

Enables you to declare calls to external procedures from an external dynamic-link library (DLL).

Methods

Method Declare Declares references to external procedures in a dynamic-link library (DLL).

Any declared method (see Declare method for more details).

Back to top

Declare Method

Description

Declares references to external procedures in a dynamic-link library (DLL).

After you use the Declare method for a method, you can use the Extern object to call the declared method.

Syntax

Extern.Declare(RetType, MethodName, LibName, Alias, [ArgType(s)])

Argument

Type

Description

RetType

String

Data type of the value returned by the method. For available data types, see Extern.Declare Data Types.

Note: String value types (micString and micWideString) are not supported as return values.

To return a string value, use a string out argument in the called procedure.

In the Extern.Declare statement, use micVoid for the RetType argument and micByRef + micString (or other relevant string type) for the ArgType argument. For a complete example, see Returning a String Value Using an Extern.Declare Statement.

MethodName

String

Any valid procedure name.

LibName

String

Name of the DLL or code resource that contains the declared procedure.

Alias

String

Name of the procedure in the DLL or code resource.

Note:  

  • DLL entry points are case sensitive.

  • If Alias is an empty string, MethodName is used as the Alias.

ArgType(s)

String

A list of data types representing the data types of the arguments that are passed to the procedure when it is called. For available data types, see Extern.Declare Data Types.

Note: For out arguments, use the micByRef flag.

Back to top

See also: