Declaração em VB |
Private Declare Function AssociarAssinatura Lib "BemaSAT32.dll" (ByVal sSessao As Integer, ByVal CNPJValue As String, ByVal assinaturaCNPJs As String) As Long Private Declare Function AtivarSAT Lib "BemaSAT32.dll" (ByVal sSessao As Integer, ByVal SubComando As Integer, ByVal codigoDeAtivacao As String, ByVal CNPJ As String, ByVal cUF As Integer) As Long Private Declare Function AtualizarSoftwareSAT Lib "BemaSAT32.dll" (ByVal sSessao As Integer, ByVal codigoDeAtivacao As String) As Long Private Declare Function BloquearSAT Lib "BemaSAT32.dll" (ByVal sSessao As Integer, ByVal codigoDeAtivacao As String) As Long Private Declare Function CancelarUltimaVenda Lib "BemaSAT32.dll" (ByVal sSessao As Integer, ByVal codigoDeAtivacao As String, ByVal chave As String, ByVal dadosCancelamento As String) As Long Private Declare Function ConfigurarInterfaceDeRede Lib "BemaSAT32.dll" (ByVal sSessao As Integer, ByVal codigoDeAtivacao As String, ByVal dadosConfiguracao As String) As Long Private Declare Function ConsultarNumeroSessao Lib "BemaSAT32.dll" (ByVal sSessao As Integer, ByVal codigoDeAtivacao As String, ByVal cNumeroDeSessao As String) As Long Private Declare Function ConsultarSAT Lib "BemaSAT32.dll" (ByVal sSessao As Integer) As Long Private Declare Function ConsultarStatusOperacional Lib "BemaSAT32.dll" (ByVal sSessao As Integer, ByVal CodigoAtivacaoSAT As String) As Long Private Declare Function DesbloquearSAT Lib "BemaSAT32.dll" (ByVal sSessao As Integer, ByVal codigoDeAtivacao As String) As Long Private Declare Function EnviarDadosVenda Lib "BemaSAT32.dll" (ByVal sSessao As Integer, ByVal codigoDeAtivacao As String, ByVal dadosVenda As String) As Long Private Declare Function ExtrairLogs Lib "BemaSAT32.dll" (ByVal sSessao As Integer, ByVal codigoDeAtivacao As String) As Long Private Declare Function TesteFimAFim Lib "BemaSAT32.dll" (ByVal sSessao As Integer, ByVal codigoDeAtivacao As String, ByVal dadosVenda As String) As Long Private Declare Function TrocarCodigoDeAtivacao Lib "BemaSAT32.dll" (ByVal sSessao As Integer, ByVal codigoDeAtivacao As String, ByVal novoCodigo As String, ByVal confNovoCodigo As String) As Long
'Declaração da função de conversão do retorno com tratamento Private Declare Function ConvCStringToVBString Lib "kernel32" Alias "lstrcpyA" (ByVal lpsz As String, ByVal pt As Long) As Long
'Função para definir um ponteiro e receber o retorno Public Function GetStringFromPointer(ByVal lpString As Long) As String Dim NullCharPos As Long Dim szBuffer As String szBuffer = String(1024, 0) ConvCStringToVBString szBuffer, lpString NullCharPos = InStr(szBuffer, vbNullChar) GetStringFromPointer = Left(szBuffer, NullCharPos - 1) End Function
|