Click here to Skip to main content
15,867,787 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi all,
I use VB6 and I need to create applications and plugins for it. Please show me a way to do this. Can you help me with a demo using VB6.
Thanks in advance.
Posted
Updated 11-Feb-11 2:25am
v3

This[^] might help.
 
Share this answer
 
Comments
Andrewpeter 12-Feb-11 2:50am    
Thanks, this is my need, vote 5.
Check the MSDN[^]. If you can't create a simple application, extending one will be problematic.

[Edit: Moved link from comment]
Writing Pluginbased Applications
 
Share this answer
 
v2
Comments
Nish Nishant 11-Feb-11 8:06am    
That link is not for VB6.
Bassam Abdul-Baki 11-Feb-11 8:19am    
You're right. This <a href="http://www.developerfusion.com/article/4371/writing-pluginbased-applications/">link</a> has a source code example in VB.Net. Looks to me like VB6 articles are slowly disappearing.
Nish Nishant 11-Feb-11 8:52am    
Yeah again VB.NET is different from VB6. VB6 is native code, so I think COM or a a DLL based approach would be his best bet. None of these .NET approaches will help him with that.
Bassam Abdul-Baki 11-Feb-11 8:57am    
True, but maybe he can convince whoever to switch to .NET.
Andrewpeter 12-Feb-11 2:52am    
I need app and plugin in VB6, however thank for your sharing, I'll convert it to VB6.
If you want a 100% VB6 solution you'd have to use COM. Define the COM interface in one VB6 DLL, and then app references this DLL. Now any plugins you write will also be COM DLLs that implement this DLL. The app then loads these plugins via the COM interface. The plugins may need to be added to a specific registry key so the parent app can enumerate them.

If a mix of VB6 and C/C++ will work for you, you can have a C based plugin model. Just export some well-known (pre-decided) function names in the C DLLs (function exports), and then VB6 can P/Invoke these DLLs and invoke these well known functions (P/Invoke is not the right term, I forgot what it used to be called in VB6).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900