1. Launch BladeSmith.
2. Choose Project New to start a new BladeSmith project. Complete the New Project wizard.
3. Choose Edit Insert Opaque Type.
4. On the first page of the wizard, do the following:
5. If you want to make opaque type members available as ActiveX properties, check the Generate Accessor Methods check box.
6. On the data structure page (Page 2) of the wizard, define the underlying C data structure of the opaque type.
7. On the support routines page (Page 4) of the wizard, check the Categories of routines check boxes for the categories of opaque type routines you want to create.
Names and Data Types of ActiveX Properties Properties of ActiveX value objects are given the same names as their associated members, and the data types of the members are mapped to ActiveX data types as shown in the following table.
unsupported types
gl_wchar_t
mi_char
mi_char1
mi_string
mi_wchar
BSTR
mi_boolean
BOOL
mi_date
mi_datetime
mi_decimal
mi_money
mi_numeric
mi_double_precision
double
mi_int1
mi_smallint
mi_unsigned_char1
mi_unsigned_smallint
short
mi_int8
mi_unsigned_int8
mi_integer
mi_unsigned_integer
long
mi_interval
mi_real
For example, if the data structure has a member named x that is of type mi_double_precision, the ActiveX property is named x and is of type double. If a member of an opaque type is an array, the following additional properties are made available:
By default, BladeSmith writes all ActiveX value object source code-for both client and server projects-to the src\ActiveX directory. To generate client and server source code
1. In BladeSmith, choose Generate DataBlade.
2. Click the DataBlade folder.
3. If you are generating server project code for a UNIX-hosted Informix database server, click the grid cell that contains the word DOS and select UNIX from the list box.
4. Click the Source folder.
5. Edit the source code generation properties as required and click Apply.
6. Click Generate Source.