????? ????? ???? ????? ???? ????? ??????? ???? COM ?? ATL

?????? ????????? ?????? ?????????
???? ???????: 244495 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

??????

Microsoft Active Directory ???? ????? (ATL) ???? ?? ????? ???? ?????? ??????? STA ?? ATL ???? ?????? ????? ?? ?? ???? ?? ?????? ??? ??????? ??? ???? ??????? ????? ??. ????? ??????? ???????? ?? ??? "???? ?? ?????????" ?? ??? ??????? ????? ?????? ????.

??????? ????

??????? ??????? ?????? ?????? ?????? ???? ?????? ?????:
  1. ?????? ??? CExeModule ?? CServiceModule ????:
    CComAutoThreadModule<>
    					
    CExeModule : public CComAutoThreadModule<>
    					
  2. ???? ?????? DECLARE_CLASSFACTORY_AUTO_THREAD() ?? ?? ??? ATL ???? ????? ??? ???? ????? ???? STA
  3. ???? ?????? DECLARE_NOT_AGGREGATABLE() ?? ?? ??? ATL ???? ???? ??????? ??? ???? ????? ???? STA
    DECLARE_NOT_AGGREGATABLE(CMyPooledObject)
    					
  4. ????? ????? CExeModule::Unlock() ?? CServiceModule::Unlock() ??????? ???? ?????:
    CComAutoThreadModule<>::Unlock()
    						
    LONG CExeModule::Unlock()
    {
       LONG l = CComAutoThreadModule<>::Unlock();
       if (l == 0)
       {
         bActivity = true;
         SetEvent(hEventShutdown); // tell monitor that we transitioned to zero
       }
       return l;
    }
    						
??? ??? ??? ?????? ????? ? ??? ????? ??? ?????? ???? ?????. ????? ????????? ???????? ??????? ??:
inline void CServiceModule::Init(_ATL_OBJMAP_ENTRY* p, HINSTANCE h, UINT nServiceNameID, const GUID* plibid)
{
   CComModule::Init(p, h, plibid);
				
???:
inline void CServiceModule::Init(_ATL_OBJMAP_ENTRY* p, HINSTANCE h, UINT nServiceNameID, const GUID* plibid)
{
   CComAutoThreadModule<>::Init(p, h, plibid);
				
?????????? ATL ???? ???? ?? ????? ?????? ????? ??? ?????. ????? ????? ??? ?? ??????? _Module.Init() ?? ??????? ???? tWinMain() ???? ?????? ??? ?????? ??????? ?? ????? ?? ???????. ???? ???????? ?????? CComAutoThreadModule CComSimpleThreadAllocator ???? ???? ???????. ?????? CComSimpleThreadAllocator ???? round robin ????? ??? ????? ?????? ?? ???? ?????? ???????.

?????

?????? ??? ???? ?? ????????? ????? DECLARE_CLASS_FACTORY_AUTO_THREAD()CComAutoThreadModule ? ???? ????? Microsoft (MSDN).

????? ?? ?????????? ???? ??? ??? ??????? ?????? ?????? ?? "????? ??????? ?? Microsoft:
202128FIX: ?? ????? ?????? EXE ATL ???????? ??? CComAutoThreadModule ??? ???????

???????

???? ???????: 244495 - ????? ??? ??????: 18/???? ??????/1426 - ??????: 3.0
????? ???
  • Microsoft ActiveX Template Library 3.0, ????? ?????? ??:
    • Microsoft Visual C++ 6.0 Enterprise Edition
    • Microsoft Visual C++ 6.0 Professional Edition
    • Microsoft Visual C++, 32-bit Learning Edition 6.0
????? ??????: 
kbmt kbarchitecture kbhowto kblocalsvr kbservice kbthread KB244495 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????244495

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

 

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