Click here to Skip to main content
15,914,016 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionAudio Device Enumeration Pin
~Jabeen~10-Feb-08 23:01
~Jabeen~10-Feb-08 23:01 
GeneralRe: Audio Device Enumeration Pin
Rajkumar R10-Feb-08 23:10
Rajkumar R10-Feb-08 23:10 
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 
Rajkumar R wrote:
restricted that ppv will point to interface that relates to riid


Yes it will, every interface relates to IUnknown, whatever riid is requested. That's the point, type safety comes through QueryInterface on the returned pointer which is always valid to call (except for NULL pointer) and must always return the correct result. i.e. if you call QueryInterface on the same interface you've already got it must succeed and give you a valid pointer. Thems the rules Smile | :)
Remember you're passing in the address of a void pointer which will be overwritten by the CoCreateInstance call with an IUnknown pointer. If the HRESULT returned is S_OK then you know *ppv is now of type IUnknown.

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

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 
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 

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.