Click here to Skip to main content
15,917,632 members
Home / Discussions / COM
   

COM

 
GeneralRe: Tutorial on COM Pin
valikac5-Jan-04 4:59
valikac5-Jan-04 4:59 
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 
I have a COM DLL written in C++/ATL. I added a new method to one of the interfaces and altered my testbed to call this new method.

I then went and registered an earlier version of the DLL which doesn't contain the new method. Not surprisingly, an exception is raised when the testbed tries to call the method. I can catch this with a try/catch handler, but I still get an unrecoverable exception when the calling function exits (see code snippet below).

Is there anyway of interrogating the interface to see if the method exists?
If not, is there I way my app can continue to run gracefully? This final 0xC0000005 exception is a bit of a showstopper.

Thanks,

Gary

---

void func()
{
::CoInitialize(NULL);

try
{
CComPtr<IMyInterface> MyInt;
MyInt.CoCreateInstance(CLSID_MyInterface);

MyInt->NewMethod();
}
catch(...)
{
AfxMessageBox("eek");
}
} // exception 0xC0000005 thrown here
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 
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 

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.