Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Performs caller-implemented actions before the process to create a new item begins.
HRESULT PreNewItem(
[in] DWORD dwFlags,
[in] IShellItem *psiDestinationFolder,
[in] LPCWSTR pszNewName
);
[in] dwFlags
Type: DWORD
bitwise value that contains flags that control the operation. See TRANSFER_SOURCE_FLAGS for flag descriptions.
[in] psiDestinationFolder
Type: IShellItem*
Pointer to an IShellItem that specifies the destination folder that will contain the new item.
[in] pszNewName
Type: LPCWSTR
Pointer to the file name of the new item, for instance Newfile.txt. This is a null-terminated, Unicode string.
Type: HRESULT
Returns S_OK if successful, or an error value otherwise. In the case of an error value, this operation and all subsequent operations pending from the call to IFileOperation are canceled.
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | shobjidl_core.h (include Shobjidl.h) |
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today