Skip to content

Latest commit

 

History

History
101 lines (76 loc) · 2.71 KB

addconsolealias.md

File metadata and controls

101 lines (76 loc) · 2.71 KB
title description author ms.author ms.topic keywords f1_keywords MS-HAID MSHAttr ms.assetid topic_type api_name api_location api_type
AddConsoleAlias function
See reference information about the AddConsoleAlias function, which defines a console alias for the specified executable.
miniksa
miniksa
article
console, character mode applications, command line applications, terminal applications, console api
consoleapi3/AddConsoleAlias
consoleapi3/AddConsoleAliasA
consoleapi3/AddConsoleAliasW
wincon/AddConsoleAlias
wincon/AddConsoleAliasA
wincon/AddConsoleAliasW
AddConsoleAlias
AddConsoleAliasA
AddConsoleAliasW
base.addconsolealias
consoles.addconsolealias
PreferredSiteName:MSDN
PreferredLib:/library/windows/desktop
e4072c3c-cf32-4992-847e-efdb846e5784
apiref
AddConsoleAlias
AddConsoleAliasA
AddConsoleAliasW
Kernel32.dll
DllExport

AddConsoleAlias function

[!INCLUDE not-recommended-banner]

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.

[!INCLUDE no-vt-equiv-shell-banner]

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 ConsoleApi3.h (via 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