Call External C++ DLL
Im trying to create a function in the Procedures&Functions folder,
right now looks like this :
ALTER function DBA.dll_func(inout dsn char(255))
returns integer external name 'RemoveFiles@DBRemoveFileServiceDLL.dll
I call the function from a VB6 app using an sql statement set to:
strSQL = "CALL dll_func('strString')"
The C function I'm using is :
void RemoveFiles ( char *strDSN)
When I run the VB6 app I get an error message:
Run-Time error '-2147467259 (80004005)':
[Sybase][ODBC Driver][Adaptive Server Anywhere]General error:
Could not load dynamic library 'DBRemoveFileServiceDLL.dll
Ive since tried to include the extfnapi.h file to my dll ( along with
about a dozen other headers that are
associated with it to compile), and changed my function to :
void RemoveFiles (an_extfn_api *api, char *strDSN),
but I'm not sure what to do with the an_extfn_api *api part. Is there
a specific place to put my DLL for sybase to load it? Also, do I need
to call the function uint32 extfn_use_new_api( )? if so, how I declare
it in my dll specfically?
Thanks for any help,
Dave
|