D
Dave Wurtz
In my VB.NET application, I'm trying to call a function from a 32-bit,
non-.NET dll file and I'm having problems. I believe I have the
correct signature for the dll with:
<System.Runtime.InteropServices.DllImportAttribute("asdHTMLCompare.dll")>
_
Public Shared Function BuildCompositeFile(ByVal szOldFile As
System.IntPtr, _
ByVal szNewFile As System.IntPtr, _
ByVal szCompositeFile As System.IntPtr, _
ByVal szOldPrefix As System.IntPtr, _
ByVal szNewPrefix As System.IntPtr, _
ByVal szCompositePrefix As System.IntPtr, _
ByVal bCheckForChangedImages As System.Boolean) As System.Int32
End Function
I'm trying to call this function with the following code:
Dim html1 As System.String = "c:\test1.htm"
Dim html2 As System.String = "c:\test2.htm"
Dim composite As System.String = "c:\changes.htm"
Dim changes As System.Int32 = GlobalApp.BuildCompositeFile( _
System.Runtime.InteropServices.Marshal.ReadIntPtr(html1, 0), _
System.Runtime.InteropServices.Marshal.ReadIntPtr(html2, 0), _
System.Runtime.InteropServices.Marshal.ReadIntPtr(composite, 0), _
System.Runtime.InteropServices.Marshal.ReadIntPtr(".htm", 0), _
System.Runtime.InteropServices.Marshal.ReadIntPtr(".htm", 0), _
System.Runtime.InteropServices.Marshal.ReadIntPtr(".htm", 0), _
True)
When I run this, I get the error:
An exception of type 'System.EntryPointNotFoundException' occurred in
ProductVision.Windows.Forms.dll but was not handled in user code.
Additional information: Unable to find an entry point named
'BuildCompositeFile' in DLL 'asdHTMLCompare.dll'.
What am I doing wrong?
Thanks in advance!
Dave
non-.NET dll file and I'm having problems. I believe I have the
correct signature for the dll with:
<System.Runtime.InteropServices.DllImportAttribute("asdHTMLCompare.dll")>
_
Public Shared Function BuildCompositeFile(ByVal szOldFile As
System.IntPtr, _
ByVal szNewFile As System.IntPtr, _
ByVal szCompositeFile As System.IntPtr, _
ByVal szOldPrefix As System.IntPtr, _
ByVal szNewPrefix As System.IntPtr, _
ByVal szCompositePrefix As System.IntPtr, _
ByVal bCheckForChangedImages As System.Boolean) As System.Int32
End Function
I'm trying to call this function with the following code:
Dim html1 As System.String = "c:\test1.htm"
Dim html2 As System.String = "c:\test2.htm"
Dim composite As System.String = "c:\changes.htm"
Dim changes As System.Int32 = GlobalApp.BuildCompositeFile( _
System.Runtime.InteropServices.Marshal.ReadIntPtr(html1, 0), _
System.Runtime.InteropServices.Marshal.ReadIntPtr(html2, 0), _
System.Runtime.InteropServices.Marshal.ReadIntPtr(composite, 0), _
System.Runtime.InteropServices.Marshal.ReadIntPtr(".htm", 0), _
System.Runtime.InteropServices.Marshal.ReadIntPtr(".htm", 0), _
System.Runtime.InteropServices.Marshal.ReadIntPtr(".htm", 0), _
True)
When I run this, I get the error:
An exception of type 'System.EntryPointNotFoundException' occurred in
ProductVision.Windows.Forms.dll but was not handled in user code.
Additional information: Unable to find an entry point named
'BuildCompositeFile' in DLL 'asdHTMLCompare.dll'.
What am I doing wrong?
Thanks in advance!
Dave