- Inno Setup version 5.6.1(u). 
- Dev Studio 2015 64 bit class library. 
- .NET Framework 4.6.1 
- Uses the UnamanagedExports package. 
Here's the script:
[Setup]
ArchitecturesInstallIn64BitMode=x64
ArchitecturesAllowed=x64
[Files]
Source: "DotNet64.dll"; Flags: dontcopy
[Code]
function TestFunction(): Boolean;
external 'Testing@files:DotNet64.dll stdcall setuponly delayload'; 
procedure CurPageChanged(CurPageID: Integer);
var
  ires : Boolean;
begin
  if CurPageID = wpWelcome then begin
    ires := TestFunction();
  end;
end;
Here's the C# DLL code
using RGiesecke.DllExport;
using System.Runtime.InteropServices;
using Microsoft.Win32;
namespace DotNet64
{
    public class InnSetDLL
    {
      [DllExport("Testing", CallingConvention = CallingConvention.StdCall)]
      public static bool Testing()
      {
         return false;
      }
   }
}
As soon TestFunction() is called in the script, I get a popup: 
Runtime Error (at 2:55): Could not call proc.
 
     
    