|
yes!! I guessed correctly, u misunderstood the concept of dual interface in OA.
direct vtable-based interfaces as u expect are called "custom interfaces" and invocation through IDispatch are called "automation" or "dispatch interfaces" the "custom interfaces" may need to be accessed after a query interface and may needs custom marshalling. Dual iterfaces can be accessed without a query interface and gets standard marshalling support like dispatch interfaces.
a comparison of these 3 interfaces is here [^]
|
|
|
|
|
Thanks Rajkumar,
Sorry that I may not made myself understood. My question is, if I do not declare the interface as dual in IDL file, but actually in implementation, I implemented the dual approach.
Could the client of the component (e.g. in case of C++ client) utilize vtable other than through IDispatch?
regards,
George
|
|
|
|
|
George_George wrote: but actually in implementation, I implemented the dual approach.
again, don't confuse it with "custom interface"
George_George wrote: Could the client of the component (e.g. in case of C++ client) utilize vtable other than through IDispatch?
yes, u can, use queryinterface and get ur "custom interface".
|
|
|
|
|
Thanks Rajkumar,
Seems the dual property does not enforce compile/link/runtime's strong checking about whether or not the component implements dual interfaces (if the component does not implement dual interface, and there will not be any compile/link/runtime error if component only implemeents IDispatch)? Right?
And similar to the situation when we do not add dual, compile/link/runtime does not enforce strong checking and gives warning or error message when client tries to use dual interface (both vtable and IDispatch), right?
regards,
George
|
|
|
|
|
Hi,
I need to compare two text files in VC++6.0, whose contents have been displayed in two richedit controls.Also i need to highlight the differences that exists in the two files......Can any one help me out?
|
|
|
|
|
|
What have you tried so far? Where are you stuck?
|
|
|
|
|
i have displayed the contents of the files in the richeditcontrols.I dont know how to compare the files and highlight the differences in them.The codes which i got by surfing the net just tell whether the files are equal or not.They just return an int or bool value.Here is the place i got struck.
|
|
|
|
|
I think it's rather a complex task. I don't think you will get the "code" here right away. You may have to look at the XDiff[^] project. Perhaps that would help you.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
My condolences. I had to do the exactly same thing some 5 years ago, and ended up with a post "I hate MFC" in the Lounge
Anyway, to find the differences between files, use Longest Common Subseqence Algorithm[^] - that would be the easy part.
Now, for displaying it in the richedit controls - good luck with that
|
|
|
|
|
How to check the instance of the class is valid or it is not especially in multi threaded program?
Best Regards,
Suman
|
|
|
|
|
rp_suman wrote: How to check the instance of the class is valid
What do you mean exactly ? Can you be more explicit please. What does 'valid' mean ?
|
|
|
|
|
Suman,
Plz give more deatils....what is actually men by 'valid'.
It will be better if u provide with some code fragment that u are using.....
Prasanth
|
|
|
|
|
HI,
Plz give more deatils....what is actually mean by 'valid'.
It will be better if u provide with some code fragment that u are using.....
prasanth
|
|
|
|
|
Hi Prasanth, you replied to the wrong person.
Maxwell Chen
|
|
|
|
|
Maxwell Chen wrote: you replied to the wrong person.
How dare you call Cedric a wrong person!
|
|
|
|
|
Rajesh R Subramanian wrote: How dare you call Cedric a wrong person!
Maxwell Chen
|
|
|
|
|
He might have meant different person,
Best Regards,
Suman
|
|
|
|
|
There's a thing called pun. And one more thing called "the joke icon".
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
For example, if we create some object using new() and call delete(), the object will be deleted.
I want to avoid the use of the object before new() and after delete().
Can we check like if(object != NULL) or else?
BTW:
Sorry for delay I posted just before leaving office, now seeing from my room.
Best Regards,
Suman
|
|
|
|
|
Yes, just set the pointer to NULL in your constructor and once you delete the object, just set it to NULL again.
|
|
|
|
|
So, I can check the object is not NULL before accessing it.
Thanks & Regards,
Suman
|
|
|
|
|
Onlyl if you are working with pointers because if you are working with objects directly, they are always "valid" (except if you did something really wrong, but anyway, there's no way to test it).
|
|
|
|
|
Hi Cedric, you are right..
Thanks for the great help!!
Best Regards,
Suman
|
|
|
|
|
rp_suman wrote: How to check the instance of the class is valid or it is not especially in multi threaded program?
is that pointer to class or simple object!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|