Delphi Dynamic Dll - global variable -


I am busy doing a DLL coding which provides several functions in the host application. This app dynamically loads, loads and offers dll after each function call.

I have no control over the host app. I can only work within DLL. Is there any way that I can put some variables in memory so that I can reuse them within each function? Clearly a global variable gets approved, when DLL loads by the host application.

thanks

thanks

thanks

thanks

I think you have 2 main options here.

  1. Provide 2 versions of your function, now, plus one and where they pass through a buffer (records, whatever), you can read the previous state , And of course can update the state. Call the high perf version of this function. They would like to use it.

  2. Either save the file as a cookie (basically what it is).

  3. Option 1 will require modification in the host app, but will be forced to take advantage of host app developers, option 2 will not need any change in host app , But will not be in the form of performance.

    I personally would not like to start complaining about reference counting, possibly because the host app is about to be unloaded for a reason, if I had the host application god, then I would have trouble.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -