Method: SQLAnywhere::API.sqlany_initialize_interface

Defined in:
ext/sqlanywhere.c

.sqlany_initialize_interface(VALUEapi) ⇒ Object

Initializes the SQLAnywhereInterface object and loads the DLL dynamically.

This function attempts to load the SQL Anywhere C API DLL dynamically and
looks up all the entry points of the DLL.

<b>Parameters</b>:
- <tt>VALUE api</tt> -- An API structure to initialize.

<b>Returns</b>:
- <tt>result</tt>: <tt>1</tt> on successful initialization, <tt>0</tt> on failure.


196
197
198
199
200
201
202
203
204
205
206
207
# File 'ext/sqlanywhere.c', line 196

static VALUE
static_API_sqlany_initialize_interface(VALUE module, VALUE api)
{
    SQLAnywhereInterface* s_api;
    int result;

    Data_Get_Struct(api, SQLAnywhereInterface, s_api);
    
    result = sqlany_initialize_interface( s_api, NULL );

    return( INT2NUM(result) ); 
}