IShellLinkW::GetArguments method (shobjidl_core.h)
Gets the command-line arguments associated with a Shell link object.
HRESULT GetArguments( [out] LPWSTR pszArgs, [in] int cch );
A pointer to the buffer that, when this method returns successfully, receives the command-line arguments.
The maximum number of characters that can be copied to the buffer supplied by the pszArgs parameter. In the case of a Unicode string, there is no limitation on maximum string length. In the case of an ANSI string, the maximum length of the returned string varies depending on the version of Windows—MAX_PATH prior to Windows 2000 and INFOTIPSIZE (defined in Commctrl.h) in Windows 2000 and later.
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
In Windows 7 and later, it is recommended that you retrieve argument strings though IPropertyStore (using the PKEY_Link_Arguments value) rather than this method, which can silently truncate the string if the provided buffer is not large enough. IPropertyStore allocates a string of the correct size.
|Minimum supported client||Windows XP [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|
|DLL||Shell32.dll (version 4.0 or later)|