Criei uma DLL COM em c# VS2010 para ser distribuída com outra aplicação em Delphi.
Esta DLL faz apenas consumo em WEB Services.
Na máquina onde foi construída a DLL não ocorre erro. Mas nas distribuição quando é executado os métodos da DLL é retornado a mensagem:
O sistema não pode encontrar o arquivo especificado.
Isso é alguma configuração que deve ser executada na configuração da DLL?
Código da DLL
public string RecepcionarLoteRps(string AEnderecoWebService, string AXmlEntrada)
{
string Retorno = string.Empty;
try
{
ServiceReferenceAbrasfV201.nfseClient wsClient = new ServiceReferenceAbrasfV201.nfseClient("nfseSOAP1", AXmlEntrada);
Retorno = wsClient.RecepcionarLoteRps(Cabecalho(), AXmlEntrada);
}
catch (Exception e)
{
Retorno = e.Message;
}
return Retorno;
}
Código em Delphi para enviar os parâmetros a dll.
var
LClientWBAws: IAbrasfV201_Interface;
LRetorno: string;
begin
LClientWBAws := CoAbrasfV201.Create;
if (Pos('ConsultarLoteRpsEnvio', LEnviaArqXml) > 0) then
begin
LRetorno := LClientWBAws.Getnfse(ALayout.Parametros['EnderecoWebService'], LEnviaArqXml);
end
else if (Pos('CancelarNfseEnvio', LEnviaArqXml) > 0) then
begin
LRetorno := LClientWBAws.CancelarNfse(ALayout.Parametros['EnderecoWebService'], LEnviaArqXml);
end
else
begin
LRetorno := LClientWBAws.RecepcionarLoteRps(ALayout.Parametros['EnderecoWebService'], LEnviaArqXml);
end;
end;