Article View: borland.public.csharpbuilder.ide.general
Article #88interop with D8 Code
From: Tony Blomfield
Date: Sat, 16 Oct 2004 09:46
Date: Sat, 16 Oct 2004 09:46
56 lines
2300 bytes
2300 bytes
Actually, this question would be better on a VS Interop-D8 NG, but it
donesnt exist, so sorry, this is the best I can find.
My problem is this:
I have created an assembly in Delphi 8.
Inside the assembly is just an interface declaration eg
IRemoteNUCManager = interface
function1: boiolean;
function2: boolean;
end;
Effectivly this assembly is simply a referance point for both Client and
Server.
the actual implementation of this interface is done in a Remotable object.
I have made a D8 Client which worrks just fine.
I have tried to make a VS-Client to use my Remote object, and have added the
assembly as a referance in the VS project.
Everything seems to be fine, and indeed I can browse my assembly in the VS
project and see all of the method implementations and classes etc.
However, when I try to activate my server object from the client I get the
following error when I try to com,pile
C:\Projects\DTS\NOSS\VSClient\NosVSClient\Form1.cs(123): Cannot implicitly
convert type 'object' to 'SharedNOSSInterface.IRemoteNUCManager'
The line of code that fales to compiel ist this:
ObjManager =
Activator.GetObject(typeof(SharedNOSSInterface.IRemoteNUCManager),
RemoteServer + ServerResource);
this code works fine in Delphi, but fails in C#.
I am not comfortable in C# so most likely I have made a silly mistake.
Can anyone give me some advise please.
Thanks,
Tony
Technical Details
Message-ID:
<4170eea3$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!news-FFM2.ecrc.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 165859,d6ab59e888126370,start X-Google-Attributes: gid165859,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Tony Blomfield" <tonyb@sailaway.co.nz> Newsgroups: borland.public.csharpbuilder.ide.general Subject: interop with D8 Code Date: Sat, 16 Oct 2004 22:46:57 +1300 Lines: 60 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 NNTP-Posting-Host: 222.152.51.238 Message-ID: <4170eea3$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1097920163 222.152.51.238 (16 Oct 2004 02:49:23 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!news-FFM2.ecrc.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail