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
  1. Home
  2. General Programming
  3. C#
  4. Calling DLL Fuinctions

Calling DLL Fuinctions

Scheduled Pinned Locked Moved C#
csharpdata-structureshelp
2 Posts 2 Posters 0 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.
  • S Offline
    S Offline
    salman_syed_01
    wrote on last edited by
    #1

    I developed a windows-based application in C# ,there is a browse button, a textbox and a treeview control on the window, when i click on the browse button i can import managed DLL, the treeview control can display the classes, methods and methods parameter inside the DLL in a tree form, i want to call anyone of the method in a class in DLL at runtime,it is okay for static method but not okay for non-static method, I used MethodBase.Invoke(object,params) for this. Please help me so that i can create an object of the specified class and and also call that class method with the help of that class object at runtime in C#. Thanks.

    J 1 Reply Last reply
    0
    • S salman_syed_01

      I developed a windows-based application in C# ,there is a browse button, a textbox and a treeview control on the window, when i click on the browse button i can import managed DLL, the treeview control can display the classes, methods and methods parameter inside the DLL in a tree form, i want to call anyone of the method in a class in DLL at runtime,it is okay for static method but not okay for non-static method, I used MethodBase.Invoke(object,params) for this. Please help me so that i can create an object of the specified class and and also call that class method with the help of that class object at runtime in C#. Thanks.

      J Offline
      J Offline
      Judah Gabriel Himango
      wrote on last edited by
      #2

      You can use Assembly.CreateInstance(typeName) to create an instance of a type in an assembly, and from there you can invoke methods on that instance.

      Tech, life, family, faith: Give me a visit. I'm currently blogging about: Christian Zionism, as seen from a Jewish perspective The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

      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