HMG.3.4.0 Ejemplos DLL no funcionan

Moderator: Rathinagiri

User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

HMG.3.4.0 Ejemplos DLL no funcionan

Post by Pablo César »

Hi Pete,

I do not wish to extend in this discussion about my words/your words... because I could offend indirectly to some to people who is not present here and also is not my intention. So this question about when I said "unfair", we can let apart of this discussion.

As you said (in other words) technical proposes should be most considered.

So, revising Harbour codes, seeing CalDll32 plus functions be working in HMG 3.3.1 and now in HMG 3.4.0 (both in UNICODE) I can suppose that something wrongly was changed.

The big question is Harbour's CallDll32 + functions are working ONLY in ANSI in except when is for Windows Mobile (WinCE) and this is not good for us, because we (HMG I mean) always are keep compatibilitiy and mostly we detect automactically when is UNICODE and ANSI.

So in this way, I believing we should keep our original library (of course re-adapted to new functions in Harbour, I guess the problem is we use GetProcAddress function) and still keeping our CallDll32 in our library. Because if Harbour does not offer this differentiation: it will become a problem for us. In that way, we can say our library (who it was created by HMG) is same important than Harbour or better say: there is not problem each GUI libraries having it own function even thinking it could be duplicated. It may seem duplicated but the real history is be handled in different ways. Do you agree with this ?

So if HMG remove our original CallDll32+functions and let Harbour do the job, what to do whith this ?
Screen3.png
Screen3.png (30.87 KiB) Viewed 5000 times
Most probably when Harbour will be ready to work in UNICODE regarding CallDll32 we will have to fix our app codes again...
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Mario Mansilla
Posts: 269
Joined: Wed Aug 13, 2008 2:35 pm
Location: Córdoba - Argentina

Re: HMG.3.4.0 Ejemplos DLL no funcionan

Post by Mario Mansilla »

Hola Pablo :
aún con las modificaciones que propusiste con HMG.3.4.0 los ejemplos DLL2 y DLL3 no funcionan .
En el sistema donde uso CallDll32 , cuando las funciones llamadas devuelven valores estos son string vacios .
Con HMG.3.3.1 todos los ejemplos y en el sistema donde utilizo calldll32 funciona correctamente

Uso win7 32 bits

Saludos .
Mario Mansilla
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: HMG.3.4.0 Ejemplos DLL no funcionan

Post by srvet_claudio »

Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
Mario Mansilla
Posts: 269
Joined: Wed Aug 13, 2008 2:35 pm
Location: Córdoba - Argentina

Re: HMG.3.4.0 Ejemplos DLL no funcionan

Post by Mario Mansilla »

Hola Claudio :
la funcion que propones es : HMG_CallDLL ( cLibName, [ nRetType ] , cFuncName, Arg1, ..., ArgN ) ---> xRetValue

La funcion que utilizo actualmente es :
handler = CallDll32 ( "OpenComFiscal" , "WINFIS32.DLL" ,c_Prtcom,c_Modo )

Transformada quedaria asi :
HMG_CallDLL("WINFIS32.DLL" , handler , "OpenComFiscal" , c_Prtcom , c_Modo)

Saludos

Mario Mansilla
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: HMG.3.4.0 Ejemplos DLL no funcionan

Post by srvet_claudio »

Mario Mansilla wrote:Hola Claudio :
la funcion que propones es : HMG_CallDLL ( cLibName, [ nRetType ] , cFuncName, Arg1, ..., ArgN ) ---> xRetValue

La funcion que utilizo actualmente es :
handler = CallDll32 ( "OpenComFiscal" , "WINFIS32.DLL" ,c_Prtcom,c_Modo )

Transformada quedaria asi:
HMG_CallDLL("WINFIS32.DLL" , handler , "OpenComFiscal" , c_Prtcom , c_Modo)

Saludos

Mario Mansilla
Mario,
quedaría asi:

#include "hbdyn.ch"
handle := HMG_CallDLL("WINFIS32.DLL" , HB_DYN_CTYPE_INT, "OpenComFiscal" , c_Prtcom , c_Modo)

HB_DYN_CTYPE_INT (C:\hmg.3.4.0\HARBOUR\include\hbdyn.ch) hace que la función retorne un numero de tipo INT ---> int OpenComFiscal (int Com, int Mode)

Si la función al llamarla asigna algún nuevo valor a algún parámetro tenes que pasarlo por referencia, ej. @Arg1
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
Mario Mansilla
Posts: 269
Joined: Wed Aug 13, 2008 2:35 pm
Location: Córdoba - Argentina

Re: HMG.3.4.0 Ejemplos DLL no funcionan

Post by Mario Mansilla »

Hola Claudio :
probe en el sistema la dll a travez de la nueva funcion y funciona correctamente .
Estas pruebas las realize junto con la modificacion de los archivos .c .ch que propuso Pablo en un mensaje anterior y reconstruyendo la libreria para Ansi 32 bits .
Estas modificaciones en los archivos deben mantenerse con la nueva funcion o hay que volverlas a su estado original ?

Hello Claudio:
probe in the system dll travez of the new function and working properly.
Realize these tests along with the modification of the .c files .ch Pablo proposed in a previous message and rebuilding the library for 32-bit Ansi.
These changes should be kept in the archives with the new function or have to return them to their original state?

Saludos
Mario Mansilla
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: HMG.3.4.0 Ejemplos DLL no funcionan

Post by srvet_claudio »

Hi Mario.
Yes, this new function works with the changes proposed by Pablo.
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
Mario Mansilla
Posts: 269
Joined: Wed Aug 13, 2008 2:35 pm
Location: Córdoba - Argentina

Re: HMG.3.4.0 Ejemplos DLL no funcionan

Post by Mario Mansilla »

Hola Claudio :
perfecto muchas gracias .
Saludos
Mario Mansilla
User avatar
danielmaximiliano
Posts: 2612
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: HMG.3.4.0 Ejemplos DLL no funcionan

Post by danielmaximiliano »

Hola Claudio Soto :
hay alguna forma de exportar o ver las funciones de una .DLL cargada en Harbour
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
danielmaximiliano
Posts: 2612
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: HMG.3.4.0 Ejemplos DLL no funcionan

Post by danielmaximiliano »

Pablo César wrote:Provisional solution (unofficial) for the current version HMG 3.4.0:

This is what I've done and worked perfectly. :D
Hola Pablo:
estoy trabajando con .dll y si tuvieras la amabilidad de subir las correcciones tanto en .c y .prg seria muy bueno asi no equivocarme y reconstruir las librerias ..

Gracias
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Post Reply