Click here to Skip to main content
15,888,113 members
Home / Discussions / COM
   

COM

 
Questionquestion about COM event handler Pin
asr112214-Feb-11 3:40
asr112214-Feb-11 3:40 
QuestionHow to get COM IID from a registered dll Pin
drakkor_111-Feb-11 13:22
drakkor_111-Feb-11 13:22 
AnswerRe: How to get COM IID from a registered dll Pin
drakkor_111-Feb-11 13:33
drakkor_111-Feb-11 13:33 
GeneralRe: How to get COM IID from a registered dll Pin
NedoRot14-Feb-11 2:32
NedoRot14-Feb-11 2:32 
QuestionIObjectWithSite - amidoinitrite? Pin
T800G2-Feb-11 10:53
T800G2-Feb-11 10:53 
QuestionPlz help with QueryInterface() [modified] Pin
Ganesamoorthy.S26-Jan-11 22:59
Ganesamoorthy.S26-Jan-11 22:59 
AnswerRe: Plz help with QueryInterface() Pin
Yusuf27-Jan-11 1:02
Yusuf27-Jan-11 1:02 
QuestionCComContainedObject Question Pin
Craig Longman23-Jan-11 12:36
Craig Longman23-Jan-11 12:36 
I have a plugin that I'm developing that is used in a COM environment. The issue is, I seem to be able to readily obtain an pointer to a base class of my class, but I'm unable to figure out how to get a pointer to my main class.

Here is my class:
class ATL_NO_VTABLE Plugin : 
	public CDXBaseNTo1,
	public CComCoClass< Plugin, &CLSID_Plugin >,
	public IDispatchImpl< IPlugin, &IID_IPlugin, &LIBID_MAINLib >,
#if(_ATL_VER < 0x0300)
  public CComPropertySupport< Plugin >,
#endif
  public IObjectSafetyImpl2< Plugin >,
  public IPersistStorageImpl< Plugin >,
  public ISpecifyPropertyPagesImpl< Plugin >,
  public IPersistPropertyBagImpl< Plugin >,
  public CSFVideoPlugin< PLUGINPROPS >


The CSFVideoPlugin is derived from the ISfExchangeProps< PLUGINPROPS > interface.

Then, in another are of the plugin environment, the Property Page to configure it, I can do the following:
CComQIPtr< ISfExchangeProps< PLUGINPROPS >, &IID_ISfExchangeProps >
  pxPlugin( m_ppUnk[ 0 ] );


This part all works fine, and calls into the pxPlugin work fine. When inside a method call there, the debugger shows [ATL::CComContainedObject<Plugin>] as the first "member" of this, so the relationship is known, or so it would seem. But calls like this return a completely bogus pointer:
CComQIPtr< Plugin, &IID_IPlugin >
  pxPlugin( m_ppUnk[ 0 ] );

The memory is in the same basic area, but the values are all messed up, and in fact setting them on occasion can/will crashes.
I can't figure out how to query for that CComContainedObject interface. Given that even the debugger has enough information to track it down though, clearly it must be.
Any help would be greatly appreciated. If I haven't provided a piece of information that would be useful, please let me know.

Thanks, CraigL
QuestionProblem in registering a 32 bit C++ COM/ATL Service on Windows7 64 bit Pin
Aseem Sharma22-Dec-10 15:01
Aseem Sharma22-Dec-10 15:01 
AnswerRe: Problem in registering a 32 bit C++ COM/ATL Service on Windows7 64 bit Pin
ShilpiP22-Dec-10 21:38
ShilpiP22-Dec-10 21:38 
QuestionDifference between COM and DCOM Pin
tasumisra28-Nov-10 15:39
tasumisra28-Nov-10 15:39 
AnswerRe: Difference between COM and DCOM Pin
«_Superman_»29-Nov-10 8:20
professional«_Superman_»29-Nov-10 8:20 
AnswerRe: Difference between COM and DCOM Pin
Abhinav S16-Jan-11 3:11
Abhinav S16-Jan-11 3:11 
AnswerRe: Difference between COM and DCOM Pin
Shameel17-Aug-11 2:34
professionalShameel17-Aug-11 2:34 
Questionproblem with SafeArrayPutElement Pin
Member 444090525-Nov-10 17:22
Member 444090525-Nov-10 17:22 
AnswerRe: problem with SafeArrayPutElement Pin
T21021-Jan-11 1:49
T21021-Jan-11 1:49 
QuestionHow can I filter unwanted unwanted types(not in my code) from DIA SDK? Pin
glitteringsound13-Nov-10 3:52
glitteringsound13-Nov-10 3:52 
AnswerRe: How can I filter unwanted unwanted types(not in my code) from DIA SDK? Pin
Richard MacCutchan13-Nov-10 7:06
mveRichard MacCutchan13-Nov-10 7:06 
GeneralRe: How can I filter unwanted unwanted types(not in my code) from DIA SDK? Pin
glitteringsound13-Nov-10 9:51
glitteringsound13-Nov-10 9:51 
GeneralRe: How can I filter unwanted unwanted types(not in my code) from DIA SDK? Pin
Richard MacCutchan14-Nov-10 1:45
mveRichard MacCutchan14-Nov-10 1:45 
GeneralRe: How can I filter unwanted unwanted types(not in my code) from DIA SDK? Pin
glitteringsound14-Nov-10 3:52
glitteringsound14-Nov-10 3:52 
GeneralRe: How can I filter unwanted unwanted types(not in my code) from DIA SDK? Pin
Richard MacCutchan14-Nov-10 4:23
mveRichard MacCutchan14-Nov-10 4:23 
QuestionCan we calculate/extract Virtual Table address some how from DIA SDK? Pin
glitteringsound4-Nov-10 12:30
glitteringsound4-Nov-10 12:30 
AnswerRe: Can we calculate/extract Virtual Table address some how from DIA SDK? Pin
Richard MacCutchan4-Nov-10 23:34
mveRichard MacCutchan4-Nov-10 23:34 
GeneralRe: Can we calculate/extract Virtual Table address some how from DIA SDK? Pin
glitteringsound5-Nov-10 0:12
glitteringsound5-Nov-10 0:12 

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.