Skip to content

Latest commit

 

History

135 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Windows API Code Pack for .NET

CI Build Release NuGet Version NuGet Downloads

Managed wrappers for selected Windows Shell and desktop APIs, originally released by Microsoft as the Windows API Code Pack 1.1 and maintained here for modern .NET.

Active source: Source/Current/Windows API CodePack
License: MIT — see LICENSE
Roadmap: Source/Current/ROADMAP.md · Changes: Changelog.md

Packages

Package Contents
WindowsAPICodePack Meta-package (all components)
WindowsAPICodePackCore Task Dialogs, power, network list, restart/recovery
WindowsAPICodePackShell Shell objects, Common File Dialogs, Explorer Browser, taskbar
WindowsAPICodePackSensors Sensor platform
WindowsAPICodePackExtendedLinguisticServices Extended Linguistic Services
WindowsAPICodePackShellExtensions Preview handlers and thumbnail providers

Target frameworks: .NET Framework 4.6.2–4.8.1 and .NET 8 / 9 / 10 (net*-windows). Windows desktop (WinForms/WPF) only.

DirectX from the original Code Pack is not shipped in 8.x. The Current tree keeps an unbuilt stub; see Components/DirectX/README.md.

Usage notes

TaskDialog and comctl32 v6

If creating a TaskDialog throws NotSupportedException about comctl32.dll version 6, enable Common Controls v6 in the application manifest:

<dependency>
  <dependentAssembly>
    <assemblyIdentity
        type="win32"
        name="Microsoft.Windows.Common-Controls"
        version="6.0.0.0"
        processorArchitecture="*"
        publicKeyToken="6595b64144ccf1df"
        language="*" />
  </dependentAssembly>
</dependency>

Visual Studio can cache the old DLL in-process; restart the IDE if the error persists after adding the manifest.

Authenticode signing

Optional during build. Disabled by default.

Certificate file:

<PropertyGroup>
  <EnableAuthenticodeSigning>true</EnableAuthenticodeSigning>
  <CodeSigningCertificatePath>path\to\your\certificate.pfx</CodeSigningCertificatePath>
  <CodeSigningCertificatePassword>your-password</CodeSigningCertificatePassword>
</PropertyGroup>

Certificate store:

<PropertyGroup>
  <EnableAuthenticodeSigning>true</EnableAuthenticodeSigning>
  <CodeSigningCertificateThumbprint>your-certificate-thumbprint</CodeSigningCertificateThumbprint>
</PropertyGroup>

Requires Windows SDK (SignTool.exe). The build continues with a warning if signing fails. For GitHub Actions, see .github/workflows/README.md (CODESIGN_CERTIFICATE_BASE64, CODESIGN_CERTIFICATE_PASSWORD).

Samples and original tree

  • Source/Samples — mix of modernized and legacy demos; prefer samples that reference Source/Current.
  • Source/Original — archive of the Microsoft-era sources, tests, and full DirectX.

Contributing

See CONTRIBUTING.md. Bug reports should include Windows version, TFM, and package version (template).

About

No description, website, or topics provided.

Resources

Contributing

Security policy

Stars

49 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages