Click here to Skip to main content
15,902,445 members
Home / Discussions / COM
   

COM

 
GeneralCOM & VB.NET overloading Pin
izotov5-Jan-04 2:36
izotov5-Jan-04 2:36 
GeneralRe: COM & VB.NET overloading Pin
Heath Stewart5-Jan-04 13:41
protectorHeath Stewart5-Jan-04 13:41 
GeneralRe: COM & VB.NET overloading Pin
Jörgen Sigvardsson6-Jan-04 6:12
Jörgen Sigvardsson6-Jan-04 6:12 
GeneralRe: COM & VB.NET overloading Pin
Niels Penneman12-Jan-04 10:21
Niels Penneman12-Jan-04 10:21 
GeneralRe: COM & VB.NET overloading Pin
Jörgen Sigvardsson12-Jan-04 10:23
Jörgen Sigvardsson12-Jan-04 10:23 
GeneralRe: COM & VB.NET overloading Pin
Niels Penneman12-Jan-04 10:26
Niels Penneman12-Jan-04 10:26 
QuestionHow do I determine if a certain method exists on an interface? Pin
Gary Chapman5-Jan-04 2:16
Gary Chapman5-Jan-04 2:16 
AnswerRe: How do I determine if a certain method exists on an interface? Pin
Xiangyang Liu 刘向阳5-Jan-04 2:46
Xiangyang Liu 刘向阳5-Jan-04 2:46 
Gary Chapman wrote:
Is there anyway of interrogating the interface to see if the method exists?

You need to call GetIDsOfNames after CoCreateInstance to determine if a method exists on a given interface.

The way your code is written will not work because even if the method exists, you cannot call it as if it is early-bound (you are doing late-binding). What you need to call is the Invoke method of IDispatch.

[Edit] As Bo Hunter pointed out, I was wrong in saying the code won't work. [/Edit]

COM programming is very complicated without help from libraries like ATL or MFC. However, you can reuse some of my code[^] to save a lot of time. Wink | ;)





My articles and software tools





GeneralRe: How do I determine if a certain method exists on an interface? Pin
Bo Hunter5-Jan-04 14:39
Bo Hunter5-Jan-04 14:39 
GeneralRe: How do I determine if a certain method exists on an interface? Pin
Xiangyang Liu 刘向阳5-Jan-04 15:27
Xiangyang Liu 刘向阳5-Jan-04 15:27 
GeneralRe: How do I determine if a certain method exists on an interface? Pin
Vi25-Jan-04 22:00
Vi25-Jan-04 22:00 
GeneralRe: How do I determine if a certain method exists on an interface? Pin
Bo Hunter7-Jan-04 3:12
Bo Hunter7-Jan-04 3:12 
GeneralIs it necessary to Implement class factory interface Pin
Omar Alvi5-Jan-04 1:39
Omar Alvi5-Jan-04 1:39 
GeneralRe: Is it necessary to Implement class factory interface Pin
Vi25-Jan-04 22:06
Vi25-Jan-04 22:06 
GeneralOut-of-proc weirdness: Case Closed Pin
Jörgen Sigvardsson4-Jan-04 23:33
Jörgen Sigvardsson4-Jan-04 23:33 
GeneralReleasing IDirectinputdevice interface Pin
Manju4-Jan-04 21:50
Manju4-Jan-04 21:50 
GeneralRe: Releasing IDirectinputdevice interface Pin
JJeffrey7-Jan-04 14:27
JJeffrey7-Jan-04 14:27 
GeneralOutlook Rule programming Pin
nightcoder4-Jan-04 7:14
nightcoder4-Jan-04 7:14 
GeneralUsing Word i nC# Pin
Stephane David3-Jan-04 5:43
Stephane David3-Jan-04 5:43 
GeneralImplentation of Pin
SiddharthAtw2-Jan-04 1:54
SiddharthAtw2-Jan-04 1:54 
GeneralRe: Implentation of Pin
Heath Stewart3-Jan-04 8:19
protectorHeath Stewart3-Jan-04 8:19 
GeneralRe: Implentation of Pin
Anonymous3-Jan-04 19:19
Anonymous3-Jan-04 19:19 
QuestionHow to bypass login window? Pin
SiddharthAtw31-Dec-03 0:03
SiddharthAtw31-Dec-03 0:03 
AnswerRe: How to bypass login window? Pin
valikac2-Jan-04 11:48
valikac2-Jan-04 11:48 
GeneralRe: How to bypass login window? Pin
SiddharthAtw2-Jan-04 18:20
SiddharthAtw2-Jan-04 18:20 

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.