www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Creating ActiveX in D

reply BLS <windevguy hotmail.de> writes:
Hi,
Sergey G. ask (by accident ;) ) about : How to create an ActiveX control 
in D.
Now, I am curious : Is it possible to create an ActiveX Control In D ?

Something along :
class Component : IDispatch
{
}

instead of :

class Component : IUnknown
{
}

and if so, how to build an AX control in D, guess as DLL + D runtime ???

Thank's for enlighten me.
björn
Jul 23 2009
next sibling parent reply Frank Benoit <keinfarbton googlemail.com> writes:
BLS schrieb:
 Hi,
 Sergey G. ask (by accident ;) ) about : How to create an ActiveX control
 in D.
 Now, I am curious : Is it possible to create an ActiveX Control In D ?
 
 Something along :
 class Component : IDispatch
 {
 }
 
 instead of :
 
 class Component : IUnknown
 {
 }
 
 and if so, how to build an AX control in D, guess as DLL + D runtime ???
 
 Thank's for enlighten me.
 björn
in dwt there is that ole package, I think this shows how to do it.
Jul 23 2009
parent BLS <windevguy hotmail.de> writes:
Frank Benoit wrote:
 BLS schrieb:
 Hi,
 Sergey G. ask (by accident ;) ) about : How to create an ActiveX control
 in D.
 Now, I am curious : Is it possible to create an ActiveX Control In D ?

 Something along :
 class Component : IDispatch
 {
 }

 instead of :

 class Component : IUnknown
 {
 }

 and if so, how to build an AX control in D, guess as DLL + D runtime ???

 Thank's for enlighten me.
 björn
in dwt there is that ole package, I think this shows how to do it.
Thanks Frank, guess the DWT OLE package is more OLE consumer orientated. probably I am wrong...will have a look. ( maybe, just read the msg from John C. .. not really encouraging ) , nevertheless :) thanks again, björn
Jul 23 2009
prev sibling next sibling parent reply div0 <div0 users.sourceforge.net> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

BLS wrote:
 Hi,
 Sergey G. ask (by accident ;) ) about : How to create an ActiveX control
 in D.
 Now, I am curious : Is it possible to create an ActiveX Control In D ?
 
 Something along :
 class Component : IDispatch
 {
 }
 
 instead of :
 
 class Component : IUnknown
 {
 }
 
 and if so, how to build an AX control in D, guess as DLL + D runtime ???
 
 Thank's for enlighten me.
 björn
Just implementing IDispatch doesn't make a COM component an ActiveX Control. IDispatch is used as a calling interface for older scripting languages like VB6. ActiveX controls have to implement a whole bunch of interfaces. They are a right arse ache to do and I can highly recommend staying clear of it. If you are really interested: http://msdn.microsoft.com/en-us/library/aa268985(VS.60).aspx - -- My enormous talent is exceeded only by my outrageous laziness. http://www.ssTk.co.uk -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iD8DBQFKaLgCT9LetA9XoXwRAr/RAKDFuT4TGzfwN6naWmXQtNX6RQpJHQCfYOO2 Lr/oaPwHjROCACUs+B8lS1o= =42Ui -----END PGP SIGNATURE-----
Jul 23 2009
parent BLS <windevguy hotmail.de> writes:
div0 wrote:
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
 BLS wrote:
 Hi,
 Sergey G. ask (by accident ;) ) about : How to create an ActiveX control
 in D.
 Now, I am curious : Is it possible to create an ActiveX Control In D ?

 Something along :
 class Component : IDispatch
 {
 }

 instead of :

 class Component : IUnknown
 {
 }

 and if so, how to build an AX control in D, guess as DLL + D runtime ???

 Thank's for enlighten me.
 björn
Just implementing IDispatch doesn't make a COM component an ActiveX Control. IDispatch is used as a calling interface for older scripting languages like VB6.
like Java script :) IDispatch + all the registerWTF thingies ?
 
 ActiveX controls have to implement a whole bunch of interfaces.
 They are a right arse ache to do and I can highly recommend staying
 clear of it.
 
 If you are really interested:
 
 http://msdn.microsoft.com/en-us/library/aa268985(VS.60).aspx
 
Thanks for the pointer!
 - --
 My enormous talent is exceeded only by my outrageous laziness.
 http://www.ssTk.co.uk
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.7 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
 
 iD8DBQFKaLgCT9LetA9XoXwRAr/RAKDFuT4TGzfwN6naWmXQtNX6RQpJHQCfYOO2
 Lr/oaPwHjROCACUs+B8lS1o=
 =42Ui
 -----END PGP SIGNATURE-----
Jul 23 2009
prev sibling parent reply John C <johnch_atms hotmail.com> writes:
BLS Wrote:

 Hi,
 Sergey G. ask (by accident ;) ) about : How to create an ActiveX control 
 in D.
 Now, I am curious : Is it possible to create an ActiveX Control In D ?
 
 Something along :
 class Component : IDispatch
 {
 }
 
 instead of :
 
 class Component : IUnknown
 {
 }
 
 and if so, how to build an AX control in D, guess as DLL + D runtime ???
 
 Thank's for enlighten me.
 björn
I wouldn't, certainly not merely out of curiosity. It's a mountain of work, and you have to implement lots of pretty obscure interfaces. If you really must do it, find a C++ example and translate it to D.
Jul 23 2009
next sibling parent reply Daniel Keep <daniel.keep.lists gmail.com> writes:
John C wrote:
 BLS Wrote:
 
 Hi,
 Sergey G. ask (by accident ;) ) about : How to create an ActiveX control 
 in D.
 Now, I am curious : Is it possible to create an ActiveX Control In D ?

 Something along :
 class Component : IDispatch
 {
 }

 instead of :

 class Component : IUnknown
 {
 }

 and if so, how to build an AX control in D, guess as DLL + D runtime ???

 Thank's for enlighten me.
 bj�rn
I wouldn't, certainly not merely out of curiosity. It's a mountain of work, and you have to implement lots of pretty obscure interfaces. If you really must do it, find a C++ example and translate it to D.
That or use VB6. I remember it being pretty much painless. :D
Jul 23 2009
parent BLS <windevguy hotmail.de> writes:
Daniel Keep wrote:
 
 John C wrote:
 BLS Wrote:

 Hi,
 Sergey G. ask (by accident ;) ) about : How to create an ActiveX control 
 in D.
 Now, I am curious : Is it possible to create an ActiveX Control In D ?

 Something along :
 class Component : IDispatch
 {
 }

 instead of :

 class Component : IUnknown
 {
 }

 and if so, how to build an AX control in D, guess as DLL + D runtime ???

 Thank's for enlighten me.
 bj�rn
I wouldn't, certainly not merely out of curiosity. It's a mountain of work, and you have to implement lots of pretty obscure interfaces. If you really must do it, find a C++ example and translate it to D.
That or use VB6. I remember it being pretty much painless. :D
,...and the result is only usable in VB. Thanks Daniel, but this response does not help too much :) Why aren't people using D ? VC offers an ActiveX wizard. Borland C++ dito. D -- well I/we am/are using D as secondary language (as 4GL add on language) That's why I have a certain interest in seeing D grow.
Jul 23 2009
prev sibling parent reply BLS <windevguy hotmail.de> writes:
John C wrote:
 BLS Wrote:
 
 Hi,
 Sergey G. ask (by accident ;) ) about : How to create an ActiveX control 
 in D.
 Now, I am curious : Is it possible to create an ActiveX Control In D ?

 Something along :
 class Component : IDispatch
 {
 }

 instead of :

 class Component : IUnknown
 {
 }

 and if so, how to build an AX control in D, guess as DLL + D runtime ???

 Thank's for enlighten me.
 björn
I wouldn't, certainly not merely out of curiosity. It's a mountain of work, and you have to implement lots of pretty obscure interfaces. If you really must do it, find a C++ example and translate it to D.
Thanks John, If YOU don't give it a chance... then everything is lost. another leak in D +
Jul 23 2009
parent John C <johnch_atms hotmail.com> writes:
BLS Wrote:

 John C wrote:
 BLS Wrote:
 
 Hi,
 Sergey G. ask (by accident ;) ) about : How to create an ActiveX control 
 in D.
 Now, I am curious : Is it possible to create an ActiveX Control In D ?

 Something along :
 class Component : IDispatch
 {
 }

 instead of :

 class Component : IUnknown
 {
 }

 and if so, how to build an AX control in D, guess as DLL + D runtime ???

 Thank's for enlighten me.
 björn
I wouldn't, certainly not merely out of curiosity. It's a mountain of work, and you have to implement lots of pretty obscure interfaces. If you really must do it, find a C++ example and translate it to D.
Thanks John, If YOU don't give it a chance... then everything is lost. another leak in D +
Well, I wouldn't go that far. It's just that some other languages have either much of the legwork for you (eg, MFC/ATL/VCL). But I don't think these belong in the D language or its standard library. It's relatively straightforward to create a COM server in a DLL and register a few classes with the system. Juno's (http://www.dsource.org/projects/juno) COM package shows how it can be done. If you want to do something useful like show a window have allow the user to interact with it, you need to implement IOleObject, IOleControl, IOleInPlaceActiveObject, and so on (http://msdn.microsoft.com/en-us/library/aa751972(VS.85).aspx). And maybe IDispatch. And you need a UI library. So if you're feeling bold... John.
Jul 24 2009