Windows Runtime Internals

My new course about the internals of the Windows Runtime is now available from Pluralsight!

Windows Runtime Internals

Discover the compilers, tools, mechanics, and abstractions that make up the Windows Runtime’s component architecture.

This course will help you understand how the class-based component abstraction presented by Windows Runtime language projections is actually implemented in terms of traditional COM interfaces. You will learn all about the tools and compilers that are necessary to build rich components entirely with Standard C++ in the most efficient manner. You will discover how abstractions like constructors and static methods are implemented with activation factories. You will learn how delegates and events are actually implemented with COM interfaces and lock-free algorithms. And you will discover the weird and wonderful way that the Windows Runtime uses C++ templates to simulate CLR generics using parameterized interfaces.

This is my first advanced level course for Pluralsight and not for the faint-hearted. Enjoy!

2 thoughts on “Windows Runtime Internals

  1. ravi

    kenny
    great course,
    but u didn’t covered iasynoperation and its variant

    auto main()
    {

    Check(RoInitialize(RO_INIT_MULTITHREADED));

    auto userStatics = ActivateInstance(L”Windows.System.UserProfile.UserInformation”);

    ComPtr<IAsyncOperation> operation;
    Check(MakeAndInitialize(&operation));

    // how to execute the below function ???????
    Check(userStatics->GetDisplayNameAsync(operation.GetAddressOf()));

    return EXIT_SUCCESS;
    }

    do i have to use threadpool.
    how to execute the below statement
    userStatics->GetDisplayNameAsync( what to pass )

    Reply
    1. Kenny Kerr Post author

      The component provides the implementation of IAsyncOperation. You simply need to grab the reference returned by GetDisplayNameAsync and wait for it to complete. Remember that IAsyncOperation is a parameterized interface so you need to use something like this:

      ComPtr<ABI::Windows::Foundation::IAsyncOperation<HSTRING>> operation;

      Reply

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