| Computers Forum Index » Computer - Databases - Oracle (Tools) » Forms V4.5 and FFI question... |
|
Page 1 of 1 |
|
| Author |
Message |
| ... |
Posted: Tue May 12, 2009 7:28 pm |
|
|
|
Guest
|
All,
We have a C program that performs some file operations. I have the
source code and can change it and compile it into a dll. The problem
is that Forms doesn't seem to find it and keeps picking up the old
one. I put the dll in the same directory as the fmx files but no joy.
Is there a way I can tell where Forms looks for it and even how I can
specifically force it to use and load a specific file?
Where does ora_ffi.find_library and ora_ffi.load_library look?
This is the code (dll name changed)
/*
* Try and find the DLL already loaded
*/
lh_ffie2sb := ora_ffi.find_library('dll_name.dll');
EXCEPTION WHEN ora_ffi.FFI_ERROR THEN
/*
* Ok not found lets load it
* The null argument for the LOAD library is the DLL location so if
* the DLL was not in
* the working DIR or not in the PATH somewhere we might want to
* put something in here.
*/
lh_ffie2sb := ora_ffi.load_library(NULL,'dllname.dll');
Thanks in advance.
Allan |
|
|
| Back to top |
|
|
|
| Malcolm Dew-Jones... |
Posted: Wed May 13, 2009 2:34 am |
|
|
|
Guest
|
allan.speir at (no spam) googlemail.com wrote:
: All,
: We have a C program that performs some file operations. I have the
: source code and can change it and compile it into a dll. The problem
: is that Forms doesn't seem to find it and keeps picking up the old
: one. I put the dll in the same directory as the fmx files but no joy.
: Is there a way I can tell where Forms looks for it and even how I can
: specifically force it to use and load a specific file?
: Where does ora_ffi.find_library and ora_ffi.load_library look?
Where is the old .dll? Presumably you owould put the new one in the same
directory as the old one (i.e. replace it).
In general on Windows, dll's are found in the PATH, same as an .exe.
I have no idea if the oracle interface does anything to override that.
$0.10 |
|
|
| Back to top |
|
|
|
| ddf... |
Posted: Wed May 13, 2009 3:22 pm |
|
|
|
Guest
|
On May 12, 2:28 pm, allan.sp... at (no spam) googlemail.com wrote:
Quote: All,
We have a C program that performs some file operations. I have the
source code and can change it and compile it into a dll. The problem
is that Forms doesn't seem to find it and keeps picking up the old
one. I put the dll in the same directory as the fmx files but no joy.
Is there a way I can tell where Forms looks for it and even how I can
specifically force it to use and load a specific file?
Where does ora_ffi.find_library and ora_ffi.load_library look?
This is the code (dll name changed)
/*
* Try and find the DLL already loaded
*/
lh_ffie2sb := ora_ffi.find_library('dll_name.dll');
EXCEPTION WHEN ora_ffi.FFI_ERROR THEN
/*
* Ok not found lets load it
* The null argument for the LOAD library is the DLL location so if
* the DLL was not in
* the working DIR or not in the PATH somewhere we might want to
* put something in here.
*/
lh_ffie2sb := ora_ffi.load_library(NULL,'dllname.dll');
Thanks in advance.
Allan
I'm surprised you didn't find the original dll before you started
modifying the code. Would it not have been easier to find the
original, rename it and place your modified version in the same
directory?
David Fitzjarrell |
|
|
| Back to top |
|
|
|
| Shakespeare... |
Posted: Wed May 13, 2009 5:29 pm |
|
|
|
Guest
|
Malcolm Dew-Jones schreef:
Quote: allan.speir at (no spam) googlemail.com wrote:
: All,
: We have a C program that performs some file operations. I have the
: source code and can change it and compile it into a dll. The problem
: is that Forms doesn't seem to find it and keeps picking up the old
: one. I put the dll in the same directory as the fmx files but no joy.
: Is there a way I can tell where Forms looks for it and even how I can
: specifically force it to use and load a specific file?
: Where does ora_ffi.find_library and ora_ffi.load_library look?
Where is the old .dll? Presumably you owould put the new one in the same
directory as the old one (i.e. replace it).
In general on Windows, dll's are found in the PATH, same as an .exe.
I have no idea if the oracle interface does anything to override that.
$0.10
You can use the full path in find_libary, just to be sure the right DLL
is used:
example_lh := ora_ffi.find_library('c:\windows\system\example.dll');
Shakespeare |
|
|
| Back to top |
|
|
|
|