Re: ORA_FFI ->API(FindFirstFile)

From: Michael Karg <karg_at_uranus.tuwien.ac.at>
Date: 1997/06/28
Message-ID: <01bc83e0$86c93ee0$0101a8c0_at_bigtower>#1/1


Hello

FindFirstFileA has the Parameters:
LPCSTR lpFileName,
LPWIN32_FIND_DATA lpFindFileData)

Therefore you are not able to use the parameter types you have choosen.
To use the function you have to use as second parameter a C_CHAR_PTR and build up the structure on your own in a VARCHAR2 variable (verry difficult and complicated, and i belive it would not word verry stable, because on exit the char * is convertet back to VARCHAR2, so the data is truncated after the first zero Byte).

Better you write your own DLL wich has a interface for FindFirstFile (and any other functions with structures). That interface function should always use the standard Parameters as defined by Oracle. In this case your coude should work, if you initialize the handle of the library and function with Ora_FFi.FindLibrary (or Ora_FFi.LoadLibrary) and Ora_FFi.FindFunction

If you have further questions, you can ask me (in german).

Mfg.
Michael Received on Sat Jun 28 1997 - 00:00:00 CEST

Original text of this message