maudruidas Posted June 23, 2020 Report Share Posted June 23, 2020 Boa tarde, sempre desenvolvi com os Sats da Bematech e agora estou com um Sat Tanca TS-1000 de um cliente. Estou tetando fazer um teste carregando a DLL deles porém a resposta vem sempre a mesma. Meu primeiro teste é usar a função ConsultarSAT(), passando o número da sessão. Ele sempre retorna número de sessão inválido. Acho que não estou sabendo lidar com a DLL. Vejam como estou fazendo, e se alguém poder me dar uma força agradeço. Lembrando que no programa InteliSAT da Tanca funciona normalmente. Carregando a DLL XDLL := LoadLib32("C:\SISCOM20\SAT.dll") Declarando a DLL #include "FiveWin.ch" #define _VIDEO_CH #define _OBJECTS_CH #define _DDE_CH ************************* FUNCTION DECTANCA() // Declaracoes da TANCA de 32 bits -> SAT.DLL // Consultar SAT DLL32 FUNCTION CONSAT(XRETS AS STRING ) AS LPSTR PASCAL FROM "ConsultarSAT" LIB xDll Chamando a Função ********************** FUNCTION RSAT2() NRET := Space(70) SES := 008567 nRet := Consat(SES) MsgStop("Retorno: " + nret ,"Informações do SAT") RETURN(.T.) Quote Link to comment Share on other sites More sharing options...
mkyx Posted July 8, 2020 Report Share Posted July 8, 2020 eu uso assim e funciona muito bem, com qualquer sat: hdllSAT:=LoadLibrary( "SAT.dll" ) N_SESSAO:=INT(NRANDOM(999999)+1) retorno:= SATConsultar(N_SESSAO) ? retorno return .t. DLL32 Function SATConsultar(NumeroSessao AS _INT) AS STRING PASCAL FROM "ConsultarSAT" LIB hdllSAT DLL32 Function CSO_sat(NumeroSessao AS _INT, codigoDeAtivacao AS STRING) AS STRING PASCAL FROM "ConsultarStatusOperacional" LIB hdllSAT 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.