AuroraRuntime/Source/Processes/AuArgvQuote.hpp

40 lines
997 B
C++

/*
* Copyright(C) 2011 - Daniel Colascione, Microsoft Corporation
* Public Domain || Microsoft gave their engineer permission to publish this reference code in his advisory article on MSDN/TechNet operated by MS
*/
#pragma once
/*++
Routine Description:
This routine appends the given argument to a command line such
that outputStringToArgvW will return the argument string unchanged.
arguments in a command line should be separated by spaces; this
function does not add these spaces.
arguments:
argument - Supplies the argument to encode.
outputString - Supplies the command line to which we append the encoded argument string.
force - Supplies an indication of whether we should quote
the argument even if it does not contain any characters that would
ordinarily require quoting.
Return Value:
None.
Environment:
Arbitrary.
--*/
void
ArgvQuote(
const AuString &argument,
AuString &outputString,
bool force
);