Click here to Skip to main content
15,890,845 members
Home / Discussions / COM
   

COM

 
GeneralRe: VBScript and COM Pin
Jim Crafton23-May-02 16:57
Jim Crafton23-May-02 16:57 
GeneralRe: VBScript and COM Pin
Vivek Rajan23-May-02 18:16
Vivek Rajan23-May-02 18:16 
GeneralRe: VBScript and COM Pin
Jim Crafton24-May-02 3:08
Jim Crafton24-May-02 3:08 
GeneralRe: VBScript and COM Pin
Vi224-May-02 3:35
Vi224-May-02 3:35 
GeneralRe: VBScript and COM Pin
soptest24-May-02 7:16
soptest24-May-02 7:16 
QuestionCringeworthy Cast in ATL?? Pin
20-May-02 23:23
suss20-May-02 23:23 
AnswerRe: Cringeworthy Cast in ATL?? Pin
Vivek Rajan21-May-02 6:50
Vivek Rajan21-May-02 6:50 
GeneralRe: Cringeworthy Cast in ATL?? Pin
soptest21-May-02 7:41
soptest21-May-02 7:41 
Just declare implemented interface IMyInterface *_pi;
then assign incomming to _pi
_pi = pIn;
If incomming interface is different then you need just typecast incomming interface. (COM object must implement all of those interfaces)

And that is it. You do not need to do QueryInterface because vtlb has all pointers to all methods of all implemented interfaces.

P.S. Typecasting interface to class which implements this interface is bad idea (because the class may have other functions implemented which are not exposed by implemented interface/s, and data members), never do this.

soptest
GeneralRe: Cringeworthy Cast in ATL?? Pin
Vivek Rajan21-May-02 9:08
Vivek Rajan21-May-02 9:08 
GeneralRe: Cringeworthy Cast in ATL?? Pin
soptest21-May-02 10:32
soptest21-May-02 10:32 
GeneralRe: Cringeworthy Cast in ATL?? Pin
Vivek Rajan21-May-02 10:53
Vivek Rajan21-May-02 10:53 
GeneralRe: Cringeworthy Cast in ATL?? Pin
soptest21-May-02 12:10
soptest21-May-02 12:10 
GeneralRe: Cringeworthy Cast in ATL?? Pin
NotYourAverageGuy6-Jun-02 9:13
NotYourAverageGuy6-Jun-02 9:13 
GeneralRe: Cringeworthy Cast in ATL?? Pin
21-May-02 22:15
suss21-May-02 22:15 
GeneralRe: Cringeworthy Cast in ATL?? Pin
Vivek Rajan23-May-02 16:33
Vivek Rajan23-May-02 16:33 
GeneralCOM+ deployment help Pin
Annesa20-May-02 2:25
Annesa20-May-02 2:25 
GeneralRe: COM+ deployment help Pin
soptest20-May-02 9:40
soptest20-May-02 9:40 
Generaldrag and drop destination Pin
20-May-02 0:39
suss20-May-02 0:39 
GeneralRe: drag and drop destination Pin
soptest20-May-02 9:31
soptest20-May-02 9:31 
GeneralCannot expose interface Pin
Hans Ruck19-May-02 21:51
Hans Ruck19-May-02 21:51 
GeneralRe: Cannot expose interface Pin
soptest20-May-02 9:36
soptest20-May-02 9:36 
GeneralRe: Cannot expose interface Pin
Hans Ruck20-May-02 22:44
Hans Ruck20-May-02 22:44 
GeneralRe: Cannot expose interface Pin
Vi221-May-02 1:06
Vi221-May-02 1:06 
GeneralRe: Cannot expose interface Pin
Vi226-May-02 20:56
Vi226-May-02 20:56 
GeneralDlls in Internet Explorer Pin
Erasmop16-May-02 10:25
Erasmop16-May-02 10:25 

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.