Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Getting a Windows (Delphi) program to run on a website...

Posted on 2011-03-20
Medium Priority
Last Modified: 2012-05-11
Hi, I've written a stock analysis software and instead of selling individual copies outright (as most people do), I would like to have it 'pay-per-use' over a website. It's a Windows program written in Delphi, that basically runs one big 'batch job' on the data of 3500 stocks and spits out recommendations. Ideally I'd like to have my software sitting on a server somewhere, the customer comes to my website, makes a small payment of a few dollars to Paypal (or some other payment processor), then gets access to my program over the web so he can run his one-time batch job analysis. Then when he's done, he logs out (or his allotted time expires and he gets logged out). And that's it.

So basically my first hurdle is - how can I run my Delphi program through a website? Maybe it's not even possible? Then once I can solve that, would look for a way to handle the "pay-per-use" side of it.


Question by:shawn226
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
  • 2
  • +3
LVL 19

Expert Comment

ID: 35176942
I suggest using a web service to make your application accessible over the internet.

Building a Web Service from Scratch with Delphi

You can either implement your functionality directly into the web service server application or make a call to your Windows program...

Author Comment

ID: 35177146
Thanks Thommy, but I haven't a clue on how to do this or where to start. Briefly looking at that link and I was totally lost.
   Do I just basically take my existing Delphi program and add a few commands to it? Or do I have to totally write my program over again in a different programming language?

LVL 24

Accepted Solution

jimyX earned 375 total points
ID: 35178284
>   "how can I run my Delphi program through a website?"
Here comes the wonderful world of the Intraweb:

For simple example:

And you can find many examples & demos on the web about working with IntraWeb.
This link will get you started:

And let's not forget Dr.bob's:
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

LVL 19

Expert Comment

ID: 35178629
There is no getting around to familiarize with web development, if you want to make your application available over the internet!!!

You do not have to use a different programming language, but you have to rewrite your program as a web application, which meets the demands of the internet.

jimyX has provided a good collection of links for starting your career as a Delphi web developer...
LVL 38

Expert Comment

by:Geert Gruwez
ID: 35178674
i would consider what your app actually does first,
before even thinking about the web

from what you say: a stock analysis program

from what i know about something like that:
1: start program
2: get access to the database
3: get the data
4: run tool for analysis
5: create report

now let's get into detail about each item
you control when you start this program
you will have to automate each step if you want this done over the web
probably also provide 24/7 support as the web is wordwide

99% of your customers will not want something from on the web have access to the database
especially if they don't know what it's gonna do
which databases will you support ?
oracle, interbase, firebird, dbase, paradox, mssql, banyan vines, teradata, msaccess, ... etc

again 99% will not trust anything from the web
> alternative: upload all the data into your site
> this means that you will have to provide the necessary space to store their data
> i hope you are very succesfull, and that you provide enough space for at least 10 customers a day
> also keep in mind that once they paid, they will want you to maintain a history for them to access every 6 or 12 months

you control this too, the more customers you have, the more processor power you'll need :)

pdf reports or even html reports are easy to make

i believe your most crucial point:
getting to the data
* having people trust you and let you in
* having them upload the data to you

if you can get them to upload the data, you wouldn't need to change your app at all
just build a framework around it to get the data and deliver the report back out
if i were you, i would try to get this to work first
LVL 32

Expert Comment

by:Ephraim Wangoya
ID: 35180827
Nice one Geert

On top of that you can always change bits of your applications to DLL's so you dont have to write a whole new application for the WEB, just use existing (already tested) code via the DLLs
LVL 38

Expert Comment

by:Geert Gruwez
ID: 35180857
Nice one ?
just pointing out some possible problems
like clients having a few TerraByte of data to analyse
LVL 32

Expert Comment

by:Ephraim Wangoya
ID: 35180871
So I agree with you

Author Comment

ID: 35185963
Thanks everybody for the replies. Looks like I have quite the magical journey ahead of me  ;-)

But doing some googling I found this link:


... it seems to address exactly what I need in a much much simpler way (making my Delphi app an ActiveX object?). Is this approach okay too? Would this work?

In response to Geert's suggestions, it's best I give a little more detail on my app. The running of it is pretty straightforward and it essentially accepts a few input fields from the user, he then clicks GO and my app reads through flat ascii files (no database) of the daily data of around 3600 stocks (one ascii file per stock). Total size of all data files together would be around 250 - 300 megs. It does its number crunching (around 10 - 12 minutes total) and then presents a list of candidate stocks right on the screen in a TListView box. No pdf output, no pdf printouts, nothing like that. The User can sort and rank the results in the TListView by clicking different columns - if he finds a trade suggestion he likes, he can simply jot it down.
    This all raises another important issue as well - if my app becomes halfway popular, it's possible I could have a lot of customers all arriving at my website wanting to run it simultaneously. Would this cause problems and require a special kind of web server?

Thanks to all

Author Comment

ID: 35223468
Hi guys... are you still with me? Any thoughts on my last post?

LVL 24

Expert Comment

ID: 35224008
Does your application require interactive communication with database?
When I read your comment (#35185963) I understand that you have database. Even if it's a text file and one-way reading, still it requires retrieving data. Can the ActiveX do that? I do not think so.

> "the customer comes to my website, makes a small payment"

You can have Customers Database and assign user/password to every customer whenever a payment is made. The payee will be extended the right to access your application for a specific period of time, let's say X hours from the time of the first log in, or it can be prorated to a maximum of three sessions every session is a specific period of time, or whatever the package that you offer is. So whenever a customer logs, in the time will be captured and counter will start to determine when the session ends.

You have two options here, use web application (IntraWeb) or web Site (php or similar).

Author Comment

ID: 35224578
Thanks for the reply JimyX. Yes my app has to read ascii data files, so in that sense, I guess that is the database. And an ocx cannot do this?? I really have no idea how ocx's work, I hardly know what they are.

You say "You have two options here, use web application (IntraWeb) or web Site (php or similar)." How would I accomplish this with the "web site" option? I would have to re-write my whole app in Java or something?

(I realize I've asked kind of a 2-part question: how to make my Windows app run on a website, and also how to set up a pay-per-use system for it. I think in this thread I better just stick to the topic of how to get my app to run over a website. Once I've got that working,then I can worry about how to set up a "pay-per-use" system for it).

LVL 32

Expert Comment

by:Ephraim Wangoya
ID: 35227362

I don't know how an ActiveX object helps you in this case. Your processing is done on your server where you have your files so whats the need for ActiveX

All this stuff is going to be done in the code behind. Send the desired information to your dll in the code behind, let it crunch the numbers then spit out XML which you will bind to your datagrid

Expert Comment

ID: 35239795
Does your application have a form? Or can it just accept some parameters and run away with it and return a result?

ActiveX could be used, but it would only run on IE browsers, not on others. On top of that, users would have to allow unsigned activex controls to run on their computer (which mostly they don't), so there'd be a lot of issues.

Another option is, if no form is required, CGI (console) program, run on web server.
Yet another, to make regular ISAPI (dll) to run on web server.

You really need to provide us with more information about your Delphi application :)

Take care,

Author Comment

ID: 35261235
Hi Sabina... you wrote:

>Does your application have a form? Or can it just accept some parameters and run away with it and >return a result?

Yes, I do use a GUI form. It's a very simple program - the user enters some parameters in the form, clicks GO and the program then crunches data for 3600 stocks. Then it displays the results back on the form in a TListView box. It does not write to output files.

>ActiveX could be used, but it would only run on IE browsers, not on others. On top of that, users >would have to allow unsigned activex controls to run on their computer (which mostly they don't), >so there'd be a lot of issues.

I guess that wouldn't be very handy then if Firefox users (or others) couldn't use it.

>Another option is, if no form is required, CGI (console) program, run on web server.
>Yet another, to make regular ISAPI (dll) to run on web server.

What is ISAPI?



Author Closing Comment

ID: 35454487
Thanks, this got me on the right track, and I have continued to follow up on how to implement Intraweb via the discussion forum at www.atozed.com.


Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question