Click here to Skip to main content
15,918,193 members
Home / Discussions / COM
   

COM

 
Generalaccessing IShellBrowser from CFileDialog Pin
zerwuff12-Aug-04 3:33
zerwuff12-Aug-04 3:33 
Generaladding a button to explorer toolbar Pin
rolati10-Aug-04 11:22
rolati10-Aug-04 11:22 
GeneralNon-exposed interfaces Pin
Antti Keskinen10-Aug-04 10:01
Antti Keskinen10-Aug-04 10:01 
GeneralRe: Non-exposed interfaces Pin
Milton Karimbekallil10-Aug-04 18:53
Milton Karimbekallil10-Aug-04 18:53 
GeneralRe: Non-exposed interfaces Pin
Antti Keskinen11-Aug-04 1:26
Antti Keskinen11-Aug-04 1:26 
GeneralRe: Non-exposed interfaces Pin
Milton Karimbekallil11-Aug-04 3:23
Milton Karimbekallil11-Aug-04 3:23 
GeneralRe: Non-exposed interfaces Pin
Antti Keskinen11-Aug-04 4:12
Antti Keskinen11-Aug-04 4:12 
GeneralRe: Non-exposed interfaces Pin
Antti Keskinen11-Aug-04 11:25
Antti Keskinen11-Aug-04 11:25 
Problem solved.

As the m_MsTscAx1 is derived from CWnd, it also has a method called CWnd::GetControlUnknown, which returns a pointer to the existing IUnknown interface of the object. This interface pointer can be used to query for other existing interfaces on the object. Even those interfaces that are marked as 'non-creatable' can be accessed in this way, because querying for the interfaces doesn't create new interface objects.

The pointer returned by GetControlUnknown must not be released, as that might terminate the object (all interfaces released). However, all interfaces queried from here on should be released in the normal way. The key issue here is that QueryInterface only casts the given IUnknown pointer to the target interfaces, while adding the reference count at the same time.

-Antti Keskinen

----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
GeneralRe: Non-exposed interfaces Pin
Milton Karimbekallil11-Aug-04 20:09
Milton Karimbekallil11-Aug-04 20:09 
GeneralOPC - implement the custom-DLL Pin
ro_bürgel9-Aug-04 23:45
ro_bürgel9-Aug-04 23:45 
GeneralHelp: DCOM and local system account Pin
Storm749-Aug-04 20:53
Storm749-Aug-04 20:53 
GeneralRe: Help: DCOM and local system account Pin
Milton Karimbekallil9-Aug-04 22:55
Milton Karimbekallil9-Aug-04 22:55 
GeneralRe: Help: DCOM and local system account Pin
Storm7410-Aug-04 2:58
Storm7410-Aug-04 2:58 
GeneralBeginng Active-X. Need help. Pin
lovehis9-Aug-04 20:47
lovehis9-Aug-04 20:47 
GeneralRe: Beginng Active-X. Need help. Pin
Milton Karimbekallil9-Aug-04 23:10
Milton Karimbekallil9-Aug-04 23:10 
GeneralRe: Beginng Active-X. Need help. Pin
rgondzur12-Aug-04 9:36
rgondzur12-Aug-04 9:36 
GeneralInstantiating another CoClass from a CoClass method in the same component Pin
G. Raven9-Aug-04 7:44
G. Raven9-Aug-04 7:44 
GeneralRe: Instantiating another CoClass from a CoClass method in the same component Pin
Milton Karimbekallil9-Aug-04 19:08
Milton Karimbekallil9-Aug-04 19:08 
GeneralRe: Instantiating another CoClass from a CoClass method in the same component Pin
G. Raven12-Aug-04 1:16
G. Raven12-Aug-04 1:16 
General.net 2003 compilation error! Pin
kunja_chan6-Aug-04 2:40
kunja_chan6-Aug-04 2:40 
GeneralRe: .net 2003 compilation error! Pin
darkbyte18-Aug-04 13:46
darkbyte18-Aug-04 13:46 
GeneralUse to convert a spezific File to a Bitmap Pin
codefire5-Aug-04 0:49
codefire5-Aug-04 0:49 
Generalquestion Pin
ursus zeta9-Aug-04 11:01
ursus zeta9-Aug-04 11:01 
GeneralQueryInterface in CCmdTarget class in MFC Pin
johnny,Kim3-Aug-04 15:09
johnny,Kim3-Aug-04 15:09 
QuestionHow To run DCOM Component with Multiple Users Pin
Sushil Suri3-Aug-04 1:09
Sushil Suri3-Aug-04 1:09 

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.