For testing I am trying to call a Delphi XE2 DLL (see code) in a C# application (developed in Visual C# 2010 Express).
procedure CLP; stdcall; export;
begin
showmessage('TEST');
end;
exports CLP;
However when trying to add the DLL as reference to a C# project the following message appears:
A reference to 'D:\temp\test.dll' could not be added. Please make sure that the file is accessible, and that is a valid assembly or COM component.
When the same DLL is compiled under Delphi 2010 it works without any problem.
Any suggestions how to solve the problem are appreciated.