????? ????? DLLs ??????? ???????? ?????? MFC

?????? ????????? ?????? ?????????
???? ???????: 198846 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

??????

DLL ?????? ?? ???? ?????? ???????? ??????? ?? ???? ??????. ???? ????? ??????? DLL ???? ????? ??? ????? ??????? ?? ???? ?????? "???????" ?????? ???. ????? ??? ??? ???? ??? ???? ?? ??????? DLL ??????.

???? ????????? ????? ????? ??? ???? ????? DLL ?? 5.0 Visual C++.

??????? ????

???? ??? ??????? ????? ??? ?????? ?????? ????? ??????? "?" ???? DLL ????? ??? ??? ???? ??????. ???????? ??? ???????? ???? ???? ??????? ?? ??? RC ???? ?????? ?????? ???? ?? ?? ??????? ?? ??? ????? ?????.

  1. ????? ????? AppWizard MFC ??????? (???? ????? ??? ??????? ?? ??? ??????) ? ?????? ?????????? ???? ???????. ??????? ????? MFC ?? DLL ??????.
  2. ????? ??????? DLL AppWizard MFC ?????? ??????? ???? (ResourceDll ?? ??? ??????) ? ???? DLL ???? MFC (???????? DLL MFC ????????) ???? DLL. ???? ??? ????? ?? ??? .lib DLL ????? ??????? ???? ???? ??????? linker ?? ??????? ??????? ????? ????????.
  3. ?????? RC ?????? ????? Resource.h ResourceDll.rc2 ???? ????? ??????? RES ?? ????? ResourceDll.
  4. ?? ??????? ' ????? ' ? ??? ??????? ???????? ????? Project ?? ???? ???????. ????? ??? MyApp.RC ?? ??????? ResourceDll.
  5. ??? ??? ?????? ??? ??? ??? ???? ???????? ???????:

    1. ?? ??????? ????? ? ???? ??? ??????? ???? ????? ??????? ? Debug ????. ??? ???? ??????? ????? ??????? ???????? ????? ??? ????????? ?????? ?? ?? ResourceDll - ??????? Win32 ?? ????? ????? ????? ???????? ? ??? ????????? ?????? ?? ?? ResourceDll - ????? Win32.
    2. ?? ???? ?????? "??????? ???????" ? ???? ??????? ?????? ?? ??????? ??????- ???? ???????. ???? ?? ??????? ??????? ??????? ??????? ???? ????? ?? ???? ?????? ????? ??????? Project ??? ?????. ?? ??????? ??????? ????? ??????? preprocessor AFX_RESOURCE_DLL ? AFX_TARG_XXX ??? ???? XXX ???? ??? ?????. ??? ???? ??????? FRA ?? ???????? [?????, DEU ?? ????????? ? ENU ?? ?????????? (???????? ???????)].

      ??????: ???? ????????? preprocessor ?????? ???? ?????? ??? ??????? ??????.
    3. ?? ??????? ??????- ???? ????? ? ??? ????? ????????? ?? ??????.

      ??????: ?? ????? ??? ??? DLLs ???????? ?? ?????? ?????. ??? ???? ?????? ?? ????? ??? ????? "d" ??? ??? ????? ????? ???? ??? ??? ????? DLL ???????? ?????? ??????? ?????? ?????? ?????? ????????? ???????. ?? ??? ??? ?? ???? ????? ????? ????? ???????? ?? ???? ????? ????? ???????? ?????? ??????.

      ???? ????? ??? ?? ???? ????? ????? ??????? ???? ?????? linker ???? ?? DLL.

      1. ??? ???? ????? ?????? ?? Project ??????? ???? ??????.
      2. ?? ?? ??????? ??????? ??????- ?????? ? ????? ??????? ???? ???? ????? ?????? ??????? DLL.
      3. ???? ?? ????? ??? ??? ??? ?? ??? ??? ?????? ??????? ?? ???? ??????? ??? ??? ??? ???????.
      ??? ???? ??????? ??????? ????? dll ???????? ??????? ?? ????????, ????? Debug/ResourceDLL.dll ??? Debug ???????? / ResourceDLLd.FRA Debug Win32 ??????? ???????? ????? Release/ResourceDLL.dll ??? ??????? ??????? / ResourceDLL.FRA ?????? ??????? Win32.

      ???????? ??? DLLs ???? ??? ??? DLL ???????? ?? ??? ?????? ??? MyApp.exe ?? ??? ??????? Windows ?????, ?? ?? ?????? ?????? ResourceDll.dll ?? ResourceDllD.dll. ??? ???? ??????:

      ???? ResourceDll.FRA\windows\system\ResourceDll.dll

      ????? ????? ????? ?????? ???? ???? ????? ??? ?????? MyApp.res ? ?? DLL ??? ?????.

      1. ??? ???? ????? ??????? ?? ???? ?????? ??????? Project.
      2. ?? ?? ??????? ??????? ??????- ?????? ? ????? ??????? ???? ???? ????? ?????? ??????? ??????.
      3. ???? ?? ????? ??? ??? ??? ?? ??? ?????? ??? ???? ????? ??? ??????? ??????? ?? ???? ??????? ??? ??? ??? ???????.
  6. ?? ??????? ' ????? ' ? ??? ??????? ?? ????? ??????? ResourceDLL. ???? ???? ????????? ?? ??????? ??????? ???? ??????? ??????. ???? ??? ????? ??????? C/C++ ??????? ?? Preprocessor ?????. ????? ???? ??????? ??? ?? ??? ?????? ????? ???????.
  7. ?? Project ??????? ? ??? ??????? ????? ????? ??? ???????. ???? ???? ????????? ?? ??????? ?? ???? ??????? ??????. ???? ??? ????? ??????? ??????? ?? ?? ????? ??????? Preprocessor ?????? AFX_RESOURCE_DLL. ????? ????? ??? ???? ??????? ?? MyApp.exe.
  8. ?? ????? ????? ResourceView ??? ?? ???? ?? ?? ????? ??? ??????? CTRL, ??? ???? ??????? ?? ??????? ??? ???????. ??? ???? ??????? ??? ?? ????????? ????? IDR_MAINFRAME ????? ? IDD_ABOUTBOX ?????? ??? ???? ?????? "".

    ??? ?? ??????? ResourceDLL ?? ??????? ????? ? ???? ??? ??? ??????? ????? ????? ??? ????? ???????? ?? ???? "?????". ??? ?? ???? ???? ?????? ????? ?? ????? ????? ??? ????. ??? ????? ???????, ??? ????? ?? ????.

    (??? ?? ??? ????? ???? ???? ????? ??????? ???????? ?? ????? ?????? ??? ??? ???? ?? ????? ???? ??? ?????? ??????. ??? ????? ????????? ???????? ????? ????? ?????? ????? ?? "????? ??? ?????" ???? ?????? ????? ?????????? ?????.)

    ??????: ????? ????? ??? ??????? preexisting ??? ??? ?????? ?? ??? ?????. ??? ???? ??????? ????? AppWizard MFC ?????? ??????? ??????? ???? ?????? ????? ????? ???????? ???????? ??? ????????? ????????? ?????? ??? ?????? ???????. ??? ????? ??? ??????? ? ???? ????? ????? ?? ???? ????? ??? ??????? ??? ???? ResourceView. ??? ?? ??????? ???? ???? ??? ??? ?? ???? ??? RC ??????? ????????. ???? ?????/??????? ???? ??????? ?? ????? ???????? ?? ??????? ??? ???????. ??? ??????? ???????? ?????? ?? ???????? ?????? ?? ???????.
  9. ????? ????? ??? HINSTANCE ??? ??????? ????? CWinApp ?????? ???. ?????? ???? ???? DLL. ??? ???? ??????:
       HINSTANCE m_hInstResDLL;
    						


    ???? ????? CWinApp::InitInstance ??????? ??? ?????? ??????? ??????? ?? ????? ?????? ?? ??????:

    #ifdef _DEBUG
       // Load the debug version of the localized resources.
       m_hInstResDLL = LoadLibrary("ResourceDlld.dll");
    #else
       // Load the release version of the localized resources.
       m_hInstResDLL = LoadLibrary("ResourceDll.dll");
    #endif
       ASSERT( m_hInstResDLL != NULL );
    						


    ??????: ??? ?? ??????? ??? ??????? AfxSetResourceHandle() ??? ??? ??????.
  10. ????? ???? ??? CMyApp::ExitInstance() ?? ????? ???????? ?????. ????? ?????? ?????? ????? ??????? ??? ????? ???????. ?? ?????? ?????? ??? ???:

    int CMyApp::ExitInstance()
    {
       // In case you load multiple DLL's make sure to free them,
       // and avoid calling FreeLibrary with a NULL pointer.
    
       FreeLibrary(m_hInstResDLL);
       return CWinApp::ExitInstance();
    }
    						


  11. ??????? ???? ??????. ???????? ???? ?????? "????? ???????" ??? ??????? ????????. ???? ??? ??? DLL ???????? ??? ???? ????? ?? ?? ?????? ??????.

?????

?????? ????? 56 (TN056) ??? ??????? ????? MFC ????? (MFC40LOC.DLL).

?????? ????? ???? 57 (TN057) ?? ??????? ?????????? ???? ???? ????????? ????? ???? ????? ?? ???? ?????? ?? OLE "??" ????? ?? DLL ???? ?????? MFC.

?????? ????? 23 (TN023) ??? ??????? ???????? ???????? ?? ????? ?????? ?? ??? ????? MFC.

?????? ??? ??????? ?????? ??? ???? Foundation Microsoft ??????? ?? ??????? Visual C++ 2.2 ?????????? ??????? ?????? ?????? ??????? ??????? ?? "????? ??????? ?? Microsoft:
147149 "????? ????? ?????? ???? ??? ???? Foundation"


(c) 1999 ???? Microsoft ? ???? ???? ?????. ????????? ??? Isaac Varon ? Microsoft Corporation.

???????

???? ???????: 198846 - ????? ??? ??????: 13/????? ??????/1425 - ??????: 1.1
????? ???
  • Microsoft Visual Studio 97 Service Pack 3
  • Microsoft Visual C++ 5.0 Professional Edition
  • Microsoft Visual Basic 5.0 Enterprise Edition
????? ??????: 
kbmt kbhowto kbintl kbintldev KB198846 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????198846
????? ??????? ?? ????? ???? ?? ????? ???????
?? ????? ????? ?????? ???? ???? ???? ??? ??????? ??? ?? ? ?? ??? ??????? Microsoft ??? ????? ??? ??????? ????? ?????? ?????

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com