Archived

This topic is now archived and is closed to further replies.

Age-Man

plugin architecture

Recommended Posts

Age-Man    122
Hey, Does anybody know any sites that have tutorial on plugin architecture, and how to implement plugins in a program ? thank''s ------------ Exam Tip: For math/science exams, try using Roman numerals.

Share this post


Link to post
Share on other sites
ATronic    122
Plugin is really a broad term in my opinion. It could be nothing more than a script. Say you have a program with a scrip language. You may load a file called "DrawLine.plugin" that looks like so:
  FUNCTION DrawLine :: ARGUMENTS{ 3DCOORD A , 3DCOORD B }
ENTER_DRAWMODE GL_LINES
DRAWVERTEX A
DRAWVERTEX B
EXIT_DRAWMODE
END_FUNCTION

Then your app would have the new function "DrawLine" that could be called using your script vm, like so.
  ScriptFunction("DrawLine", *Arguments);    

which may be linked to a button or something. As for DLL's, I am afraid I don't know anything about using them really.

Alex Broadwin
A-Tronic Software & Design
-----
"if you fail in life, you were destined to fail. If you suceed in life, call me."
"The answer is out there."
"Please help, I'm using Windows!"

Edited by - ATronic on January 31, 2002 8:11:47 PM

Share this post


Link to post
Share on other sites
Zaei    122
DLL plugins are fairly easy. Simply have a set of functions that the application that uses the plugin will call, and define them in your DLL. Then, in the application, use the LoadLibrary() and GetProcAddress() functions to get the functions to be called, and substitute the function pointers you get from GetProcAddress for calls functions defined in the application.

Z.

Share this post


Link to post
Share on other sites