BUG: ShellExecuteExW() Fails on Windows 2000 (262261)
The information in this article applies to:
- Microsoft Platform Software Development Kit (SDK) 1.0, when used with:
- the operating system: Microsoft Windows 2000
This article was previously published under Q262261 SYMPTOMS
The ShellExecuteExW function fails on Microsoft Windows 2000 when the SEE_MASK_CLASSKEY flag is not specified.
CAUSE
If hkeyClass is not NULL or if it is an invalid value (for example, it is not initialized), then ShellExecuteExW fails, even though
hkeyClass should not be used by ShellExecuteExW, because SEE_MASK_CLASSKEY is not specified in the fMask member of the
SHELLEXECUTEINFO structure.
RESOLUTION
Assign the hkeyClass member of SHELLEXECUTEINFO to NULL even though SEE_MASK_CLASSKEY is not specified.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. MORE INFORMATION
The problem occurs only with the wide version of ShellExecuteEx, that is, ShellExecuteExW, or when _UNICODE is defined for a project and
ShellExecuteEx is used in the manner noted in the "Cause" section.
The workaround is to initialize the hkeyClass member to NULL or initialize the SHELLEXECUTEINFO structure to zero by using ZeroMemory or
any other such means of initializing the members of the structure, especially assigning the hkeyClass member to NULL.
Modification Type: | Minor | Last Reviewed: | 7/11/2005 |
---|
Keywords: | kbbug kbShellGrp KB262261 |
---|
|