Quick Search for:  in language:    
EXE,ROT,VBAVB,OPEN,BMP,VOTE,Expose,your,apps,
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
Visual Basic Stats

 Code: 3,011,557. lines
 Jobs: 117. postings

 How to support the site

 
Sponsored by:

 

You are in:

 
Login



Latest Code Ticker for Visual Basic
Defrag at certain time
By Michael Nipper on 7/1


Click here to see a screenshot of this code!Extended Find Ver 2
By Roger Gilchrist on 7/1

(Screen Shot)

Y! Module
By NightCrawler on 7/1


Files Comperator (the right way)
By Jarry Claessen on 6/30


Simple UDP example
By Mick Walton on 6/30


CAPS Trigger
By Trevor Burley on 6/30


Auto clip picture
By Kenneth. Jakobsen on 6/30


Click here to see a screenshot of this code!Game of life clone (cool math)
By Johannes B on 6/30

(Screen Shot)

String to CHR()
By Nikhil Raj on 6/30


Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!





Affiliate Sites



 
 
   

A true plugin model / Expose your app's objects

Print
Email
 
winzip icon
Submitted on: 10/27/2000 3:13:12 AM
By: BDCSoftware  
Level: Advanced
User Rating: By 21 Users
Compatibility:VB 6.0

Users have accessed this code 18803 times.
 
(About the author)
 
     Expose your app's objects / A true plugin model. This sample will teach you how to expose classes from an ActiveX EXE to other Applications. I felt that a Main App / Plugin relationship (like in Photoshop) will be best suited to showcase this cool solution. <p>This is how it works: <br> When an object gets created based on a class from an ActiveX Exe it gets created in its own memory area (Multiple objects based on the same class cannot share their data). In C++ that object registers itself with the ROT (Running Object Table) so that anybody who needs to, can access that instance of the object. For instance Excel. When Excel is running you can refer to the running instance from VBA/VB, and access any data that's present in the spread sheet. However VB based objects lack that functionality. Activex EXE created in VB will NOT get registered in the ROT! (That's why you can't use GetObject on VB made ActiveX's ;-) ) </p> <p>Anyhow, here is a solution that will register your ActiveX EXE in the ROT, and you will be able to reference the running instance of your object from any other application. </p> <p>Please use this sample as follows: </p> <ol> <li>Extract Files from Zip (use folder names checked) </li> <li> run MainApp.EXE (ActiveX EXE) </li> <li> click on the OPEN icon </li> <li> load the supplied BMP </li> <li> wait for a few sec....(sorry the image handling is awfully slow, I didn't wanted to deal with DIB's for simplicity reasons) </li> <li> plugin Button should be enabled by now (this calls a ShellExecute and runs a regular EXE (our plugin) </li> <li> In the plugin click on GetData (this will transfer the image from the main app) </li> <li> click on modify image (thanx Rog3r) </li> <li> click on Close Plugin & Transfer data (this will transfer the modified image back to the main app) </li> <li> Voila </li> </ol> <p>The benefits: If you expose your app's objects up front, you can later on create any plugins/addons you want without modifying the original app. </p> <p>This is my first contribution to planet-source-code. Please let me know what you think (bad/good, anything is welcome) and like always VOTE. </p> <p>Thanx <br> Raf </p>

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzipto decompress it.

Virus note:All files are scanned once-a-day by Planet Source Code for viruses,but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:
1)Re-scan downloaded files using your personal virus checker before using it.
2)NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
3)Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
1) You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 1 submission(s) by this author

 

 
Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
Your Vote!

What do you think of this code(in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
10/27/2000 10:02:06 AM:Rang3r
=) you're using a really nice antialias 
effect there =)
thanx for mentioning 
me..
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/22/2000 7:39:22 PM:TTFN7677
i noticed when the MainApp loses focus 
the picture disapears. Why is that?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
12/22/2000 7:59:40 PM:Raf
Autoredraw, setting on the MainApps 
picturebox, should be set to true. Or 
you could redraw the picturebox 
whenever the form refreshes...
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
1/26/2001 1:31:34 PM:Joe
I was excited to see this code! It can 
solve a long time problem for me. I had 
trouble using it in my Webbrowser 
project, though,  because VB6 keeps 
telling me the class object cannot be 
public 'in this type of project'. I've 
tried to research it, but can't solve 
the problem. I would appreciate any 
suggestions. thanks, Joe
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
1/26/2001 1:36:49 PM:Joe
I was very happy to see your code but 
when I tried to use it in my WebBrowser 
project, VB6 keept telling me the class 
object cannot be public 'in this type 
of project'. I've tried to research it 
but need any suggestions you might have 
to help. Thanks for your code, Joe
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
1/26/2001 2:38:58 PM:raf
Your project might be a Standard EXE. 
Standard EXE cannot expose objects to 
the public....
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
2/9/2001 1:43:33 PM:Johnny
Very nice. If I load more than one 
picture, the plugin seems to still use 
the first one. Why is that?
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
2/9/2001 1:51:35 PM:Raf
Johny: I am not sure why, I have not 
been working with the code for a while 
now. I will check it tonight though....
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
1/31/2002 9:53:55 AM:M. Highlander
good but complex, check my very simple 
code!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/11/2002 12:14:26 PM:James Kelly Jr.
Love it! Might use it in a professional 
edition of one of my gfx progs!! -THNX 
SO MUCH. 5 from me.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
2/3/2003 10:22:28 PM:James J. Kelly Jr.
Nice plugin. I bet that greyscale would 
make a very intresting terrian with 
some modification.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

NOTICE: The author of this code has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular code, please click here.
 
Name:
Comment:

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | Visual Basic Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.