Can I use a DLL that I created in Delphi (Delphi 10), directly in Powershell via the [Reflection.Assembly]::LoadFile() method? I'm currently trying, but getting the error:
Exception calling "LoadFile" with "1" argument(s): "The module was expected to contain an assembly manifest.
I am able to wrap the Delphi DLL in a DLL that I wrote in C# and use it that way, but would prefer not to, since it would mean compiling two projects for each change instead of one.
This is the code I currently have in the Delphi DLL:
library TestDLL;
procedure TestCall(foo: PChar); stdcall;
begin
end;
exports
TestCall;
begin
end.