DLL Coding Practices

Top  Previous  Next

Clarion applications that make use of DLLs must avoid calling certain file functions for Oracle tables in the constructors of static instances of classes declared in the EXE or DLLs, with the following exceptions:

- NAME(File)

- SEND(File, String)

- File{PROP:xxx} (get and set)

- Key{PROP:xxx} (get and set)

This is complete list. Any attempt to call any other file function in the constructors of static instances of classes can cause an "Oracle could not be found" error on attempt to load the Oracle client-side DLL.

ABC templates generate an instance of the DLLInitializer class for every DLL and provide embed points to enter custom code in the constructor. The constructor for the "data" DLL indirectly calls Init methods for every generated instance of the FileManager class. This method makes calls to the file functions from the list given above. Code entered in the provided embed points or added by 3rd party templates should not use calls to other file functions from DLLInitializer.Construct.