Examine a C++ macro that changes a file (within a managed project) from managed (/clr) to unmanaged—a task you may need it to perform for performance reasons, creating a mixed executable.
More articles by Kate Gregory
Take a look at some of the C++ language changes awaiting you in the next version of Visual Studio.
This column presents a macro for use with a class that implements one or more interfaces. When you run the macro, it adds empty function bodies for all the functions in the interface.
Add-ins are usually written in C++ (although you can create them in any .NET language) and macros are written in Visual Basic only... but not any more. Discover new options.
Learn how to add a button to a server application (a WinForm app with a big Listen button) and have the handler for the click event raise a custom event.
Remoting is one of the three techniques available on the CLR for creating distributed applications.
A feature under discussion may not be part of Standard C++, but if it's part of Managed C++, why go to C# to have it? If you're willing to target the .NET Framework and write a managed application, why not write in Managed C++?
Here's a little Object-Oriented question: If I have a function f in my base class, say that takes an integer, and I write an overload of that function in a derived class that takes something different, can I still call the original function that was inherited from the base class? The answer might surprise you.
Have you ever wondered if you could use keywords such as Property and Delegate in your C++ applications? You can, but it's not always obvious how to do so.
STL, String, StringBuilder, character arrays — How do you get the best performance when working with strings?
The libraries in the .NET Framework cover almost every task you are likely to tackle when developing for .NET. Learn how to use them from this chapter from the Visual C++ .NET 2003 Kick Start.
Benchmarking is not for the faint of heart—you have to know what you're measuring. Don't always believe that Java is faster than VB.NET, nor that C# is faster than C++.
For years, writing a service meant writing in Visual C++. Well, now you can learn how they are super easy to make in Managed C++ as well as VB .NET or C#!
Take your .NET development one step farther with Microsoft Office System projects.
Learn to use the web.config file to configure anything you'd like the user to be able to change without recompiling and redeploying your C++ application.
Learn how to arrange custom marshaling for function parameter when using P/Invoke to access a legacy function from Visual C++.
Learn about some of the changes to Visual C++ .NET, the compiler, and related developer tools coming in 'Whidbey'.
Learn why you need P/Invoke if you would like to control the marshaling or conversions associated with a call to a function where data types may need to be converted.
Yes, you can leave your legacy C++ class as native code and still use it from C# or Visual Basic .NET.
Make that old legacy C++ code available to managed code — It's a lot less work than you might expect!
Learn how to wrap your legacy C++ code into a DLL and then call it from both managed and unmanaged code.
Learn how to convert an ordinary unmanaged C++ class to a COM component, and then use that COM component from both unmanaged and managed code.
Chances are, if you are using C++ and moving to .NET, you won't want to rewrite all your existing C++ code. Kate begins a series of articles on the various ways you can reuse old C++ code in new Managed C++ projects.
C++ templates are like a secret weapon for developers. Those who never got around to learning C++ because 'it's really complicated' and 'it has all kinds of funky features no one would ever use' have no idea what we can do with templates. Now to learn about templates and the dramatic improvements in Visual C++ .NET!
If you're writing a new Managed C++ application and you're thinking of using collections in that code, you may be unsure whether to use STL collections or a class from the Base Class Library. Learn your choices.
With the release of Visual Studio .NET, many developers are now willing to consider using the new technology known as managed code. But especially for C++ developers, it can be a bit confusing. That's because C++ is special.
Microsoft announced a potentially serious bug that affects only Visual C++ developers using VS.NET 2002 and VS.NET 2003 to create mixed DLLs. While only a few may be impacted by this, all Visual C++ programmers should be aware of it.
Does a simple C++ application compile to the same IL as the equivalent VB or C# application in .NET? Let's see.
When using Managed C++, be aware that boxing and unboxing values so that you can use the Base Class Libraries carries a performance cost.
Previously Kate showed how to use the ATL CImage class to dramatically simplify working with images in classic C++ applications. This time around, she creates the an application as a Managed C++ Windows application and uses System.Drawing.Image to do the heavy lifting.
Visual Studio .NET 2003 is of special interest to Visual C++ programmers, who get all kinds of neat stuff that was missing from the current released version.
With .NET, there's no excuse for skimping on security. When you build .NET applications, you get a lot of security code without writing it yourself. Kate presents the code you need to implement role based security using Managed C++.
Web services are the talk of the Net; however, there is little information on Web Services with Visual C++. Discover how to call a Web service asynchronously using Visual C++ .NET.
Tackle using Visual C++ .NET's managed code to parse, search, and generate XML. You'll use the help of the .NET Framework to produce the managed C++ code.
XML was changing everything before .NET came along. In Kate's newest article, she covers how to read, write, and transform XML using the Microsoft COM component called MSXML 4.
Web Services are the talk of the day. If you want to learn how to create a Web Service with Managed C++, then now is your chance!
Many people will tell you that you can't build a Windows Forms application in Visual C++ .NET. However, that's not strictly true.
Visual C++ .NET is not the same as Visual C++ 6.