More C++/CLI work on RAPI

by Codewiz51 July 09, 2008 07:23

I was able to work on my RAPI project last night after I finished mourning my old lawn mower's death. I made some small changes to the dccole2.h interface definitions to enable IDccManSink and IDccMan for use with msclr::com::ptr.

The header file uses old syntax and does not associate a GUID with an interface. This makes it hard to use with templates and macros that use __uuidof(c) syntax. By adding the GUID to the interface definition, no harm is done to existing code and we gain access to the interaces using modern templates. 

// Old definition: 
// DECLARE_INTERFACE_ (IDccManSink,  IUnknown) equivalent to:
interface __declspec(novtable) IDccManSink : public IUnknown
// Change to the new definition
interface __declspec(novtable, uuid("A7B88840-A812-11CF-8011-00A0C90A8F78")) IDccManSink : public IUnknown


I've written up my findings on my wiki. Having the GUID associated with the interface is a big help when dealing with CComPtr or msclr::com::ptr. I'll try to finish up a small article on the use of these interfaces, after I hunt down a new lawn mower tomorrow.

Comments are closed

Powered by BlogEngine.NET 1.6.0.0
Theme by Mads Kristensen | Modified by Mooglegiant

Disclaimer

This blog represents my personal hobby, observations and views. It does not represent the views of my employer, clients, especially my wife, children, in-laws, clergy, the dog, the cats or my daughter's horse. In fact, I am not even sure it represents my views when I take the time to reread postings.

© Copyright 2008-2011