How to create an Automation DLL?
It used to work fine. But all of a sudden I get errors in navision saying that it cannot create an instance of the automation class.
I don't have any experience with creating DLL's so I found this on the Net and used it in my VB Project:
Imports System
Imports System.Xml
Imports System.Runtime.InteropServices
Imports NETRONIC.XGantt
Namespace cWrapper
<Guid("89439AD1-756F-4f9c-BFB4-18236F63251E"), _
InterfaceType(ComInterfaceType.InterfaceIsIDispatch)> _
Public Interface _cWrapper
<DispId(1)> Function ScheduleShipment(ByVal fileLocation As String) As Integer
End Interface
<Guid("1376DE24-CC2D-46cb-8BF0-887A9CAF3014"), _
ClassInterface(ClassInterfaceType.None), _
ProgId("Wrapper.Numbers")>
Public Class cWrapper
Implements _cWrapper
Public Function ScheduleShipment(ByVal fileLocation As String) As Integer Implements _cWrapper.ScheduleShipment
MessageBox.Show(fileLocation)
...
End Function
Public Sub New()
MyBase.New()
End Sub
End Class
End Namespace
The DLL shows up in my registry after I register it. But I cannot create an instance of it. Anyone know what's wrong here? Or does anyone know a better way to create a DLL or OCX? So that I do not need to use the interface and all the <Guid("89439AD1-756F-4f9c-BFB4-18236F63251E"), _
InterfaceType(ComInterfaceType.InterfaceIsIDispatch)> _ ...code ?
Thanks in advance ;)

