How to get executing program's handle

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

  1. rcflyer2005

    rcflyer2005 New Member

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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice