jpcavagnaro wrote:Hola gente, en fwh2212 estoy intentando hacer :
xDll := LoadLibrary( "WINFIS32.DLL" )
y me devuelve "0x0" si no existe y "0x000000" si es correco, como pregunto por estos valores porque son tipo P (puntero según leí)
Saludos
Jorge
jpcavagnaro wrote:Hola Antonio, el error lo tengo en el loadllibrary, lo que devuelve:
hDll := LoadLibrary( "winfis32.dll" )
el hDll = 0x0000000 si la librería existe o 0x0 si no existe, en lugar de devolver 0 si es correcto o el -1
Saludos
Jorge
// C:\FWH..\SAMPLES\WINFIS32.PRG - Compilado con Harbour y xHarbour.
#Include "FiveWin.Ch"
#Include "Directry.ch"
#include "dll.ch"
STATIC XDLL
FUNCTION Main()
// debe estar en el carpeta del programa
xDll := LoadLibrary( "WINFIS32.DLL" )
IF xDll > 0
? "Open DLL funciona"
ELSE
? "Open DLL no funciona"
ENDIF
// Continua...
// ACTIVATE...
// FreeLibrary( xDll )
RETURN NIL
DLL32 FUNCTION OpenComFiscal( nCom AS _INT, nMode AS _INT ) AS _INT PASCAL FROM "OpenComFiscal" LIB XDLL
DLL32 FUNCTION MandaPaqueteFiscal( nHandler AS _INT, cBuffer AS LPSTR ) AS _INT PASCAL FROM "MandaPaqueteFiscal" LIB XDLL
DLL32 FUNCTION UltimaRespuesta( nHandler AS _INT, cBuffer AS LPSTR ) AS _INT PASCAL FROM "UltimaRespuesta" LIB XDLL
DLL32 FUNCTION CloseComFiscal( nHandler AS _INT ) AS VOID PASCAL FROM "CloseComFiscal" LIB XDLL
DLL32 FUNCTION ReOpenComFiscal( nCom AS _INT ) AS _INT PASCAL FROM "ReOpenComFiscal" LIB XDLL
DLL32 FUNCTION InitFiscal( nHandler AS _INT ) AS _INT PASCAL FROM "InitFiscal" LIB XDLL
DLL32 FUNCTION VersionDLLFiscal( ) AS _INT PASCAL FROM "VersionDLLFiscal" LIB XDLL
DLL32 FUNCTION BusyWaitingMode( nMode AS _INT ) AS VOID PASCAL FROM "BusyWaitingMode" LIB XDLL
DLL32 FUNCTION CambiarVelocidad( nPortNumber AS _INT, nNewSpeed AS LONG) AS VOID PASCAL FROM "CambiarVelocidad" LIB XDLL
DLL32 FUNCTION SearchPrn( nHandler AS _INT ) AS LONG PASCAL FROM "SearchPrn" LIB XDLL
DLL32 FUNCTION ProtocolMode( nMode AS _INT ) AS _INT PASCAL FROM "ProtocolMode" LIB XDLL
DLL32 FUNCTION SetCommandRetries( nRetries AS _INT ) AS _INT PASCAL FROM "SetCommandRetries" LIB XDLL
DLL32 FUNCTION Abort( nPortNumber AS _INT ) AS VOID PASCAL FROM "Abort" LIB XDLL
// FIN / END
Carpeta de c:\FWH1905\samples
22/04/2023 13:27 13.691 WINFIS32.c
22/04/2023 13:17 73.728 winfis32.dll
22/04/2023 13:27 4.003.840 WINFIS32.exe
22/04/2023 13:27 777.945 WINFIS32.map
22/04/2023 13:27 6.273 WINFIS32.obj
22/04/2023 13:27 11.333 WINFIS32.ppo
22/04/2023 13:28 1.762 WINFIS32.PRG
22/04/2023 13:27 524.288 WINFIS32.tds
jpcavagnaro wrote:Hola Antonio, el error lo tengo en el loadllibrary, lo que devuelve:
hDll := LoadLibrary( "winfis32.dll" )
el hDll = 0x0000000 si la librería existe o 0x0 si no existe, en lugar de devolver 0 si es correcto o el -1
Saludos
Jorge
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 49 guests