www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: Creating ActiveX in D

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


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 built-in language support for ActiveX (VB, C#, Delphi) or libraries that do 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