BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Opening several instances of one DLL in one VB program?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (IDE)
View previous topic :: View next topic  
Author Message
Scott
Guest





PostPosted: Wed Jun 07, 2006 9:20 pm    Post subject: Opening several instances of one DLL in one VB program? Reply with quote



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





PostPosted: Wed Jun 07, 2006 10:26 pm    Post subject: Re: Opening several instances of one DLL in one VB program? Reply with quote



"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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (IDE) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.