On Mon, 09 Jun 2008, Szakáts Viktor wrote: Hi Viktor,
> + contrib/hbw32/dllcall.c > * contrib/hbw32/common.mak > * contrib/hbw32/Makefile > + Added DLL interface. From xhb. Work of several authors. > ; I've applied some modifications made by Alex Strickland. > ; The API calls below are implemented: > XBase++ compatible: > - DLLLoad() > - DLLUnload() > - DLLPrepareCall() > - DLLExecuteCall() > - DLLCall() > Proprietary: > - LoadLibrary() - Same as DLLLoad() > - FreeLibrary() - Same as DLLUnload() > - GetProcAddress() > - CallDLL() > - CallDLLBool() > - GetLastError() > - SetLastError() > ! Fixed GetProcAddress() passed ordinals to always be > WORDs casted to DWORD. > ! Fixed a few possible buffer overruns. > * Cleanup, format, etc. > ; Compile with HB_NO_ASM if you use BCC55 and don't have > TASM32 (or upgrade to free BCC58 which contains TASM32). Please note that this code is ABI dependent. In WIN64 pointer size has 64bit and it uses different ABI so this code will not work. Now it has to be disabled for such builds. But for WIN64 it should be possible to easy eliminate asm code. 1-st 10 parameters are passed in registers (AFAIR RAX, RCX, RX1, ..., RX8) so simple casting of function pointer to some function with 10 _INT64 parameters and passing this parameters or 0 for unused should be enough to execute any function. It's even possible to eliminate .asm code also for 32bit platform using similar dirty hack with casting but it will have to be more complicated. > ; "C struct" support was stripped (but that seems only a > small portion. I added C structures ported from xharbour to XHB library so maybe you can enable them optionally. best regards, Przemek _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour