Click here to Skip to main content
15,884,388 members
Articles / Multimedia / Audio

Muting All Microphones on Vista/Win7

Rate me:
Please Sign up or sign in to vote.
4.89/5 (9 votes)
12 Aug 2012CPOL2 min read 50.5K   1.9K   12  
How to enumerate and mute all audio capture endpoints using Core Audio API
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
// Copyright (c) Microsoft Corporation. All rights reserved
//

//
//  Command line parsing logic
//
struct CommandLineSwitch
{
    enum CommandLineSwitchType
    {
        SwitchTypeNone,
        SwitchTypeInteger,
        SwitchTypeString,
    };

    LPCWSTR SwitchName;
    LPCWSTR SwitchHelp;
    CommandLineSwitchType SwitchType;
    void **SwitchValue;
    bool SwitchValueOptional;
};

bool ParseCommandLine(int argc, wchar_t *argv[], const CommandLineSwitch Switches[], size_t SwitchCount);

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
South Africa South Africa
I have a keen interest in IT Security, Internet applications, and systems/embedded development. My recent research interests have included secure networks, models of trust, trusted agents, information exchange, and software development methodologies.

Comments and Discussions