Click here to Skip to main content
15,921,577 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
Questionhelp: why a ATL control created in VC can not work well in vb? Pin
ictory18-May-05 3:29
ictory18-May-05 3:29 
AnswerRe: help: why a ATL control created in VC can not work well in vb? Pin
Jörgen Sigvardsson18-May-05 12:14
Jörgen Sigvardsson18-May-05 12:14 
Generalsimple c++ question Pin
Timothy_198217-May-05 0:53
Timothy_198217-May-05 0:53 
GeneralRe: simple c++ question Pin
James R. Twine17-May-05 1:23
James R. Twine17-May-05 1:23 
GeneralRe: simple c++ question Pin
Timothy_198217-May-05 1:27
Timothy_198217-May-05 1:27 
GeneralRe: simple c++ question Pin
James R. Twine17-May-05 3:31
James R. Twine17-May-05 3:31 
GeneralRe: simple c++ question Pin
[tlg]1-Jun-05 14:29
[tlg]1-Jun-05 14:29 
GeneralImplementing and exposing multiple Event interfaces in ATL. Pin
James R. Twine16-May-05 7:47
James R. Twine16-May-05 7:47 
[ATL, VC++ 6.0 SP6]

   Hello to all.  I am working on an ATL COM project that needs to interface with a 3rd party application.  This application uses IDispatch interfaces with CP-based event interfaces that go along with them (shudder Smile | :) ).

   I have the following problem.  I have an object that uses two interfaces, and implements two more as well as the connection-point-based event interface.  Problem is, I now need to add another event interface sink to the object.  After adding it, I am unable to call DispEventAdvise because the compiler cannot resolve the ambiguity between Event interface and the other.

   I have tried various means of qualifying the function call, including using the expanded form of one version of the IDispEventImpl-derived class, but I cannot get any of them to work.  If anyone has any idea how to resolve this, I would love to hear about it.

   The def of the object's class is as follows (some identifiers renamed):

class ATL_NO_VTABLE CxxxxMWare : <br />
	public CComObjectRootEx< CComSingleThreadModel>,<br />
	public CComCoClass< CxxxxMWare, &CLSID_xxxxMWare>,<br />
	public IDispEventImpl< 1, CxxxxMWare, &DIID_EAxxxxxxxx, &LIBID_xxxxLib, 1, 0 >,<br />
// --	public IDispEventImpl< 2, CxxxxMWare, &DIID_ECxxxxCxxxx, &LIBID_xxxxLib, 1, 0 >,<br />
	public IDispatchImpl<IxxxxMWare, &IID_IxxxxMWare, &LIBID_xxxxMIDDLEWARELib>,<br />
	public IDispatchImpl<IxxxxMiddleWare, &IID_IxxxxMiddleWare, &LIBID_xxxxSERVERLib>,<br />
	public IDispatchImpl<IMxxxxxxxxAPICB, &IID_IxxxxxxxxAPICB, &LIBID_xxxxSERVERLib><br />
//<br />
// ... Event functions and other members removed...<br />
//<br />
BEGIN_SINK_MAP(CxxxxMWare)<br />
  SINK_ENTRY_EX(1, DIID_EAxxxxxxxx, 0x01, BxxxxSxxxx)<br />
  SINK_ENTRY_EX(1, DIID_EAxxxxxxxx, 0x02, AxxxxSxxxx)<br />
  SINK_ENTRY_EX(1, DIID_EAxxxxxxxx, 0x03, WxxxxCxxxx)<br />
  SINK_ENTRY_EX(1, DIID_EAxxxxxxxx, 0x04, Dxxxx)<br />
  SINK_ENTRY_EX(1, DIID_EAxxxxxxxx, 0x05, AxxxxCxxxx)<br />
  SINK_ENTRY_EX(1, DIID_EAxxxxxxxx, 0x06, OxxxxAxxxx)<br />
  SINK_ENTRY_EX(1, DIID_EAxxxxxxxx, 0x07, Mxxxx)<br />
  SINK_ENTRY_EX(1, DIID_EAxxxxxxxx, 0x08, Cxxxx)<br />
  SINK_ENTRY_EX(1, DIID_EAxxxxxxxx, 0x09, Dxxxx)<br />
<br />
//SINK_ENTRY_EX(2, DIID_ECxxxxCxxxx, 0x01, CxxxxExxxx)<br />
END_SINK_MAP()<br />

   The class/object, as written, works correctly.  I need to receive events from the DIID_ECxxxxCxxxx interface, and when the commented lines are uncommented, calls to DispEventAdvise from within the class' code become ambigious - the compiler cannot resolve between they two IDispEventImpl classes.

   Any thoughts?  I would perfer not to have to create a separate class for this Event interface, but that is what I will do if I cannot resolve this within the next day or so...

   AdvaThanksnce!

   Peace!

-=- James
If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
DeleteFXPFiles & CheckFavorites
(Please rate this post!)
GeneralRe: Implementing and exposing multiple Event interfaces in ATL. Pin
Stuart Dootson16-May-05 20:54
professionalStuart Dootson16-May-05 20:54 
GeneralRe: Implementing and exposing multiple Event interfaces in ATL. Pin
James R. Twine17-May-05 1:00
James R. Twine17-May-05 1:00 
GeneralRe: Implementing and exposing multiple Event interfaces in ATL. Pin
Stuart Dootson17-May-05 1:37
professionalStuart Dootson17-May-05 1:37 
GeneralRe: Implementing and exposing multiple Event interfaces in ATL. Pin
James R. Twine17-May-05 3:35
James R. Twine17-May-05 3:35 
GeneralATL Addin Pin
Raj72315-May-05 10:44
Raj72315-May-05 10:44 
GeneralIncreasing height and width of the ActiveX Control Pin
ajalilqarshi12-May-05 19:54
ajalilqarshi12-May-05 19:54 
GeneralRe: Increasing height and width of the ActiveX Control Pin
ajalilqarshi18-May-05 19:38
ajalilqarshi18-May-05 19:38 
GeneralAdding WTL to an MFC project Pin
rajas12-May-05 18:38
rajas12-May-05 18:38 
GeneralRe: Adding WTL to an MFC project Pin
Michael Dunn13-May-05 12:22
sitebuilderMichael Dunn13-May-05 12:22 
GeneralRe: Adding WTL to an MFC project Pin
rajas15-May-05 7:08
rajas15-May-05 7:08 
GeneralRe: Adding WTL to an MFC project Pin
Michael Dunn17-May-05 17:34
sitebuilderMichael Dunn17-May-05 17:34 
GeneralIs this Possible Pin
ThatsAlok11-May-05 21:07
ThatsAlok11-May-05 21:07 
GeneralRe: Is this Possible Pin
Vi212-May-05 21:13
Vi212-May-05 21:13 
GeneralRe: Is this Possible Pin
ThatsAlok12-May-05 21:50
ThatsAlok12-May-05 21:50 
GeneralRe: Is this Possible Pin
Vi212-May-05 22:04
Vi212-May-05 22:04 
GeneralATL Component not working properly in windows 98 Pin
naveen.V8-May-05 22:55
naveen.V8-May-05 22:55 
GeneralMTS packages Pin
Pavneet Singh7-May-05 8:19
Pavneet Singh7-May-05 8:19 

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.