Hmm... so many wonderful replies. Thank you to all!!
Let me see if I can clarify my needs a little better while putting my lack of OP knowledge on display.
I can create simple DLLs easily enough, and which I can make work with my other languages (C, C++, VB.NET, etc.). For the type of DLL I'm thinking I need (perhaps mistakenly), however, it probably would be used in FreePascal/Lazarus only.
Here is why I said this part:
For the type of DLL I'm thinking I need (perhaps mistakenly),
Again, creating a DLL is easy enough. However, for programs written in some languages, if more than one program uses the same DLL, only one of those programs can be open at a time. Or rather, only one of those programs at a time can make a call to the shared DLL without creating a
new instance of the DLL. Otherwise, a sharing violation error is raised.
Now, here is where my lack of experience in OP/FP shows:
1. If two or more programs share a DLL written in OP/FP, does each program need to create a new instance of that library using a variable (object variable?) when calling it in order to avoid a sharing violation (as is required in some other languages) if two of those programs are open at once? Or, can each program make a direct call to (load) the DLL without the need to create a new instance of it and not risk an error?
2.Given the info in question #1... does an OP program automatically create a new instance of the DLL when loading it? Or, would each program try to share the same instance of the shared DLL if each does not specifically create a new instance. I honestly don't know with OP/FP.
3. If the answer to #1 & #2 is that each program must create a new instance of the shared DLL, does doing so require that a class (or classes) be used within the DLL because one would actually be creating a new instance of the class rather than the DLL?
This is the source of my quandry. It is the case in some other languages that one or more classes be implemented within the DLL in order to create a new instance of the class(es), thus avoiding a sharing error when two or more programs which share a DLL are open and attempting to load the DLL at the same time.
I have about 3 DLLs that I use in all of my programs. Each DLL contains methods, records/enums, properties, and events which need to be accessed or made available to every program I write. Regarding the events... when an event is raised within the DLL, the program is notified via a "With Events" notation in the DLL's variable declaration. The program then decides how to handle the event (rather than the DLL itself) according to the info/data passed when the event within the DLL gets raised.
Does this clarify a bit more what I'm trying to acheive?