Delphi32.com - Home!
| Home/News | Downloads | Forums | D32 Magazine | Resources | Info and Facts |  
 
 Testing IDispatch Descendants


Is there a minimal test I can perform to test the validity of the GUID, and that the interface descends from IDispatch (and therefore supports automation methods)?   

    Call CreateRemoteComObject and use the name of the computer and the GUID you are trying to connect to. If it returns an error, this indicates a server problem, otherwise a client problem.

    ?
    const MyGUID = '{444... }'; //Whatever the guid is... var Unk: IUnknown; Disp: IDispatch; begin { Make sure this line works correctly } Unk := CreateRemoteComObject('server ', StringToGUID(MyGUID)); { If it does, then cast it to a IDispatch } Disp := Unk as IDispatch; end; ?
    If this works and problems remain, then you'll need to step through your client code and see where it is failing. If not, then run the server in the debugger and connect with the client, then you should be able to debug near to where it fails.

     



  << Previous Faq     Complete List     Next Faq >>  



 
 Hits/month  2,500,000+ 
 Downloads
 (Since May 2000)
 7,393,709 
 Total Files  6,023 
 Forum msgs  7,670 
 Articles/FAQs  70+/900+ 
Kylix
Tips n Tricks
FAQs
Knowledge Base
Bug Listings
Articles
Books
Newsgroups
Links
Submissions
Testimonials
Advertising
Contact Us
About Us
Search Amazon:
Top Selling Software at Amazon

| Home/News | Downloads | Forums | Resources | Info and Facts | Testimonials |
  Site Search:
 


Comments/Problems: Webmaster@delphi32.com
Copyright © 1998-2006, Delphi32.com. All rights reserved.
Terms of Use