共享DLL代码 [英] Shared DLL code

查看:75
本文介绍了共享DLL代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在MSDN上读到,当多个应用程序使用相同的DLL时,它们每个都有自己的DLL数据副本,但它们共享相同的代码。当第二个应用程序在第一个应用程序调用
该函数之后立即调用DLL中的函数并且它仍在执行但尚未返回时会发生什么?第二个应用程序的调用是否会立即返回错误代码?或者第二个应用程序的调用是否等待第一个应用程序的调用完成,然后执行
并返回预期值?

I read on MSDN that when multiple applications use the same DLL, they each have their own copy of DLL data, but that they share the same code. What happens when a second application calls a function in the DLL right after a first application has called that function and it is still executing and hasn't returned yet? Does the call by the second application immediately return an error code? Or does the call by the second application wait until the call by the first application is finished, and then executes and returns the expected value?

推荐答案

来自两个应用程序的调用独立运行,并行运行(如果它们在不同的CPU上运行)并且不要等待或相互阻塞。

Calls from both applications run independently, in parallel (if they run on different CPUs) and do not wait or block each other.

(你能解释一下原因吗?)

(Can you explain why?)

- pa


这篇关于共享DLL代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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