Question

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'"

Was it helpful?

Solution

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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top