Custom functions in DLLs

Windows dynamic link libraries (DLLs) provide a way of linking to external functions that you call from within calculation icons. Authorware must have the following information about a function in a DLL before it can load it:

User code documents (U32s)

Windows DLLs weren't created for non-programmers. Standard DLL format and calling conventions often require you to refer to programmer documentation and cope with API calls to Windows. To get around that, Authorware supports a transparent extension to the conventional DLL, called a U32. C programmers who create DLLs for use with Authorware can use a U32 to preload the information Authorware needs to recognize and link to functions within the DLL, including function names, arguments, return types, syntax templates, and online descriptions. The additional resources can be stored either with the DLL or separately, and they remain transparent to other programs that have access to the DLL.

When you load a U32, Authorware lists the functions it contains in the Functions dialog box, in the Category whose name is that of your Authorware file. You can select the functions and paste them into a Calculation window as you would a system function. This makes it possible to load and call DLLs without having to use low-level programming conventions.

Conventional DLLs

Authorware also supports conventional DLLs by presenting a dialog box in which you can enter the specific calling parameters. Such conventional support makes it possible to link to DLLs that have not been written to be specifically loadable by Authorware. See Loading DLLs that don't follow Authorware conventions.

DLLs and the search path

Because files for DLLs are separate from the files that call them, they must be in the folders specified in the search path. If Authorware can't locate the custom function in any of these folders, it ignores the function and continues running the piece. Always make sure that the folder containing DLLs is included in the search path.

See also


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/authorware/7/using_aw_en/09_var40.htm