替换使用中的exe和dll [英] Replace exe and dll in use

查看:219
本文介绍了替换使用中的exe和dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我有2个问题:


1)据我所知,Windows无法替换正在运行exe,但是

有人告诉我这是可行的,我找不到任何关于

的信息怎么能以编程方式完成。是这样的吗?

可能吗?如果是,怎么样?


2)我的产品有一个dll,由

系统中的multimple应用程序使用。有没有什么方法可以更新这个DLL(没有

杀死所有加载了这个dll的exe)?或者这只能在重新启动时实现


如果只是重启,我怎么能做到以下几点:我在

相同dir dll和dll_new,我怎么能一步完成:删除dll和

用dll重命名dll_new?


先谢谢,

Viv

Hi all,

I have 2 questions:

1) As I know there is no way on Windows to replace a running exe, but
somebody told me that this is doable, and I couldn''t find any info on
how could this be done programmatically. Is something like this
possible? And if yes, how?

2) My product has a dll that is used by multimple application from the
system. Is there any way in which I could update this dll (without
killing all the exe that have loaded this dll)? Or this is doable only
over a reboot?
If it''s only over a reboot, how could I do the following: i have in the
same dir dll and dll_new, how could I do in one step: delete dll and
rename dll_new with dll?

Thanks in advance,
Viv

推荐答案



" Viviana Vc" < VC ******* @ hotmail.com>在消息中写道

新闻:2i ************ @ uni-berlin.de ...

"Viviana Vc" <vc*******@hotmail.com> wrote in message
news:2i************@uni-berlin.de...
大家好,

我有两个问题:

1)据我所知,在Windows上没有办法替换正在运行的exe,但是有人告诉我这是可行的,我不能找不到任何关于
的信息如何以编程方式完成。这样的事情可能吗?如果是的话,怎么样?

2)我的产品有一个dll,由
系统的多种应用程序使用。有没有什么方法可以更新这个DLL(没有
杀死已加载此dll的所有exe)?或者这只是在重启时才可行?
如果它只是重​​启,我怎么能做到以下几点:我在
相同的dir dll和dll_new,怎么可能我一步到位:删除dll并用dll重命名dll_new?
Hi all,

I have 2 questions:

1) As I know there is no way on Windows to replace a running exe, but
somebody told me that this is doable, and I couldn''t find any info on
how could this be done programmatically. Is something like this
possible? And if yes, how?

2) My product has a dll that is used by multimple application from the
system. Is there any way in which I could update this dll (without
killing all the exe that have loaded this dll)? Or this is doable only
over a reboot?
If it''s only over a reboot, how could I do the following: i have in the
same dir dll and dll_new, how could I do in one step: delete dll and
rename dll_new with dll?




在这两种情况下,你都不能。根据您运行的操作系统,您可以重命名或移动文件并使用旧文件名复制新文件

,但运行程序将继续使用旧的

文件,直到程序重新启动。


-

-GJC [MS Windows SDK MVP]

-软件顾问(嵌入式系统和实时控制)

- http://www.mvps.org/ArcaneIncantations/consulting.htm
- g*******@mvps.org



In both cases, you can''t. Depending on what operating system you''re
running you may be able to rename or move the file and copy a new file with
the old file name, but the running programs will continue to use the old
file until the programs are restarted.

--
-GJC [MS Windows SDK MVP]
-Software Consultant (Embedded systems and Real Time Controls)
- http://www.mvps.org/ArcaneIncantations/consulting.htm
-g*******@mvps.org





" MoveFileEx"功能是用于此目的。

我一直用它来替换旧版本的dll系统dll,这些dll是

工作得更好而且windows没有'由于更高的版本需要更换

数字!

也看看这篇msdn文章Q140570:
http://support.microsoft.com/default...b;en-us ; 140570


问候,

arno


" Viviana Vc" < VC ******* @ hotmail.com> écritdansle message de news:
2i ********* ***@uni-berlin.de ...
大家好,

我有两个问题:

1)据我所知,在Windows上没有办法替换正在运行的exe,但有人告诉我这是可行的,我找不到任何关于
如何以编程方式完成的信息。这样的事情可能吗?如果是的话,怎么样?

2)我的产品有一个dll,由
系统的多种应用程序使用。有没有什么方法可以更新这个DLL(没有
杀死已加载此dll的所有exe)?或者这只是在重启时才可行?
如果它只是重​​启,我怎么能做到以下几点:我在
相同的dir dll和dll_new,怎么可能我一步到位:删除dll并用dll重命名dll_new?

提前致谢,
Viv
Hi all,

I have 2 questions:

1) As I know there is no way on Windows to replace a running exe, but
somebody told me that this is doable, and I couldn''t find any info on
how could this be done programmatically. Is something like this
possible? And if yes, how?

2) My product has a dll that is used by multimple application from the
system. Is there any way in which I could update this dll (without
killing all the exe that have loaded this dll)? Or this is doable only
over a reboot?
If it''s only over a reboot, how could I do the following: i have in the
same dir dll and dll_new, how could I do in one step: delete dll and
rename dll_new with dll?

Thanks in advance,
Viv


你好Viviana,


MoveFileEx MOVEFILE_DELAY_UNTIL_REBOOT


这对问题2有帮助吗?


祝你好运,

Slobodan

" Viviana Vc" < VC ******* @ hotmail.com>在留言新闻中写道:2i ************ @ uni-berlin.de ...
Hi Viviana,

MoveFileEx MOVEFILE_DELAY_UNTIL_REBOOT

Does this help with question 2?

Best regards,
Slobodan
"Viviana Vc" <vc*******@hotmail.com> wrote in message news:2i************@uni-berlin.de...
大家好,

我有2个问题:1)据我所知,在Windows上无法替换正在运行的exe,但是有人告诉我这是可行的,我找不到任何关于<的信息这怎么可能以编程方式完成。这样的事情可能吗?如果是的话,怎么样?

2)我的产品有一个dll,由
系统的多种应用程序使用。有没有什么方法可以更新这个DLL(没有
杀死已加载此dll的所有exe)?或者这只是在重启时才可行?
如果它只是重​​启,我怎么能做到以下几点:我在
相同的dir dll和dll_new,怎么可能我一步到位:删除dll并用dll重命名dll_new?

提前致谢,
Viv
Hi all,

I have 2 questions:

1) As I know there is no way on Windows to replace a running exe, but
somebody told me that this is doable, and I couldn''t find any info on
how could this be done programmatically. Is something like this
possible? And if yes, how?

2) My product has a dll that is used by multimple application from the
system. Is there any way in which I could update this dll (without
killing all the exe that have loaded this dll)? Or this is doable only
over a reboot?
If it''s only over a reboot, how could I do the following: i have in the
same dir dll and dll_new, how could I do in one step: delete dll and
rename dll_new with dll?

Thanks in advance,
Viv


这篇关于替换使用中的exe和dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆