FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index mod_harbour HIX + FWH DLL (Self contained)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
HIX + FWH DLL (Self contained)
Posted: Sun Jan 18, 2026 05:38 AM

This is a guide to build a FWH DLL (with the Harbour's hvm inside the DLL)

go64.bat

@setlocal
call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
c:\harbour\bin\win\msvc64\hbmk2 fwh64.hbp -comp=msvc64
dumpbin /exports fwh64.dll
@endlocal

fwh64.prg

#include "FiveWin.ch"  
  

function Main()

   MsgInfo( "dentro DLL" )

return nil 

#pragma BEGINDUMP

#include <windows.h>
#include <hbapi.h>
#include <hbvm.h>

__declspec(dllexport) void TEST( void )
{
   hb_vmInit( HB_TRUE );
   hb_vmQuit();   

}

#pragma ENDDUMP

fwh64.hbp

-gui  

-hbdynvm  

-ofwh64  

-Ic:\fwh64\include  

fwh64.prg  

-Lc:\fwh64\lib  

-lFiveH64  

-lFiveHC64  

-lgdiplus  

-lole32  

-lOleDlg  

-lversion  

-luxtheme  

-cflag=-MD  

-ldflag+=/NODEFAULTLIB:LIBCMT  

xhb.hbc  

hbct.hbc  

hbwin.hbc  

hbmzip.hbc  

hbziparc.hbc  

hbfoxpro.hbc

fwh.prg (run this from HIX. Remember to have hbdyn.ch at HIX folder)

#include "hbdyn.ch"

function Main()

   local hDLL := hb_libLoad( "fwh64.dll" )  
     

   hb_dynCall( { "TEST", hDLL, hb_bitOr( HB_DYN_CALLCONV_STDCALL, HB_DYN_CTYPE_VOID ) } )
   

   hb_libFree( hDLL )  

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 410
Joined: Sun Jan 31, 2010 03:30 PM
Re: HIX + FWH DLL (Self contained)
Posted: Tue Jan 20, 2026 04:16 PM

Antonio ... buen dia..

Ya genere la DLL..

Pregunto... que funcion tiene fwh64.prg en el fwh64.hbp

como uso la dll.. según este caso : //oRs := TArrayData():NEW(cAlias)

function main()

    local hDLL := hb_libLoad( "fwh64.dll" )

    oRs  := hb_dynCall( { "TArrayData", hDLL, hb_bitOr( HB_DYN_CALLCONV_STDCALL, HB_DYN_CTYPE_VOID ) },cAlias )
   
     hb_libFree( hDLL )

nRecCou := oRs:reccount()

return nil

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: HIX + FWH DLL (Self contained)
Posted: Wed Jan 21, 2026 02:59 AM

Esa DLL no sirve para lo que quieres hacer.

Necesitamos construir una DLL de pcode y de momento da error

-hbdyn

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion