Assigning a reference using getObject()

Assigning a reference using getObject()

Post by AP » Sun, 18 Sep 2005 03:08:04


Hello,

I am trying to create an object and then use the getObject() method to set
my VB object to a running instance of the object within a window in a
windows program that is currently running.

For example: -

Dim A as Game.Application
A = getObject()

The object I want to reference is within an ATL window. Is there any way I
can set object A to reference an object in an ATL window?
Do I need to use API functions such as FindWindow in getObjects()
parameters?
Do I need to refer to the actual dll file instead?

I hope someone can help. My aim is to achieve automation, i.e control the
program with vb code.

Thanks
AP
 
 
 

1. Referencing data set B in data step A's DO loop

2. JScript GetObject() vs. VBScript GetObject() vs. W2000 vs W3000 server

Greetings!

So, I have this VBScript logon script that works fine on a W2k, W3K,
XP, etc. I translated this script to JScript and it works fine on W2k
and XP. However, it does not work on W3K. The place where it breaks
is this piece of JScript code:

var objPrinter = GetObject ("WinNT://" + strPrtServerDomain + "/" +
strPrtServer + "/" + strPrtShare);

however, this same piece of Code in VBScript works great:

Set objPrinter = GetObject("WinNT://" & strPrtServerDomain & "/" &
strPrtServer & "/" & strPrtShare)

Any ideas?

I've tried changing the server name and domain to uppercase/lowercase,
etc. Nothing has done the trick for W3000.

thanks.

jic

3. Using FindWindow() API to find MSProject and using GetObject

4. assigning function references to array elements changes the 'this' reference within them

5. assigning movieclip object reference to a variable using it's instance name

6. Printing report b after report a prints using report a's variables

7. using "if" but omitting the #n/a's

8. Opening a password protected project file using GetObject

9. Reading properties .ICO and .CUR-files using GetObject function

10. Using Excel templates with GetObject/CreateObject

11. Using Activator.GetObject with MS Word

12. Simulate 'GetObject' using remoting

13. Using getObject()

14. (Disable macro's while) using the GetObject

15. Controlling Reflection1 from Excel using getObject