Re: C#-Klassen von ATL-COM Interfaces ableiten

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Thomas Beck (tho_be_at_gmx.de)
Date: 09/07/04


Date: Tue, 07 Sep 2004 13:44:51 GMT

Hat sich bereits erledigt. Ich weiß auch nicht, was los war, aber plötzlich
hat er es übersetzt.

Es funktioniert mit

void IClientCallbackIF.Execute(ref string strXmlIn, ref object dataIn, ref
string strXmlOut, ref object dataOut)
{
...
}

Ich bin mir (fast) sicher, daß er genau das vorher angemeckert hat...

"Thomas Beck" <tho_be@gmx.de> wrote in message
news:U7i%c.3270$%4.84759@typhoon.bart.nl...
> Hallo,
>
> Ich versuche in C# eine class von einem COM-Interface abzuleiten.
> Das Interface hat genau eine Funktion, der Object Browser zeigt sie so an:
>
> public abstract new void Execute ( System.String strXmlIn , System.Object
> dataIn , System.String strXmlOut , System.Object dataOut )
> Member of CLIENTSTATIONRPCLib.IClientCallbackIF
>
> Im C++ ATL Project sieht sie so aus:
> HRESULT Execute(BSTR * strXmlIn, VARIANT * dataIn, BSTR * strXmlOut,
> VARIANT * dataOut);
>
> Wenn ich meine C#-class von IClientCallbackIF ableite bekomme ich immer
> die Fehlermeldung
>
> error CS0535: 'TestLocalStationService.Form1' does not implement interface
> member 'CLIENTSTATIONRPCLib.IClientCallbackIF.Execute(ref string, ref
> object, ref string, ref object)'
>
> bzw. wenn ich den Interface-Namen vor das Execute schreibe
>
> error CS0539: 'IClientCallbackIF.Execute' in explicit interface
> declaration is not a member of interface.
>
>
>
> void IClientCallbackIF.Execute(System.String strXmlIn, System.Object
> dataIn, System.String strXmlOut, System.Object dataOut)
> {
> ....
> }
>
> Ich habe es mit und ohne "ref" probiert, mit "string"/"object" und
> "System.String"/"System.Object", Rückgabewert "void"/"long", nichts hat
> funktioniert. Aus irgendeinem Grund passen die Funktionen nicht zusammen.
>
> Muß man noch irgendetwas beachten, wenn man von nicht-C# Interfaces
> ableiten will ?
>
>
>



Relevant Pages

  • Re: Polymorphie auf Klassenebene
    ... class ProviderA implements ColumnHeader { ... String[] getColumnHeader ... Object[] getRow ... In Deiner Tabelle arbeitest Du nur mit dem ColumnHeader Interface. ...
    (de.comp.lang.java)
  • Re: [OT] My First C# (warning - long post)
    ... or string,. ... public string IBreturn ... interface block with the new return code. ... It is unwieldy to keep referencing substrings of an 8K string ...
    (comp.lang.cobol)
  • Re: Explicit Linking of DLLs in VB.net
    ... yes this technique will only work on managed assemblys (exe or dll) ... "YourObject" is a form and is limited to the form methods. ... Wel implement propertys, methods, events in your interface and start ... Public Shared Function LoadMeByName(ByVal vstrAssemblyName As String, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Operator overloading [was Re: 7.0 wishlist?]
    ... I doubt Harry was proposing that the translation be naïve. ... public interface Addable{ ... BigDecimal--would be powerful enough, even if operator overloading ... String and return a String, ...
    (comp.lang.java.programmer)
  • Re: VS 2005 prof. Mathe - Problem
    ... Deklariere also Deine Variable z as Long. ... >> Du hast z as Object deklariert und ihm einen Wert vom Typ Long ... >> Datentypen. ... >> txtGesamtforderungsbetrag.Text liefert einen String. ...
    (microsoft.public.de.german.entwickler.dotnet.vb)