-
September 14th, 2005, 12:31 AM
#1
CComPtr and without? what is the ..
Guys, what is the difference between these 2 :
CComPtr <IMediaControl> pConfig;
and
IMediaControl *pConfig;
-
September 14th, 2005, 01:14 AM
#2
Re: CComPtr and without? what is the ..
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
-
September 14th, 2005, 03:08 AM
#3
Re: CComPtr and without? what is the ..
sure .. thanks for the tips. humptydumpty
-
September 14th, 2005, 03:42 AM
#4
Re: CComPtr and without? what is the ..
-
September 14th, 2005, 04:17 AM
#5
Re: CComPtr and without? what is the ..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|