postMoveItem method

void postMoveItem(
  1. int dwFlags,
  2. IShellItem? psiItem,
  3. IShellItem? psiDestinationFolder,
  4. PCWSTR pszNewName,
  5. HRESULT hrMove,
  6. IShellItem? psiNewlyCreated,
)

Performs caller-implemented actions after the move process for each item is complete.

Throws a WindowsException on failure.

To learn more, see learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-ifileoperationprogresssink-postmoveitem.

Implementation

@pragma('vm:prefer-inline')
void postMoveItem(
  int dwFlags,
  IShellItem? psiItem,
  IShellItem? psiDestinationFolder,
  PCWSTR pszNewName,
  HRESULT hrMove,
  IShellItem? psiNewlyCreated,
) {
  final hr$ = HRESULT(
    _PostMoveItemFn(
      ptr,
      dwFlags,
      psiItem?.ptr ?? nullptr,
      psiDestinationFolder?.ptr ?? nullptr,
      pszNewName,
      hrMove,
      psiNewlyCreated?.ptr ?? nullptr,
    ),
  );
  if (hr$.isError) throw WindowsException(hr$);
}