HIX + FWH DLL (Self contained)

mod_harbour es un módulo para Apache que permite correr tus PRGs directamente en la web!!!
Post Reply
User avatar
Antonio Linares
Site Admin
Posts: 44508
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 717 times
Been thanked: 311 times
Contact:

HIX + FWH DLL (Self contained)

Post by Antonio Linares »

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

go64.bat

Code: Select all | Expand

@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

Code: Select all | Expand

#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

Code: Select all | Expand

-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)

Code: Select all | Expand

#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
russimicro
Posts: 413
Joined: Sun Jan 31, 2010 3:30 pm
Location: Bucaramanga - Colombia
Been thanked: 5 times

Re: HIX + FWH DLL (Self contained)

Post by russimicro »

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()

Code: Select all | Expand

    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

User avatar
Antonio Linares
Site Admin
Posts: 44508
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 717 times
Been thanked: 311 times
Contact:

Re: HIX + FWH DLL (Self contained)

Post by Antonio Linares »

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
Post Reply