Calling a C++ Object from D

David Eagen spam_me_here at mailinator.com
Tue Jan 24 04:30:18 PST 2012


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
that in D. Information about the call is at
http://msdn.microsoft.com/en-us/library/aa386098(v=vs.85).aspx.

I have the C++ header and have successfully defined VARIANT_BOOL,
VARIANT_TRUE, and VARIANT_FALSE. The last bit to do is to define the
ISystemInterface object itself and the RebootRequired method. How do I do
that?

-Dave


More information about the Digitalmars-d-learn mailing list