Need help converting basic COM program from C++ to D

Chris Burt-Brown brokenbeta+newsgroups at gmail.com
Tue Aug 19 16:08:25 PDT 2008


Sönke Ludwig Wrote:

> Chris Burt-Brown wrote:
> > Hi, this my first post and I'm a little lost so please excuse my missteps.
> > 
> > I am trying to implement this basic little program:
> > 
> > http://msdn.microsoft.com/en-us/library/ms783787(VS.85).aspx
> > 
> > This is a DirectShow "hello world" and I have been looking around for anyone 
> > who has actually connected to DirectShow through D, but it doesn't appear to 
> > have been done. I'm sure that I can cope with a more complex example if I 
> > can get the basics down.
> > 
> > I've searched around and found various other cries for help relating for 
> > COM; they have only served to confuse me further :( and the section on COM 
> > on the Digital Mars website is ... erm, disappointingly brief.
> > 
> > I know that this one's a tricky one. Even the slightest nod in a direction 
> > will be appreciated.
> > Thank you very much.
> > 
> > Chris 
> > 
> > 
> 
> I have tried to get DirectShow to work using D some time ago and created a 
> header file which basically seems to work (offscreen frame grabber tested). Some 
> prototypes are taken from the bindings project. However, if I remember right, 
> all 'LONG' (32-bit) parameters were incorrectly ported as 'long' (64-bit) - so 
> that had to be corrected.
> 
> The only problem which remains is a crash with an enabled GC in my test app. I 
> haven't had the time to debug this but it shouldn't be related to the header files.
> 
> I'll attach the header files as is and could also post the DShow part of the 
> test application if needed.
> 

Oh, that's excellent! Thank you!

I knew somebody on this crazy world had to have got there before me :-)

I am now listening to a music file through D and the prospect of making this app has just got a lot more inviting. Thanks!



More information about the Digitalmars-d mailing list