???? ??????? ?? ????? ?? ????????? ??? ??? ????? ??????? debuggee ?????? ???? ?? 63 ????? ??????? ?????? ????? ???????

???? ???????: 939969 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

???????

???? ??? ????????? ??????. ???? ??????? ???? ??? ???? ??? ????? ????? ???? ????? ???? "interop - ????." ?? ????? debuggee ??? ????? ????? ?????? (CLR). ???? debuggee ????? ??????? ?????? (TLS) ???? ????? ???? ?? 63 ??? ?? ????? debuggee CLR. ?? ??? ?????????? ?????? ???? ?? ????????? ?? ?? ?????? ?????? ???? ??????? ??????? CPU. ??? ?? ????? ????? ?? debuggee ???????? ????? ?????? ?????? ???? ??????? ??? ????.

?????? ?? ???? ??? ??????? ????? ?? ?? ???? ??? ????? ?????? ?????? ICorDebug (???? ??? Microsoft Visual Studio .NET 2002 Visual Studio .NET 2003 ? Visual Studio 2005) ??? ????? ??????? ????????.

?????

???? ??? ??????? ??? CLR ?????? ????? TLS. ??? ????? ?????? ??? ????? ????? TLS ????? CLR ?? ???? ????? ? ?? ???? ????? ??? ????? ???? ????? ???? ????? 63 ???? ????.

???? ??????

??????? ?????? ??? ??? ??????? ?????? ???? ????? ???????:
  • ??????? ???? ??????? ??????? ??? ?? ?????? ??????? ??? ????? ?? ???? ????? ??? ?????.
  • ????? debuggee ????? CLR ??????. ??? ????? ????? TLS ????? ??? ???? ????? ???? ? ????? ?????. ????? ??? ?????? debuggee CLR ?????? ? ??? ??? ????? ????? ???.
  • ????? debuggee ??? ????? TLS ??? ?? CLR. ???? ????? ??? ????? ??? ?? ?? ?????? ??? ??????? ??? ????? CLR. ?????? ????? ?????? ????? ????????? ???????? ??????.
    #include "stdafx.h"
    #include "windows.h"
    
    const int NumSlots = 20; 
    DWORD g_slots[NumSlots];
    
    // Call this from Main
    // This "reserves" the low TLS slots for the CLR.
    void AllocateSlots()
    {
        for(int i = 0; i < NumSlots; i++)
        {
            g_slots[i] = TlsAlloc();
        }
    }
    
    // Call this after your application finishes allocating its own TLS slots, but 
    // before you load any managed code.
    void FreeSlots()
    {
        for(int i =0; i < NumSlots; i++)
        {
            TlsFree(g_slots[i]);
            g_slots[i] = 0;
        }
    }
    
    
    int _tmain(int argc, _TCHAR* argv[])
    {
    
        AllocateSlots();
    
        // these are exactly like the slots that are allocated by the application.
        DWORD i1 = TlsAlloc();
        DWORD i2 = TlsAlloc();
        DWORD i3 = TlsAlloc();
        DWORD i4 = TlsAlloc();
        
        FreeSlots();
    
        // ....pretend we load the CLR...
        
        // This should now be a low slot
        DWORD i5 = TlsAlloc();
        
    
    	return 0;
    }
    

???????

???? ???????: 939969 - ????? ??? ??????: 19/????/1428 - ??????: 2.3
????? ???
  • Microsoft .NET Framework 2.0
  • Microsoft .NET Framework 1.1
  • Microsoft .NET Framework 1.0
????? ??????: 
kbmt kbtshoot kbexpertiseadvanced kbprb KB939969 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????939969

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