Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Gonna Use FreePascal to Control darkGDK for DeskTop Apps - GUI !!!

Author
Message
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 16th Jan 2008 17:34 Edited at: 16th Jan 2008 17:57
Eloquent? No - SLick considering DarkGDK winMain? I think so - its like Landscape Maker someone on here did. Idea is to make one app control the other - and devise some InterProcess Comm to make it work.

Attaching Exe - but I'll post the source - its harmless and requires notepad.exe fro xp in your path.
[edit]Changed to launch cmd.exe[/edit]

project1.lpr


unit1.pas - remember most of this code was written for me in the Lazarus IDE!!!!


Note - I tossed in other widgets so you can See WHY I might bother to use FreePascal - (besides I have literally 10's of Thousands of routines I've written for it over the years from sockets to multithreaded webserver, linkeed list, advanced parsers etc etc.

You have all the source and the project1.exe in the attached Zip.
Next Post will have screenie.

Attachments

Login to view attachments
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 16th Jan 2008 17:36 Edited at: 16th Jan 2008 17:56
Screenie

[edit]I just did a test to make sure I would have complete process control of DarkGDK - I do - it worked flawless!

Now I need to devise some DLL/IPC/Process "system" so I can control DarkGDK "remotely" sort of.
[/edit]

Attachments

Login to view attachments
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 16th Jan 2008 18:34
mapped memory might work best, and quickest for the apps to ipc with each other. if you were using .net 3.5 you could take advantage of the new NamedPipesServer and Client classes

My DBP plugins page is now hosted [href]here[/href]
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 16th Jan 2008 18:47
I agree. Mapped Memory is Sweet.

.Net - Yes - But I tend to like true compiled bin's versus the JIT stuff... personal preference. For business software - I don't care as much - as most "clients" just throw faster hardware - or just don't care. I agree that .net3 has some neat options.

I have a IPC lib I made based on a file system I designed - that uses block read/writes, and allows dropping data from 1byte to 4 gig in a fell swoop... and my testing so far today has proved it should work just fine.

Additionally I have a complete sockets lib also that I may utilize for IPC if this pans out as "Not to complex" to control stuff back and forth.

The only thing with the memmapping is that its very operating system specific, and all my freepascal code to date runs on any os. MemMapping would pretty much lock me into FPC code that is windows specific.

Beleive it or not - the GUI I'll be making will run equally well in Mac and Linux... of course DarkGDK can't go there - but ... OpenGL and possibly Irrlicht or something for those OS's if I ever decide to look into such things.

Good suggestion - but to many things I'm contending with here make that not seem quite as attractive. However I TOTALLY agree that mem to mem communication could be made EXTRELEY LEAN/FAST ROCKET SPEED!

I think I May implement a different mecahnism that does same priniciple via sharing data across threads in a similiar manner.

What ever I can do - Speed/simple - I'll do I don't want to spend to much time on this part - just get the framework in place so I can try my hand at actual GUI based DarkGDK C++.

I'm well aware .net version when released would make this simple tasks, but it is what it is... I'm C++ bound by design and FreePascal + DarkGDK exploring

Hayer
19
Years of Service
User Offline
Joined: 4th Nov 2005
Location: Norway
Posted: 16th Jan 2008 21:56 Edited at: 16th Jan 2008 21:57
I did something pretty equale to this with Visual Basic 6 and DBPro, using mapping..

CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 17th Jan 2008 00:43
btw...

Quote: ".Net - Yes - But I tend to like true compiled bin's versus the JIT stuff... personal preference"


not trying to change or sway anything here, please stay with c++.
In the case of runtime, .net exe's and dll's are "true compiled bins", compiled as such at first run and optimized for that machine by the JIT compiler. But yes, they are msil until then. Just double checking. I want to make sure you dont think .NET is some interpretted runtime, which its not, and which is a common myth.

good luck with the ipc. I have an upcoming project that will require a form of ipc as well, and I was researching all of the options. Then I read by accident that 3.5 had cool new stuff to simplify things like that. Thought i'd share

My DBP plugins page is now hosted [href]here[/href]
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 17th Jan 2008 01:05
I'm glad you shared! always glad you share! And for the exe - yeah - myth got me - I was under impression it does it each time you execute it... almost like it compiles as you fire the exe up - like it compiles into ram or something... I thought this because people said without obfusciating your code - you can easily reverse engineer the clr of any .net exe - and this is why there is a microsoft "basic obfusciator" and more "pro" ones you can buy from various vendors etc.

Microsoft in general adds a lot of bloat to everything - and sometimes (usually) I like to go back to the basics so I get get as lean and mean as possible. I'll add enough bloat to my software as it is - so I like to start with none. I also keep an eye to platform independance because at $300+ for a "MS" OS everytime they make a new one - well... I think that is going to become less and less "palettable" to people....


I really am sorry - I always jump on a soap box on this stuff. Truth is - .Net isn't going ANYWHERE soon and staying on the course or "road map" for technologies you tend to work in makes sense ... I'm the rebel here... usually mainstream does better where computers are concerned as a general rule...

which means I shoot myself in the foot from time to time

CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 17th Jan 2008 02:14
Quote: "yeah - myth got me - I was under impression it does it each time you execute it... almost like it compiles as you fire the exe up"

well, it compiles to a binary when you start it the first time, and runs as a native binary out f memory. The next time you run the exe, if nothing's changed it does a light compile with the assembly info (a compile but quicker) then runs the bin out of memory. If the msil is changed then it first recompiles from scratch, then runs as a bin. thats why .net apps tend to be a lil slower starting up, especially the first run, or after changes to the msil.

Quote: "I thought this because people said without obfusciating your code - you can easily reverse engineer the clr of any .net exe - and this is why there is a microsoft "basic obfusciator" and more "pro" ones you can buy from various vendors etc."

this is quite true, but is a sep issue from above. the msil exe is easily reversed engineered to plain text, in fact ms includes the decompiler with VS and .NET sdk's. The obfuscators do help.

Quote: "Microsoft in general adds a lot of bloat to everything "

yep, ugh.

Quote: "I also keep an eye to platform independance"

yeah, that was the original goal of .NET, cross-platform. Its slow in coming thus far.

Quote: "I really am sorry - I always jump on a soap box on this stuff"

nah, no worries, we all have our soap boxes I just wanted to make sure you new .net was different than interpretted execution, thats all

My DBP plugins page is now hosted [href]here[/href]
tempicek
16
Years of Service
User Offline
Joined: 27th Nov 2007
Location: Prague
Posted: 17th Jan 2008 10:05
Just because you are talking about that, CattleRustler, do you have any experience with .NET on Linux and the Mono thing? I wonder how far they actually are.
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 17th Jan 2008 12:18
A friend on irc was running something for linux that allowed him to run any .net exe I sent to him. What that was (maybe mono) I am not sure, sorry. Next time I speak to him I will ask.

My DBP plugins page is now hosted [href]here[/href]

Login to post a reply

Server time is: 2024-11-17 02:28:35
Your offset time is: 2024-11-17 02:28:35