Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / August 2003

Tip: Looking for answers? Try searching our database.

Can I access a remote com server with only cusotm interfaces from c#?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Howard Swope - 27 Aug 2003 19:46 GMT
I am try to access a remote com server from my c# app. The server has no
dispatch interfaces. Is this possible?

Signature

Howard Swope
Software Engineer
Spitz, Inc [http://www.spitzinc.com]

David Stucki [MS] - 27 Aug 2003 22:50 GMT
As long as your interfaces inherit from IUnknown you should be able to call
them from C#.  Do you have a Type Library for these interfaces?  If so you
can create an interop assembly with TLBIMP.exe or by adding a project
reference in VS.NET.  If this doesn't work or you have no TLB then you can
manually define the COM interfaces in your code.

David Stucki
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
Joel Lyons - 28 Aug 2003 15:45 GMT
From an earlier post (April):

Use Type.GetTypeFromProgID or GetTypeFromCLSID have overloads that allow
you to specify a server name, then use this type with
Activator.CreateInstance.

Type t = Type.GetTypeFromProgID("MyLibrary.Object", "REMOTE_MACHINE_NAME");
MyLibrary.IObject obj = (MyLibrary.IObject)Activator.CreateInstance(t);

Hope this helps.

David Stucki
Microsoft Developer Support

> I am try to access a remote com server from my c# app. The server has no
> dispatch interfaces. Is this possible?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.