jorge Posted May 25, 2004 Posted May 25, 2004 Well i get a error , and do'nt know what it is and there is nothing on google: here is the code: Imports System Imports System.Runtime.InteropServices Namespace CM2 'Since the .NET Framework interface and coclass have to behave as 'COM objects, we have to give them guids. <Guid("")> Public Interface IManagedInterface Function PrintHi(ByVal Name As String) As Integer End Interface <Guid("")> Public Class InterfaceImplementation Implements IManagedInterface Public Function PrintHi(ByVal name As String) As Integer Console.WriteLine("Hello, {0}!", name) Return 33 End Function End Class End Namespace the error is on: Implements IManagedInterface and the error msg is: COM.vb(15) : error BC30149: 'CM2.InterfaceImplementation' must implement 'Function PrintHi(Name As String) As Integer' for interface 'CM2.IManagedInterface'. any one had something like this befor? Quote Jorge - http://www.blackdot.be/?page=apache.htm
Administrators PlausiblyDamp Posted May 25, 2004 Administrators Posted May 25, 2004 Public Interface IManagedInterface Function PrintHi(ByVal Name As String) As Integer End Interface Public Class InterfaceImplementation Implements IManagedInterface Public Function PrintHi(ByVal name As String) As Integer Implements IManagedInterface.PrintHi Console.WriteLine("Hello, {0}!", name) Return 33 End Function End Class Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
jorge Posted May 25, 2004 Author Posted May 25, 2004 k works now, thanx Quote Jorge - http://www.blackdot.be/?page=apache.htm
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.