Skip to content

Upgrading win32 2 to 3

Breaking2.7.0 → 3.1.4Breaking8New12Changed4Fixed3Other6

BreakingUpgrade verdict

8 breaking changes.

  • Method and property names on COM and WinRT objects now start with a lowercase letter, matching Dart style and avoiding name clashes.
  • If you used fromPointer on WinRT classes, it is now called fromRawPointer.
  • If you import the WinSock library directly, struct names are now all uppercase, so old names like hostent must be updated.
  • The TouchInputParameters struct is now named in all uppercase, so references to it must be updated.
Top 3 of 8 that need code or config changes
Breaking8
Renames COM and WinRT methods and properties from TitleCase to camelCase.
Renames the WinRT fromPointer method to fromRawPointer.
fromPointerfromRawPointer
WinSock APIs now use upper cased struct names, e.g. hostent is now HOSTENT; affects explicit win32/winsock2.dart imports.
hostentHOSTENTwin32/winsock2.dart
TouchInputParameters is now upper-cased in the metadata.
TouchInputParameters
Overhauls COM and WinRT API generation; traditional Win32 callers need no changes, but COM and WinRT users should expect changes.
Moves WinRT APIs to a separate library imported via package:win32/winrt.dart, which also re-exports all Win32 APIs.
package:win32/winrt.dart
Adds IModalWindow.from() style casting to a COM interface without needing the target IID.
IModalWindow.from()toInterface()IID_IModalWindow
Adds direct projection of List and String types in WinRT classes.
ListString