Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Issue with CreateObject

Status
Not open for further replies.

BuilderSpec

Programmer
Dec 24, 2003
383
GB
Hi

I am trying to create an object to an instance of hostex32.exe running on a machine. I use code that says :

HE = createobject("HostExplorer")

Which works. Funnily enough GetObject does not work , createobject in this instance seems to attach to the existing process as opposed to creating a new one. anyway that is not the issue but if I don't mention it someone will point that out.

The issue is that sometimes there are more than one process called "hostex32.exe" running and I need to be able to set an instance to each as I will need to "find" the one i am really interested in.

As background i use this for screen scraping a mainframe session so it is important I attach to the right one.

Does anyone know of a way that I can tell the createobject which process to connect to ?

I DID try another tactic of killing any spurious processes. if I had 2 processes I can tell which is the "correct" one by the process.MainWindowTitle etc and I could then kill the other process. Unfortunately my users don't have elevated privilege so that wouldn't work.

My program logic itself works successfully if there is only one hostex32.exe running , I have issues when there is more than one.

Any help appreciated.

Thanks




Hope this helps!

Regards

BuilderSpec
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top