Name

Name Directive

Syntax

exports Subroutine signature name String, ... ;
subroutine declaration; external D11Name name String;

Description

A unit or library can export any subroutine and supply a different name for it in a DLL. Without the name directive, Delphi uses the function or procedure name. The name directive lets you use names that include non-alphanumeric characters, or just use a different name.

Tips and Tricks

  • If you export overloaded subroutines, you must use the name directive to ensure the overloaded routines are exported with unique names.

  • You can use the index and name directives for the same exported routine (in that order).

  • For more information and an example, see the exports keyword.

  • To export a subroutine by index only, use an empty string for the name.

See Also

Exports Keyword, External Directive, Index Directive, Name Directive

Get Delphi in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.