 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Scott Guest
|
Posted: Wed Jun 07, 2006 9:20 pm Post subject: Opening several instances of one DLL in one VB program? |
|
|
Is it possible to open more than one instance of one DLL in a
VB program. I created the DLL in C++ Builder 6. I have a way to
make reference to each DLL instance and its classes that I will
have open. However I have only been allowed to have one
instance of the dll at a time. Everytime I try to call the
function that I want to call it allows me to do that function
but cuts off what I had stored from the previous call of the
same function. In each function I pass an ID value that
Identifies the DLL or class that I want to use. If that value
is bad the function doesn't execute.
Hope this is enough information,
Thanks,
Scott |
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Wed Jun 07, 2006 10:26 pm Post subject: Re: Opening several instances of one DLL in one VB program? |
|
|
"Scott" <developer (AT) needhelp (DOT) com> wrote in message
news:4486fcea$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Is it possible to open more than one instance of one DLL
in a VB program.
|
No. That is just how DLLs work in general. You could call LoadLibrary()
multiple times, but only the first time will actually load the DLL into the
process. Subsequent calls will just increment the DLLs reference count.
| Quote: | I have a way to make reference to each DLL instance and its
classes that I will have open.
|
You will only have one instance running. That is all you need. A class is
just a block of code. You can instantiate a class multiple times. You
don't need multiple DLL instances in order to do that.
| Quote: | Everytime I try to call the function that I want to call it allows me to
do that function but cuts off what I had stored from the previous call
of the same function.
|
Depending on what the function does to begin with, that is likely what it is
supposed to be doing. Please provide more details about what the function
actually does.
| Quote: | In each function I pass an ID value that Identifies the DLL or class
that I want to use. If that value is bad the function doesn't execute.
|
What does that have to do with loading multiple instances of the DLL?
Sounds to me like the DLL is already designed to handle multiple class
instances in a single DLL instance. So what exactly are you having a
problem with?
Gambit |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|