Hello,
Say i have a compule of dlls with a simle function.
Now i know i need to add a reference to the dll in order to use it, but i dont know which dll to use until the program is run and user does something.
So how can i load a dll at runtime.. ?
Printable View
Hello,
Say i have a compule of dlls with a simle function.
Now i know i need to add a reference to the dll in order to use it, but i dont know which dll to use until the program is run and user does something.
So how can i load a dll at runtime.. ?
ActiveX DLL can be used without referencing them if you use late bindings. It's less effective but works.VB Code:
Dim obj As Object Set obj = CreateObject("[i]ProjectName.ClassName[/i]")
Hi there,
this is not working...
say i compiled the activex dll to MyDll.dll and its placed in app.path & "\extra\"
a folder called Extra in my app.path.
So dont i need to specify the path of the dll?
No, you don't need to specify the path to an ActiveX DLL. However the DLL needs to be registered on the computer. On your computer VB will register it automatically. You can register a DLL manually using the RegSvr32.exe program but normally you would create a setup package which will install and register the DLL. The normal location of the file is in the System32 folder (or System on Win9x/Me).
What you mean is a plugin?
With some API's you can register/unregister a *.dll (Active-X) at runtime. In case of plugins be careful to name all the class names equal.
First register with the Regserver class and then:
[vb]
Set Plugin= CreateObject("Projectname.ClassName")
[/vb]