Hi Matt

Found this concerning state management with a Delphi dll
http://stackoverflow.com/questions/1042686/delphi-dynamic-dll-global-variable

The best options look like
1. Use a second dll that is loaded dynamically (and unload it when done).
2. Use COM


There is also LoadLibraryEx and FreeLibrary (http://msdn.microsoft.com/en-us/library/ms684179(v=VS.85).aspx <http://msdn.microsoft.com/en-us/library/ms684179%28v=VS.85%29.aspx>)

On 15/12/2010 9:42 PM, Matt Siebert wrote:
I'm not sure about the globals. I did have success with allocating the buffer in Delphi, then cleaning it up in a separate call but can't remember if the Delphi code kept a reference to the buffer, or if the .NET code passed it into the cleanup call.

Reply via email to