Results 1 to 2 of 2

Thread: Finding and Calling DLLs or Modules

  1. #1

    Thread Starter
    Member friendsofwatto's Avatar
    Join Date
    Jan 2003
    Location
    Aussie-land
    Posts
    52

    Finding and Calling DLLs or Modules

    Hi,

    I am wondering whether it is possible for me to have a piece of code in VB which would scan a selected directory and allow the use of all the DLL files in that directory.

    My program is basically an archive reader for many different file types. I want to allow people to write plugins for different archive types so my program can interperate them. The working of my program is pretty simple - if the user chooses a archive called myfile.red or something like that, my program will first see if it can understand that file. If not, it will look in the preset plugin directory for a dll called red.dll (ie, the name of the dll is the name of the file archive extension)

    Is this possible to achieve? What about the dynamic inclusion of VB modules instead of DLL files? When I access these DLLs, will the DLL be able to access global variables in my VB program?


    Thanks guys - I tried searching the forums but I didn't find anything too helpful

    WATTO
    [email protected]
    http://www.watto.org
    "There is no such thing as a coincidence" - Tegan Sneddon 2002

  2. #2
    Addicted Member
    Join Date
    Feb 2003
    Posts
    237
    yeah you can do that, here is a sample

    http://sandsprite.com/Sleuth/1.3plugins/

    you could also dynamically include raw code modules
    if you wanted by using the Microsoft Script Control.

    your plugins can access your global form variables, form
    objects and classes, but I dont think they can access
    module subs or global application variables unless you
    write a stub for them on a com object like a form or class

    You gain access to these things by passing the plugin
    a reference to your com object (calling a function with the
    form as the argument)
    Free Code, papers, tools, and more

    http://sandsprite.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width