Shell32CommandLineToArgvW Method

Parses a Unicode command line string and returns an array of pointers to the command line arguments, along with a count of such arguments, in a way that is similar to the standard C run-time argv and argc values.

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("Shell32.dll", CharSet = CharSet.Unicode, ExactSpelling = true, 
	SetLastError = true)]
public static string[] CommandLineToArgvW(
	string cmdLine,
	out int refNumArgs
)

Parameters

cmdLine  String
Pointer to a null-terminated Unicode string that contains the full command line.

If this parameter is an empty string the function returns the path to the current executable file

refNumArgs  Int32
Pointer to an integer that receives the number of array elements returned, similar to argc.

Return Value

String
A pointer to an array of LPWSTR values, similar to argv.

If the function fails, the return value is .

To get extended error information, call GetLastWin32Error) function.

Remarks

See Also