KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
i have a simple task: is it possible to write a Delphi DLL and put a .Net Assembly (with only one interface with 4 methods and one class implementing the interface) besides it and call it from the Delphi DLL? I mean, can i import the .Net types directly from the .Net assembly (relative filename) if i create a tlb and a delphi unit for the tlb, without registering the Assembly/tlb? best, thalm EDIT (what i found): Most solutions must register at least one dll/tlb for COM. But the most promising thing i found was: Unmanaged Exports from Robert Giesecke, its a Visual Studio project template which lets you write static C# (or whatever .Net language) methods and call them from any unmanaged language, awesome: class Test { [DllExport("add", CallingConvention = CallingConvention.StdCall)] public static int Add(int left, int right) { return left + right; } } EDIT 2: It really works! You can even control the type marshalling, unbeliveable!!!
Tags (comma-separated)
Save Edits
Cancel