1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to get executing program's handle

Discussion in 'Windows' started by rcflyer2005, Jul 24, 2008.

  1. rcflyer2005

    rcflyer2005 New Member

    Jul 13, 2008
    Likes Received:
    Trophy Points:
    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:

    Dim mySrvObj
    Set mySrvObj = CreateObject("ImageDisplaySrv.ImgDisp")
    iResult = mySrvObj.UnBusyInvoice(vDocID, vStaus)

    if vStatus not= "S" then
    MsgBox with appropriate message
    end if

    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???)

    Thanks much!!!

Share This Page