views:

53

answers:

1

Hi all. I am working with the scantest of application documentation (shocker), and what there is seems to be misleading/contradicting. I will ask the software company as well, but their last reply took weeks. In the meantime....(thanks).....

I am trying to access the [alledged] COM interface of a GUI application we'll call: Xyz

My Question: Would the results below imply to you that there IS no COM interface available, that it needs to be registered, etc...

USER MANUAL STATES:

Here are the only two quotes related to the app's COM Interface ability:

  1. "Since Xyz is a 32 bit application using COM (Component Object Model) components, running Xyz from a network......".

  2. "You can access the Xyz.Interface COM object to query for information and present it in a format you like".

CODE EXAMPLE 1:

Dim xyz_com Set xyz_com= CreateObject("Xyz.Interface") xyz_com.Visible=false

RESULT 1:

"Object doesn't support this property or method: 'Visible'"

CODE EXAMPLE 2:

Dim xyz_com Set xyz_com= CreateObject("Xyz.Interface")

RESULT 2:

The initial application screen appears which - if I AM starting the application in 'server mode' as they say - I wouldn't think I would have the screen showing.

CODE EXAMPLE 3:

Dim xyz_com Set xyz_com= CreateObject("Xyz.Interface") xyz_com.QueryInterface()

RESULT 3:

"Object doesn't support this property or method: 'QueryInterface'"

A: 

Would the results below imply to you that there IS no COM interface available, that it needs to be registered, etc.. The CreateObject call succeeds, so the COM interface exists and is registered.

Some comments:

  • You can't directly call QueryInterface like that from VB
  • You need to cast the object to the correct interface before setting the Visible property. Try Dim xyz_com as Xyz.Interface instead of just Dim xyz_com
Joe Gauterin
Sorry - didn't mention this is VBScript/WSH where the AS doesn't go over to well. But thanks for the info that the interface exists and is registered. I am further than I was ;)
Chris
OK a little further. Using VS I looked for the COM interfaces and found their methods. They don't appear to have the one I need (shocker), but even more troublesome. When I use CreateObject() for say, an Excel application, I have the option of setting visible=false so that the VB code can use Excel without seeing the screens. THESE COM interfaces seem to have no such ability: I CreateObject (Xyz.Interface) and BANG I have a full-fledged GUI being created, screens and all. Does that seem to defeat the purpose of the COM interface? I could have started the GUI normally and gotten the screens....
Chris