Share via


FragmentProviderUnmanaged Sample

This topic describes the FragmentProviderUnmanaged Sample code sample. It contains the following topics:

  • Description
  • Download Information
  • Minimum Requirements
  • Building the Sample
  • Running the Sample
  • Related Topics

Description

The FragmentProviderUnmanaged Sample code sample demonstrates how to implement a Microsoft UI Automation provider for a simple custom control. Specifically, the sample implements providers for a fragment of the automation element tree that is hosted in a window (HWND) object.

Download Information

The FragmentProviderUnmanaged Sample is installed as part of the Microsoft Windows Software Development Kit (SDK) and is available in the following location.

Location Path/URL
Windows SDK %Program Files%\Microsoft SDKs\Windows\[version number]\Samples\winui\UIAutomation\fragproviderunmgd

Minimum Requirements

Product Version
Operating System Windows 7, Windows Server 2008
Windows SDK 7.0
Microsoft Visual Studio 2008

Building the Sample

To build the sample using Visual Studio 2008:

  1. Run the Windows SDK Configuration Tool provided with the SDK to add SDK include directories to Visual Studio.
  2. Open Windows Explorer and navigate to the project directory.
  3. Double-click the icon for the .sln (solution) file to open the project in Visual Studio.
  4. On the Build menu, select Build Solution to build the solution. The application will be built in the default \Debug or \Release directory.

To build the sample from the command line, see Building Samples in the Windows SDK release notes at the following location: %Program Files%\Microsoft SDKs\Windows\v7.0\ReleaseNotes.htm

Running the Sample

To run the sample:

  1. Navigate to the directory that contains the new executable, using the command prompt or Windows Explorer.
  2. Type FragmentProviderUnmanaged.exe at the command line, or double-click the icon for FragmentProviderUnmanaged.exe to launch it from Windows Explorer.

To run from Visual Studio, press F5 or click Start Debugging from the Debug menu.