C++/CLI in Action

Some of you already know about this, but I have been working on a C++/CLI book for Manning Publications for the past five months or so. The book is titled “C++/CLI in Action” and is targeted at Visual C++ developers with a .NET background who’d like to interop their native code with managed frameworks. The first part of the book discusses the C++/CLI language and semantics, the second part moves into mixed-mode programming techniques, and the third part covers specific managed frameworks and how to interop with them from native code.

There are chapters dedicated to mixing MFC with .NET, Windows Forms and MFC interop, interoping with Avalon (Windows Presentation Foundation), and interoping with Indigo (Windows Communication Foundation) including migrating DCOM based applications to Indigo. Of course, the WinFX coverage is futuristic in nature since the frameworks are still in an advanced Beta stage. The book is currently scheduled for a Sep/Oct 2006 release, and in a couple of weeks, I’ll be submitting the first draft of the final manuscript for editing and review.

It’s been a lot of hard work, especially since I have a fulltime day-job, and I’ve been doing an extra 25-35 hours every week just for the book (and that’s in addition to my 40 hours at work). I just hope that readers will benefit from the long hours of R&D I have put into the book. In future blog entries, I’ll write more details of the book’s nature and structure.

Advertisements

26 thoughts on “C++/CLI in Action

  1. Hello Nish,
    that sounds interesting.
    I am already an owner of your Bock co-production with Tom Archer (Extending MFC Apps…)
    So your new book is an update for VS 2005, the new CLI syntax and then some ?

    I think I will be right in tranistion when the book is publsihed, so it might come in handy.

  2. Hello Martin,

    Yes – the new book is based on the new C++/CLI syntax. It’s not an update of the previous book though. While there is a little overlap, specially the MFC .NET interop, the new book does not really discuss the .NET framework classes at all. It’s more about interop techniques, understanding C++/CLI semantics, and utilizing managed frameworks like Windows Forms, WinFX etc.

  3. Hi Nish.

    That sounds very interesting. When do you expect the book to show up? Also, do you have
    any guess how much is it going to cost?

  4. I hope this book pushed Microsoft to improve the Workflow, Presentation, and Communication
    Foundation integration with C++ in VS 2005. We need something better from them soon.
    I am very frusted by C# as I try to get Workflow to work with our developemnt effort
    which to date has a ton of C++ code.

  5. Nemanja

    I believe it is currently scheduled for a October 2006 release, give or take a couple of weeks. And I have no idea what its price will be. But most Manning books have e-editions that are lower-priced.

  6. So my whishes include:

    – Please NOT another book that cites large chapters of the class library manual. Nearly all books do that and render themself uninterestingly to me.
    – Currently converting/compiling a 2-solutions, 20-projects application (formerly MFC/VS.NET 2003) with C++/CLI, I’m rather interested in reading about large-scale, real-world scenarios when it comes to speed-tuning and performance-optimizing in medium- to mid-sized applications.

    Thanks πŸ™‚

  7. Hey Uwe,

    It is not a class library sort of book – and does not intend to really cover the .NET library. Readers are assumed to be familiar with the .NET framework and the BCL classes.

    It basically covers various interop techniques and scenarios, most of which can be directly or indirectly applied to real world scenarios. Of course, since it’s a small (or medium) sized book (roughly 300 pages or so), I obviously haven’t tried to feature a massive example. Instead, what I’ve tried to do is to demonstrate techniques that can be scaled up and applied to actual real life scenarios such as the ones you describe.

  8. hi nish
    i m really sory to post this thing here..but i really dont knw where to post it
    so here’s my problem:
    i want to change the way windows makes a login…
    means…
    after loading that username-password dialogbox i want to display my dialog box..till then
    all things will b jammed
    i had searched alot, found about msgina.dll its functions, but not exactly the procedure
    so plz help me as u r a vc freak

  9. Hi Nish!

    sounds interesting. Our product will be completely refactored from base (FoxPor with dBase and C/C++ Modules operating with the Sequiter CodeBase API c4dll.dll)
    to C++/CLI, C# and a SQL like RDBMS using an unmanaged DB-Layer for portability reasons running the DB tier on a Windows or a LINUX or what ever. So I’m looking forward to get a copy of your book. Starting next year with the refactoring the release seems to be perfect πŸ˜‰

    Cheers,
    Rainer

  10. Hi,
    where can we get the book from? How much will that cost?

    Thanks. πŸ™‚

    //This is not a signature
    while (I’m_alive) {
    printf(“I Love Programming”);
    }

  11. I’m very much looking forward to your book Nish. I only wish it were coming out sooner.

    Right now I am in the process of trying to write a Winforms application that needs to access
    a large pre-existing C++ library. I am having a tough time deciding on the trade-offs
    between a C# GUI/wrapper or a straight C++/CLI application. There aren’t a lot of resources
    out there at the moment.

    I will pick your book up as soon as it comes out!

  12. I am looking forward to the release of your new book on C++/CLI.
    Could you alert me through my email when it is available to purchase??

    Thanks,
    HL

  13. Hello Nish,

    I read your article on codeproject with the title “A rational attempt to substantiate C++/CLI as a first class CLI language”. This article is very well written and is very usefull.
    Write now I’m writting a module in managed C++ and the concepts that you focus
    on your article are usefull imediatelly.
    When do you expect to release the book ?

    Thanks,
    LFS

    p.s. Your performance comparisons were very usefull and will be in the near future, at
    least around here. Once again, thanks

  14. Hi

    Sounds like just the book I may be looking for. Does it cover interop with NON MFC code as well? We have a large C project NON MFC which we compiled using IJW and now want to add new Managed code but also to integrate the new code with the existing C code. We want to do things like host our existing windows, dialogs and controls on Windows forms and vice versa. I notice you mention MFC. I hope it deals with NON MFC as well as this sort of information is sadly lacking anywhere.

  15. Hi Nish,

    As you are writing a book on WCF and WPF you may have some insite on this: Would you care to speculate if Microsoft intends to replace DirectX with WPF in the long run?

    From what I understand, WPF seems to be able to do a number of things that DirectX can do (e.g., transformations) more simply than DirectX.

  16. Hello Mike B,

    WPF internally uses DirectX – and it can even be seen as an abstract wrapper for DirectX. So I don’t see Microsoft removing DirectX any time soon, unless WPF is re-written entirely from scratch. Possibly, documentation and samples for native DirectX usage would be fewer from now on, but for those who want to directly use DirectX, I believe it will continue to be available.

  17. WPF is at a higher abstraction level than DirectX
    Actually, DirectX 10 was going to be called WGF (Windows Graphics Foundation) but in the end they decided to stick with the old naming convention.
    In any event, WPF sits on top of WGF/DirectX and both APIs have different goals.

    On a different subject, I cant wait to put my hands on Mr.Nish’s new book.
    Is the table of contents anywhere we can see it? Thanks!

  18. hi,

    i want to develop Hosting a Windows Forms control in an MFC dialog but use of MFC is Use MFC in a Static Library, for this m getting following error,
    fatal error C1189: #error : Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d]

    if m using MFC in a shared dll, its working fine,

    great job of masked text box, am interesting developing such type of application can you help me out from this error

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s