Kernel32GetConsoleOriginalTitle Method

Retrieves the original title for the current console window.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Kernel32.dll", CharSet = CharSet.Auto, BestFitMapping = false, 
	ThrowOnUnmappableChar = true, SetLastError = true)]
public static uint GetConsoleOriginalTitle(
	StringBuilder buffer,
	uint bufferSize
)

Parameters

buffer  StringBuilder
A pointer to a buffer that receives a null-terminated string containing the original title.
bufferSize  UInt32
The size of buffer, in characters.

Return Value

UInt32
If the function succeeds, the return value is the length of the string copied to the buffer, in characters.

If the buffer is not large enough to store the title, the return value is zero and GetLastError returns ERROR_SUCCESS.

If the function fails, the return value is zero and GetLastError returns the error code.

Remarks

See Also