Skip to content

Commit

Permalink
Update deprecated properties for file picker windows
Browse files Browse the repository at this point in the history
  • Loading branch information
tddang-linagora committed Jun 11, 2024
1 parent fbb7e62 commit ab68ea4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/windows/file_picker_windows.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class FilePickerWindows extends FilePicker {
String? initialDirectory,
}) {
int hr = CoInitializeEx(
nullptr, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
nullptr, COINIT.COINIT_APARTMENTTHREADED | COINIT.COINIT_DISABLE_OLE1DDE);

if (!SUCCEEDED(hr)) throw WindowsException(hr);

Expand Down Expand Up @@ -134,7 +134,7 @@ class FilePickerWindows extends FilePicker {
if (!SUCCEEDED(hr)) {
CoUninitialize();

if (hr == HRESULT_FROM_WIN32(ERROR_CANCELLED)) {
if (hr == HRESULT_FROM_WIN32(WIN32_ERROR.ERROR_CANCELLED)) {
return Future.value(null);
}
throw WindowsException(hr);
Expand Down

0 comments on commit ab68ea4

Please sign in to comment.