views:

156

answers:

4

I'm working on a desktop application in Delphi 2007 and on a website where content data for this application is maintained. To view this website, the user is basically restricted to Internet Explorer 7 or higher. (Not going to support the rest.)

What I am looking for is a way to add a link to the website which would tell my already-running application to select a certain record by an ID that's passed to it from the website.

That sounds easy but it's a bit more complex than this. In the application, the user selects a dossier for a customer of the user. In this list he can find a list of products. His customer -who sits next to the user- just searches on the website and selects a product to be added. (Or the user selects one for him.)

Second Life seems to be able to do this by supporting a new protocol for the web browser. Thus, the link secondlife://gingivere/240/72/ would kick you to some place in Second Life. (Unless you haven't installed Second Life, in which case it doesn't do much.) Basically, I want to implement something similar in my application! (Must support Windows 2000, 2003, XP, Vista and newer versions of Windows.)

Oh, I'm using Borland/Codegear/Embarcadero Delphi 2007 and the application is a simple WIN32 application. (I also have Visual Studio 2008 available but would prefer to not use this.)

A: 

I would poll a webservice from the client application rather that try to make a connection from the server to the browser.

Hans Malherbe
With a single website and 4000 users who would be polling every day during office hours, I'd go through my ISP bandwidth within a day. Besides, it's not a critical process. It's just a nice-to-have function which allows users to select directly from the website instead through a multiple of windows.
Workshop Alex
+7  A: 

See Registering an Application to a URL Protocol.

TOndrej
+1  A: 

RTC Real Thin Client and remote functions are perfect for this.

Junior-RO
A: 

Me, I'd forget the browser compatibility issues (how do you think you will stop IE8 being used?) and use the PBear browser component direct. Using this you can intercept your links easily, and thus spot whatever reference you wish. In my app, I have things like "act://actHelp" and I spot the link type as 'act' and then search for an action with the name "actHelp". If available, I execute it. You can also pre-parse the HTML code to look for these links, and insert an image of the icon that the action uses, thus matching your UI and ensuring it is kept up to date.

Go integrated, and forget external browser issues.

mj2008