I am calling an unmanaged ('C') DLL from my VB.NET application. The application makes an initial call that passes a reference to a data structure and the DLL gets the structure and is able to access the elements correctly. The DLL also saves a copy of the pointer at this time. When a subsequent call is made to the DLL the data elements in the structure are no longer correct.
The structure is instantiated in the calling class and from the perspective of that class the data remains the same. The pointer is a static global in the DLL so I don't understand why the data changes from the perspective of the DLL on subsequent calls.
Any pointers would be much appreciated,