I know what a DLL is. But thanks for your inputs. The problem is also my
English, sorry about that.
time.
executed more than one time at one time. I have more than one instance
than one thread per client.
"Joseph M. Newcomer" <newcomer@flounder.com> schrieb im Newsbeitrag
No, that makes no sense at all. A DLL is a DLL, and is *not* an
application; you asked a
misleading question. Please try to state your REAL problem, no some
bizarre and
inappropriate restatement of the problem.
Note that unless you have a shared data segment, a DLL is just a
subroutine library and
requires no synchronization when used by different applications. When
used by multiple
threads, you have to treat it as any other multithreaded application and
provide
appropriate synchronization.
If you don't have a shared data segment, why should it matter if there
are
1, 30, or 500
copies of a DLL running? There is no interaction between the processes.
Now if the DLL
is doing something like accessing a file or database or some other
shared
state, then that
is a different question, and has NOTHING to do with it being a DLL at
all!
In fact, the
DLLness is essentially irrelevant to the problem.
Please ask a coherent question and you might get a useful answer. For
example:
"I have a DLL with a shared data segment which must be shared by
multiple
processes..." or
"I have a DLL which manages shared state [describe state here]..."
When you finally state the REAL problem, you might be able to get an
answer. You have not
given any specification of what needs to be serialized! The vague
description about
"serialization" is pointless in the context you are asking; a PRECISE
SPECIFICATION of the
problem is essential.
joe
On Thu, 29 Jun 2006 17:34:51 +0200, "Hans Stoessel"
<hstoessel.list@pm-medici.ch> wrote:
The problem is, that my "application" is a DLL. The methods from the DLL
are
called from a Java application via JNI. And this Java application can
have
more than one thread who call methods and the Java application can run
more
than one time. This means there can be more than one process (instance
of
the DLL) with more than one thread is running. The serialization of the
threads is not the problem, but the serializaion of the processes if I
have
more than one instance of the DLL. The functionality in the DLL should
run
only one time, not a few times at the same time.
Thanks
"Eddie Pazz" <drpazz@hotmail.com> schrieb im Newsbeitrag
news:et077t4mGHA.4964@TK2MSFTNGP04.phx.gbl...
You can check on the OnInitInstance if the app is already running. If
so,
abort on the second instance, or you can wait until the first instance
is
done. Check out:
http://www.codeproject.com/cpp/csingleinst.asp
"Hans Stoessel" <hstoessel.list@pm-medici.ch> wrote in message
news:ekQNll4mGHA.192@TK2MSFTNGP03.phx.gbl...
Hi
I have an application and on the same PC two instances of this
application. This means there are two processes of the same
application.
It is neceesary that the processes doesn't run simultaneous.
Is it possible to serialize the two processes?
I mean the processes, not the threads.
I use Visual Studio 2003 and C++./MFC.
Thanks
Hans
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm