dbTalk Databases Forums  

Forms V4.5 and FFI question

comp.databases.oracle.tools comp.databases.oracle.tools


Discuss Forms V4.5 and FFI question in the comp.databases.oracle.tools forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
allan.speir@googlemail.com
 
Posts: n/a

Default Forms V4.5 and FFI question - 05-12-2009 , 02:28 PM






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

Reply With Quote
  #2  
Old   
Malcolm Dew-Jones
 
Posts: n/a

Default Re: Forms V4.5 and FFI question - 05-12-2009 , 05:34 PM






allan.speir (AT) googlemail (DOT) 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


Reply With Quote
  #3  
Old   
Shakespeare
 
Posts: n/a

Default Re: Forms V4.5 and FFI question - 05-13-2009 , 08:29 AM



Malcolm Dew-Jones schreef:
Quote:
allan.speir (AT) googlemail (DOT) 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.dl l');

Shakespeare


Reply With Quote
  #4  
Old   
ddf
 
Posts: n/a

Default Re: Forms V4.5 and FFI question - 05-13-2009 , 10:22 AM



On May 12, 2:28*pm, allan.sp... (AT) googlemail (DOT) 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


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.