www.digitalmars.com         C & C++   DMDScript  

D - D and Com

reply "Mike Wynn" <mike.wynn l8night.co.uk> writes:
I've managed to create a D app that can embed an instance of MSIE :)
looks like I got VARIANT right!

one odd thing
I could not use
extern(C) IID IID_IWebBrowser2;   // error no interface from the locally
defined class
extern(C) CLSID CLSID_WebBrowser; // error class not registered

instead I defined them locally

CLSID LCL_CLSID_WebBrowser = {
0x8856F961,0x340A, 0x11D0, [
0xA9, 0x6B, (byte)0x00, (byte)0xC0, (byte)0x4F, (byte)0xD7, (byte)0x05,
(byte)0xA2]
};

IID LCL_IID_IWebBrowser2 = {
0xD30C1661, 0xCDAF, 0x11d0,
[0x8A, 0x3E, 0x00, 0xC0, 0x4F, 0xC9, 0xE2, 0x6E]
} ;

any ideas anyone ?

if anyone wants the source, email me I've got to tidy it up a little ....
its currently over 200K of source to create a 103K exe

mike.
Aug 01 2003
parent reply "Walter" <walter digitalmars.com> writes:
"Mike Wynn" <mike.wynn l8night.co.uk> wrote in message
news:bgf627$1ok5$1 digitaldaemon.com...
 I've managed to create a D app that can embed an instance of MSIE :)
 looks like I got VARIANT right!
Cool! It'd be great if we could post it on the D web site as an example of a non-trivial COM app!
 one odd thing
 I could not use
 extern(C) IID IID_IWebBrowser2;   // error no interface from the locally
 defined class
 extern(C) CLSID CLSID_WebBrowser; // error class not registered

 instead I defined them locally

 CLSID LCL_CLSID_WebBrowser = {
 0x8856F961,0x340A, 0x11D0, [
 0xA9, 0x6B, (byte)0x00, (byte)0xC0, (byte)0x4F, (byte)0xD7, (byte)0x05,
 (byte)0xA2]
 };

 IID LCL_IID_IWebBrowser2 = {
 0xD30C1661, 0xCDAF, 0x11d0,
 [0x8A, 0x3E, 0x00, 0xC0, 0x4F, 0xC9, 0xE2, 0x6E]
 } ;

 any ideas anyone ?
That's because the Microsoft keeps adding new IID's in their library, and my version doesn't have them.
 if anyone wants the source, email me I've got to tidy it up a little ....
 its currently over 200K of source to create a 103K exe
I think your code could be a great help for others.
Aug 02 2003
parent "Mike Wynn" <mike.wynn l8night.co.uk> writes:
I'm in the process of rebuilding my PC [again] and have no FTP access to my
main site.
so I've put a couple of files online on geocities.
http://www.geocities.com/one_mad_alien/dcom_not_dcom.html

one is my whole cygwin build env (makefiles etc) + browser project, the
other is just my current progress through the VC++6.0 header files ..

happy hacking!

"Walter" <walter digitalmars.com> wrote in message
news:bggr6q$d8a$1 digitaldaemon.com...
 "Mike Wynn" <mike.wynn l8night.co.uk> wrote in message
 news:bgf627$1ok5$1 digitaldaemon.com...
 I've managed to create a D app that can embed an instance of MSIE :)
 looks like I got VARIANT right!
Cool! It'd be great if we could post it on the D web site as an example of
a
 non-trivial COM app!

 one odd thing
 I could not use
 extern(C) IID IID_IWebBrowser2;   // error no interface from the locally
 defined class
 extern(C) CLSID CLSID_WebBrowser; // error class not registered

 instead I defined them locally

 CLSID LCL_CLSID_WebBrowser = {
 0x8856F961,0x340A, 0x11D0, [
 0xA9, 0x6B, (byte)0x00, (byte)0xC0, (byte)0x4F, (byte)0xD7, (byte)0x05,
 (byte)0xA2]
 };

 IID LCL_IID_IWebBrowser2 = {
 0xD30C1661, 0xCDAF, 0x11d0,
 [0x8A, 0x3E, 0x00, 0xC0, 0x4F, 0xC9, 0xE2, 0x6E]
 } ;

 any ideas anyone ?
That's because the Microsoft keeps adding new IID's in their library, and
my
 version doesn't have them.

 if anyone wants the source, email me I've got to tidy it up a little
....
 its currently over 200K of source to create a 103K exe
I think your code could be a great help for others.
Aug 02 2003