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

Sönke Ludwig ludwig at informatik_dot_uni-luebeck.de
Mon Aug 18 11:24:51 PDT 2008


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dshow.zip
Type: application/zip
Size: 22693 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20080818/467d6d00/attachment.zip>


More information about the Digitalmars-d mailing list