Guys, what is the difference between these 2 :
Quote:
CComPtr <IMediaControl> pConfig;
and
IMediaControl *pConfig;
Printable View
Guys, what is the difference between these 2 :
Quote:
CComPtr <IMediaControl> pConfig;
and
IMediaControl *pConfig;
CComPtr
A COM interface specifying the type of pointer to be stored
ATL uses this class and the CComQIPtr class to manage COM interface pointers. Both classes perform automatic reference counting through calls to AddRef and Release. Overloaded operators handle pointer operations. CComQIPtr additionally supports automatic querying of interfaces though QueryInterface.
template< class T >
class CComPtr
in case of
IMediaControl *pConfig;
pConFig is a Object of IMediaControl or pConfig is a pointer to a IMediaControl Type . and here you have to handle AddRef and Release everything manually.which is a inbuild functionality of smart Pointer.Like
CComPtr & CComQIPtr etc
Better if you read First SmartPointer Concept and then move ahead.it's good
sure .. thanks for the tips. humptydumpty
U always welcome
[ Moved Thread ]