且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

打开一个Windows应用程序的两个实例?

更新时间:2023-11-22 16:26:28

嗨Nina,


每个实例都在自己的地址空间中运行,所以,没有,全局变量

不会相互干扰。


HTH,


Bernie Yaeger >

Nina <镍** @ discussions.microsoft.com>在消息中写道

news:16 ********************************** @ microsof t.com ...
Hi Nina,

Each instance runs in its own address space, so, no, the global variables
will not interfere with each other.

HTH,

Bernie Yaeger

"Nina" <Ni**@discussions.microsoft.com> wrote in message
news:16**********************************@microsof t.com...
当用户正在处理Windows应用程序时,他或她同时启动同一应用程序的另一个实例。这会影响此应用程序第一个实例中的全局变量吗?如果在用户尝试打开第二个实例时应用程序已经打开,我怎么能以编程方式知道
?有没有办法禁止用户一次启动超过一个
的应用程序?

谢谢。

Nina
While user is working on a windows application, at same time he or she
launches another instance of the same application. Will this affect the
global variables in the first instance of this application? How can I
know
programmatically if the application is already opened when user tries to
open
the second instance? Is there a way to prohibit user to launch more than
one
application at one time?

Thanks.

Nina



嗨Nina,


每个实例都在自己的地址空间中运行,所以,不,全局变量

不会互相干扰。


HTH,


Bernie Yaeger


" ;尼娜&QUOT; &LT;镍** @ discussions.microsoft.com&GT;在消息中写道

news:16 ********************************** @ microsof t.com ...
Hi Nina,

Each instance runs in its own address space, so, no, the global variables
will not interfere with each other.

HTH,

Bernie Yaeger

"Nina" <Ni**@discussions.microsoft.com> wrote in message
news:16**********************************@microsof t.com...
当用户正在处理Windows应用程序时,他或她同时启动同一应用程序的另一个实例。这会影响此应用程序第一个实例中的全局变量吗?如果在用户尝试打开第二个实例时应用程序已经打开,我怎么能以编程方式知道
?有没有办法禁止用户一次启动超过一个
的应用程序?

谢谢。

Nina
While user is working on a windows application, at same time he or she
launches another instance of the same application. Will this affect the
global variables in the first instance of this application? How can I
know
programmatically if the application is already opened when user tries to
open
the second instance? Is there a way to prohibit user to launch more than
one
application at one time?

Thanks.

Nina





" Nina" &LT;镍** @ discussions.microsoft.com&GT;在消息中写道

news:16 ********************************** @ microsof t.com ...

"Nina" <Ni**@discussions.microsoft.com> wrote in message
news:16**********************************@microsof t.com...
当用户正在处理Windows应用程序时,他或她同时启动同一应用程序的另一个实例。这会影响此应用程序第一个实例中的全局变量吗?如果用户尝试打开
打开第二个实例时,如果应用程序已经打开,我怎么能以编程方式知道
?有没有办法禁止用户一次启动超过
的一个应用程序?
While user is working on a windows application, at same time he or she
launches another instance of the same application. Will this affect the
global variables in the first instance of this application? How can I know programmatically if the application is already opened when user tries to open the second instance? Is there a way to prohibit user to launch more than one application at one time?




我也有兴趣知道我的应用程序是否已在运行时它会启动。
启动。


如果用户打开我的应用程序所在的数据文件,这将特别有用

默认处理程序。如何将新数据文件交给我应用程序的已经运行的

实例,而不是生成我的应用程序的第二个副本?



I am also interested in knowing if my application is already running when it
starts up.

This is especially helpful if a user opens a data file to which my app is
the default handler. How can I hand the new datafile to the already running
instance of my app instead of spawning a second copy of my app?