gecko-dev/xpcom/io
Toshihito Kikuchi 7d84bc7ec1 Bug 1597963 - Pass VT_ERROR for Explorer to call ShellExecuteExW with null verb. r=aklotz
The patch for Bug 1588975 specified the "open" verb to execute a target, but
the default verb is not always "open".  For example, the default verb for a font
file is "preview".  We should specify null verb to start the default operation.

Now we use `IShellDispatch2.ShellExecute` to ask explorer.exe to call
`ShellExecuteExW`.  That method takes an optional `VARIANT` parameter as a verb.
According to https://devblogs.microsoft.com/oldnewthing/20140919-00/?p=44023,
we need to pass `VT_ERROR` to omit an optional parameter.  If we pass
other values such as `nullptr` with `VT_BSTR` or `VT_EMPTY`, explorer.exe calls
`ShellExecuteExW` with the empty string `""` instead of `nullptr`, which is not
considered as a valid verb if the target file is not associated with any app.

Differential Revision: https://phabricator.services.mozilla.com/D54036

--HG--
extra : moz-landing-system : lando
2019-11-22 22:52:00 +00:00
..
Base64.cpp
Base64.h
CocoaFileUtils.h
CocoaFileUtils.mm
FileDescriptorFile.cpp
FileDescriptorFile.h
FilePreferences.cpp
FilePreferences.h
FileUtilsWin.cpp
FileUtilsWin.h
InputStreamLengthHelper.cpp
InputStreamLengthHelper.h
InputStreamLengthWrapper.cpp
InputStreamLengthWrapper.h
NonBlockingAsyncInputStream.cpp
NonBlockingAsyncInputStream.h
SlicedInputStream.cpp
SlicedInputStream.h
SnappyCompressOutputStream.cpp
SnappyCompressOutputStream.h
SnappyFrameUtils.cpp
SnappyFrameUtils.h
SnappyUncompressInputStream.cpp
SnappyUncompressInputStream.h
SpecialSystemDirectory.cpp
SpecialSystemDirectory.h
components.conf
crc32c.c
crc32c.h Bug 1562642 - add missing license in xpcom/ r=froydnj 2019-11-11 21:44:32 +00:00
moz.build
nsAnonymousTemporaryFile.cpp
nsAnonymousTemporaryFile.h
nsAppDirectoryServiceDefs.h
nsAppFileLocationProvider.cpp Bug 1545123 - simplify how we get directory information for plugins, r=handyman,mconley 2019-11-02 22:33:42 +00:00
nsAppFileLocationProvider.h
nsBinaryStream.cpp
nsBinaryStream.h
nsDirectoryService.cpp
nsDirectoryService.h
nsDirectoryServiceDefs.h
nsDirectoryServiceUtils.h
nsEscape.cpp
nsEscape.h
nsIAsyncInputStream.idl
nsIAsyncOutputStream.idl
nsIBinaryInputStream.idl
nsIBinaryOutputStream.idl
nsICloneableInputStream.idl
nsIConverterInputStream.idl
nsIConverterOutputStream.idl
nsIDirectoryEnumerator.idl
nsIDirectoryService.idl
nsIFile.idl
nsIIOUtil.idl
nsIInputStream.idl
nsIInputStreamLength.idl
nsIInputStreamTee.idl
nsILineInputStream.idl
nsILocalFileMac.idl
nsILocalFileWin.idl
nsIMultiplexInputStream.idl
nsIOUtil.cpp
nsIOUtil.h
nsIObjectInputStream.idl
nsIObjectOutputStream.idl
nsIOutputStream.idl
nsIPipe.idl
nsISafeOutputStream.idl
nsIScriptableBase64Encoder.idl
nsIScriptableInputStream.idl
nsISeekableStream.idl
nsIStorageStream.idl
nsIStreamBufferAccess.idl
nsIStringStream.idl
nsITellableStream.idl
nsIUnicharInputStream.idl
nsIUnicharLineInputStream.idl
nsIUnicharOutputStream.idl
nsInputStreamTee.cpp
nsLinebreakConverter.cpp
nsLinebreakConverter.h
nsLocalFile.h
nsLocalFileCommon.cpp
nsLocalFileCommon.h
nsLocalFileUnix.cpp
nsLocalFileUnix.h
nsLocalFileWin.cpp Bug 1597963 - Pass VT_ERROR for Explorer to call ShellExecuteExW with null verb. r=aklotz 2019-11-22 22:52:00 +00:00
nsLocalFileWin.h
nsMultiplexInputStream.cpp
nsMultiplexInputStream.h
nsNativeCharsetUtils.cpp
nsNativeCharsetUtils.h
nsPipe.h
nsPipe3.cpp
nsScriptableBase64Encoder.cpp
nsScriptableBase64Encoder.h
nsScriptableInputStream.cpp
nsScriptableInputStream.h
nsSegmentedBuffer.cpp
nsSegmentedBuffer.h
nsStorageStream.cpp
nsStorageStream.h
nsStreamUtils.cpp Bug 1593560 - Only return false from NS_InputStreamIsBuffered if the underlying object doesn't implement ReadSegments. r=mayhemer 2019-11-06 22:37:07 +00:00
nsStreamUtils.h
nsStringStream.cpp
nsStringStream.h
nsUnicharInputStream.cpp
nsUnicharInputStream.h
nsWildCard.cpp
nsWildCard.h