where you can find lots and lots of information about the Windows API. In
the past it was also possible to download the Platform SDK from the
Microsoft site but I lost the URL to that.
About WinExec, that API is basically obsolete yet Delphi still supports it.
There are two better options to start new processes. One is by
ShellExecuteEx and the other by using CreateProcess. Both have their
advantages and disadvantages, though. And both can be a bit complicated if
you want to have control over the process that you've just started. So the
best thing is to read first about these functions before using them. (Maybe
just try to Google for them.)
Vahan does make a good point, btw. You might want to add some licensing
mechanism to your code to limit each executable to just the functionality
that the user is allowed to use. And maybe you also want to add some
inter-process communications too, for which there are dozens of different
methods, varying from the Windows messaging system to memory mapped files to
events, semaphores and mutexes and things like named and unnamed pipes. You
do have to realise that you're starting to do some complicated programming
this way. It's a challenge but if you like programming, it's a fun
challenge. (Not wanting to discourage you but it took me months to work well
with these APIs and have some control over the applications I call from my
main application.)
One other thing to remember: if you split your project in several separate
executables, the total size of all executables will be much bigger than if
you keep everything in a single executable. This is because each and every
executable will contain it's own runtime library, which tends to be huge.
--
With kind regards,
\/\//\ Wim,
W.A. ten Brink
On 4/24/06, Roberto Freitas <[EMAIL PROTECTED]> wrote:
>
> Thanks for your explanations.
> I'll try the way to use ShellExecute or even another function I saw
> somewhere = WinExec.
> Following your advise, I should first start reading the helpfiles and
> web about them.
> The problem is: in Delphi Help (I use Delphi Enterprise 7.0) I could
> not find any entry for ShellExecute or WinExec.
> So, until now I have no way to read about them, more, I have no idea
> how to use them.
> Any other advise, please?
>
> --- In [email protected], "Workshop Alex" <[EMAIL PROTECTED]>
> wrote:
> >
> > As I see it, you have multiple options. One way would be by using
> runtime
> > packages. This will result in a small executable but it will be
> dependant of
> > the Delphi runtime packages which will also become part of your
> product. And
> > you would have to install them on any system that your application
> is
> > installed on.
> > A second solution is by putting all processing logic in DLLs and
> just keep
> > all the forms and visible parts in the main executable of your
> application.
> > (You can put forms in DLLs too but they will behave a bit unexpected
> > sometimes.) The DLL would perform most of the business logic of your
> > appliction while all your executable does is display input screens,
> options
> > and call the appropiate DLL methods.
> > A third option is by building a multi-tier application. Again, here
> you
> > divide the user interface from the business logic. There are quite
> a few
> > techniques to do this but in general this means you will have one
> system
> > that contains the business locig and multiple clients that will
> connect in
> > some way to this system and call this business logic. Methods to do
> this can
> > be simple TCP/IP communication, DCOM or COM+ components or even more
> > complicated techniques like SOAP. Yet this technique can be over
> the top if
> > all you want to make is a simple desktop application.
> >
> > But your solution is a good one too. A simple executable that uses
> > ShellExecute to start other applications. If ShellExecute succeeds
> you have
> > a handle to the new process that you can use in
> > WaitForSingleObject/WaitForMultipleObjects calls to see if the
> process has
> > ended again. Both functions are a bit complex API calls and I would
> suggest
> > you start reading the helpfiles and web first about them before
> using them.
> > Of course, the application would need to have a list of executables
> that it
> > can start and offer the appropiate menu-option if that executable is
> > available.
> > --
> > With kind regards,
> >
> > \/\//\ Wim,
> > W.A. ten Brink
> >
> > On 4/24/06, Roberto Freitas <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi,
> > > Sometimes a program becomes so large (and actually with many
> different
> > > interconnected functions) that it would be interesting to divide
> it
> > > into parts or modules.
> > > For example, a management enterprise application. It has
> accounting,
> > > payroll, stock, etc, each one is an application itself.
> > > I would like to have a very small PROGRAM1.EXE with just a menu:
> after
> > > calling this first program, the user could choose on the menu the
> > > actual application he is interested on. Then, PROGRAM1.EXE,
> someway,
> > > would call accounting program, or payroll program, etc
> > > It's interesting because not ALL clients want to use ALL
> functions, so
> > > we can dispose modules accordingly.
> > > How to do it using Delphi?
> > >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>
>
>
>
>
> -----------------------------------------------------
> Home page: http://groups.yahoo.com/group/delphi-en/
> To unsubscribe: [EMAIL PROTECTED]
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
--
With kind regards,
\/\//\ Wim,
W.A. ten Brink
[Non-text portions of this message have been removed]
-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED]
YAHOO! GROUPS LINKS
- Visit your group "delphi-en" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

