출처: http://www.autohotkey.com/community/viewtopic.php?t=68780
The "OLE/COM Object Viewer" is a very handy tool
to get a peek on all COM objects currently installed on your system. It
is part of the Windows 2000 resource kit and can be downloaded for free
from here
An exe called oleview.exe is installed by default in "C:\Program
Files\Resource Kit". It is missing a file called IViewers.dll. I am
attaching the dll with this post. Copy it to the same directory where
oleview.exe resides and register the dll using the command line:
regsvr32 iviewers.dll.
Download: OLE/COM Object Viewer | IViewers.dll
Example:
Menu -> View -> Expert mode (clear expert mode)
Run it and follow this tree: Control->Microsoft Web Browser.
The right pane contains a lot of information to use this object in
an AHK script. "VersionIndependentProgID" contains the name to be used
in an ComObjCreate function. InProcServer32 means that the object runs
in the same thread as our script (in-process). When you see
LocalServer32, the object runs as a separate process. The object must
also contain a type library (the lines following "TypeLib="), otherwise
(afaiu) it can't be used in an AHK script.
The interfaces in the left column are several ways of interacting
with the object. IOleObject, IOleControl are used for embedding in a
GUI. AHK uses the IDispatch interface for automation. This interface
exposes all scriptable methods and properties that the object supports.
Right-click -> "View..." -> "View TypeInfo..." (button is
grayed out if you have not registered the IViewers.dll, or the object
does not have a type library)
The methods and properties are shown. Browse through the "Inherited Interfaces" to retrieve more methods for the object.
The syntax of the described methods/properties are in C/C++ style. A
property described as "HRESULT Resizable([in] VARIANT_BOOL pbOffline)"
can be used in AHK like: Resizable := Obj.Resizable
- Adapted for AHK from another web-tutorial. Maybe someone with more insight into COM/OLE can expand on this.
_________________
If i've seen further it is by standing on the shoulders of giants
http://tory45.egloos.com/4970463
- 2009/06/05 17:03
- tory45.egloos.com/4970463
- 덧글수 : 0
아주 가끔 필요할때 있을겁니다.. ^^
https://msdn.microsoft.com/ko-kr/library/d0kh9f4c.aspx
OLE/COM 개체 뷰어 사용
You can use the OLE/COM Object Viewer to view a control's interfaces.
OLE/COM 개체 뷰어를 사용하려면
Start the OLE/COM Object Viewer (oleview.exe), which is located in the \Program Files (x86)\Windows Kits\8.0\bin\x86\ folder.
In the Object Classes, Grouped by Component category in the viewer, open the Automation Objects folder to view the registered Automation objects.
Select one of the controls. Several tabs appear in the right pane; the interfaces that are implemented by the control are displayed on the Registry tab.If you open the shortcut menu for a control in the left pane and then choose View Type Information, the ITypeInfo Viewer displays a reconstructed .idl or .odl file.
If you expand the control node in the left pane, a list of the interfaces in the object is displayed. If you select an interface, its registry entry is displayed in the right pane.If you open the shortcut menu for an interface and then choose View, the OLE/COM Object Viewer displays a dialog box that shows the GUID for the interface and an option to view type library information, if it is available. Selecting View Type Info displays a portion of a reconstructed .idl file that is specific to the interface in the ITypeInfo Viewer.In the ITypeInfo Viewer, you can select an interface member in the tree view to display the accessor method signatures in the right pane.
'Programming' 카테고리의 다른 글
델파이 2007,2009,2010에서 도움말이 설치가 안되는 경우 (0) | 2012.04.10 |
---|---|
[펌] API 문서가 없는 ATL, OCX 의 Method를 볼수 있는 방법.. OLE/COM Object Viewer 써 볼까? (0) | 2012.04.09 |
[펌] ActiveX Method 분석 방법 (0) | 2012.04.09 |