zoukankan      html  css  js  c++  java
  • AfxLoadLibrary VS LoadLibrary

    For AfxLoadLibrary, and serving as the dll search rule: When no path is specified, the function searches for the file in the following sequence:
    • The directory from which the application loaded.

    • The current directory.

    • Windows 95/98: The Windows system directory. Windows NT: The 32-bit Windows system directory. The name of this directory is SYSTEM32.

    • Windows NT only: The 16-bit Windows system directory. There is no Win32 function that obtains the path of this directory, but it is searched. The name of this directory is SYSTEM.

    • The Windows directory.

    • The directories that are listed in the PATH environment variable.

    Each process maintains a reference count for each loaded library module. This reference count is incremented each time AfxLoadLibrary is called and is decremented each time AfxFreeLibrary is called. When the reference count reaches zero, the module is unmapped from the address space of the calling process and the handle is no longer valid.

    Be sure to use AfxLoadLibrary and AfxFreeLibrary (instead of the Win32 functions LoadLibrary and FreeLibrary) if your application uses multiple threads and if it dynamically loads an extension DLL. Using AfxLoadLibrary and AfxFreeLibrary insures that the startup and shutdown code that executes when the extension DLL is loaded and unloaded does not corrupt the global MFC state.

  • 相关阅读:
    堆排序
    分治与递归的结合-------快速排序
    递归算法--写实例----阶乘问题---整数划分问题
    PAT A+B格式
    学习C#的第一天
    C#快捷键
    字符串匹配算法(在字符串T中查找是否有与字符串P相同的子串)
    linux中nohup实时查看启动日志的解决办法
    linux 产看pycharm 安装路径
    pip requirements.txt
  • 原文地址:https://www.cnblogs.com/taoxu0903/p/1517108.html
Copyright © 2011-2022 走看看