Export (0) Print
Expand All

AddConsoleAlias function

Defines a console alias for the specified executable.

Syntax


BOOL WINAPI AddConsoleAlias(
  _In_  LPCTSTR Source,
  _In_  LPCTSTR Target,
  _In_  LPCTSTR ExeName
);

Parameters

Source [in]

The console alias to be mapped to the text specified by Target.

Target [in]

The text to be substituted for Source. If this parameter is NULL, then the console alias is removed.

ExeName [in]

The name of the executable file for which the console alias is to be defined.

Return value

If the function succeeds, the return value is TRUE.

If the function fails, the return value is FALSE. To get extended error information, call GetLastError.

Remarks

To compile an application that uses this function, define _WIN32_WINNT as 0x0501 or later. For more information, see Using the Windows Headers.

Examples

For an example, see Console Aliases.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wincon.h (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

Unicode and ANSI names

AddConsoleAliasW (Unicode) and AddConsoleAliasA (ANSI)

See also

Console Aliases
Console Functions
GetConsoleAlias
GetConsoleAliases
GetConsoleAliasExes

 

 

Community Additions

ADD
Show:
© 2015 Microsoft