Page 1 of 2

Plugin-Based Apps

Posted: Sat Mar 31, 2007 7:01 am
by Inf0Byt3
Here is a quick demonstration on how to make your program support plugins. It's quite easy to do and it can be extended really fast. Demo code and sources included. Hope it's useful.

Use at your own risk.

Here it is:
File:1->Plugin_Based_App.rar
Image

Posted: Sat Mar 31, 2007 7:33 am
by JCV
Very nice and simple to understand.
Thanks! ;)

Posted: Sat Mar 31, 2007 9:28 am
by Inf0Byt3
No problem :D. I'm glad it's usefull.

Posted: Wed May 02, 2007 11:29 am
by CSAUER
Unable to unrar file. Can you please recheck the file?

Posted: Wed May 02, 2007 1:07 pm
by Flype
by the way, i thank you inf0byt3 for your demo.
i do not have time, these days, to work on it...
but i will need to discuss more about it, soon.

Posted: Wed May 02, 2007 4:55 pm
by Inf0Byt3
Np :). I think I accidentally deleted the file from PureStorage, but the link is fixed now.

Re: Plugin-Based Apps

Posted: Fri May 04, 2007 12:56 pm
by NoahPhense
Very nice..

- np

link broken

Posted: Wed Feb 06, 2008 8:06 pm
by quasiperfect
link broken can someone please share this code again

thanks

Posted: Wed Feb 06, 2008 9:27 pm
by Foz
If someone can send me the rar, I'll post it on my website for a permanent location.

Hmmm... I really do need to put up a general storage place for things like this.

And I would like to have a look at it too, because I've rediscovered a project I started a year or two ago in .net that was based on plugins and I'd like to redo it properly in PB :)

Posted: Wed Feb 06, 2008 10:43 pm
by NoahPhense

thanks

Posted: Wed Feb 06, 2008 10:47 pm
by quasiperfect
funy name for a domain but thanks for the files

Re: thanks

Posted: Wed Feb 06, 2008 10:50 pm
by NoahPhense
I have a few domains.. I got that one, cause people were always asking
me to burn them sh!t .. :)

- np

Posted: Wed Feb 06, 2008 11:11 pm
by quasiperfect
anyone has any other example ?
or any other piece of info that can help

i want to make a plugin based app where
1. each plugin ads a menu or more in the main app menu
2. each plugin can open one or more windows with gadgets
basicly i don't want to close one plugin to be able to open another.

is this posible ?
any bare bone example ?

this example has some problems or i'm a idiot
i created another plugin same as 1

Code: Select all

ProcedureDLL.l ExitCallback()
  
  MessageRequester("Plugin3","It seems that the main app is quitiing ... I gotta do that too",32)
  
  ProcedureReturn
  
 EndProcedure
 
 ProcedureDLL.s WHO_ARE_YOU()
  
  ProcedureReturn "I_AM_YOUR_FATHER"
  
 EndProcedure
 
 ProcedureDLL.s GetPluginName()
 
  ProcedureReturn "Plugin3"
 
 EndProcedure
 
 ProcedureDLL.s GetPluginDesc()
 
  ProcedureReturn "Opens another window"
 
 EndProcedure
 
 ProcedureDLL.s GetPluginAuthor()
 
  ProcedureReturn "Inf0Byt3"
 
 EndProcedure
 
 ProcedureDLL.s PluginMain()

  If OpenWindow(666, 100, 200, 195, 260, "PureBasic Window", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget)

   Repeat
     EventID = WaitWindowEvent()
     If EventID = #PB_Event_CloseWindow  ; If the user has pressed on the close button
       Quit = 1
     EndIf
   Until Quit = 1
   CloseWindow(666)
  EndIf
launch the 3 plugin and click on the list of plugins from the main window it crashes the app. i'm running latest beta of purebasic on win xp sp3

Posted: Tue Feb 26, 2008 7:07 am
by localmotion34
RAR file is missing from all links...

I need an example of how to do this, thanks guys.

Posted: Tue Feb 26, 2008 8:17 am
by quasiperfect