Pessoal, 

Estou  com este erro ao chamar uma funcao de uma DLL
Method's type signature is not PInvoke compatible.

Estou testando a DLL sintegra32.dll no Delphi .net, faço a chamada normalmente

implementation

  Function Info_Versao: ShortString; stdcall; external 'SIntegra32Dll.dll';
  Procedure Inicia_SIntegra; stdcall; external 'SIntegra32Dll.dll';
  Procedure Finaliza_SIntegra; stdcall; external 'SIntegra32Dll.DLL';

  Function Registro10(CGC_MF, Insc_Est, Nome_Contribuinte, Municipio, UF,
                      Fax, Data_Inicial, Data_Final, Cod_Convenio, Cod_Operacao,
                      Cod_Finalidade: ShortString): ShortString; stdcall; 
external 'SIntegra32Dll.DLL';




O aplicativo compila mas quando chamo a funcao pelo comando

//Registro10 - Mestre do Estabelecimento - Indentifição do Estabelecimento 
informante
procedure TForm1.Button1Click(Sender: TObject);
var
 TempStr: String;
begin
Inicia_SIntegra;
TempStr := Registro10(CGC,                              //CGC
                      IE,                               //IE
                      'Nome do Contribuinte',           //Nome_Contribuinte
                      'Salvador',                       //Municipio
                      'BA',                             //UF
                      '(071)371-1818',                  //Fax
                      '01/01/2005',                     //Data Inicial
                      '31/01/2005',                     //Data Final
                      '3',                              //Convênio 76/03
                      '3',                              //Totalidade das 
Operacoes
                      '1'                               //Normal
                      );

 Trata_SIntegra_Str(TempStr);
end;

Acontece este errro:

---------------------------
Demo_sintegra32dll
---------------------------
Method's type signature is not PInvoke compatible.
---------------------------
OK   
---------------------------

Alguém sabe como proceder?




[As partes desta mensagem que não continham texto foram removidas]

Responder a