.NET Framework Interop (CLR, C#, VB)

Post your working scripts, libraries and tools
User avatar
evilC
Posts: 2887
Joined: 27 Feb 2014, 12:30

Re: .NET Framework Interop (CLR, C#, VB)

06 Mar 2017, 09:35

OK, I have it all working now.
Many thanks to Lexikos for releasing CLR and your help on this thread.

I now have my own thread here: https://autohotkey.com/boards/viewtopic ... 19&t=28889
lexikos
Posts: 5189
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: .NET Framework Interop (CLR, C#, VB)

10 Mar 2017, 18:04

Why ask the question when it's so simple to just change the code and see what happens?

Yes, it's possible.
User avatar
evilC
Posts: 2887
Joined: 27 Feb 2014, 12:30

Re: .NET Framework Interop (CLR, C#, VB)

10 Mar 2017, 19:08

I tried, but I could not get it to work. I guess I did something wrong - it said something like "interface does not support that". I suppose I will have to try again then.
lexikos
Posts: 5189
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: .NET Framework Interop (CLR, C#, VB)

10 Mar 2017, 21:58

I can't imagine what would cause that.

Modifying my example to use a BoundFunc is very simple:
  • Obviously, if handler (on the C# side) is a BoundFunc, handler.Handle() won't work. Change it to handler() or handler.call().
  • Change util.Test(Handler) to util.Test(Handler.Handle.Bind(Handler)).
raskun
Posts: 12
Joined: 01 Mar 2017, 20:30

Re: .NET Framework Interop (CLR, C#, VB)

12 Mar 2017, 07:58

How to use this when my main ahk script was referencing to calling to another ahk script?
b0bi
Posts: 4
Joined: 07 Apr 2016, 13:11

Re: .NET Framework Interop (CLR, C#, VB)

20 Mar 2017, 10:14

This seems very interesting, but the download link is dead :/
burque505
Posts: 45
Joined: 22 Jan 2017, 19:37

Re: .NET Framework Interop (CLR, C#, VB)

20 Mar 2017, 11:31

Confirming dead link 03/20/17 at 10:31 MST
User avatar
evilC
Posts: 2887
Joined: 27 Feb 2014, 12:30

Re: .NET Framework Interop (CLR, C#, VB)

20 Mar 2017, 17:04

Whee! C# is fun!

I am currently mucking around with Managed Extensibility Framework (MEF). MEF is basically a framework to make it easy to write plugins which can advertise their capabilities etc.

I have a post here if anyone is interested in how to rig up a DLL which can load other DLLs as plugins - it's pretty easy:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

lexikos
Posts: 5189
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: .NET Framework Interop (CLR, C#, VB)

21 Mar 2017, 05:18

The download link was to my Dropbox public folder. Dropbox killed all public folders.

I've replaced the link. (It just links to the download function of the code box at the bottom of my post now.)
burque505
Posts: 45
Joined: 22 Jan 2017, 19:37

Re: .NET Framework Interop (CLR, C#, VB)

21 Mar 2017, 10:05

Thanks, lexikos.

Return to “Scripts and Functions”

Who is online

Users browsing this forum: guest3456 and 18 guests