Re: Microsoft Document Explorer - VC++ 2005

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



John Gabriel wrote:

Where does this leave me with VC++ 2005 - do you acknowledge this is a problem which is going to be fixed, i.e. Microsoft knows about it?


What I know so far, is that they are redesigning MSDN documentation for 2005 from scratch, so I suppose any documentation problems will be fixed.


Seems to me that when one uses ^, the compiler generates code so that it is used as an index into an array of pointers to objects on the *managed heap* the CLR uses to manage the separate heap.
So in this sense it is not a pointer and can not be used as one. So although you state that *Handles have different semantics than usual pointers* - this is only true for the CLR for in all previous versions of C++, it was essentially the same as a pointer. Strange then that it is called a *handle* and not a *gc-index*.


I do not know the implementation details of a handle (perhaps if you check the latest C++/CLI draft

http://www.plumhall.com/C++-CLI%20draft%201.10.pdf


and the CLI standard that provides implementation details of the VM as well as its assembly language, you will probably find how they are implemented.



I am not sure I understand the difference between a handle in C++/CLI and a managed pointer in "managed extensions". In both cases, handles/managed pointers have been different than native pointers, in the sense that their values change whenever the object is moved in the managed heap by the CLR (that's why you can't do pointer arithmetic with them).



So I am led to believe. Your webpage makes sense. Can I take it for granted everything you state is correct or do I need to make yet more comparisons against other sources? :-)


As far as I know it is correct, with perhaps some room left for minor clarifications. Legally speaking, I do not provide any guarantee however. :-)
.




Relevant Pages

  • Re: C / C++ skills
    ... We don't have a good version of .NET to target small embedded MCUs yet. ... There was a company making a CLR for embedded targets but they went ... static memory allocation, since the small targets I have in mind don't ... bounds-checking, uninitialized pointers, etc. ...
    (comp.arch.embedded)
  • Re: Microsoft Document Explorer - VC++ 2005
    ... you may be correct but I am going by the documentation I read: ... Declares a handle to an object on the managed heap. ... The common language runtime maintains a separate heap on which it implements ... you state that *Handles have different semantics than usual pointers* - this ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Peace between Native and .NET freaks (a proposal)
    ... > architecture via publicly afforded Microsft API's directly into the ... > commercially available CLR - like nuking a few pointers on the GC ...
    (borland.public.delphi.non-technical)
  • Re: need to send a pointer in C#
    ... One problem with the idea of pointers in .Net is that the CLR will, ... CLR managed memory space and into unmanaged memory. ... >>Is that quite true, Mattias? ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Unmaged Code
    ... In a previous post you mention the statement "The clr will sometimes ... to care about this unless you use pointers with managed objects. ... If you really need pointers into managed objects, ... A discussion of unmanaged code and data is really ...
    (microsoft.public.dotnet.framework.clr)