HiRDB Datareplicator Version 8 Description, User's Guide and Operator's Guide

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

8.1.3 Creating an import information editing UOC routine (Windows)

This section explains the procedure for creating an import information editing UOC routine with Windows Datareplicator. A UOC routine for Windows Datareplicator is created as a DLL file (xxx.dll).

Organization of this subsection
(1) How to create
(2) Compiling and linking
(3) Notes

(1) How to create

In the Windows edition, you can create an import information editing UOC routine in the following development environments:

To create a DLL file:

  1. Select a table that will use the import information editing UOC routine.
  2. Select functions for your import information editing UOC routine; create these functions in the C language that is used to create application programs for Windows HiRDB. To issue SQL statements from the UOC routine, use the HiRDB preprocessor to expand the SQL statements into the applicable language. Datareplicator's UOC header file is stored in \include under the Datareplicator installation directory.
  3. Compile and link the created functions to create a DLL file. To call the UOC routine from Datareplicator, you must create an interface function with the __cdecl calling convention, and then export it.
  4. Specify in the import definition as an absolute pathname the name of the import information editing UOC routine.

(2) Compiling and linking

This subsection explains how to compile and link a UOC routine in each development environment.

(a) Microsoft Visual C++ Version 5.0

If you use Microsoft Visual C++ Version 5.0 to compile and link your UOC routine, select Settings from the Project menu to specify options.

The following table lists and describes the items to be specified in Project Settings or Settings.

Table 8-1 Items to be specified in Project Settings or Settings in Microsoft Visual C++ Version 5.0

Item Category Category setting Setting
Compiler Code Generation Struct Member Alignment 8 bytes
Runtime Library Multi-threaded DLL
Calling Convention _cdecl *
Preprocessor Include file path Datareplicator-installation-directory\include
Linker Input Object/runtime module CLTDLL.LIB
(specify if SQL statements will be issued from the UOC routine)
Additional library path HiRDB-installation-directory\CLIENT\LIB
(specify if SQL statements will be issued from the UOC routine)

If an unresolved link error occurs, specify all libraries required during linking.


(b) Platform SDK February 2003
(c) Visual Studio 2005

If you use Visual Studio 2005 to compile and link your UOC routine, select Settings from the Project menu to specify options.

The following table lists and describes the items to be specified.

Table 8-2 Items to be specified in Project Settings or Settings in Visual Studio 2005

Item Category Category setting Setting
Platform -- -- Win32
Configuration Properties General Common Language Runtime Support No Common Language Runtime Support
Compiler Code Generation Struct Member Alignment 8 bytes
Runtime Library Multi-threaded DLL
Advanced Calling Convention _cdecl *
General Additional Include Directories Datareplicator-installation-directory\include
Linker General Additional Library Directories HiRDB-installation-directory\CLIENT\LIB
(specify if SQL statements will be issued from the UOC routine)
Input Additional Dependencies CLTDLL.LIB
(specify if SQL statements will be issued from the UOC routine)

Legend:
--: Not applicable

If an unresolved link error occurs, specify all libraries required during linking.


(3) Notes