Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: ORA-304500
Problem Description
Calling a Windows API function from Oracle Forms using the ORAFFI (foreign function interface) the user receives the following error:
FRM-40735: Unhandled Exception ORA-304500.
Problem Background
This code worked in the 16-bit version of Oracle*Forms for Windows 3.1x.
The
user started getting this error after upgrading to the 32-bit version of
Forms
on Windows 95 or NT.
Solution Description
Solution Background
The error message is most likely due to Oracle*Forms not being able to find the specified function in the specified library (.dll). The names of the library files have changed from 16 bit windows to 32 bit windows:
16 Bit Windows 32 Bit Windows NT/95 ============== ==================== USER.EXE USER32.DLL KRNL386.EXE KERNEL32.DLL GDI.EXE GDI32.DLL
Also, the some of the names of the functions implemented in these libraries have been changed by Microsoft. For example, WinHelp has been changed to WinHelpA. The following is an incomplete list of function names that have changed:
16 Bit Windows 32 Bit Windows NT/95 ============== ==================== WinHelp WinHelpA GetPrivateProfileString GetPrivateProfileStringA WritePrivateProfileString WritePrivateProfileStringA FindWindow FindWindowA ExpandEnvironmentStrings ExpandEnvironmentStringsA GetWindowsDirectory GetWindowsDirectoryA GetTempPath GetTempPathA GetTempFileName GetTempFileNameA DeleteFile DeleteFileA
Step 1:
Substitute the 16 bit Windows library name with the equivalent 32 bit
Windows
NT or Windows 95 library name in your PL/SQL code (program unit or .PLL
file).
Step 2:
If the function name has not been changed by Microsoft, the step 1 will fix
the error. In case you still get the "FRM-40735: Unhandled Exception
ORA-304500" error message, then you need to find out if the function name
has
been changed. Use a utility, such as DUMPBIN provided with Microsoft Visual
C++, that lets you determine the function names exported by a .dll file.
Subsitute any changed function name in the ORA_FFI.Register_Function call in
your PL/SQL Code.
(HINT: If the Windows API function you are calling is not listed above and
you do not have access to a 32 bit C compiler, try appending the letter "A"
to
the function name. This will most likely resolve the problem.)
For more information regarding why the names of the functions have been changed please refer to documentation provided by Microsoft. Received on Thu Nov 19 1998 - 02:11:03 CST