Re: IDropSource and IDataObject Multiple Inheritance
- From: "Alexander Nickolov" <agnickolov@xxxxxxxx>
- Date: Tue, 12 Jun 2007 10:01:38 -0700
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
.
- References:
- IDropSource and IDataObject Multiple Inheritance
- From: alpana s dhole
- IDropSource and IDataObject Multiple Inheritance
- Prev by Date: IDropSource and IDataObject Multiple Inheritance
- Next by Date: IDropSource and IdataObject Multiple inheritance
- Previous by thread: IDropSource and IDataObject Multiple Inheritance
- Next by thread: IDropSource and IdataObject Multiple inheritance
- Index(es):
Relevant Pages
|
Loading