To unload a client module, the operating system calls the client module's Unload function. See Initializing and Registering a Client Module for more information about how to specify a client module's Unload function during initialization.
A client module's Unload function ensures that the client module is deregistered from the Network Module Registrar (NMR) before the client module is unloaded from system memory. A client module initiates deregistration from the NMR by calling the NmrDeregisterClient function, which it typically calls from its Unload function. A client module must not return from its Unload function until after it has been completely deregistered from the NMR. If the call to NmrDeregisterClient returns STATUS_PENDING, the client module must call the NmrWaitForClientDeregisterComplete function to wait for the deregistration to complete before it returns from its Unload function.
For example:
If a client module is registered as a client of multiple Network Programming Interfaces (NPIs), it must call NmrDeregisterClient for each NPI that it supports. If a network module is registered as both a client module and a provider module (that is, it is a client of one NPI and a provider of another NPI), it must call both NmrDeregisterClient and NmrDeregisterProvider.
A network module must wait until all of the deregistrations are complete before returning from its Unload function.
A client module is not required to call NmrDeregisterClient from within its Unload function. For example, in the situation where a client module is a subcomponent of a complex driver, the deregistration of the client module might occur when the client module subcomponent is deactivated. However, in such a situation the driver must still ensure that the client module has been completely deregistered from the NMR before returning from its Unload function.
到此这篇快程序卸载(卸载快应用)的文章就介绍到这了,更多相关内容请继续浏览下面的相关推荐文章,希望大家都能在编程的领域有一番成就!版权声明:
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若内容造成侵权、违法违规、事实不符,请将相关资料发送至xkadmin@xkablog.com进行投诉反馈,一经查实,立即处理!
转载请注明出处,原文链接:https://www.xkablog.com/kjbd-yiny/60855.html