Hola Daniel,
Todavia no tuve tiempo de mirar tu código posteado. Pero aqui por tu ultimo mensaje se vé que en el segundo parametro que pusiste en HMG_CallDLL deberia ser del tipo numérico de acuerdo la documentacion.
No sé si esto te resuelve pero mejor usar como dice. No creo que en el segundo parametro tengas que usar el handle. Fijate en el archvio hbdyn.ch las opciones que cuentas.
Un abrazo,
firma digital
Moderator: Rathinagiri
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
firma digital
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- danielmaximiliano
- Posts: 2612
- Joined: Fri Apr 09, 2010 4:53 pm
- Location: Argentina
- Contact:
Re: firma digital
Hola Pablo ; Claudio Soto y demás ..
creo que mi error se debe a esto ...
(Source XMLSEC.C )
sigo investigando ....
creo que mi error se debe a esto ...
(Source XMLSEC.C )
Code: Select all
/**
* xmlSecInit:
*
* Initializes XML Security Library. The depended libraries
* (LibXML and LibXSLT) must be initialized before.
*
* Returns: 0 on success or a negative value otherwise.
*/
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
- srvet_claudio
- Posts: 2193
- Joined: Thu Feb 25, 2010 8:43 pm
- Location: Uruguay
- Contact:
Re: firma digital
Según la doc: https://www.aleksey.com/xmlsec/api/xmlsec-xmlsec.html:danielmaximiliano wrote:No pude ni puedo hacer que funcione el retorno del Init de XMLSec, este debe devolve 0 o negativo si no se cargo la libreria..Pablo César wrote:Gracias Daniel + Claudio por la dedicacion y logros. La verdad que es muy importante que dominemos el uso de DLLs de dentro del HMG.
nHandler := HMG_CallDLL("libxmlsec1.dll" , "xmlSecInit" , @nTrue )
nHandler := HMG_CallDLL("libxmlsec1.dll" , "xmlSecInit()" , @nTrue )
or
nTrue := HMG_CallDLL("libxmlsec1.dll" , nHandler , "xmlSecInit" )
nTrue := HMG_CallDLL("libxmlsec1.dll" , nHandler , "xmlSecInit()" )
Code: Select all
// int xmlSecInit (void);
// - Initializes XML Security Library. The depended libraries (LibXML and LibXSLT) must be initialized before.
// - Returns : 0 on success or a negative value otherwise.
nError := HMG_CallDLL("libxmlsec1.dll" , HB_DYN_CTYPE_INT, "xmlSecInit" )
IF nError <> 0
// error
ENDIF
- danielmaximiliano
- Posts: 2612
- Joined: Fri Apr 09, 2010 4:53 pm
- Location: Argentina
- Contact:
Re: firma digital
Sigue devolviendo "U"srvet_claudio wrote:Code: Select all
// int xmlSecInit (void); // - Initializes XML Security Library. The depended libraries (LibXML and LibXSLT) must be initialized before. // - Returns : 0 on success or a negative value otherwise. nError := HMG_CallDLL("libxmlsec1.dll" , HB_DYN_CTYPE_INT, "xmlSecInit" ) IF nError <> 0 // error ENDIF
Code: Select all
#include <hmg.ch>
#include "hbdyn.ch"
Function Main
Local nHandler , nError
Local nTrue
Local nFalse
Load Window Main
Main.Center
nError := HMG_CallDLL("libxmlsec1.dll" , HB_DYN_CTYPE_INT, "xmlSecInit" )
IF nError <> 0
msgbox( valtype ( nError ), Valtype (nHandler) )
ENDIF
Return
Code: Select all
import libxml2
import xmlsec
def main():
assert(sys.argv)
if len(sys.argv) < 3:
print "Error: wrong number of arguments."
print "Usage: %s <xml-tmpl> <key-file>" % sys.argv[0]
return sys.exit(1)
# Init libxml library
libxml2.initParser()
libxml2.substituteEntitiesDefault(1)
# Init xmlsec library
if xmlsec.init() < 0:
print "Error: xmlsec initialization failed."
return sys.exit(-1)
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Re: firma digital
Hola daniel, al final pudistes hacer llamada a la DLL, consulta como la construistes?
slds
NS
slds
NS