xHarbour.org updated!

Re: xHarbour.org updated!

Postby karinha » Sun Sep 17, 2023 2:13 pm

Enrico: thank you very much. Everything is working perfectly. This is, without a doubt, a very robust and powerful new compiler. Fantastic.

enrico: muchas gracias. Todo está funcionando perfectamente. Este es, sin duda, un nuevo compilador muy robusto y potente. Fantástico.

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7824
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: xHarbour.org updated!

Postby Enrico Maria Giordano » Sun Sep 17, 2023 3:00 pm

Great! I'm happy for this. But to be honest, it's been a year now that I'm using MSC32 because it generates a much smaller EXEs. If you want to try it just let me know.
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: xHarbour.org updated!

Postby wartiaga » Mon Sep 18, 2023 6:29 pm

Enrico,

Can you help me about this? Thank you!


Turbo Incremental Link 6.80 Copyright (c) 1997-2017 Embarcadero Technologies, Inc.
Error: Unresolved external '___get_std_stream' referenced from D:\LANG\FWH1811\XH1.3.0\LIB\COMMON.LIB|hbtrace
Error: Unresolved external '__chdir' referenced from D:\LANG\FWH1811\XH1.3.0\LIB\HBZIP.LIB|zipplatform
Error: Unable to perform link
wartiaga
 
Posts: 212
Joined: Wed May 25, 2016 1:04 am

Re: xHarbour.org updated!

Postby Enrico Maria Giordano » Mon Sep 18, 2023 7:17 pm

Sure, but I need a simple PRG showing the errors that I can test here.
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: xHarbour.org updated!

Postby wartiaga » Mon Sep 18, 2023 7:22 pm

Enrico Maria Giordano wrote:Sure, but I need a simple PRG showing the errors that I can test here.


Code below, I change testget in samples folder to try tipclient with https. Thanks in advance!

#Include "Fivewin.ch"


Function Main()

LOCAL oDlg, oGet
LOCAL cCad := "Testing " // pad("Testing Gets",40)
LOCAL nNum := 0
LOCAL dDat := Date()
Set Century on
Set Date To British
Set Epoch to 1960
Set Multiple On
Set Deleted On


DEFINE DIALOG oDlg TITLE "TGet from " + FWDESCRIPTION

@ 1, 2 SAY "Text..:" OF oDlg
@ 1, 6 GET oGet1 VAR Inicio OF oDlg SIZE 100, 10 COLOR "W/G" PICTURE "99999999"

@ 3, 7 BUTTON "&Ok" OF oDlg SIZE 30, 12 ACTION WebPageSource()
@ 3, 16 BUTTON "&Cancel" SIZE 30, 12 OF oDlg ACTION oDlg:End() CANCEL


ACTIVATE DIALOG oDlg CENTERED

Return nil


FUNCTION WebPageSource(cUrl)
local oIE,cTXT,cHTML,cMemo:=""
local cString
LOCAL cString1,cString2
LOCAL oUrl, oCli,lOk

DEFAULT cUrl := "https://www.bcv.org.ve"

BEGIN SEQUENCE

oUrl = TUrl():New( cUrl )

IF EMPTY( oUrl )
BREAK
ENDIF

oCli = TIPClientHttp():New( oUrl )

IF EMPTY( oCli )
BREAK
ENDIF

IF !oCli:Open( oUrl )
BREAK
ENDIF

WHILE .T.

cString := oCli:Read()

IF Empty(cString)
EXIT
ENDIF

cMemo:=cMemo+cString

ENDDO

cString:=cMemo
oCli:Close()
oUrl:Close()

END SEQUENCE

MEMOWRIT("BCV.TXT",cMemo)
MsgInfo( cString )
MemoEdit( cString )

Return Nil
wartiaga
 
Posts: 212
Joined: Wed May 25, 2016 1:04 am

Re: xHarbour.org updated!

Postby Enrico Maria Giordano » Mon Sep 18, 2023 7:36 pm

Compiled: no unresolved externals, with both Harbour and xHarbour. Please try with the latest xHarbour from here:

http://xharbour.org/index.asp?page=download/windows/binaries_win
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: xHarbour.org updated!

Postby karinha » Mon Sep 18, 2023 7:50 pm

Enrico, no acepta https.

Code: Select all  Expand view

// C:\FWH..\SAMPLES\WARTIAGA.PRG - Compila perfecto.

#include "Fivewin.ch"

FUNCTION Main()

   LOCAL oDlg, oGet, oGet1
   LOCAL cCad := "Testing    " // pad("Testing Gets",40)
   LOCAL nNum := 0
   LOCAL dDat := Date()
   LOCAL Inicio := 0

   SET CENTURY ON
   SET DATE TO BRITISH
   SET EPOCH TO 1960
   SET Multiple ON
   SET DELETED ON

   DEFINE DIALOG oDlg TITLE "TGet from " + FWDESCRIPTION

   @ 1,  2 SAY "Text..:" OF oDlg UPDATE

   // NO HACE SENTIDO... PARA QUE SIRVE?
   @ 1,  6 GET oGet1 VAR Inicio OF oDlg SIZE 100, 10 COLOR "W/G" ;
      PICTURE "99999999" UPDATE

   @ 3,  7 BUTTON "&Ok" OF oDlg SIZE 30, 12 ;
      ACTION WebPageSource()

   @ 3, 16 BUTTON "&Cancel" SIZE 30, 12 OF oDlg ;
      ACTION( oDlg:End() ) CANCEL

   ACTIVATE DIALOG oDlg CENTERED

RETURN NIL

FUNCTION WebPageSource( cUrl )

   LOCAL oIE, cTXT, cHTML, cMemo := ""
   LOCAL cString
   LOCAL cString1, cString2
   LOCAL oUrl, oCli, lOk

   // BANCO CENTRAL DE VENEZUELA?
   DEFAULT cUrl := "www.bcv.org.ve"

   BEGIN SEQUENCE

      // Enrico: No acepta https aqui:
      oUrl = TUrl():New( cUrl )

      IF Empty( oUrl )

         __QUIT()

         // BREAK // NO USE ESTO

      ENDIF

      oCli := TIPClientHttp():New( oUrl )

      IF Empty( oCli )

         __QUIT()

         // BREAK // NO USE ESTO

      ENDIF

      IF !oCli:Open( oUrl )

         __QUIT()

         // BREAK // NO USE ESTO

      ENDIF

      WHILE( .T. )

         SYSREFRESH()

         cString := oCli:Read()

         ? cString

         IF Empty( cString )

            EXIT

         ENDIF

         cMemo := cMemo + cString

      ENDDO

      cString := cMemo

      oCli:Close()

      // oUrl:Close()  //??

   END SEQUENCE

   MemoWrit( "BCV.TXT", cMemo )

   MsgInfo( cString )

   MemoEdit( cString )

RETURN NIL

// fin / end
 


Regards, saludos
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7824
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: xHarbour.org updated!

Postby leandro » Mon Sep 18, 2023 8:03 pm

Excelente Enrico y karinha :D, aplicación compilada correctamente. De momento sin problemas, cualquier cosa comento. :D :D :D :D
Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1676
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia

Re: xHarbour.org updated!

Postby karinha » Mon Sep 18, 2023 8:19 pm

Artiaga, ¿qué necesitas "sacar" de la página web del banco central de Venezuela? ¿No necesitas una clave o autorización?

Code: Select all  Expand view

// C:\FWH..\SAMPLES\WARTIAG3.PRG

#Include "FiveWin.ch"

FUNCTION Main()

   LOCAL cCnpj

   cCnpj := "00000000000000"

   SiteCnpjFazenda( cCnpj )

RETURN NIL

FUNCTION SiteCnpjFazenda( cCnpj )

   LOCAL cUrl

   /*
   cUrl := [http://www.receita.fazenda.gov.br/PessoaJuridica/CNPJ/cnpjreva/Cnpjreva_Solicitacao2.asp?cnpj=] + ;
      StrZero( Val( cCnpj ), 14 )
   */

   cUrl := "https://www.bcv.org.ve" // falta algo????

   ShellExecute(GetActiveWindow(),"open",'"'+cUrl+'"', 0)

RETURN NIL

// FIN - kapiabafwh@gmail.com
 


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7824
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: xHarbour.org updated!

Postby wartiaga » Mon Sep 18, 2023 9:12 pm

Enrico Maria Giordano wrote:Compiled: no unresolved externals, with both Harbour and xHarbour. Please try with the latest xHarbour from here:

http://xharbour.org/index.asp?page=download/windows/binaries_win


I downloaded xharbour from this address. What version of bcc and fwh did you use? Does it use hbzip.lib and common.lib? Thanks.
wartiaga
 
Posts: 212
Joined: Wed May 25, 2016 1:04 am

Re: xHarbour.org updated!

Postby Enrico Maria Giordano » Mon Sep 18, 2023 9:26 pm

karinha wrote:Enrico, no acepta https.


You have to setup your compiler for SSL. Please search in this forum my instructions about that.
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: xHarbour.org updated!

Postby Enrico Maria Giordano » Mon Sep 18, 2023 9:29 pm

wartiaga wrote:
Enrico Maria Giordano wrote:Compiled: no unresolved externals, with both Harbour and xHarbour. Please try with the latest xHarbour from here:

http://xharbour.org/index.asp?page=download/windows/binaries_win


I downloaded xharbour from this address. What version of bcc and fwh did you use?


BCC 7.60 and latest FWH.

wartiaga wrote:Does it use hbzip.lib and common.lib? Thanks.


Yes, of course.
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: xHarbour.org updated!

Postby wartiaga » Mon Sep 18, 2023 9:40 pm

Enrico I managed to compile, but this version of xharbour does not accept https? I have a system that communicates with a website for registering cargo for transport and I urgently need to access it via https, I used to access it with http normally but the website now only accepts secure protocol (tls 1.2 and above). What is needed? Thank you for your help!
wartiaga
 
Posts: 212
Joined: Wed May 25, 2016 1:04 am

Re: xHarbour.org updated!

Postby wartiaga » Mon Sep 18, 2023 9:43 pm

karinha wrote:Artiaga, ¿qué necesitas "sacar" de la página web del banco central de Venezuela? ¿No necesitas una clave o autorización?

Code: Select all  Expand view

// C:\FWH..\SAMPLES\WARTIAG3.PRG

#Include "FiveWin.ch"

FUNCTION Main()

   LOCAL cCnpj

   cCnpj := "00000000000000"

   SiteCnpjFazenda( cCnpj )

RETURN NIL

FUNCTION SiteCnpjFazenda( cCnpj )

   LOCAL cUrl

   /*
   cUrl := [http://www.receita.fazenda.gov.br/PessoaJuridica/CNPJ/cnpjreva/Cnpjreva_Solicitacao2.asp?cnpj=] + ;
      StrZero( Val( cCnpj ), 14 )
   */

   cUrl := "https://www.bcv.org.ve" // falta algo????

   ShellExecute(GetActiveWindow(),"open",'"'+cUrl+'"', 0)

RETURN NIL

// FIN - kapiabafwh@gmail.com
 


Regards, saludos.


Karinha had an error in the compilation but I managed to resolve it. The example I posted is for testing purposes only. I need to use https to register the load and it cannot be opened by opening a browser page, understand? I need to be from within the system to enter a document and they process it and return a code to be recorded in the database. I used xharbour 1.2.1 with http normally but they changed it to https so I thought that by updating xharbour I could use it but still giving the error when calling https. Thanks!
wartiaga
 
Posts: 212
Joined: Wed May 25, 2016 1:04 am

Re: xHarbour.org updated!

Postby wartiaga » Tue Sep 19, 2023 2:25 am

Enrico Maria Giordano wrote:
karinha wrote:Enrico, no acepta https.


You have to setup your compiler for SSL. Please search in this forum my instructions about that.


Enrico, thank you very much for your help. Through your post I managed to create the libs and put the dll in the executable folder. It is compiling normally but the IF oCli:Open() line is returning false, is there a different new parameter to use https? Thank you again. Code below:

TRY
oUrl = TUrl():New( 'https://apis.averbeporto.com.br/php/conn.php' )
CATCH
CurSorArrow()
MsgInfo('Erro ao criar a conexão','Erro')
RETURN(.F.)
END

IF !EMPTY( oUrl )
oCli = TIPClientHttp():New( oUrl )
IF !EMPTY( oCli )
oCli:nConnTimeout = -1
IF oCli:Open() <============================ this line returns false.
hQuery["mod"] := "login"
hQuery["comp"] := "5"
hQuery["user"] := "login"
hQuery["pass"] := "senha"
oCli:cUserAgent:='Mozilla/3.0 (compatible; Indy Library)'
IF !oCli:PostMultiPart(hQuery)
CurSorArrow()
MsgInfo(oCli:lastErrorMessage,'Erro')
ELSE
cNFSeResp := oCli:ReadAll()
RespC := oCli:GetCookies() // Captura cookie
ENDIF
oCli:Close()
ENDIF
ENDIF
ENDIF
wartiaga
 
Posts: 212
Joined: Wed May 25, 2016 1:04 am

PreviousNext

Return to WhatsNew / Novedades

Who is online

Users browsing this forum: No registered users and 3 guests