none
RegASM warning for Bing Translator Web service RRS feed

  • Question

  • Hello,

    I am calling the Bing Translator Web service from a managed DLL imported into a native C++ exe. (I'm calling the web service from native c++.)

    However, I am getting a strange exception when executing the following statement:

    // Create the interface pointer.

    ISpeakPtr pISpeak(__uuidof(GeorgeSpeak));

    The exception thrown is the following: An unhandled exception of type 'System.Runtime.InteropServices.SEHException' occurred in GeorgeServer.exe

    Additional information: External component has thrown an exception.

    A warning from running DisASM from the command-line for the managed dll stated:

    Type registed successfully Type library exporter warning processing 'ManagedGeorgeSpeak.LanguageClient.LanguageServiceClient, ManagedGeorgeSpeak'. Warning: Type library exporter encountered a type that derives from a generic class and is not marked as [ClassInterface(ClassInterfaceType.None)]. Class interfaces cannot be exposed for such types. Consider marking the type with [ClassInterface(ClassInterface.Type.None)] and exposing an explicit interface as the default interface to COM using the ComDefaultInterface attribute.

    How do I apply the attribute to the web service? Is this the cause of the exception?

    Regards,

    William Johnston


    williamj

    Monday, January 7, 2013 6:14 PM

Answers