getTimeOfLastChange method

Pointer<FILETIME> getTimeOfLastChange(
  1. IMoniker? pmkObjectName
)

Retrieves the time that an object was last modified.

Throws a WindowsException on failure.

To learn more, see learn.microsoft.com/windows/win32/api/objidl/nf-objidl-irunningobjecttable-gettimeoflastchange.

Implementation

Pointer<FILETIME> getTimeOfLastChange(IMoniker? pmkObjectName) {
  final pfiletime = adaptiveCalloc<FILETIME>();
  final hr$ = HRESULT(
    _GetTimeOfLastChangeFn(ptr, pmkObjectName?.ptr ?? nullptr, pfiletime),
  );
  if (hr$.isError) {
    free(pfiletime);
    throw WindowsException(hr$);
  }
  return pfiletime;
}