Hi!
I encounter the following problem:
Let's have a simple .NET COM class.
using System;
using System.Runtime.InteropServices;
namespace Galaxy.Guide
{
[Guid("F747532F-D6F7-4c4b-A372-76DBC4CDD02A")]
public class DeepThought
{
public void TheAnswer() {
System.Windows.Forms.MessageBox.Show("42");
}
}
}
I compile it to a dll library, regasm it and create a type library.
Then I run VB4, create a new project, add reference to the type library,
and have the following function:
Private Sub Command1_Click()
Dim dt As New DeepThought
dt.theanswer
End Sub
Upon execution of the second line of code it throws
Runtime Error -2146233054 (80131522)
No server registered or could not load class CLSID
{The GUID of DeepThought class here}
Any ideas?
Regards!
Michal Ziemski
Willy Denoyette [MVP] - 06 Jul 2003 14:13 GMT
Your COM library must be in the same directory as your VB4 client, or you have to specify the Codebase option when running regasm.
Willy.
> Hi!
>
[quoted text clipped - 34 lines]
> Regards!
> Michal Ziemski