Jump to content
Fivewin Brasil

Edmar Frazao

Membros
  • Posts

    125
  • Joined

  • Last visited

Everything posted by Edmar Frazao

  1. Duvidas sobre o Cloud? 1)o IP do servidor pode ser acessado remotamente? 2)pode se compartilhar o dados como o compartilhamento de arquivos? 3)Pode instalar o XAMP? e acesssar as paginas, ou seja criar uma home page sendo acessado remotamente?
  2. ARC do Ads é free http://devzone.advantagedatabase.com/dz/content.aspx?key=20&Release=16
  3. O usuário ja tenho com a função acima da API preciso é da senha do usuário logado no windows para implementar um login automático no meu sistema.
  4. a função abaixo busca o usuario do windows. Mas como capturar a senha do usuario logado no windows??? Static Function _GetUserName () user:= GetUserName() Return User //----------------------------------------------------------------// // Função GetUsername, em C, usada para obter o nome do usuário. #pragma BEGINDUMP #include #include // BOOL GetUserName( LPTSTR lpBuffer, LPDWORD nSize ); // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/getusername.asp HB_FUNC ( GETUSERNAME ) { TCHAR lpBuffer[255]; DWORD nSize = 255; GetUserName( lpBuffer, &nSize ); hb_retc( lpBuffer ); } #pragma ENDDUMP Editado por - edmarfrazao on 09/03/2012 08:42:15
  5. a função abaixo busca o usuario do windows. Mas como capturar a senha do usuario logado no windows??? Static Function _GetUserName () user:= GetUserName() Return User //----------------------------------------------------------------// // Função GetUsername, em C, usada para obter o nome do usuário. #pragma BEGINDUMP #include #include // BOOL GetUserName( LPTSTR lpBuffer, LPDWORD nSize ); // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/getusername.asp HB_FUNC ( GETUSERNAME ) { TCHAR lpBuffer[255]; DWORD nSize = 255; GetUserName( lpBuffer, &nSize ); hb_retc( lpBuffer ); } #pragma ENDDUMP Editado por - edmarfrazao on 09/03/2012 08:42:15
  6. não tenho o #include poderia postar? citação:USO ESSA NO MEU SISTEMA E FUNCIONA MELHOR QUE QUALQUER OUTRA. POIS DISPARA VIA API. #pragma BEGINDUMP #include #include #include #include int hb_Ping( const char * cp ) { HANDLE hIcmpFile; unsigned long ipaddr; DWORD dwRetVal; char SendData[32] = "Data Buffer"; LPVOID ReplyBuffer; DWORD ReplySize; ipaddr = inet_addr( cp ); if (ipaddr == INADDR_NONE) return 1; hIcmpFile = IcmpCreateFile(); if (hIcmpFile == INVALID_HANDLE_VALUE) return 2; ReplySize = sizeof(ICMP_ECHO_REPLY) + sizeof(SendData); ReplyBuffer = (VOID*) malloc(ReplySize); if (ReplyBuffer == NULL) return 3; dwRetVal = IcmpSendEcho(hIcmpFile, ipaddr, SendData, sizeof(SendData), NULL, ReplyBuffer, ReplySize, 1000); if (dwRetVal == 0) return 4; return 0; } HB_FUNC( HB_PING ) { hb_retni( hb_Ping( hb_parc( 1 ) ) ); } #pragma ENDDUMP IF hb_Ping( GetHostByName( ALLTRIM( cServer) ) ) == 0 cMsg := "Conexão estabelecida com Sucesso. " + CRLF + "Servidor : " + cServer + CRLF + "IP : " + AllTrim( GetHostByName( ALLTRIM(cServer) ) ) ELSE cMsg := "Falha ao Conectar com o Servidor " + CRLF + cServer + CRLF + "Verifique a Rede!!" ENDIF Gilmar Silva Santos Programador - Goiânia Go Não Recuarei, Nada Temerei, Comigo Está o Senhor. Email : gilmarss2010@gmail.com FWH 10.8, DBF, MED EDITOR, UESTUDIO, XHB 1.2, BCC 5.82 id=quote>id=quote>
  7. consegui usando "WScript.Shell" ) mas quando o servidor esta desligado demora uns 3 segundos. preciso de algo mais rápido. cip:='192.168.50.77' nTentativas:=0 cServer:=cIP ePING(cip,2) **************************************************************************** function ePING(IP,xNoTentativas) Local xArq:='C:\PING.TXT' Local xComando:="ping " + IP + " -n " + AllTrim(Str(xNoTentativas)) + " >"+xArq ferase(xArq) //Funciona mas em XP tem problema nao lembro o motivo eRun(xcomando) //win exe não funciona win 64 //eRun2(xcomando) //Funciona mais abre janela dos //eRun3(xcomando) X:=MEMOREAD(xArq) IF 'bytes='$x msginfo('ok') elseIF 'inacess'$x msginfo('Host Inacessivel') else MSGINFO(X) endif Return lResult Function eRun(xComando) local oShell, RET oShell := CreateObject( "WScript.Shell" ) RET := oShell:Run( "%comspec% /c " + xComando, 0, .T. ) oShell := NIL return Function eRun2(xComando) RET:=WINEXEC(xComando,1) return Function eRun3(xComando) run (xcomando) return
  8. uso xharbour.com +hwgui não tenho estas funções.
  9. o comando nao funciona ou seja não grava no txt
  10. preciso saber se o IP do servidor esta ativo. Como fazer? usando o inet não funciona ChecaIP('10.1.1.20') Function Checaip(cAddress) InetInit() aHosts := InetGetHosts( cAddress ) IF aHosts == NIL .or. len(aHosts)=0 InetCleanup() RETURN .f. endif FOR EACH cAddress IN aHosts nRet:=.t. NEXT InetCleanup() RETURN nRet Editado por - edmarfrazao on 06/03/2012 10:03:32
  11. preciso saber se o IP do servidor esta ativo. Como fazer? usando o inet não funciona ChecaIP('10.1.1.20') Function Checaip(cAddress) InetInit() aHosts := InetGetHosts( cAddress ) IF aHosts == NIL .or. len(aHosts)=0 InetCleanup() RETURN .f. endif FOR EACH cAddress IN aHosts nRet:=.t. NEXT InetCleanup() RETURN nRet Editado por - edmarfrazao on 06/03/2012 10:03:32
  12. não achei a função poderia postar o link?
  13. Achei estas funções e talvez seja de utilidade para vocês. Elas chamam as rotinas da API do windows para salvar e ler arquivos. exemplo ARQ_PRN:=ESAVEFILE("c:\REL.txt") ARQ_PRN:=ELOADFILE("c:\REL.txt") #pragma BEGINDUMP #include "windows.h" #include "hbapi.h" HB_FUNC( ESAVEFILE ) { OPENFILENAME ofn; char File[ MAX_PATH ] = ""; if ( ISCHAR( 1 ) ) lstrcpy( File, hb_parc( 1 ) ); ofn.lStructSize = 76; ofn.hwndOwner = GetActiveWindow(); ofn.lpstrFilter = "Arquivos Texto(*.txt)"; ofn.lpstrCustomFilter = 0; ofn.nFilterIndex = 1; ofn.lpstrFile = File; ofn.nMaxFile = MAX_PATH; ofn.lpstrFileTitle = 0; //ofn.lpstrInitialDir = 0; ofn.lpstrTitle = "Salvar como?"; ofn.Flags = OFN_HIDEREADONLY | OFN_NOCHANGEDIR | OFN_SHAREAWARE | OFN_NODEREFERENCELINKS | OFN_NOTESTFILECREATE | OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT ; ofn.lpstrDefExt = 0; if ( GetSaveFileName( &ofn ) ) hb_retclen( File, lstrlen( File ) ); else hb_retc( "" ); } HB_FUNC( EOPENFILE ) { OPENFILENAME ofn; char File[ MAX_PATH ] = ""; char xFiltro[ MAX_PATH ] = ""; if ( ISCHAR( 1 ) ) lstrcpy( File, hb_parc( 1 ) ); if ( ISCHAR( 2 ) ) lstrcpy( xFiltro, hb_parc( 2 ) ); ofn.lStructSize = 76; ofn.hwndOwner = GetActiveWindow(); if ( ISCHAR(2)) ofn.lpstrFilter = xFiltro; else ofn.lpstrFilter = "Arquivos Texto (*.dbf)"; ofn.lpstrCustomFilter = 0; ofn.nFilterIndex = 1; ofn.lpstrFile = File; ofn.nMaxFile = MAX_PATH; ofn.lpstrFileTitle = 0; //ofn.lpstrInitialDir = 0; ofn.lpstrTitle = "Arquivo a ler"; ofn.Flags = OFN_HIDEREADONLY | OFN_NOCHANGEDIR | OFN_SHAREAWARE | OFN_NODEREFERENCELINKS | OFN_NOTESTFILECREATE | OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT ; ofn.lpstrDefExt = 0; if ( GetOpenFileName( &ofn ) ) hb_retclen( File, lstrlen( File ) ); else hb_retc( "" ); } #pragma ENDDUMP
  14. Achei estas funções e talvez seja de utilidade para vocês. Elas chamam as rotinas da API do windows para salvar e ler arquivos. exemplo ARQ_PRN:=ESAVEFILE("c:\REL.txt") ARQ_PRN:=ELOADFILE("c:\REL.txt") #pragma BEGINDUMP #include "windows.h" #include "hbapi.h" HB_FUNC( ESAVEFILE ) { OPENFILENAME ofn; char File[ MAX_PATH ] = ""; if ( ISCHAR( 1 ) ) lstrcpy( File, hb_parc( 1 ) ); ofn.lStructSize = 76; ofn.hwndOwner = GetActiveWindow(); ofn.lpstrFilter = "Arquivos Texto(*.txt)"; ofn.lpstrCustomFilter = 0; ofn.nFilterIndex = 1; ofn.lpstrFile = File; ofn.nMaxFile = MAX_PATH; ofn.lpstrFileTitle = 0; //ofn.lpstrInitialDir = 0; ofn.lpstrTitle = "Salvar como?"; ofn.Flags = OFN_HIDEREADONLY | OFN_NOCHANGEDIR | OFN_SHAREAWARE | OFN_NODEREFERENCELINKS | OFN_NOTESTFILECREATE | OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT ; ofn.lpstrDefExt = 0; if ( GetSaveFileName( &ofn ) ) hb_retclen( File, lstrlen( File ) ); else hb_retc( "" ); } HB_FUNC( EOPENFILE ) { OPENFILENAME ofn; char File[ MAX_PATH ] = ""; char xFiltro[ MAX_PATH ] = ""; if ( ISCHAR( 1 ) ) lstrcpy( File, hb_parc( 1 ) ); if ( ISCHAR( 2 ) ) lstrcpy( xFiltro, hb_parc( 2 ) ); ofn.lStructSize = 76; ofn.hwndOwner = GetActiveWindow(); if ( ISCHAR(2)) ofn.lpstrFilter = xFiltro; else ofn.lpstrFilter = "Arquivos Texto (*.dbf)"; ofn.lpstrCustomFilter = 0; ofn.nFilterIndex = 1; ofn.lpstrFile = File; ofn.nMaxFile = MAX_PATH; ofn.lpstrFileTitle = 0; //ofn.lpstrInitialDir = 0; ofn.lpstrTitle = "Arquivo a ler"; ofn.Flags = OFN_HIDEREADONLY | OFN_NOCHANGEDIR | OFN_SHAREAWARE | OFN_NODEREFERENCELINKS | OFN_NOTESTFILECREATE | OFN_PATHMUSTEXIST | OFN_OVERWRITEPROMPT ; ofn.lpstrDefExt = 0; if ( GetOpenFileName( &ofn ) ) hb_retclen( File, lstrlen( File ) ); else hb_retc( "" ); } #pragma ENDDUMP
  15. Olha Terminal Service é excelente para tudo Local, Wireless,Internet etc Com Sistemas C/S ou não. Rede Wireless é lento para trabalhar até com Terminal Service imagine com C/S, nem nem pensar.
  16. discordo DBF no Terminal service e muito rapido.
  17. ou regasm /u NFe_Util_2G.dll /tlb:NFe_Util_2G.tlb regasm NFe_Util_2G.dll /tlb:NFe_Util_2G.tlb
  18. para atualizar. Basta copiar a nova dll e registrar.
  19. Estou testando o unicte mas ele não gera o xml alguem tem alguma rotina para gera xml do cte?
  20. Estou testando o unicte mas ele não gera o xml alguem tem alguma rotina para gera xml do cte?
  21. Pense assim: a)Valor total da NF. b)Base de calculo c)Isenta d)Outras a=b+c+d b=Produtos Tributadores CST 00 10 20 70 C=Produtos Isentos CST 30 40 41 e a diferença do CST 10 20 70 quando tem redução de Base de calculo(parte não tributada) d)Outras em geral a diferença de d=a-b-c em geral CST 50 51 60 90
  22. Tenho algumas duvidas, alguem ja implementou? Como imprir a Nfs-e apos autorizada(não encontrei nenhum procedimento do webs
  23. Tenho algumas duvidas, alguem ja implementou? Como imprir a Nfs-e apos autorizada(não encontrei nenhum procedimento do webs
  24. existe o caso do desconto incondicional e do desconto que diminui somente do total da nf(desconto dos impostos para zona franca de Manaus e importação) Mas nunca o vr de desconto sera superior ao total dos produtos pois ai zeraria a nf
×
×
  • Create New...