Home > Articles > Programming > C#

  • Print
  • + Share This
This chapter is from the book


  1. What other languages are available for the CLR that can be accessed using managed C++?

  1. Right now, Microsoft is only creating and distributing Visual Basic, C#, and managed C++. However, Microsoft has published the CLR specifications for other companies to create compilers for other languages. Several companies have pledged support for the platform and have announced plans to bring out compilers for various other programming languages. One of the first announced was by a company bringing out a COBOL compiler for the CLR. Any and all languages compiled for the CLR should be able to create objects that you can access using managed C++, or that you can create components using managed C++ that these languages can access.

  1. In the unmanaged C++ client, why couldn't I put the __gc modifier on the managed class?

  1. The managed class in the unmanaged client has to be accessible by the unmanaged code in the application. When a managed class is marked for garbage collection, it can't be accessed by any unmanaged code. The reverse situation was seen yesterday, when you had a managed, garbage collected class accessing an unmanaged class. It seems that managed, garbage collected objects can reach outside the managed sandbox to access unmanaged objects. It's just that the garbage collected objects are located on the CLR managed heap, which can't be accessed from the outside. But objects on the managed CLR heap can use non-garbage collected pointers to access objects on the outside.

  • + Share This
  • 🔖 Save To Your Account