www.digitalmars.com         C & C++   DMDScript  

D - COM - C/C++ header file conversion examples?

reply Nigel Sandever <nigelsandever btconnect.com> writes:
Hi,

I'm just starting to try and convert the ms header files for several COM
objects 
for use with D and it's a rather daunting task. 

I've read the "C .h to D modules" guidlines which are great as far as they go, 
but if anyone has an example of doing this for one of the smaller (are any of 
them?) standard COm objects that they could share, it would make life simpler.

I'm currently working on ExDisp.h and I will post my results somewhere if this 
would be of interest to others...once I've got it working.

Thanks, njs.
Apr 06 2004
parent reply C <dont respond.com> writes:
Hi nigel,

JCC has a tutorial using COM =

http://www.dsource.org/tutorials/index.php?show_example=3D31.

And Y.Tomino has translated some COM headers found here =

http://hp.vector.co.jp/authors/VA028375/d/windows.h.html

I haven't read or used either of these but in light of the recent =

interface Ill read over them now.

Still it might be good to learn doing it yourself, not trying to put you=
 =

off :).

C

On Wed, 07 Apr 2004 05:42:44 GMT, Nigel Sandever =

<nigelsandever btconnect.com> wrote:

 Hi,

 I'm just starting to try and convert the ms header files for several C=
OM =
 objects
 for use with D and it's a rather daunting task.

 I've read the "C .h to D modules" guidlines which are great as far as =
 they go,
 but if anyone has an example of doing this for one of the smaller (are=
=
 any of
 them?) standard COm objects that they could share, it would make life =
 simpler.

 I'm currently working on ExDisp.h and I will post my results somewhere=
=
 if this
 would be of interest to others...once I've got it working.

 Thanks, njs.
-- = D Newsgroup.
Apr 07 2004
parent reply Nigel Sandever <nigelsandever btconnect.com> writes:
On Wed, 07 Apr 2004 08:51:33 -0700, C <dont respond.com> wrote:

 Hi nigel,
 
 JCC has a tutorial using COM =
 
 http://www.dsource.org/tutorials/index.php?show_example=3D31.
 
Yep. I seen this one. That's pretty much the motivation for starting this.
 And Y.Tomino has translated some COM headers found here =
 
 http://hp.vector.co.jp/authors/VA028375/d/windows.h.html
 
Perfect. Thanks for the link and special thanks to Y.Tomino and one_mad_alien if they're reading.
 I haven't read or used either of these but in light of the recent =
 
 interface Ill read over them now.
 
 Still it might be good to learn doing it yourself, not trying to put you=
  =
 
 off :).
 
I'm not easily put off. However, having tried to use dmc to preprocess ExDisp.h, it bottled out with errors having produced 2.5 MB of output, none of which appeared to contain the crux of ExDisp.h, I then switched to using CL /EP which completed but resulted in a file of 1.9 MB/60000+ lines (after trimming comments and blank lines). I was looking for a before'n'after example to get me started on what to throw away. Finding that ExDisp.h has already be converted, albeit with the event callback stuff missing, is a considerable bonus. The one downside of the name D, is that it makes searching for related materials kinda hard. Thanks again.
 C
 
 On Wed, 07 Apr 2004 05:42:44 GMT, Nigel Sandever =
 
 <nigelsandever btconnect.com> wrote:
 
 Hi,

 I'm just starting to try and convert the ms header files for several C=
OM =
 objects
 for use with D and it's a rather daunting task.

 I've read the "C .h to D modules" guidlines which are great as far as =
 they go,
 but if anyone has an example of doing this for one of the smaller (are=
=
 any of
 them?) standard COm objects that they could share, it would make life =
 simpler.

 I'm currently working on ExDisp.h and I will post my results somewhere=
=
 if this
 would be of interest to others...once I've got it working.

 Thanks, njs.
-- = D Newsgroup.
Apr 07 2004
next sibling parent reply J Anderson <REMOVEanderson badmama.com.au> writes:
Nigel Sandever wrote:

The one downside of the name D, is that it makes searching for related
materials 
kinda hard.
  
Just put the keywords "Digital Mars" in your search.
Thanks again.
  
-- -Anderson: http://badmama.com.au/~anderson/
Apr 07 2004
parent Nigel Sandever <nigelsandever btconnect.com> writes:
On Thu, 08 Apr 2004 00:12:14 +0800, J Anderson <REMOVEanderson badmama.com.au> 
wrote:
 Nigel Sandever wrote:
 
The one downside of the name D, is that it makes searching for related 
materials
kinda hard.
  
Just put the keywords "Digital Mars" in your search.
I do, and it works for many good pages, but I have also come across or been pointed at several pages with good information and bits of code were the authors have omitted any mention of Digital Mars. A saving grace is that almost all have a link to "digitalmars.com" which makes a reasonably selective search term.
Thanks again.
  
-- -Anderson: http://badmama.com.au/~anderson/
Apr 07 2004
prev sibling parent J C Calvarese <jcc7 cox.net> writes:
Nigel Sandever wrote:
 On Wed, 07 Apr 2004 08:51:33 -0700, C <dont respond.com> wrote:
 
 
Hi nigel,
JCC has a tutorial using COM =
http://www.dsource.org/tutorials/index.php?show_example=3D31.
Yep. I seen this one. That's pretty much the motivation for starting this.
Because it was too simple or too hard? (Or did it just whet your appetite?)
 
 
And Y.Tomino has translated some COM headers found here =
http://hp.vector.co.jp/authors/VA028375/d/windows.h.html
Perfect. Thanks for the link and special thanks to Y.Tomino and one_mad_alien if they're reading.
I haven't studied Y.Tomino's COM stuff, but I tried out his other Win32 headers and they're great. I've worked some with one_mad_alien's COM stuff and it's great, too. I managed to adapt one_mad_alien's COM to work with Y.Tomino Win32 headers, but something stopped working with DMD 0.82 (or earlier). Oops. I can probably fix it, but it looks tricky.
I haven't read or used either of these but in light of the recent =
interface Ill read over them now.
Still it might be good to learn doing it yourself, not trying to put you=
off :).
I'm not easily put off. However, having tried to use dmc to preprocess ExDisp.h, it bottled out with errors having produced 2.5 MB of output, none of which appeared to contain the crux of ExDisp.h, I then switched to using CL /EP which completed but resulted in a file of 1.9 MB/60000+ lines (after trimming comments and blank lines). I was looking for a before'n'after example to get me started on what to throw away. Finding that ExDisp.h has already be converted, albeit with the event callback stuff missing, is a considerable bonus. The one downside of the name D, is that it makes searching for related materials kinda hard.
You could try searching for "D Programming Language". Also, you could try the links on these pages: http://jcc_7.tripod.com/d/links.html http://www.wikiservice.at/d/wiki.cgi?MoreLinks http://dmoz.org/Computers/Programming/Languages/D/ http://directory.google.com/Top/Computers/Programming/Languages/D/ http://www.digitalmars.com/d/dlinks.html [...] -- Justin http://jcc_7.tripod.com/d/
Apr 07 2004