In Delphi you have the possiblity to import a TLB file in your project.
The importer will generate you a xxx_TLB.pas with interfaces from the
TLB file. The file is similar to what the Type Library Editor is making
for you.
I am trying to do the following:
1. import mshtml.tlb as mshtml_tlb.pas
2. implement some of the interfaces from there
3. implement an IActiveScriptSite to execute some scripts on the
automation objects supporting interfaces from MSHTML
The scripting part was the most easy to implement, and it is working
fine. Also, I was able to export some of my own automation objects not
supporting the interfaces from mshtml.tlb.
I was able to make some steps:
1. imported the mshtml.tlb to have the interfaces (created the file
mshtml_tlb.pas)
2. took the IHTMLWindow2 interface and implemented it in an TAutoObject
descendant class
3. linked the original tlb file compiled as a resource in my project
After all these steps when in the initialization section of my
HTMLWindow2 implementation unit I call TAutoObjectFactory.Create(...),
an EOleSysError exception is thrown with message 'Old format or invalid
type library'.
I have also tried to load up the type library from the executable
manually with LoadTypeLib function and the same error is returned.
My resource script looks like this:
1 typelib "mshtml.tlb"
I compile it with Delphi 7 resource compiler and include it in my
project with $R.
Any help or advice would be greatly appreciated.
Kind regards,
Tibor Csonka
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"Tibor Csonka" <b...@rawbite.ro> wrote in message
news:4390201c$1...@newsgroups.borland.com...
Because I want to expose objects to JScript which are similar to the
objects ob IE but not the same. For that I should implement the same
automation interfaces as IE.
Any idea about the error message I got?
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"Tibor Csonka" <b...@rawbite.ro> wrote in message
news:4395814a$1...@newsgroups.borland.com...
Not really because, as I understood, you can register com objects only
for your current process. Is this not true?
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"Tibor Csonka" <b...@rawbite.ro> wrote in message
news:4397e6e2$1...@newsgroups.borland.com...