preNewItem method
Performs caller-implemented actions before the process to create a new item begins.
Throws a WindowsException on failure.
To learn more, see learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ifileoperationprogresssink-prenewitem.
Implementation
@pragma('vm:prefer-inline')
void preNewItem(
int dwFlags,
IShellItem? psiDestinationFolder,
PCWSTR pszNewName,
) {
final hr$ = HRESULT(
_PreNewItemFn(
ptr,
dwFlags,
psiDestinationFolder?.ptr ?? nullptr,
pszNewName,
),
);
if (hr$.isError) throw WindowsException(hr$);
}