Click here to Skip to main content
15,913,055 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
JokeRe: how to run dll using Rundll32.exe Pin
ThatsAlok6-Apr-08 22:47
ThatsAlok6-Apr-08 22:47 
Generalcheck how much bytes are transsferred from port 21 Pin
chetanjoshi96-Apr-08 20:01
chetanjoshi96-Apr-08 20:01 
Generalcalculate how much bytes transfferd by putfile() function Pin
chetanjoshi96-Apr-08 19:59
chetanjoshi96-Apr-08 19:59 
GeneralRe: calculate how much bytes transfferd by putfile() function Pin
ThatsAlok6-Apr-08 22:54
ThatsAlok6-Apr-08 22:54 
GeneralCheck Internet speed Pin
chetanjoshi96-Apr-08 19:58
chetanjoshi96-Apr-08 19:58 
GeneralRe: Check Internet speed Pin
ThatsAlok6-Apr-08 22:50
ThatsAlok6-Apr-08 22:50 
GeneralCComMultiThreadModelNoCS Pin
George_George6-Apr-08 19:53
George_George6-Apr-08 19:53 
QuestionATL bug of CComPtr? Pin
George_George6-Apr-08 19:42
George_George6-Apr-08 19:42 
Hello everyone,


In the ATL Internals book, one form of constructor of CComQIPtr is implemented as this,

CComQIPtr (IUnknown* lp)
{
    p = NULL; if (lp != NULL) lp -> QueryInterface (*piid, (void**)&p);
}


I think there is a bug when QueryInterface fails, and the original value of member variable p is overwritten.

I found the in MSVC 2008, the implementation is,

atlcomcli.h

	CComQIPtr(_In_opt_ IUnknown* lp) throw()
	{
		if (lp != NULL)
			lp->QueryInterface(*piid, (void **)&p);
	}


Seems the bug is fixed? Is it a bug in old version of ATL or a bug in the book? Smile | :)


thanks in advance,
George
AnswerRe: ATL bug of CComPtr? Pin
CPallini6-Apr-08 22:14
mveCPallini6-Apr-08 22:14 
GeneralRe: ATL bug of CComPtr? Pin
George_George6-Apr-08 22:26
George_George6-Apr-08 22:26 
GeneralRe: ATL bug of CComPtr? Pin
CPallini6-Apr-08 23:09
mveCPallini6-Apr-08 23:09 
GeneralRe: ATL bug of CComPtr? Pin
George_George6-Apr-08 23:12
George_George6-Apr-08 23:12 
QuestionProblem with Binary Tree Program [modified] Pin
Member 42588976-Apr-08 17:58
Member 42588976-Apr-08 17:58 
GeneralRe: Problem with Binary Tree Program Pin
Member 42588978-Apr-08 16:32
Member 42588978-Apr-08 16:32 
Questionhow to spy++ a windows which will hide when it lose focus? Pin
code_discuss6-Apr-08 17:24
code_discuss6-Apr-08 17:24 
GeneralRe: how to spy++ a windows which will hide when it lose focus? Pin
CPallini6-Apr-08 21:35
mveCPallini6-Apr-08 21:35 
GeneralRe: how to spy++ a windows which will hide when it lose focus? Pin
code_discuss6-Apr-08 21:55
code_discuss6-Apr-08 21:55 
GeneralCStdioFile problem Pin
lisoft6-Apr-08 16:24
lisoft6-Apr-08 16:24 
GeneralRe: CStdioFile problem Pin
nisha000006-Apr-08 18:11
nisha000006-Apr-08 18:11 
GeneralRe: CStdioFile problem Pin
lisoft6-Apr-08 18:47
lisoft6-Apr-08 18:47 
GeneralRe: CStdioFile problem Pin
nisha000006-Apr-08 19:40
nisha000006-Apr-08 19:40 
GeneralRe: CStdioFile problem Pin
krmed7-Apr-08 1:50
krmed7-Apr-08 1:50 
GeneralRe: CStdioFile problem Pin
lisoft7-Apr-08 15:18
lisoft7-Apr-08 15:18 
GeneralRe: CStdioFile problem Pin
krmed8-Apr-08 0:47
krmed8-Apr-08 0:47 
GeneralRe: CStdioFile problem Pin
Hamid_RT8-Apr-08 7:21
Hamid_RT8-Apr-08 7:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.