Developer Tools

    .NET Compact Framework Sample: Asynch Callbacks

    Language:
    English
    Learn to use the MessageWindow class to support asynchronous functions between managed and unmanaged code.
    • Version:

      1.0

      File Name:

      AsynchCallbacksSampleSetup.exe

      Date Published:

      12/9/2003

      File Size:

      522 KB

        In the .NET Compact Framework newsgroup several people have asked questions about passing delegates to native Win32 DLL's to be used as asynchronous callbacks to P/Invoke back into managed code after an unmanaged function wants to report back to its caller. Unfortunately, passing delegates to unmanaged code is not supported by the .NET Compact Framework. As an alternative, the .NET Compact Framework contains the MessageWindow class. This class can be used to pass Windows messages from unmanaged code to managed code. The functionality of MessageWindow is great if you need to pass Windows messages to a managed control. In certain solutions however, using the MessageWindow class is somewhat artificial and not a true replacement for delegates. With a little extra coding effort it is possible to setup an event handler mechanism that exposes itself to the managed application developer as if true delegates exist to call back from unmanaged code into managed code. In this article we provide you with the details of this mechanism.
    • Supported Operating System

      Windows 2000, Windows 2000 Service Pack 2, Windows 2000 Service Pack 3, Windows 2000 Service Pack 4, Windows NT, Windows Server 2003, Windows XP

        • Visual Studio .NET 2003
        1. Click the Download link to start the download.
        2. Do one of the following:
          • To start the installation immediately, click Open or Run this program from its current location.
          • To copy the download to your computer for installation at a later time, click Save or Save this program to disk.

    Popular downloads

      • 01

        Microsoft .NET Framework 4 (Web Installer)

        The Microsoft .NET Framework 4 web installer package downloads and installs the .NET Framework components required to run on the target machine architecture and OS. An Internet connection is required during the installation. .NET Framework 4 is required to run and develop applications to target the .NET Framework 4.

      • 04

        Microsoft .NET Framework 3.5 Service Pack 1

        Microsoft .NET Framework 3.5 Service Pack 1 is a full cumulative update that contains many new features building incrementally upon .NET Framework 2.0, 3.0, 3.5, and includes cumulative servicing updates to the .NET Framework 2.0 and .NET Framework 3.0 subcomponents.

    Loading your results, please wait...

    Free PC updates

    • Security patches
    • Software updates
    • Service packs
    • Hardware drivers