1
votes

Tomorrow I have planed to do some IDispatch related work, and I will have to create a class that supports this interface.

I have been using ATL classes for a while to create COM objects and manage COM pointers, so I would like to use them for my class as well. But research so far, and discussions with colleagues have led me to believe that I need all the heavyweight IDL stuff even if I want to create a simple class with one property or method.

If that's the case I'll probably resort to writing everything from scratch, but I still hope I'm missing something. Is there a template I've missed?

1
There's IDispatchImpl. I don't know how much it helps, though. - Marcelo Cantos
It needs those IIDs and LIBIDs, which I don't need or want for the task. But thanks. - Coder
You always need to use an IID for every interface, but you do not have to specify a LIBID if you do not need it. IDispatchImpl will use a default internally. - Remy Lebeau
What if you're just passing IDispatch to another server for callback purposes? It would take pointer, call get IDs of names, or just plainly call method0 for example? - Coder

1 Answers

1
votes

ATL has an IDispatchImpl class.