Home Can I load a DLL written in Delphi into PowerShell?
Reply: 0

Can I load a DLL written in Delphi into PowerShell?

user731
1#
user731 Published in May 24, 2018, 3:59 pm

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.
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.321411 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO