Scalable Database Server, HiRDB Version 8 Command Reference

[Contents][Index][Back][Next]

Appendix E.1 Creating a dynamic link library

After you finish coding the UOC, you must create a dynamic link library. Specify the created dynamic link library and the functions to be called in the control statements for pdload or pdrorg.

The following example uses Microsoft Visual C++ 4.2 to create a dynamic link library:

(a) Creating a module definition file (.def)
  1. Create a file for exporting the function in DLL that is called from pdload or pdrorg. In this example, the DLL name is sample1.dll and the function name is data_change_func.
     
    sample1.def
      EXPORTS
      data_change_func
     
(b) Creating DLL
  1. From the Microsoft Visual C++ group, start Microsoft Developer Studio and from the File menu, choose New, Project Workspace, then Dynamic-Link Library.
  2. From the Insert menu, choose Add File to Project, then add the UOC source files (.c) and the module definition file (.def) created in 1.
  3. To include the UOC creation header file (pdutluoc.h) that declares the UOC interface area and symbolic constants, specify %PDDIR%\include in the include file path. To specify this, choose Build, Settings, C/C++, Preprocessor, then Additional include directories.
  4. Choose Build and then execute the DLL build. In this case, make sure that both the import library file (.lib) and the export library file (.exp) have also been created.
(c) Notes