SimpleProviderUnmanaged Sample
This topic describes the SimpleProviderUnmanaged Sample code sample. It contains the following topics:
- Description
- Download Information
- Minimum Requirements
- Building the Sample
- Running the Sample
- Related Topics
Description
The SimpleProviderUnmanaged Sample code sample demonstrates how to create a simple custom control that supports UI Automation. The control is a simple button-like control that supports the Invoke control pattern.
Download Information
The SimpleProviderUnmanaged 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\SimpleUIAProvider |
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:
- Run the Windows SDK Configuration Tool provided with the SDK to add SDK include directories to Visual Studio.
- Open Windows Explorer and navigate to the project directory.
- Double-click the icon for the .sln (solution) file to open the project in Visual Studio.
- 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:
- Navigate to the directory that contains the new executable, using the command prompt or Windows Explorer.
- Type SimpleProviderUnmanaged.exe at the command line, or double-click the icon for SimpleProviderUnmanaged.exe to launch it from Windows Explorer.
To run from Visual Studio, press F5 or click Start Debugging from the Debug menu.