Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. Writing a Plugin With Dependencies

Writing a Plugin With Dependencies

Scheduled Pinned Locked Moved Visual Basic
helptutoriallearning
1 Posts 1 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    TheFarsider
    wrote on last edited by
    #1

    I have a simple GUI interface that loads menus dynamically from a range of dll's/plugins. The problem I face is one of the plugins has a lot of Dependencies and needs to be executed with its own application path to be able to fucntion correctly. Is there a way I can load it into my GUI but set its base paths for loading assemblies etc to another path. A brief idea of what i want to achive. C:\program files\My App\Centralize Gui\Gui.exe C:\program files\My App\App1\App1Gui.dll C:\program files\My App\App2\App2Gui.dll Currently Gui.exe uses Activator.CreateInstance to dynamically load App1Gui.dll which returns a predefined iGUI interface. Public Interface Gui Delegate Sub RebuildMenuEventHandler() Property RebuildMenu() As Boolean Function GenerateMenu() As System.Windows.Forms.ToolStripMenuItem Sub AdminLevelChanged(ByVal AdminLevel As RMS.Gui.AdminLevels) Sub LoadGui() Sub ExitGui() End Interface The Gui.exe then calls LoadGui. The LoadGui routine does a lot of stuff and has to be able to access and load objects etc from assemblies within its own folder(eg C:\program files\My App\App1). This is where I hit the issue as it is currently running within "C:\program files\My App\Centralize Gui\" and of course fails to load any of the App1Gui.dll's dependencies. My gut feeling is I need to do something with Appdomains so that I can get App1Gui.dll to run within its own path but I cant find any good examples on how to achieve this and I haven't managed to get any of my own attempts anywhere near working. The solution works fine if i put my GUI within the App1 folder but this is not the solution as I need to have a single GUI that can control multiple applications. Thanks in advance for any help/pointers. To Errrr is human, but to really foul things up requires a computer

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups