Any help appreciated...
I am using a third party DLL file to access an HMI using ethernet. The function is declared in a VB module as:
'Read internal word address
Public Declare Function HKEtn_ReadInter nalMemory Lib "HKEserv.dl l" _
(ByRef dp As Int16, _
ByVal Wordcnt As Int16, _
ByVal DeviceType As Int32, _
ByVal addr As Int32, _
ByVal lpAddr As String, _
ByVal fg As Int32) _
As Int32
When I run this function in a single-threaded application, all is good. When I run the function in a multi-threaded application, I get an error message in a message box on closing the app:
myApplication.e xe - Application Error
The instruction at "0x6c3b5115 " referenced memory at "0x00000004 ". The memory could not be "read".
Click OK to terminate the program
Could the DLL be incompatible with .NET environment? Is it that I am not cleaning up some unmanaged resources?
I'm flat out of ideas...
Thanks...
--------------------------------
From: Ryan Linneman
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>9YQNf4HMtEy h7Rjyt0ZCUQ==</Id>