Re: IDropSource and IDataObject Multiple Inheritance



COM does not support multiple inheritance for interfaces.
The whole idea of COM is based on vtable layout specific
to the single inhertiance in C++. Perhaps you meant that
your C++ implementation class derives from the two
interfaces? That is an implementation detail and irrelevant
as far as COM is concerned.

Threading issues are completely unrelated to the number of
interfaces implemented by a COM object. They depend on the
apartment model of the object and the apartment model of the
client that uses it. COM handles all that via the concept of
apartments (STA and MTA), which you should probably
read from a book - a newsgroup is not the place for that.
The threading issues one usually has to worry about are that
in an STA you have to be prepared for reentrancy any time
you make a COM call (e.g. another COM call may arrive
nested before your outgoing COM call has finished), while
in MTA you need to synchronize access to object data (e.g.
C++ class member variables) since multiple method calls may
be serviced by your object simultaneously. In your case since
this is OLE your object must be apartment-threaded (e.g. STA).

I cannot help you with your second question.

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@xxxxxxxx
MVP VC FAQ: http://vcfaq.mvps.org
=====================================

"alpana s dhole" <xyz@xxxxxxxxx> wrote in message
news:ad6f00803aa94a56a837f5a98148f30b@xxxxxxxxxxxxxx
Hi There

It will good help if you can resolve following issues I have come across
with MSDN/Microsoft write up on the same.

1) I inherit my interface from IDropSource and IDataObject together.
Multiple inheritance basically.
I needed to understand what threading issues can come due to the same.
One of this is invoked by ActiveXContainer and anothere by WindowsShell.
Considering all possibilities including Multi processor machine
configuration, I need to understand if this would fail in any scenario.
What
does Microsoft talk about this scenario.

2) When I do drag and drop operation using CF_HDROP on a file names
"setup.
exe" it fails on Windows 2000, but works on WindowsXP. Basically the file
does not get copied from Temporary folder to the DropTarget. Any technical
explaination for this behavior.

Thanks
Regards


.



Relevant Pages

  • Re: Java Feature Proposal
    ... > conflict. ... No, there is no naming conflict with Java interfaces, since they contain ... class to inherit multiple conflicting implementations of a method. ... I don't see why multiple inheritance of fields is any more of a problem ...
    (comp.lang.java.programmer)
  • Re: Java Feature Proposal
    ... implementation of interfaces. ... multiple inheritance of fields which was the only big problem of [poorly ... > classes can provide the same functionality as you're proposing. ... Yes abstract base classes could be used similarly except that you can't have ...
    (comp.lang.java.programmer)
  • Re: Former C++ Programmer Approaches Lisp
    ... >> multiple inheritance but this is as close as we can get. ... > I think this is an overly simplistic way to view interfaces. ... Interfaces compromise by not allowing state to ... interfaces can only contain abstract methods. ...
    (comp.lang.lisp)
  • Re: interface question
    ... IRoadVehicle and RoadVehicle are ... and is certainly a water vehicle. ... Interfaces and inheritance both represent ...
    (microsoft.public.dotnet.languages.csharp)

Loading