When MSDN only contains C# examples, and I am trying to code C++, how can I find the names of the required include files? For example, I want to write some C++ code that uses the TextPointer
class, how do I find the #include
statements that are required?
TextPointer
is a .NET class. C++Builder does not support .NET development, which is why its compiler can't find any .NET related C++ header files - they don't exist in C++Builder's runtime libraries.
The only way you can use .NET classes in C++Builder projects is if either:
the .NET classes are COM compatible (ie, have the [ComVisible(true)]
attribute), then C++Builder code can create instances of the appropriate COM objects.
you wrap your .NET code in a DLL written in Visual Studio, and have it export a C compatible interface so C++Builder code can then use it.
you use a 3rd party framework, like CrossTalk or Hydra, that allows C++Builder code to host the .NET runtime and use .NET assemblies and types as-is.