Re: Calling a C++ Object from D

2012-01-25 Thread David Eagen
On Tue, 24 Jan 2012 07:22:46 -0600, Richard Webb wrote: How about something like this (using Juno): /// import juno.com.core, std.stdio; abstract final class SystemInformation { mixin(uuid("C01B9BA0-BEA7-41BA-B604-D0A36F469133")); mixin Interfaces!(ISystemInformation

Re: Calling a C++ Object from D

2012-01-24 Thread Richard Webb
How about something like this (using Juno): /// import juno.com.core, std.stdio; abstract final class SystemInformation { mixin(uuid("C01B9BA0-BEA7-41BA-B604-D0A36F469133")); mixin Interfaces!(ISystemInformation); } interface ISystemInformation : IDispatch { mixin(uuid(

Re: Calling a C++ Object from D

2012-01-24 Thread Richard Webb
I've never used the Windows update API, but isn't it a COM interface rather than a C++ interface? You can call those directly from D.

Re: Calling a C++ Object from D

2012-01-24 Thread Zachary Lund
On Tuesday, 24 January 2012 at 12:30:26 UTC, David Eagen wrote: I'm trying to understand how to call a C++ library from D. Specifically, the Windows Update API. My goal is rather simple in that I want to detect whether there is a reboot pending for the system. To do that I need to call the IS

Re: Calling a C++ Object from D

2012-01-24 Thread Dejan Lekic
Unfortunately, you cant use C++ namespaces. More about interfacing to C++ here: http://www.dlang.org/cpp_interface.html . The easiest way to solve this is to write a C function that will glue your code with the C++ library.

Calling a C++ Object from D

2012-01-24 Thread David Eagen
I'm trying to understand how to call a C++ library from D. Specifically, the Windows Update API. My goal is rather simple in that I want to detect whether there is a reboot pending for the system. To do that I need to call the ISystemInformation::RebootRequired property but I don't know how to do