IonicWind Software

Aurora Compiler => General Discussion => Topic started by: Rock Ridge Farm (Larry) on September 14, 2006, 03:07:17 AM

Title: Another DLL question - I think
Post by: Rock Ridge Farm (Larry) on September 14, 2006, 03:07:17 AM
I want to write a program that will call modules based on menu selections.
Would the 'other' programs be DLL's?
The main program would open a window with a menu and based on some internal
registration data open a dll (sub function) in the same window.
Sort of like blocks - main block is the menu - block 1 - n are menu items compiled
as dll's.
Does this make sense?
Title: Re: Another DLL question - I think
Post by: Haim on September 14, 2006, 03:41:35 AM
Just out of curiosity, why is that needed?
In what way would this application differ from a standard application with with a menu, where menu item selection is handled in the window handler?
Title: Re: Another DLL question - I think
Post by: Rock Ridge Farm (Larry) on September 14, 2006, 05:15:18 AM
Add on components to a project.
Each module is sole separately and has a different but related function.
Title: Re: Another DLL question - I think
Post by: Zen on September 14, 2006, 05:36:18 AM
If you give me untill the weekend Larry, i made a nice plugin system, which i guess is the same as modules, you have a main program that uses the plugin manager class, then for each module in the plugins directory when the main program is run, it runs the PluginInit function and if successfull, adds it to a menu, toolbar or custom place.

There is no documentation with my system as of yet but i would happily talk you through it.

Lewis
Title: Re: Another DLL question - I think
Post by: Rock Ridge Farm (Larry) on September 14, 2006, 05:42:02 AM
Sounds like what I need - let me know as soon as it is ready.
Thanks.
Title: Re: Another DLL question - I think
Post by: J B Wood (Zumwalt) on September 14, 2006, 07:00:23 AM
This is also something I am in need of.
I am working on 3 different physics engines right now, Ageia, ODE and Newton, I want to be able to have a way to detect a certain dat file in a folder and update components and availability through that.
Title: Re: Another DLL question - I think
Post by: kryton9 on September 14, 2006, 10:44:07 AM
I really like the sound of this sort of system. Great idea, will love to see an example of this sort of setup.
Title: Re: Another DLL question - I think
Post by: Zen on September 14, 2006, 11:10:11 AM
Its already working fine. I just wont be back home untill the weekend. So i will post it in the software projects forum when i get home.

Also, it will be a part of CCL in its next release.

Lewis
Title: Re: Another DLL question - I think
Post by: Ionic Wind Support Team on September 14, 2006, 11:29:07 AM
Of course the easiest method is using the Windows API funciton LoadLibrayA, GetProcAddress and FreeLibraryA.   Function pointers have been available in Aurora for quite a while (indirect calling).  I think there is a code sample somewhere on the forums that wrapped those functions into an easy subroutine, haven't searched for it.

Paul.
Title: Re: Another DLL question - I think
Post by: Parker on September 14, 2006, 04:11:38 PM
CLibrary class: http://www.ionicwind.com/forums/index.php?topic=874.0

It's really simple, just a wrapper for LoadLibrary, FreeLibrary, and GetProcAddress.
Title: Re: Another DLL question - I think
Post by: Ionic Wind Support Team on September 14, 2006, 09:19:27 PM
Thanks Parker, knew I had seen that somewhere ;)
Title: Re: Another DLL question - I think
Post by: Zen on September 15, 2006, 04:06:09 AM
Well mine is basicly a wrapper for that. But also has some "framework" classes to make and run plug-in's nice and easy, also has a plugin manager class which is really simple to setup.

Lewis
Title: Re: Another DLL question - I think
Post by: Rock Ridge Farm (Larry) on September 15, 2006, 08:13:23 AM
Parker - still waiting for your version.
Had no idea how to make the other one work.
Got errors about Clibrary.lib - must be more to it than the code that was posted.
Remember - I am old - need much detail and explanation.
Title: Re: Another DLL question - I think
Post by: LarryMc on September 15, 2006, 11:28:09 AM
Quote from: Rock Ridge Farm (Larry) on September 15, 2006, 08:13:23 AM
Remember - I am old - need much detail and explanation.
Let's see......I was in Basic Training when John F. Kennedy was asassinated.ÂÃ, 
Do I qualify; because I need much detail and explanation too! ;)

Title: Re: Another DLL question - I think
Post by: J B Wood (Zumwalt) on September 15, 2006, 12:11:11 PM
I can't wait to use Zens framework, it sounds very promising.
Title: Re: Another DLL question - I think
Post by: Parker on September 15, 2006, 03:55:17 PM
Hmm? I didn't have a CLibrary.lib anywhere. Maybe you had done something else. To use, cut the class declaration out and put it in CLibrary.inc, and put the source file in your project. Then include CLibrary.inc and define a CLibrary class to use.

Zumwalt, if you're interested in plugins I've got a system that works and I can explain.
Title: Re: Another DLL question - I think
Post by: J B Wood (Zumwalt) on September 15, 2006, 04:29:33 PM
I am very interested in a plugin system.
Title: Re: Another DLL question - I think
Post by: Rock Ridge Farm (Larry) on September 15, 2006, 06:00:09 PM
Mmmm that would make you about 2 years older than me.
I got drafted shortly after high school - you were about to get our by then unless you were RA.
173rd and 101 - got out in oct 68.
Title: Re: Another DLL question - I think
Post by: LarryMc on September 15, 2006, 06:09:37 PM
I stayed in approx. 10 years, 10 months, and 2 days....approx. ;)
Title: Re: Another DLL question - I think
Post by: J B Wood (Zumwalt) on September 15, 2006, 06:11:21 PM
11 months 28 days, 2 days short of 1 year for medical pay. 131'st engineers devision national guard, desert storm, honerable discharge, medical disibility, without disibility benefits because of 2 days

now where is da plugin stuff :)
Title: Re: Another DLL question - I think
Post by: LarryMc on September 15, 2006, 06:23:57 PM
I was a 'sputter butt' (AF)
Spent more time in the Pacific than I did stateside.
Viet Nam Service and Campaign medals with 2 campaign stars.
Nine combat missions and 27 combat support missions out of Clark AB PI.
Worked on Autopilots, compass systems, navigation computers, forward looking and terrain following radar, and weaspons control systems.
Title: Re: Another DLL question - I think
Post by: kryton9 on September 15, 2006, 08:23:33 PM
Thanks for your service guys, I know I appreciate it!!
Title: Re: Another DLL question - I think
Post by: Zen on September 19, 2006, 02:23:18 AM
Hi guys. Sorry for the delay, I didnt get chance to go home this weekend so I am afraid you will have to wait untill this weekend now.

Zumwalt, I wouldnt say it was a framework, although i would like to develop it further when i have the time. It was just something i did that met my needs at the time and I then decided it would become part of CCL.

Lewis
Title: Re: Another DLL question - I think
Post by: Rock Ridge Farm (Larry) on September 20, 2006, 06:48:29 AM
Ok Lewis - I have been patient. You keep letting other stuff like family, eating and paying the rent
get in the way. Is it done yet?  ;D
Bet you are glad you do not work for me. :)
Title: Re: Another DLL question - I think
Post by: J B Wood (Zumwalt) on September 20, 2006, 08:20:41 AM
I know about delays, I am in delay at the moment do to morning. As in, I just found out last night one of my best friends from Ohio died do to complications with his diabetes and anerexia. He actually died back in July but no one got ahold of me and let me know, I just figured he was traveling again. Right now I am still in shock and probably will be for a few days. No rush. Frankly I don't feal like even being at work today, but I got things I need to get done.
Title: Re: Another DLL question - I think
Post by: Zen on September 21, 2006, 02:14:35 AM
Ha ha yes I am very sorry all. I moved back up north the week before last, on my own for a new job, I could only bring my laptop with me, so not all of my programming stuff is on here, its mostly website stuff at the moment. So I am waiting untill i go back home so i can get it off my system. I cant even get anyone at home to email me it because no one can get on my computer because of the Biometrics lol.

Although, if i have some spare time i will probably rebuild the whole thing again anyway.

Lewis