Click here to Skip to main content
15,889,992 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to Print the Text in Required Format. Pin
Branislav13-Apr-06 23:53
Branislav13-Apr-06 23:53 
QuestionAnother Drag and Drop Question Pin
GrumbleWeedster13-Apr-06 1:28
GrumbleWeedster13-Apr-06 1:28 
AnswerRe: Another Drag and Drop Question Pin
Branislav13-Apr-06 23:58
Branislav13-Apr-06 23:58 
QuestionCButton text alignment problem Pin
Shree13-Apr-06 1:13
Shree13-Apr-06 1:13 
AnswerRe: CButton text alignment problem Pin
toxcct13-Apr-06 1:15
toxcct13-Apr-06 1:15 
GeneralRe: CButton text alignment problem Pin
Shree13-Apr-06 1:18
Shree13-Apr-06 1:18 
Questionproviding new functionality in activex Pin
Identity Undisclosed13-Apr-06 0:44
Identity Undisclosed13-Apr-06 0:44 
AnswerRe: providing new functionality in activex Pin
Roger Stoltz13-Apr-06 1:46
Roger Stoltz13-Apr-06 1:46 
Well, an ActiveX control IS a COM component that exposes one or more interfaces inherited from IDispatch, AKA an Automation interface.
The IDispatch interface is built on providing an index for the method or property that is used from the client side and the virtual table only contains the IDispatch methods, in short terms. There's more to it but that's irrelevant at this moment.
When creating an ActiveX you the possibility to declare the Automation interface as dual. This means that the interface has a virtual table which contains the methods that are specific to the interface derived from IDispatch and hence is immutable. Clients can use both v-table calls and the index style as desired. V-table calls are usually preferred when using C++.

Now to your question whether you can declare new methods in an existing Automation interface or not.
As you might have guessed you cannot modify an Automation interface that is a dual interface since it uses v-table calls, exactly like ordinary COM interfaces.
If, and only if, the interface is not a dual interface it is possible to add methods and properties to an existing Automation interface, given that the already existing properties and methods are unchanged and always keep their original index. Otherwise existing clients will fail to work properly.

However, even though this is technically possible, I wouldn't encourage anyone to do this.
I've seen this done at a customer of mine with all the good intentions, but later they found it difficult to tell whether the client or the server actually supported the extended interface or not.
In other words: they found themselves in similar dilemma as if they would have changed an ordinary COM interface.
If this situation is acceptable for you, or anyone that is suppose to use you ActiveX control is for you to decide. Personally I would go nuts if I was to create clients to this server. WTF | :WTF:

Hope this helps
--
Roger


It's supposed to be hard, otherwise anybody could do it!
GeneralRe: providing new functionality in activex Pin
Identity Undisclosed13-Apr-06 3:17
Identity Undisclosed13-Apr-06 3:17 
AnswerRe: providing new functionality in activex Pin
Roger Stoltz13-Apr-06 3:23
Roger Stoltz13-Apr-06 3:23 
QuestionShow html in dialog Pin
Nishad S13-Apr-06 0:40
Nishad S13-Apr-06 0:40 
AnswerRe: Show html in dialog Pin
Rage13-Apr-06 1:27
professionalRage13-Apr-06 1:27 
GeneralRe: Show html in dialog Pin
Nishad S13-Apr-06 1:34
Nishad S13-Apr-06 1:34 
QuestionClass wizard Pin
alex__b13-Apr-06 0:40
professionalalex__b13-Apr-06 0:40 
AnswerRe: Class wizard Pin
Nishad S13-Apr-06 0:52
Nishad S13-Apr-06 0:52 
GeneralRe: Class wizard Pin
alex__b13-Apr-06 1:05
professionalalex__b13-Apr-06 1:05 
GeneralRe: Class wizard Pin
Nishad S13-Apr-06 1:21
Nishad S13-Apr-06 1:21 
GeneralRe: Class wizard Pin
toxcct13-Apr-06 1:09
toxcct13-Apr-06 1:09 
GeneralRe: Class wizard Pin
Nishad S13-Apr-06 1:12
Nishad S13-Apr-06 1:12 
GeneralRe: Class wizard Pin
alex__b13-Apr-06 1:21
professionalalex__b13-Apr-06 1:21 
QuestionClass wizard Pin
alex__b13-Apr-06 0:38
professionalalex__b13-Apr-06 0:38 
AnswerRe: Class wizard Pin
toxcct13-Apr-06 0:43
toxcct13-Apr-06 0:43 
GeneralRe: Class wizard Pin
alex__b13-Apr-06 0:52
professionalalex__b13-Apr-06 0:52 
GeneralRe: Class wizard Pin
toxcct13-Apr-06 0:54
toxcct13-Apr-06 0:54 
GeneralRe: Class wizard Pin
alex__b13-Apr-06 1:00
professionalalex__b13-Apr-06 1:00 

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.