Olá, tenho um arquivo .dll feita no Delphi e quero usa-lo no c#, mas esta ocorrendo o seguinte erro.
metodos do arquivo dll
procedure ExibeMensagemTeste; external 'TesteDll.dll';
procedure RecuperaValorString(var Texto: String); external 'TesteDll.dll';
namespace ultilizado
using
System.Runtime.InteropServices;
DECLRAÇÃO
[
DllImport("TesteDll.dll",SetLastError=true)]
public static extern void ExibeMensagemTeste();
[
DllImport("TesteDll.dll", SetLastError = true)]
public static extern void RecuperaValorString(string Texto);
string
teste = "teste";
RecuperaValorString(teste);
CHAMADA
ExibeMensagemTeste();
RecuperaValorString(
"teste");
ERRO
Unable to load DLL 'TesteDll.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
OBS
A dll esta no mesmo diretorio do programa
Obrigado.