Windows Classic Samples

repository·main·Indexed 26 days ago

https://github.com/microsoft/windows-classic-samples

A collection of samples demonstrating APIs used in classic Windows desktop applications for Windows and Windows Server. The repository includes self-contained samples with Visual Studio solution (.SLN) files, covering various implementations such as the Application Loopback API, Tab Integration via WindowTabManager, Acoustic Echo Cancellation, and Antimalware Provider interfaces (IAntimalwareProvider and IAmsiStream).

Tokens
214.4K
Snippets
309
Records
2K
Agent score
88%

What's inside windows-classic-samples

  1. Overview of the WSD Stock Quote Sample

    main

    The WSD stock quote sample demonstrates the basic usage of the Web Services for Devices (WSD) API through a stock quote application. The sample includes both a client and a service implementation based on the functionality described in StockQuote.wsdl and StockQuoteService.wsdl.

    Requirements:

    • Visual Studio: Requires Microsoft Visual Studio 2013 or later (any SKU). It will not compile in Microsoft Visual Studio Express 2013 for Windows.
    • Operating System (Client): Windows 8.1
    • Operating System (Server): Windows Server 2012 R2
  2. Overview of Remote Runspace Pool 01 Sample

    main

    This sample demonstrates how to construct a remote runspace pool in Windows PowerShell to execute multiple commands concurrently.

    Key objectives demonstrated in this sample include:

    1. Creating a WSManConnectionInfo object.
    2. Creating a runspace pool using that WSManConnectionInfo object.
    3. Running cmdlets (such as Get-Process and Get-Service) concurrently via the remote runspace pool.
    4. Properly closing the runspace pool.
  3. Overview of Windows PowerShell Host03 Sample

    main
    The Host03 sample is an interactive console-based host application built on top of System.Console. It demonstrates how to build a PowerShell shell by implementing custom host interface, host user interface, and host raw user interface classes. The application reads commands from the command line, executes them, and displays the results to the console.
  4. Overview of HttpCalculatorWithUsernameOverSslClientExample

    main

    This sample demonstrates an HTTP client using a service proxy to communicate with a calculator service. It implements mixed-mode security using the following configuration:

    • Transport Security: The connection is protected (signed and encrypted) by SSL, which also provides server authentication.
    • Client Authentication: Authentication is performed via a username/password pair included in a WS-Security header within the message.
  5. Overview of SetLocation API usage

    main

    The SetLocation sample demonstrates how to use the Windows 7 Location API to set the default location.

    Workflow:

    1. The application prompts the user to specify a civic address.
    2. It creates a civic address location report from that input and prints its fields.
    3. It calls IDefaultLocation::SetReport to set the default location.
    4. The updated location can be verified in the Windows Control Panel.
  6. Overview of the Storage Management Application Sample

    main

    This C++ sample demonstrates an end-to-end workflow using the Windows Storage Management API to manage storage subsystems. It is designed for storage application programmers familiar with WMIv2 and storage industry standards like SMI-S v1.5.

    The application performs the following sequence:

    1. Retrieves a subsystem object via a user-specified subsystem name.
    2. Creates a storage pool in the subsystem using one physical disk.
    3. Creates a virtual disk within that storage pool.
    4. Creates a partition on the virtual disk.
    5. Creates an NTFS volume on the partition.
    6. Formats the volume.
  7. Overview of WASAPI rendering sample structure

    main

    This sample demonstrates rendering audio data in shared mode using the event-driven programming model via WASAPI. The implementation is organized as follows:

    • WASAPIRendering.cpp: The main program entry point; handles command line parsing.
    • CWASAPIRenderer (implemented in WASAPIRenderer.cpp): The core object that uses WASAPI to render audio buffers.
    • ToneGen.h: Responsible for generating the audio samples.
    • CmdLine.cpp: Contains the command line parser logic.