Einzelnen Beitrag anzeigen

digga

Registriert seit: 26. Jan 2005
11 Beiträge
 
#1

Typelibraries mit Delphi auslesen

  Alt 26. Jan 2005, 19:24
Hi,

ich habe folgendes Problem.
Ich möchte gerne alle Informationen einer Typelib mit Delphi auslesen.
Das klappt eigentlich auch ganz gut.

Allerdings komme ich aber nicht an die Vererbungshierarchie bei den Interfaces heran.
Ich würde also wie hier im Bsp. gerne herausfinden, dass das Interface <IWebBrowserApp> das Interface <IWebBrowser> erweitert.

[
odl,
uuid(0002DF05-0000-0000-C000-000000000046),
helpstring("Web Browser Application Interface."),
hidden,
dual,
oleautomation
]
interface IWebBrowserApp : IWebBrowser {
[id(0x0000012c), helpstring("Exits application and closes the open document.")]
HRESULT Quit();
[id(0x0000012d), helpstring("Converts client sizes into window sizes.")]
HRESULT ClientToWindow(
[in, out] int* pcx,
[in, out] int* pcy);
[id(0x0000012e), helpstring("Associates vtValue with the name szProperty in the context of the object.")]

...

Bei den CoClasses funktioniert folgender Code:
Delphi-Quellcode:
for i:=0 to typeAttr.cImplTypes-1 do begin
OleCheck(typeInfo.GetRefTypeOfImplType(i, hRefType));
logDebug(#9+#9+'hRefType: ' + inttostr(hRefType));
OleCheck(typeInfo.GetRefTypeInfo(hRefType, interfaceInfo));
interfaceInfo.GetDocumentation(-1, @bstrName, @bstrDocString, @dwHelpContext, @bstrHelpFile);
logDebug(#9+#9+'Interface: ' + bstrName);
end;
Allerdings brauche ich diese Information für die Interfaces auch.

Kann mir jemand weiterhelfen?

Danke,
Dominik

[edit=MrSpock]Code Tags eingefügt. Mfg, MrSpock[/edit]
  Mit Zitat antworten Zitat