Function BinaryName() Foundation

Determines the name of the EXE or DLL.

Syntax
BinaryName( [<lFullQualifiedName>] ) --> cBinaryFileName
BinaryName( <nCallLevel> [,<lFullQualifiedName>] ) --> cBinaryFileName
Parameters
<lFullQualifiedName>
The default value for <lFullQualifiedName> is .F. (false). If it is set to .T. (true), the function returns the name of the DLL or EXE file including drive and path specification. By default, only the file is returned.
<nCallLevel>
<nCallLevel> is a positive integer indicating the position within the call stack to be used to determine the name of the binary. The default value is zero and designates the current entity (function, procedure, method or codeblock.)
Return

The function returns the name of the DLL or EXE file as a character string.

Description

BinaryName() determines the name of the DLL or EXE file containing the code which calls the BinaryName() function. This can be used, for example, for loading resources from a DLL using the LoadResource() function, without having to specify the DLL's name as a string literal.

If BinaryName() is executed within a code block, the function returns the name of the DLL or EXE file the code block was created in.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.