Click here to Skip to main content
15,910,009 members
Home / Discussions / COM
   

COM

 
GeneralRe: Connecting Multiple clients to single server using DCOM Pin
abhiramsss13-Mar-06 22:30
abhiramsss13-Mar-06 22:30 
GeneralRe: Connecting Multiple clients to single server using DCOM Pin
FearlessBurner16-Mar-06 4:25
FearlessBurner16-Mar-06 4:25 
GeneralRe: Connecting Multiple clients to single server using DCOM Pin
abhiramsss19-Mar-06 21:24
abhiramsss19-Mar-06 21:24 
GeneralRe: Connecting Multiple clients to single server using DCOM Pin
FearlessBurner22-Mar-06 6:51
FearlessBurner22-Mar-06 6:51 
QuestionAutomation Server Can't Create Object Pin
bigmacrox27-Feb-06 12:46
bigmacrox27-Feb-06 12:46 
AnswerRe: Automation Server Can't Create Object Pin
mbue27-Feb-06 16:18
mbue27-Feb-06 16:18 
QuestionODBC dropping cell values Pin
RB@Emphasys27-Feb-06 5:30
RB@Emphasys27-Feb-06 5:30 
QuestionDrag-and-Drop in explorer.exe. Pin
Jerry New26-Feb-06 17:20
Jerry New26-Feb-06 17:20 
AnswerRe: Drag-and-Drop in explorer.exe. Pin
mbue27-Feb-06 16:21
mbue27-Feb-06 16:21 
QuestionCOM Component... Pin
Siva Sankar Koyi24-Feb-06 21:13
Siva Sankar Koyi24-Feb-06 21:13 
AnswerRe: COM Component... Pin
Lim Bio Liong24-Feb-06 23:31
Lim Bio Liong24-Feb-06 23:31 
GeneralRe: COM Component... Pin
AmitGG28-Feb-06 22:11
AmitGG28-Feb-06 22:11 
QuestionImplement a new interface Pin
zubair_ahmed23-Feb-06 19:32
zubair_ahmed23-Feb-06 19:32 
AnswerRe: Implement a new interface Pin
Lim Bio Liong24-Feb-06 23:23
Lim Bio Liong24-Feb-06 23:23 
Hello zubair_ahmed,

Yes, COM objects will by default expose its "default" interface. However, you can DIM an object of another interface and cast the original COM object to this interface. Doing so is equivalent to performing QueryInterface().

Here is an example :

'' Let's say TestObject supports its default interface
'' plus TestInterface01 and TestInterface02.
Set TestObjectObj = New TestObject

'' Define objects of the 2 desired interfaces...
Dim TestInterface01Ptr As TestInterface01
Dim TestInterface02Ptr As TestInterface02

'' Cast TestObjectObj to the desired interfaces.
'' This action is equivalent to QueryInterface().
Set TestInterface01Ptr = TestObjectObj

Set TestInterface02Ptr = TestObjectObj

'' Use the interfaces' properties and methods as per normal...
TestInterface01Ptr.strProperty = "Hello"
TestInterface01Ptr.Method01

TestInterface02Ptr.longProperty = 101
TestInterface02Ptr.Method01

'' Set the interfaces to nothing is equivalent to Release()'ing
'' the interface pointers.
Set TestInterface01Ptr = nothing
Set TestInterface02Ptr = nothing


Best Regards,
Bio.


AnswerRe: Implement a new interface Pin
mbue27-Feb-06 16:14
mbue27-Feb-06 16:14 
QuestionHow to catch ActiveX Install or Excute using BHO? Pin
Blue-Bird23-Feb-06 19:00
Blue-Bird23-Feb-06 19:00 
QuestionError In Building simple ATL application Pin
maharaja pandian23-Feb-06 1:49
maharaja pandian23-Feb-06 1:49 
AnswerRe: Error In Building simple ATL application Pin
toxcct23-Feb-06 2:13
toxcct23-Feb-06 2:13 
AnswerRe: Error In Building simple ATL application Pin
Stephen Hewitt23-Feb-06 19:20
Stephen Hewitt23-Feb-06 19:20 
QuestionCOM Server in VB Pin
Anil_vvs23-Feb-06 0:01
Anil_vvs23-Feb-06 0:01 
AnswerRe: COM Server in VB Pin
Anil_vvs23-Feb-06 0:05
Anil_vvs23-Feb-06 0:05 
AnswerRe: COM Server in VB Pin
Lim Bio Liong24-Feb-06 23:38
Lim Bio Liong24-Feb-06 23:38 
QuestionGet serious trouble in Powerpoint automation code Pin
Zhaohui Xing (Joey)22-Feb-06 16:30
Zhaohui Xing (Joey)22-Feb-06 16:30 
QuestionHow to correctly use CoInitialize? Pin
Waldermort22-Feb-06 3:34
Waldermort22-Feb-06 3:34 
AnswerRe: How to correctly use CoInitialize? Pin
Milton Karimbekallil22-Feb-06 5:42
Milton Karimbekallil22-Feb-06 5:42 

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.