Importar DLL feito no Delphi no C Sharp

.NET

22/11/2012

Pessoal, estou tentando importar uma DLL feita em Delphi porém está dando erro.


using System.Runtime.InteropServices;


[DllImport(@"D:\Projetos\DAL\bin\W01.dll", CallingConvention=CallingConvention.StdCall, CharSet=CharSet.Ansi)]
  static extern void ChamaErro([MarshalAs(UnmanagedType.AnsiBStr)]string Erro);


Na segunda linha ele não está reconhecendo o void e string está dando o segundo erro

Expected class, delegate, enum, interface, or struct
Thiago Garcez

Thiago Garcez

Curtidas 0

Respostas

Thiago Garcez

Thiago Garcez

22/11/2012

Consegui é só colocar antes do Metodo.
GOSTEI 0
Joel Rodrigues

Joel Rodrigues

22/11/2012

Valeu por compartilhar com a galera, Thiago.
Um abraço.
Estou encerrando o tópico.
GOSTEI 0
POSTAR