PACKAGE BODY WIN32 IS
-- ******************************************
-- *** ODBC FUNCTION **
-- ******************************************
odbccp32_lhandle Ora_Ffi.Libhandletype;
SQLConfigDataSource_fhandle Ora_Ffi.Funchandletype;
-- ******************************************
-- *** ODBC **
-- ******************************************
FUNCTION ff_SQLConfigDataSource(
fhandle Ora_Ffi.Funchandletype,
hwndParent pls_integer,
fRequest pls_integer,
lpszDriver varchar2,
lpszAttributes varchar2 ) return pls_integer;
PRAGMA interface( C, ff_SQLConfigDataSource, 11265 );
FUNCTION SQLConfigDataSource(
hwndParent pls_integer,
fRequest pls_integer,
lpszDriver varchar2,
lpszAttributes varchar2 ) return pls_integer AS
res pls_integer;
BEGIN
res:=ff_SQLConfigDataSource
( SQLConfigDataSource_fhandle,
hwndParent,
fRequest,
lpszDriver,
lpszAttributes );
return res;
END;
PROCEDURE OdbcInit IS
BEGIN
/* Çàãðóçêà áèáëèîòåêè */
odbccp32_lhandle:=Ora_Ffi.Load_library
( '', 'odbccp32.dll' );
/* Ðåãèñòðàöèÿ ô-öèè */
SQLConfigDataSource_fhandle:=Ora_Ffi.Register_Function
( odbccp32_lhandle, 'SQLConfigDataSource', Ora_Ffi.C_Std );
/* Ðåãèñòðàöèÿ ïàðàìåòðîâ è âîçâðàøàåìîãî çíà÷åíèÿ */
Ora_Ffi.Register_Parameter
( SQLConfigDataSource_fhandle, Ora_Ffi.C_INT );
Ora_Ffi.Register_Parameter
( SQLConfigDataSource_fhandle, Ora_Ffi.C_INT );
Ora_Ffi.Register_Parameter
( SQLConfigDataSource_fhandle, Ora_Ffi.C_CHAR_PTR );
Ora_Ffi.Register_Parameter
( SQLConfigDataSource_fhandle, Ora_Ffi.C_CHAR_PTR );
Ora_Ffi.Register_Return
( SQLConfigDataSource_fhandle, Ora_Ffi.C_INT );
END;
BEGIN -- package initialization
OdbcInit;
END; -- package
|