Windows github source code

Windows github source code

Windows classic samples

This repo contains samples that demonstrate the API used in Windows classic desktop applications.

Note. You can use Microsoft Visual Studio to search the entire set of source code here to see whether the usage of a particular Windows API is being demonstrated. Clone this repo (or download the ZIP) to your local file system. Then Find in Files in Visual Studio, set Look in to the folder you cloned or downloaded into, and search for an API name. You can install Visual Studio without expense. A Community edition is available—it’s free for students, open-source contributors, and individuals.

These samples demonstrate the functionality and programming model for Windows and Windows Server. This repo contains Visual Studio solution (SLN) files for each sample, along with the source files, assets, resources, and metadata needed to compile and run the sample. For more info about the programming models, platforms, languages, and APIs demonstrated in these samples, check out the documentation on the Windows Dev Center.

Most of these samples were created for Windows 7, Windows 8.1 and/or Windows Server 2012 R2 using Visual Studio 2013, but some were created with earlier versions, or with specific SKU and other requirements. In many cases, the samples will also work on later versions than the ones indicated. If you cannot get a sample to work as expected, it might have platform, version, or SKU-specific requirements. If you have any issues with the samples, please provide feedback using the Issues list.

To get a copy of Visual Studio, go to Visual Studio Downloads.

Windows github source code

Windows Research Kernel Source Code

Copyright (c) Microsoft Corporation. All rights reserved.

You may only use this code if you agree to the terms of the Windows Research Kernel Source Code License agreement (see License.txt). If you do not agree to the terms, do not use the code.

The Windows Research Kernel v1.2 contains the sources for the core of the Windows (NTOS) kernel and a build environment for a kernel that will run on x86 (Windows Server 2003 Service Pack 1) and amd64 (Windows XP x64 Professional) A future version may also support booting WRK kernels on Windows XP x86 systems, but the current kernels will fail to boot due to differences in some shared structures.

The NTOS kernel implements the basic OS functions for processes, threads, virtual memory and cache managers, I/O management, the registry, executive functions such as the kernel heap and synchronization, the object manager, the local procedure call mechanism, the security reference monitor, low-level CPU management (thread scheduling, Asynchronous and Deferred Procedure calls, interrupt/trap handling, exceptions), etc.

The NT Hardware Abstraction Layer, file systems, network stacks, and device drivers are implemented separately from NTOS and loaded into kernel mode as dynamic libraries. Sources for these dynamic components are not included in the WRK, but some are available in various development kits published by Microsoft, such as the Installable File System (IFS) Kit and the Windows Driver Development Kit (DDK).

WRK v1.2 includes most of the NTOS kernel sources from the latest released version of Windows, which supports the AMD64 architecture on the Desktop. The kernel sources excluded from the kit are primarily in the areas of plug-and-play, power management, the device verifier, kernel debugger interface, and virtual dos machine. The primary modifications to WRK from the released kernel are related to cleanup and removal of server support, such as code related to the Intel IA64.

Читайте также:  Как настроить дамп памяти windows

Organization of the WRK sources

The file License.txt contains the license covering use of the WRK.

The public\ directory contains a number of include files shared among system components. base\ntos\ contains the NTOS sources.

The primary NTOS source components included in the WRK are organized as follows:

Copying and building the WRK

WRK can be built on Windows Server 2003 or later, or on Windows XP or later.

To copy WRK to your machine:

  • open a console window;
  • switch to DVD;
  • switch to \Resources\Windows_Research_Kernel\Get_WRK;
  • run WRKCopy.bat /w (if you run WRKCopy.bat without parameters, WRK will be copied to C:\WRK-v1.2); ALTERNATIVELY
  • open Windows Explorer (MyComputer);
  • create the destination directory on your hard drive;
  • switch to DVD;
  • navigate to \Resources\Windows_Research_Kernel\Get_WRK\WRK-v1.2;
  • select all files and subdirectories, drag and drop them to the destination directory.

To adjust the WRK environment setting batch file:

  • open console window;
  • switch to the directory WRK was copied to;
  • run Notepad WRKEnv.bat;
  • make sure the «set path=. » statement contains the directory WinDbg was installed to; (unchanged WRKEnv.bat refers to default directory C:\Program Files\Debugging Tools for Windows);
  • save the file and exit Notepad.

To build WRK from command line:

  • open console window;
  • switch to the directory WRK was copied to;
  • run Build (or Rebuild or Clean ), see note about below; ALTERNATIVELY
  • open console window;
  • switch to the directory WRK was copied to;
  • run WRKEnv , see note about below;
  • switch to base\ntos;
  • run nmake %wrkarch%=

To build WRK in Visual Studio 2008 environment:

  • start VS2008;
  • open solution \WRK.sln, where is the directory WRK was copied to;
  • make sure the configuration is amd64/Win32 or x86/Win32, as is appropriate;
  • select Build/Build Solution (or Rebuild Solution, or Clean Solution).

To start Windows Debugger from command line:

  • open console window;
  • switch to the directory WRK was copied to;
  • run WRKDebug , see note about below; ALTERNATIVELY
  • open console window;
  • switch to the directory WRK was copied to;
  • run WRKEnv , see note about below;
  • run WinDbg %windbgargs%

Batch files Build.bat, Rebuild.bat, Clean.bat, WRKEnv.bat and WRKDebug.bat take one parameter – target architecture, which is x86 or amd64.

For the first use of either of these batch files, default target architecture is x86.

Once the target architecture was defined (explicitly or by default), it cannot be changed for current console window, and parameter of the batch files is ignored.

The title of the window where the WRK environment has been set to some target architecture changes to “WRK x86” or “WRK amd64”.

To work with different target architecture, open another console window.

Copyright (c) Microsoft Corporation. All rights reserved.

You may only use this code if you agree to the terms of the Windows Research Kernel Source Code License agreement (see License.txt). If you do not agree to the terms, do not use the code.

The Windows Research Kernel v1.2 contains the sources for the core of the Windows (NTOS) kernel and a build environment for a kernel that will run on x86 (Windows Server 2003 Service Pack 1) and amd64 (Windows XP x64 Professional) A future version may also support booting WRK kernels on Windows XP x86 systems, but the current kernels will fail to boot due to differences in some shared structures.

The NTOS kernel implements the basic OS functions for processes, threads, virtual memory and cache managers, I/O management, the registry, executive functions such as the kernel heap and synchronization, the object manager, the local procedure call mechanism, the security reference monitor, low-level CPU management (thread scheduling, Asynchronous and Deferred Procedure calls, interrupt/trap handling, exceptions), etc.

Читайте также:  Windows подлинное по майкрософт

The NT Hardware Abstraction Layer, file systems, network stacks, and device drivers are implemented separately from NTOS and loaded into kernel mode as dynamic libraries. Sources for these dynamic components are not included in the WRK, but some are available in various development kits published by Microsoft, such as the Installable File System (IFS) Kit and the Windows Driver Development Kit (DDK).

WRK v1.2 includes most of the NTOS kernel sources from the latest released version of Windows, which supports the AMD64 architecture on the Desktop. The kernel sources excluded from the kit are primarily in the areas of plug-and-play, power management, the device verifier, kernel debugger interface, and virtual dos machine. The primary modifications to WRK from the released kernel are related to cleanup and removal of server support, such as code related to the Intel IA64.

Organization of the WRK sources

The file License.txt contains the license covering use of the WRK.

The public\ directory contains a number of include files shared among system components. base\ntos\ contains the NTOS sources.

The primary NTOS source components included in the WRK are organized as follows:

Copying and building the WRK

WRK can be built on Windows Server 2003 or later, or on Windows XP or later.

To copy WRK to your machine:

  • open a console window;
  • switch to DVD;
  • switch to \Resources\Windows_Research_Kernel\Get_WRK;
  • run WRKCopy.bat /w (if you run WRKCopy.bat without parameters, WRK will be copied to C:\WRK-v1.2); ALTERNATIVELY
  • open Windows Explorer (MyComputer);
  • create the destination directory on your hard drive;
  • switch to DVD;
  • navigate to \Resources\Windows_Research_Kernel\Get_WRK\WRK-v1.2;
  • select all files and subdirectories, drag and drop them to the destination directory.

To adjust the WRK environment setting batch file:

  • open console window;
  • switch to the directory WRK was copied to;
  • run Notepad WRKEnv.bat;
  • make sure the «set path=. » statement contains the directory WinDbg was installed to; (unchanged WRKEnv.bat refers to default directory C:\Program Files\Debugging Tools for Windows);
  • save the file and exit Notepad.

To build WRK from command line:

  • open console window;
  • switch to the directory WRK was copied to;
  • run Build (or Rebuild or Clean ), see note about below; ALTERNATIVELY
  • open console window;
  • switch to the directory WRK was copied to;
  • run WRKEnv , see note about below;
  • switch to base\ntos;
  • run nmake %wrkarch%=

To build WRK in Visual Studio 2008 environment:

  • start VS2008;
  • open solution \WRK.sln, where is the directory WRK was copied to;
  • make sure the configuration is amd64/Win32 or x86/Win32, as is appropriate;
  • select Build/Build Solution (or Rebuild Solution, or Clean Solution).

To start Windows Debugger from command line:

  • open console window;
  • switch to the directory WRK was copied to;
  • run WRKDebug , see note about below; ALTERNATIVELY
  • open console window;
  • switch to the directory WRK was copied to;
  • run WRKEnv , see note about below;
  • run WinDbg %windbgargs%

Batch files Build.bat, Rebuild.bat, Clean.bat, WRKEnv.bat and WRKDebug.bat take one parameter – target architecture, which is x86 or amd64.

For the first use of either of these batch files, default target architecture is x86.

Once the target architecture was defined (explicitly or by default), it cannot be changed for current console window, and parameter of the batch files is ignored.

The title of the window where the WRK environment has been set to some target architecture changes to “WRK x86” or “WRK amd64”.

To work with different target architecture, open another console window.

Читайте также:  Audacity linux нет звука

Windows github source code

Focused samples showing API usage patterns for common scenarios with each UWP feature.

Samples and demos showing how to create beautiful apps using Windows.UI.Composition and the Fluent Design System.

Showcase samples

End-to-end app samples showing real-world integration of numerous UWP features

Other

Samples that demonstrate the Desktop Conversion Extensions for converting classic desktop apps (such as Win32, Windows Forms, WPF) and games to UWP apps and games.

Windows 10 UWP samples
Mini-app samples

Small but realistic apps showing related UWP features working together

Task snippets

Copy-and-paste snippets for small but useful UWP-related tasks

Tools and libraries

Backward-compatible versions of Windows UI features including UWP XAML controls, and Fluent styles and materials.

A collection of helper functions, custom controls, and app services. Install gallery app — View docs

A Visual Studio 2017 extension that accelerates the creation of new UWP apps using a wizard-based experience. Install extension

A new way for developers to exchange card content in a common and consistent way.
Docs — Schema — Samples — Visualizer

An easy-to-use WinRT API for immediate mode 2D graphics rendering with GPU acceleration, available to C# and C++ developers. View docs

Scripts to simplify setting up a Windows developer box.

Packaging

Samples that show how to use Visual Studio 2017 to create Windows applications that can take the best of Win32 and UWP worlds in a single package.

Tools, libraries, documentation and samples for creating app-compat fixups to enable classic Win32 applications to be distributed and executed as packaged apps.

Enables developers on a variety of platforms to unpack packages for the purposes of distribution from either the Microsoft Store, or their own content distribution networks.

Games and graphics

Game development samples written by the Microsoft Xbox Advanced Technology Group.

DirectX 12 graphics samples that demonstrate how to build graphics-intensive applications on Windows. View blog

DirectX toolkit

Collections of helper classes for writing DirectX code in C++.

New Features

#154 Support for Group Policy Management
#149 User vs. System installation (non MSIX)
#118 Added Experimental support for Repository REST API

denelon released this Mar 25, 2021

This release includes a few new features as well as some improvements and bug fixes.

The most noteworthy new experimental feature is winget import . You can pass a properly formatted JSON file using import, and the Windows Package Manager will install multiple packages with one command. Note: some packages trigger a reset in the shell or terminal so you will see an incorrect failure notification. In the event one of these packages is included in an import, the import command will not finish unless it is the last package installed.

Known packages are:

  • Microsoft.PowerShell
  • Microsoft.PowerShell-Preview
  • Microsoft.WindowsTerminal
  • Microsoft.WindowsTerminalPreview

Users can now opt-out of Windows Package Manager telemetry using winget settings . The Windows telemetry settings still take precedence if they are disabled.

The Windows Package Manager validation command has been updated to support the new v1.0 manifest schemas.

Some packages return a non-zero success code after the package has been installed. Once the v1.0 manifest schemas are in place, these non-zero success codes can be added to manifests and client will no longer report an install failure if one is returned.

New Features

#137 Support non-zero exit codes as success (requires manifest version 1.0)
#220 Added Experimental support to import multiple packages from a file
#279 Opt-Out of Telemetry
#740 Support for manifest v1.0 schema validation

Bug Fixes

#794 The Experimental Upgrade command now correctly selects the latest version of a package

Оцените статью