The MP3car.com Store The MP3car.com Store    

Sponsored links

Go Back   MP3Car.com > Mp3Car Technical > Software & Software Development > Coders Corner

Reply
 
LinkBack Thread Tools Display Modes
Old 04-18-2006, 12:48 AM   #1
Variable Bitrate
 
Join Date: Oct 2004
Location: Bay Area, CA
Posts: 374
VB6: Does anyone have experience with adding moudlarity to their apps?

I am been around VB6 for a while now an have built some pretty extensive applications with it. I have yet to be able to familiarize myself with adding modulatity though. What I'd like to be able to do it have a main application and allow users to download a file and place it in the app directory or run an installer. This will give them that functionality. This way I can upgrade a certain module of my application each time, and allow for many different options.

I guess some sort of .dll or .ocx, but it needs to be able to be loaded and run after the application is built and out. I also want to be able to make new addons and have the VB detect their existance and load them too. Do you know of any tutorials or pages about this type of functionality?

I have been looking around on Google, but what generally comes up is stuff about VB Modules, not what I need.

Thanks!
Mrbmw99 is offline   Reply With Quote
Advertisement
 
Advertisement
Sponsored links

Old 06-10-2006, 02:23 AM   #2
Variable Bitrate
 
Join Date: Apr 2006
Location: Dallas, Texas
Posts: 229
Well, I know that in VB.NET what you are looking for is a Interface. You would have an interface that a class from a DLL would implement. That way your original code can load the .DLL into memory and then create an instance of the class and call the implemented functions on the instanciated class.
Ineffigy is offline   Reply With Quote
Old 10-15-2006, 06:19 PM   #3
Newbie
 
Join Date: Sep 2006
Posts: 15
Under VB6 the trick is "Late Binding". It all gets a bit messy and is not particularly well documented but you use CreateObject("PackageName.ObjectName") to get an instance of some registered object, then from there you need to have some standard "plugin" interface that you require from third party developers so that you can call the functions etc. E.G. you may require that all valid plugins have a name property so it might go ...

function loadplugin(byval pluginObjectName as string) as object
dim result as object
set result = nothing ' assume failure
on error goto fail
set result = createobject(pluginObjectName)
if result.Name="" then set result = nothing ' We dont allow blank plugin names
set loadplugin = result ' return object if ok.
exit function

fail:
set result = nothing ' either object not registered or didnt implement name
set loadplugin = result
end function

this function would return and instance of an object registered with the supplied classid as long as it implemented a member called name that returns a non-blank string. ActiveX controls are even messier; look into controlextender.
wheesplat is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Embedding apps in vb6 Laidback Software & Software Development 9 05-09-2004 07:44 PM
Adding apps craigyb MediaCar 4 12-01-2003 06:52 AM


All times are GMT -5. The time now is 02:16 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
Copyright © 1999 - 2008 Mp3Car.com Inc.Ad Management by RedTyger
Message Board Statistics