Document-ID: 28816.1
Subject: Success with ORA_FFI()
Author: DRMILLS
Last Modified: 30 Oct 95
The following Notes sould ensure successful use of the ORA_FFI package for
calling Windows DLL functions.
1) Establish the specification of the Function of the DLL that you are
trying to call. This will include the following information
a) Function Return type and size
b) Function Arguments, datatypes and Size
c) The Name of the DLL in which the function resides (which may be
an .EXE!)
2) Don't try and write the ORA_FFI calls by hand. Use the utilty
FFIGEN which can be found in the ORAWIN/FORMS45/DEMO/FOREIGN
directory. This provides a simple interface to input the information
gathered in step (1) and will genarate a .PLD (plsql text file) for
you which you can then either inport into a library or a form.
Ensure that you have write access to your working directory for this
operation as this is where it will write the .PLD
3) Check that the .DLL file is accessible at runtime, either in the
windows system directory, or in the DOS path.
If your ORA_FFI call GPF's then check the buffer sizes that you have assigned
in the ffigen form, this is the most probable cause.