Logo

Hacker’s Guide to Visual FoxPro
An irreverent look at how Visual FoxPro really works. Tells you the inside scoop on every command, function, property, event and method of Visual FoxPro.

DISPLAY DLLS, LIST DLLS

These two commands show the dynamic link library calls that have been declared in the current sessions.

Usage

DISPLAY DLLS [TO [ FILE ] Filename [ ADDITIVE ]
              | TO PRINTER [PROMPT]]
             [ NOCONSOLE ]
LIST DLLS    [TO [ FILE ] Filename [ADDITIVE ]
              | TO PRINTER [PROMPT]]
             [ NOCONSOLE ]

These commands are typically used during development and debugging to determine if DLL functions have been declared. They probably aren’t things you’d want to leave around in a program. If you need to test whether a function has been declared in a program, prior to VFP 7, your best bet was to test TYPE(“MyDLLFunctionCall(param, param, param)”), but realize that this test actually calls and runs the function. You wouldn’t want to do this with any function that causes undesirable side effects, like shutting down Windows. Since issuing the DECLARE function again does not seem to cause any harm, we prefer to do that than to risk unintentional side effects with this trick. ADLLS() was added in VFP 7 to fill an array with a list of DLL functions that have been loaded, making life easier if you need to know what functions have been declared.

Each DLL is listed with its name, alias (if assigned), and the path of the target DLL.

Example

LIST DLLS TO PRINT PROMPT NOCONSOLE
DISPLAY DLLS

See Also

ADLLs(), Declare-DLL