explore wether a program provides COM-Components or not Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
Jovannb
Posts: 268
Joined: 17 Jun 2014, 02:44
Location: Austria

explore wether a program provides COM-Components or not

27 Apr 2017, 09:54

Hi,

using AHK it would be very helpfull knowing

a) a program provides COM-Components

and then

b) which methodes and properties are provided

Is there a way, a possibility to get those informatione e.g. from EXE- or DLL-Files of that program ?

regards

J.B.
AHK: 1.1.37.01 Ansi, 32-Bit; Win10 22H2 64 bit, german
Elgin
Posts: 124
Joined: 30 Sep 2013, 09:19

Re: explore wether a program provides COM-Components or not

27 Apr 2017, 13:01

The program Ole/COM Viewer (oleview.exe) which is part of the Windows SDK (download @ Microsoft) allows you to browse all installed COM objects and type libraries.
To see which functions are exported by exe and dll files (not COM) you need a tool called Dependency Walker.
User avatar
Jovannb
Posts: 268
Joined: 17 Jun 2014, 02:44
Location: Austria

Re: explore wether a program provides COM-Components or not  Topic is solved

27 Apr 2017, 14:13

Hi,

thank you for your tip, that brought me on the right track

1.) list all available COMObjects, type that in a Powershell-Window:

Code: Select all

Get-ChildItem HKLM:\Software\Classes -ErrorAction SilentlyContinue | Where-Object {$_.PSChildName -match '^\w+\.\w+$' -and (Test-Path -Path "$($_.PSPath)\CLSID")} | Select-Object -ExpandProperty PSChildName
with a small extension like

Code: Select all

... > info.txt
you can pipe those results (from 1. above) in a text-file, so it is easier to handle.

2.) List all Methods and Properties of a certain COMObject (e.g. Excel) to a file (in this case) called members.csv, type those two lines (one after each other) into a Powershell-Window:

Code: Select all

$test1 = new-object -comobject Excel.Application
$test1 | get-member | export-csv members.csv -notypeinformation
worked well on my Win7-Computer and another one with Win10, without a necessity to install something particular.

J.B.
Last edited by Jovannb on 27 Apr 2017, 23:59, edited 1 time in total.
AHK: 1.1.37.01 Ansi, 32-Bit; Win10 22H2 64 bit, german
magicinmath
Posts: 162
Joined: 12 Apr 2017, 23:03

Re: explore wether a program provides COM-Components or not

27 Apr 2017, 19:30

After I open COM inspector, if I do not see the name of the program in ProgID or Description, does that mean it does not support a COM interface?
User avatar
Alguimist
Posts: 428
Joined: 05 Oct 2015, 16:41
Contact:

Re: explore wether a program provides COM-Components or not

27 Apr 2017, 21:14

No, but the ITypeInfo interface needed to inspect the object is not available in almost all cases.
magicinmath
Posts: 162
Joined: 12 Apr 2017, 23:03

Re: explore wether a program provides COM-Components or not

28 Apr 2017, 13:43

Alguimist wrote:No, but the ITypeInfo interface needed to inspect the object is not available in almost all cases.
Is it possible to work around this? I'd really appreciate some hints.

I got dependency walker as well and trying to put together the pieces.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], Mannaia666, wpulford and 407 guests