[fpc-pascal] How can i detect what cause the problem
Gabor Boros
gaborboros at yahoo.com
Tue Nov 14 14:30:42 CET 2006
Many thanks Felipe, the problem is the exported name(s).
The exported names is SCAN_AllocateBuffer_A and SCAN_AllocateBuffer_W.
Thanks again!
Gabor
Felipe Monteiro de Carvalho írta:
> Can you show us the c declaration of the function you are calling? It
> should be on a .h file.
>
> Also, you should put an way to verify if the calls are working, like:
>
> DLL_Handle:=LoadLibrary('SCNAPI32.DLL');
>
> if DLL_Handle = nil then raise EException.Create('Could not load
> library');
>
> Pointer(SCAN_AllocateBuffer):=GetProcedureAddress(DLL_Handle,
> 'SCAN_AllocateBuffer');
>
> if Pointer(SCAN_AllocateBuffer) = nil then raise
> EException.Create('Could not load procedure');
>
> One possibility is that this C library uses name mangling, and the
> function has a different name from the canonical one. You can check
> all function names exported by the function using this software:
>
> http://wiki.lazarus.freepascal.org/Libview
>
More information about the fpc-pascal
mailing list