Click here to Skip to main content
15,902,198 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Audio Device Enumeration [modified] Pin
Rajkumar R10-Feb-08 23:19
Rajkumar R10-Feb-08 23:19 
Generaltype safe issue Pin
George_George10-Feb-08 22:47
George_George10-Feb-08 22:47 
GeneralRe: type safe issue [modified] Pin
Rajkumar R11-Feb-08 0:06
Rajkumar R11-Feb-08 0:06 
GeneralRe: type safe issue Pin
Matthew Faithfull11-Feb-08 0:10
Matthew Faithfull11-Feb-08 0:10 
GeneralRe: type safe issue Pin
Rajkumar R11-Feb-08 0:39
Rajkumar R11-Feb-08 0:39 
GeneralRe: type safe issue Pin
Matthew Faithfull11-Feb-08 0:59
Matthew Faithfull11-Feb-08 0:59 
GeneralRe: type safe issue [modified] Pin
Rajkumar R11-Feb-08 1:33
Rajkumar R11-Feb-08 1:33 
GeneralRe: type safe issue Pin
Matthew Faithfull11-Feb-08 2:53
Matthew Faithfull11-Feb-08 2:53 
I understand void pointers and the concept of type safety but it is not a problem in this case as long as the server obeys the rules of COM it cannot cause a well written client a problem. The traditional problem with returning a void* ( you can't be sure what it really points to ) is removed because it always points to IUnknown.
The only way the client can screw things up is to pass the address of something that sould not be overwritten in the ppv parameter and that would be plain stupid and no fault of the server or the function spec of CoCreateInstance. Your example may be incorrect sematically but it will compile and work there is no type safety issue.

Consider typeof (&(int*)) == typeof(&(SComeInterface)). Or in English, an address is and address is an address as long as we all agree we're talking 32bit addresses. Smile | :)

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

GeneralRe: type safe issue Pin
Rajkumar R11-Feb-08 3:17
Rajkumar R11-Feb-08 3:17 
GeneralRe: type safe issue Pin
CPallini11-Feb-08 3:20
mveCPallini11-Feb-08 3:20 
GeneralRe: type safe issue Pin
Rajkumar R11-Feb-08 3:26
Rajkumar R11-Feb-08 3:26 
GeneralRe: type safe issue Pin
CPallini11-Feb-08 3:41
mveCPallini11-Feb-08 3:41 
GeneralRe: type safe issue Pin
Rajkumar R11-Feb-08 3:54
Rajkumar R11-Feb-08 3:54 
QuestionRe: type safe issue Pin
CPallini11-Feb-08 4:10
mveCPallini11-Feb-08 4:10 
GeneralRe: type safe issue Pin
Rajkumar R11-Feb-08 4:12
Rajkumar R11-Feb-08 4:12 
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 
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 

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.