Click here to Skip to main content
15,912,932 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: type safe issue Pin
CPallini11-Feb-08 5:11
mveCPallini11-Feb-08 5:11 
GeneralRe: type safe issue [modified] Pin
Matthew Faithfull11-Feb-08 3:28
Matthew Faithfull11-Feb-08 3:28 
GeneralRe: type safe issue [modified] Pin
Rajkumar R11-Feb-08 3:52
Rajkumar R11-Feb-08 3:52 
GeneralRe: type safe issue Pin
Matthew Faithfull11-Feb-08 4:29
Matthew Faithfull11-Feb-08 4:29 
GeneralRe: type safe issue [modified] Pin
Rajkumar R11-Feb-08 4:34
Rajkumar R11-Feb-08 4:34 
GeneralRe: type safe issue Pin
Matthew Faithfull11-Feb-08 4:54
Matthew Faithfull11-Feb-08 4:54 
GeneralRe: type safe issue Pin
Rajkumar R11-Feb-08 5:04
Rajkumar R11-Feb-08 5:04 
GeneralRe: type safe issue Pin
Matthew Faithfull11-Feb-08 5:20
Matthew Faithfull11-Feb-08 5:20 
Rajkumar R wrote:
Whenever sombody using base class pointer to get a derived class one they need to use type safe dynamic_cast operator


Except in COM where this is the wrong way and QueryInterface is the right way.

Rajkumar R wrote:
And in COM, the use of __uuidof() keyword reduce the possibility of mismatch UUID and a interface type. And again wrapper classes CComPtr, ... helps more in reducing programming mistakes although syntactically correct.


Agreed. There's no problem with using wrapper classes and C++ mechanics to make it easier to write correct code but when COM is involved COM rules have to override normal C++ practice. It's what makes COM tricky but it's also what allows it to reach beyond C++ and has made it vital to all kinds of interoperation in the .NET Windows world and beyond.
As my DevelopMentor T shirt says, COM is Love Big Grin | :-D

Nothing is exactly what it seems but everything with seems can be unpicked.

GeneralRe: type safe issue Pin
Rajkumar R11-Feb-08 5:25
Rajkumar R11-Feb-08 5:25 
GeneralRe: type safe issue Pin
led mike11-Feb-08 4:46
led mike11-Feb-08 4:46 
GeneralRe: type safe issue Pin
Matthew Faithfull11-Feb-08 4:58
Matthew Faithfull11-Feb-08 4:58 
GeneralRe: type safe issue Pin
Rajkumar R11-Feb-08 5:18
Rajkumar R11-Feb-08 5:18 
QuestionRe: type safe issue Pin
CPallini11-Feb-08 5:26
mveCPallini11-Feb-08 5:26 
GeneralRe: type safe issue Pin
Rajkumar R11-Feb-08 5:30
Rajkumar R11-Feb-08 5:30 
GeneralRe: type safe issue Pin
CPallini11-Feb-08 5:35
mveCPallini11-Feb-08 5:35 
GeneralRe: type safe issue Pin
Rajkumar R11-Feb-08 5:42
Rajkumar R11-Feb-08 5:42 
GeneralRe: type safe issue Pin
CPallini11-Feb-08 10:39
mveCPallini11-Feb-08 10:39 
GeneralRe: type safe issue Pin
Rajkumar R11-Feb-08 16:18
Rajkumar R11-Feb-08 16:18 
GeneralRe: type safe issue Pin
Matthew Faithfull11-Feb-08 6:04
Matthew Faithfull11-Feb-08 6:04 
GeneralRe: type safe issue Pin
Rajkumar R11-Feb-08 16:29
Rajkumar R11-Feb-08 16:29 
GeneralRe: type safe issue Pin
George_George12-Feb-08 2:21
George_George12-Feb-08 2:21 
GeneralRe: type safe issue Pin
Rajkumar R12-Feb-08 2:44
Rajkumar R12-Feb-08 2:44 
GeneralRe: type safe issue Pin
George_George12-Feb-08 2:57
George_George12-Feb-08 2:57 
GeneralRe: type safe issue Pin
Matthew Faithfull12-Feb-08 2:27
Matthew Faithfull12-Feb-08 2:27 
GeneralRe: type safe issue Pin
Rajkumar R12-Feb-08 2:43
Rajkumar R12-Feb-08 2:43 

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.