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.
Namespace: DevCase.Win32.NativeMethodsAssembly: 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
)
<DllImportAttribute("Shell32.dll", CharSet := CharSet.Unicode, ExactSpelling := true,
SetLastError := true>]
Public Shared Function CommandLineToArgvW (
cmdLine As String,
<OutAttribute> ByRef refNumArgs As Integer
) As String()
Dim cmdLine As String
Dim refNumArgs As Integer
Dim returnValue As String()
returnValue = Shell32.CommandLineToArgvW(cmdLine,
refNumArgs)
public:
[DllImportAttribute(L"Shell32.dll", CharSet = CharSet::Unicode, ExactSpelling = true,
SetLastError = true)]
static array<String^>^ CommandLineToArgvW(
String^ cmdLine,
[OutAttribute] int% refNumArgs
)
[<DllImportAttribute("Shell32.dll", CharSet = CharSet.Unicode, ExactSpelling = true,
SetLastError = true)>]
static member CommandLineToArgvW :
cmdLine : string *
refNumArgs : int byref -> string[]
No code example is currently available or this language may not be supported.
- 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.
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.