How to get executing program's handle
I have a web application that makes method calls to an ole/automation server. The server is a .exe program using Microsoft COM technology. I use VBS to create the program object, which launches it, and perform method calls. A VBS example follows:
Set mySrvObj = CreateObject("ImageDisplaySrv.ImgDisp")
iResult = mySrvObj.UnBusyInvoice(vDocID, vStaus)
if vStatus not= "S" then
MsgBox with appropriate message
The first variable in the parameter list is pass to the ole server (html-->VBS--> ole erver). The second parameters is a return parameter (ole server--> VBS-->html) indicating Success or Failure of the method call.
The problem is each time the web page is refreshed I lose the handle to the ole server that is stored in VBS mySrvObj. Consequently the server launches at the start of each page refresh and closes when I go to the next web page because mySrvObj is "alive" for the duration of the current web page. Very irritating for the operator and me!
Is there a way I can make the server persistent between web page refreshes? For example, is there a technology that I can use to make the ole server persistent between web pages? (technology, such as Windows api, web technology (script lang.), C++, or anything else???)
|All times are GMT +5.5. The time now is 03:51.|