Jmsilva Posted April 11, 2018 Author Report Share Posted April 11, 2018 @cnavarro Error description: Error BASE/1123 Argument error: HB_HHASKEY Called from: => HB_HHASKEY( 0 ) Called from: .\source\internal\TGOOGLE.PRG => TGMAIL:GETTOKENS( 346 ) Called from: .\source\internal\TGOOGLE.PRG => TGMAIL:ACTIVATE( 206 ) Called from: Gmail.prg => GMAIL0( 591 ) Called from: Gmail.prg => (b)WEBBTTS( 224 ) Abraço! JMSilva Quote Link to comment Share on other sites More sharing options...
cnavarro Posted April 11, 2018 Report Share Posted April 11, 2018 Que tienes en la linea 224 y 591? Tienes el fichero client_id.json? Quote Link to comment Share on other sites More sharing options...
Jmsilva Posted April 12, 2018 Author Report Share Posted April 12, 2018 oMail := TGMail():New() //oMail:myEmail := "navarro.cristobal@gmail.com" //oMail:myEmail := "silva.ifsp@gmail.com" oMail:cRefreshFile := "C:\ROOT\google\refresh_id.json" //oMail:cRefreshFile := "C:\ROOT\google\client_id.json" //oMail:cJSonFile := "C:\ROOT\google\client_id.json" oMail:cJSonFile := "C:\ROOT\google\refresh_id.json" Quote Link to comment Share on other sites More sharing options...
cnavarro Posted April 12, 2018 Report Share Posted April 12, 2018 No, tienes que darte de alta y crear un proyecto para poder utilizar el API de Google y obtener tu API key https://console.developers.google.com/ Borra ese fichero, no te sirve para nada: refresh_id.json Puedes leer mi manual, ( Pag. 44 ) https://bitbucket.org/fivetech/harbour_novelda_2017/downloads/Cristobal_Navarro_REST.pdf Quote Link to comment Share on other sites More sharing options...
Jmsilva Posted April 13, 2018 Author Report Share Posted April 13, 2018 No, tienes que darte de alta y crear un proyecto para poder utilizar el API de Google y obtener tu API key https://console.developers.google.com/ Borra ese fichero, no te sirve para nada: refresh_id.json Puedes leer mi manual, ( Pag. 44 ) https://bitbucket.org/fivetech/harbour_novelda_2017/downloads/Cristobal_Navarro_REST.pdf @cnavarro Valeu! resolvido. Obrigado! Error description: Error BASE/1123 Argument error: HB_HHASKEY Called from: => HB_HHASKEY( 0 ) Called from: .\source\internal\TGOOGLE.PRG => TGMAIL:GETTOKENS( 346 ) Called from: .\source\internal\TGOOGLE.PRG => TGMAIL:ACTIVATE( 206 ) Called from: Gmail.prg => GMAIL0( 591 ) Called from: Gmail.prg => (b)WEBBTTS( 224 ) Abraço! JMSilva Quote Link to comment Share on other sites More sharing options...
cnavarro Posted April 13, 2018 Report Share Posted April 13, 2018 Disculpa, no se si te he entendido bien Lo has resuelto o no? Quote Link to comment Share on other sites More sharing options...
Jmsilva Posted April 15, 2018 Author Report Share Posted April 15, 2018 Disculpa, no se si te he entendido bien Lo has resuelto o no? Sim, resolvido! Obrigado. Apenas como sugestão, seria legal o tratamento referente ao parâmetro HB_HHASKEY para evitar o bug e informar o usuário. Uma vez que a classe faz leitura de arquivo e pode ocorrer diversos problemas. Quote Link to comment Share on other sites More sharing options...
cnavarro Posted April 15, 2018 Report Share Posted April 15, 2018 Ok, gracias Quote Link to comment Share on other sites More sharing options...
cnavarro Posted May 7, 2018 Report Share Posted May 7, 2018 ---------------------------- NEW VERSION ---------------- http://forums.fivetechsupport.com/viewtopic.php?f=6&t=34903&start=30#p211934 Jmsilva and kapiaba 2 Quote Link to comment Share on other sites More sharing options...
oribeiro Posted June 4, 2018 Report Share Posted June 4, 2018 Pessoal, Tentei compilar esse programa simples para fazer upload de arquivos no Google Drive, mas está dando erro: Onde estou errando? Não funciona com xHarbour? #include "Fivewin.ch" REQUEST HB_CODEPAGE_PTISO REQUEST HB_LANG_PT //Para gerar as credencias pelo google vá ao site: //https://cloud.google.com/?hl=pt-br //1-Click sobre a palavra CONSOLE no canto superior direito //2-Faz o login com seu_email@gmail.com //3-Barra lateral esquerda, posicione sobre "Apis e Servicos" e // seleciona "Credenciais" no sub menu. //4-Crie uma credencial para seu projeto //5-faça donwload do arquivo .json //copie o "Id do Cliente" em oDrive:cClientId //copie a "Chave Secreta do Cliente" para oDrive:cSecretId Static cKeySecret := "Hbpq8imdPdvApiQtbd5wysAY" // chave oasys Static cClientId := "123567890123-07vbq15j2gm4kalevad82jqcpg4ma8kp.apps.googleusercontent.com" // id oasys Static oDrive //----------------------------------------------------------------------------// Function Main() HB_CDPSELECT("PTISO") //OU HB_SetCodePage("PTISO") // para ordenacion - requiere codepage.lib SET CENTURY ON UploadMyFile() Return nil //----------------------------------------------------------------------------// Function UploadMyFile() local cFile := "" local lSw := .F. cFile := cGetFile32( "All Files (*.*) |*.*|", "Select a File to Upload" ) MsgStop(cFile) if !Empty( cFile ) oDrive := TGDrive():New( , .T., .F. ) //credenciais geradas pelo google oDrive:cJSonFile := "c:\fwh\samples\client_oasys.json" oDrive:cClientId := cClientId oDrive:cSecretid := cKeySecret // lSw := oDrive:Activate() XBrowse(oDrive) if lSw if oDrive:Authorize() oDrive:ListFiles() //carrega aFilesLists XBrowse( oDrive:aFilesLists ) If oDrive:UpLoadFileG( cFile, , .T. ) // Last parameter .T., create shared link MsgInfo("Arquivo enviado com sucesso !!!","UpLoad") Else MsgStop(oDrive:cError,"UpLoad") Endif endif else MsgStop("Erro ao autenticar as credenciais do Google.","UpLoad") endif endif Return nil ┌────────────────────────────────────────────────────────────────────────────┐ │ FiveWin for xHarbour 18.02 - Feb. 2018 xHarbour development power │▄ │ (c) FiveTech 1993-2018 for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7/8/10 │█ └────────────────────────────────────────────────────────────────────────────┘█ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ Compiling... xHarbour 1.2.3 Intl. (SimpLex) (Build 20180311) Copyright 1999-2018, http://www.xharbour.org http://www.harbour-project.org/ Compiling 'oagmail.prg' and generating preprocessed output to 'oagmail.ppo'... Generating C source output to 'oagmail.c'... Done. Lines 69, Functions/Procedures 3, pCodes 153 Embarcadero C++ 7.30 for Win32 Copyright (c) 1993-2017 Embarcadero Technologies, Inc. oagmail.c: Turbo Incremental Link 6.80 Copyright (c) 1997-2017 Embarcadero Technologies, In c. Error: Unresolved external '_HB_FUN___CLSLOCKDEF' referenced from C:\FWH\LIB\GOO GLE.LIB|Tgdrive Error: Unresolved external '_HB_FUN___CLSUNLOCKDEF' referenced from C:\FWH\LIB\G OOGLE.LIB|Tgoogle Error: Unresolved external '_HB_FUN_HB_HHASKEY' referenced from C:\FWH\LIB\GOOGL E.LIB|Tgoogle Error: Unresolved external '_HB_FUN_FW_GT' referenced from C:\FWH\LIB\GOOGLE.LIB |Tgoogle Error: Unresolved external '_HB_FUN___HBEXTERN__HBSSL__' referenced from C:\FWH\ LIB\GOOGLE.LIB|Tgoogle Error: Unable to perform link * Linking errors * C:\FWH\samples> Quote Link to comment Share on other sites More sharing options...
Jmsilva Posted June 4, 2018 Author Report Share Posted June 4, 2018 Pessoal, Tentei compilar esse programa simples para fazer upload de arquivos no Google Drive, mas está dando erro: Onde estou errando? Não funciona com xHarbour? #include "Fivewin.ch" REQUEST HB_CODEPAGE_PTISO REQUEST HB_LANG_PT //Para gerar as credencias pelo google vá ao site: //https://cloud.google.com/?hl=pt-br //1-Click sobre a palavra CONSOLE no canto superior direito //2-Faz o login com seu_email@gmail.com //3-Barra lateral esquerda, posicione sobre "Apis e Servicos" e // seleciona "Credenciais" no sub menu. //4-Crie uma credencial para seu projeto //5-faça donwload do arquivo .json //copie o "Id do Cliente" em oDrive:cClientId //copie a "Chave Secreta do Cliente" para oDrive:cSecretId Static cKeySecret := "Hbpq8imdPdvApiQtbd5wysAY" // chave oasys Static cClientId := "123567890123-07vbq15j2gm4kalevad82jqcpg4ma8kp.apps.googleusercontent.com" // id oasys Static oDrive //----------------------------------------------------------------------------// Function Main() HB_CDPSELECT("PTISO") //OU HB_SetCodePage("PTISO") // para ordenacion - requiere codepage.lib SET CENTURY ON UploadMyFile() Return nil //----------------------------------------------------------------------------// Function UploadMyFile() local cFile := "" local lSw := .F. cFile := cGetFile32( "All Files (*.*) |*.*|", "Select a File to Upload" ) MsgStop(cFile) if !Empty( cFile ) oDrive := TGDrive():New( , .T., .F. ) //credenciais geradas pelo google oDrive:cJSonFile := "c:\fwh\samples\client_oasys.json" oDrive:cClientId := cClientId oDrive:cSecretid := cKeySecret // lSw := oDrive:Activate() XBrowse(oDrive) if lSw if oDrive:Authorize() oDrive:ListFiles() //carrega aFilesLists XBrowse( oDrive:aFilesLists ) If oDrive:UpLoadFileG( cFile, , .T. ) // Last parameter .T., create shared link MsgInfo("Arquivo enviado com sucesso !!!","UpLoad") Else MsgStop(oDrive:cError,"UpLoad") Endif endif else MsgStop("Erro ao autenticar as credenciais do Google.","UpLoad") endif endif Return nil ┌────────────────────────────────────────────────────────────────────────────┐ │ FiveWin for xHarbour 18.02 - Feb. 2018 xHarbour development power │▄ │ (c) FiveTech 1993-2018 for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7/8/10 │█ └────────────────────────────────────────────────────────────────────────────┘█ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ Compiling... xHarbour 1.2.3 Intl. (SimpLex) (Build 20180311) Copyright 1999-2018, http://www.xharbour.org http://www.harbour-project.org/ Compiling 'oagmail.prg' and generating preprocessed output to 'oagmail.ppo'... Generating C source output to 'oagmail.c'... Done. Lines 69, Functions/Procedures 3, pCodes 153 Embarcadero C++ 7.30 for Win32 Copyright (c) 1993-2017 Embarcadero Technologies, Inc. oagmail.c: Turbo Incremental Link 6.80 Copyright (c) 1997-2017 Embarcadero Technologies, In c. Error: Unresolved external '_HB_FUN___CLSLOCKDEF' referenced from C:\FWH\LIB\GOO GLE.LIB|Tgdrive Error: Unresolved external '_HB_FUN___CLSUNLOCKDEF' referenced from C:\FWH\LIB\G OOGLE.LIB|Tgoogle Error: Unresolved external '_HB_FUN_HB_HHASKEY' referenced from C:\FWH\LIB\GOOGL E.LIB|Tgoogle Error: Unresolved external '_HB_FUN_FW_GT' referenced from C:\FWH\LIB\GOOGLE.LIB |Tgoogle Error: Unresolved external '_HB_FUN___HBEXTERN__HBSSL__' referenced from C:\FWH\ LIB\GOOGLE.LIB|Tgoogle Error: Unable to perform link * Linking errors * C:\FWH\samples> Só funciona com o Harbour. Quote Link to comment Share on other sites More sharing options...
oribeiro Posted June 4, 2018 Report Share Posted June 4, 2018 Que pena. Alguma previsão para tê-lo em xHarbour? Há em xHarbour alguma forma de gravar backup em outro disco virtual, tal como DropBox, etc.? Quote Link to comment Share on other sites More sharing options...
Jmsilva Posted June 4, 2018 Author Report Share Posted June 4, 2018 -Segundo CNavarro pretende disponibilizar para xHarbour, não conheço quanto a outras possibilidades para xhb via código. Como sugestão pode fazer exe no HB32, e através do comando RUN no xHarbour invocar o exe para enviar o arquivo. Quote Link to comment Share on other sites More sharing options...
oribeiro Posted June 5, 2018 Report Share Posted June 5, 2018 Uma boa sugestão JMSilva. Obrigado. Quote Link to comment Share on other sites More sharing options...
cnavarro Posted June 6, 2018 Report Share Posted June 6, 2018 Necesito a alguien que lo pruebe en xHarbour antes de publicarlo https://bitbucket.org/fivetech/fivewin-contributions/downloads/Googlex.lib Quote Link to comment Share on other sites More sharing options...
Jmsilva Posted June 6, 2018 Author Report Share Posted June 6, 2018 Necesito a alguien que lo pruebe en xHarbour antes de publicarlo https://bitbucket.org/fivetech/fivewin-contributions/downloads/Googlex.lib Linking: Gdrive.exe... Error: Unresolved external '_HB_FUN___HBEXTERN__HBSSL__' referenced from C:\USERS\SILVA\DOWNLOADS\GOOGLEX.LIB|TGOOGLE Error: Unresolved external '_HB_FUN_HB_MEMOREAD' referenced from C:\USERS\SILVA\DOWNLOADS\GOOGLEX.LIB|APIGFUNC Error: Unresolved external '_HB_FUN_HB_DEFAULTVALUE' referenced from C:\USERS\SILVA\DOWNLOADS\GOOGLEX.LIB|APIGFUNC Error: Unresolved external '_HB_FUN_HB_HHASKEY' referenced from C:\USERS\SILVA\DOWNLOADS\GOOGLEX.LIB|TGDRIVE Error: Unable to perform link 0 Files, 0 Warnings, 5 Errors Compile time: 0.00s Link time: 1.66s Total time: 1.66s Quote Link to comment Share on other sites More sharing options...
cnavarro Posted June 6, 2018 Report Share Posted June 6, 2018 Gracias, voy a revisar y publicaré una nueva version ------------------------------- REVISADA ----------------------------- https://bitbucket.org/fivetech/fivewin-contributions/downloads/Googlex.lib Por favor pruebe los ejemplos Quote Link to comment Share on other sites More sharing options...
Jmsilva Posted June 7, 2018 Author Report Share Posted June 7, 2018 Compiling: gd.prg... Linking: Gdrive.exe... Error: Unresolved external '_HB_FUN_HB_DEFAULTVALUE' referenced from C:\USERS\SILVA\DOWNLOADS\GOOGLEX (1).LIB|APIGFUNC Error: Unresolved external '_HB_FUN_HB_MEMOREAD' referenced from C:\USERS\SILVA\DOWNLOADS\GOOGLEX (1).LIB|TGOOGLE Error: Unable to perform link 1 Files, 0 Warnings, 3 Errors Compile time: 1.79s Link time: 3.02s Total time: 4.82s No xHarbour, Default() e MemoRead(). Obrigado! Quote Link to comment Share on other sites More sharing options...
cnavarro Posted June 7, 2018 Report Share Posted June 7, 2018 Qué raro, un momento que subo otra version Intenta ahora https://bitbucket.org/fivetech/fivewin-contributions/downloads/Googlex.lib Quote Link to comment Share on other sites More sharing options...
Jmsilva Posted June 7, 2018 Author Report Share Posted June 7, 2018 Qué raro, un momento que subo otra version Intenta ahora https://bitbucket.org/fivetech/fivewin-contributions/downloads/Googlex.lib Linking: Gdrive.exe... Error: Unresolved external '_HB_FUN_HB_DEFAULTVALUE' referenced from C:\USERS\SILVA\DOWNLOADS\GOOGLEX (2).LIB|APIGFUNC Error: Unable to perform link 0 Files, 0 Warnings, 2 Errors Compile time: 0.00s Link time: 3.98s Total time: 4.00s Quote Link to comment Share on other sites More sharing options...
kapiaba Posted June 7, 2018 Report Share Posted June 7, 2018 Acho que é assim: FUNCTION Teste1(nValor) // Harbour nValor:= hb_defaultValue(nValor, Date()) RETURN nValor FUNCTION Teste2(nValor) // xharbour hb_Default(@nValor, Date()) RETURN nValor Quote Link to comment Share on other sites More sharing options...
cnavarro Posted June 7, 2018 Report Share Posted June 7, 2018 Disculpa, ahora si, he cambiado el comando DEFAULT, pero no habia visto esa function Prueba ahora https://bitbucket.org/fivetech/fivewin-contributions/downloads/Googlex.lib Vuelve a descargarlo, me equivoqué de fichero Quote Link to comment Share on other sites More sharing options...
Jmsilva Posted June 7, 2018 Author Report Share Posted June 7, 2018 Disculpa, ahora si, he cambiado el comando DEFAULT, pero no habia visto esa function Prueba ahora https://bitbucket.org/fivetech/fivewin-contributions/downloads/Googlex.lib Vuelve a descargarlo, me equivoqué de fichero Compiling: gd.prg... Linking: Gdrive.exe... Error: Unresolved external '_HB_FUN_HB_DEFAULT' referenced from C:\USERS\SILVA\DOWNLOADS\GOOGLEX (3).LIB|APIGFUNC Error: Unable to perform link 1 Files, 0 Warnings, 2 Errors Compile time: 1.59s Link time: 4.49s Total time: 6.08s Fiz um teste e verifiquei que as funções Default() e HB_Default() funcionam perfeitamente no Harbour 3.2. Já no xHarbour funciona somente a Default() Portanto, Sr. Poderá usar somente a função DEFAULT() no projeto Google.lib que vai atender a ambas linguagens. Ok! Quote Link to comment Share on other sites More sharing options...
cnavarro Posted June 7, 2018 Report Share Posted June 7, 2018 Ya está corregido https://bitbucket.org/fivetech/fivewin-contributions/downloads/Googlex.lib kapiaba 1 Quote Link to comment Share on other sites More sharing options...
Jmsilva Posted June 7, 2018 Author Report Share Posted June 7, 2018 Ya está corregido https://bitbucket.org/fivetech/fivewin-contributions/downloads/Googlex.lib Compiling: gd.prg... Linking: Gdrive.exe... 1 Files, 0 Warnings, 0 Errors Compile time: 6.22s Link time: 13.55s Total time: 19.78sCompilou e criou o executável!! Ao executar: -------------------- Internal Error Handling Information --------------------- Subsystem Call ....: BASE System Code .......: 1123 Default Status ....: .F. Description .......: Argument error Operation .........: HHASKEY Arguments .........: [ 1] = Type: N Val: 1 [ 2] = Type: C Val: installed Involved File .....: Dos Error Code ....: 0 Trace Through: ---------------- HHASKEY : 0 in Module: TGDRIVE:GETTOKENS : 371 in Module: .\source\internal\TGOOGLE.PRG TGDRIVE:ACTIVATE : 226 in Module: .\source\internal\TGOOGLE.PRG UPLOADMYFILE : 70 in Module: gd.prg MAIN : 37 in Module: gd.prg ############################## Video Screen Dump ############################## Error BASE/1123 Argument error: HHASKEY Arguments: ( [ 1] = Type: N Val: 1 [ 2] = Type: C Val: installed) (Quit) Error BASE/1123 Argument error: HHASKEY Arguments: ( [ 1] = Type: N Val: 1 [ 2] = Type: C Val: installed) Error at ...: HHASKEY(0) in Module: | Called from : TGDRIVE:GETTOKENS(371) in Module: .\source\internal\TGOOGLE.PRG | Called from : TGDRIVE:ACTIVATE(226) in Module: .\source\internal\TGOOGLE.PRG | Called from : UPLOADMYFILE(70) in Module: gd.prg | Linha 70 do arquivo gd.prg lSw := oDrive:Activate() Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.