Access function from two different DLLs with same namespace and diff. versio

This topic contains 1 reply, has 2 voices, and was last updated by Profile photo of Don Jones Don Jones 7 months, 1 week ago.

  • Author
  • #60229
    Profile photo of David Koenig
    David Koenig


    i have two DLLs which are mostly identical but which different versions.

    I want to load both DLL files and store the link to the DLLs as variable in an Hash Table. During runtime i want to call function dynamically from the first or the second DLL file (depending on a variable in a given object). Is that possible with Powershell?



  • #60231
    Profile photo of Don Jones
    Don Jones

    It's maybe possible but it's going to be really, really tricky. This isn't "PowerShell" you're dealing with, it's .NET Framework's Interop layer, which s complex. Suggest doing a Google for "interior import specific dll path" and see if you find something that looks useful for you (there were several promising hits when I just tried). You may find it easier to do this in C#, which is a little "closer" to .NET's core than PowerShell.

You must be logged in to reply to this topic.