Quantcast
Channel: ERRO TEF DLL - AJUDA
Viewing all articles
Browse latest Browse all 6

ERRO TEF DLL - AJUDA

$
0
0

 

Olá.

 

Estou homologando o meu sistema para TEF DEDICADO

a bronca é o seguinte:

 

tem uma dll com a função:

 

[

DllImport("CliSiTef32I.dll", CallingConvention = CallingConvention.StdCall, EntryPoint = "ContinuaFuncaoSiTefInterativo", CharSet = CharSet.Auto, SetLastError = true)]

privatestaticexternint ContinuaFuncaoSiTefInterativo(int Comando, int TipoCampo, int TamMinimo, int TamMaximo, byte[] Buffer, int TamBuffer, int Continua);

 

 

na chamada da função :

 

byte[] _buf = newbyte[22000];

int resultado = ContinuaFuncaoSiTefInterativo(0, 0, 0,0, _buf,  (int)_buf.Length, 0);

 

gera este erro:

 

"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

 

 

é algo errado ou preciso atualizar o visual studio para resolver este problema

 

o exemplo no delphi e esse e funciona legal

 

function ContinuaFuncaoSiTefInterativo (
           var ProximoComando: Integer;
           var TipoCampo: Integer;
           var TamanhoMinimo: smallint;
           var TamanhoMaximo: smallint;
           pBuffer: PChar;
           TamMaxBuffer: Integer;
           ContinuaNavegacao: Integer
         ): integer; far; stdcall;
            external 'CliSiTef32I.dll';

________________________________________________________________

  ProximoComando:= 0;
  TipoCampo:= 0;
  TamanhoMinimo:= 0;
  TamanhoMaximo:= 0;
  Resultado:= 0;
  Resultado := sizeof(Buffer);

  Sts:= ContinuaFuncaoSiTefInterativo (ProximoComando, TipoCampo, TamanhoMinimo,
                                  TamanhoMaximo, Buffer, sizeof (Buffer),
                                  Resultado);


Viewing all articles
Browse latest Browse all 6

Latest Images





Latest Images