win32 5.1.0 win32: ^5.1.0 copied to clipboard
A Dart library for accessing common Win32 APIs using FFI. No C required!
- Bump minimum Dart version to
- Add more Windows Message constants (#755)
- Add Device Management events (#756)
NetFreeAadJoinInformationAPIs (#748, thanks to @solbirn)
- Fix a bug in the
initAppfunction, which caused programs to crash when running AOT-compiled executables (#750)
- Fix a bug in the
shell_notify_iconexample to ensure compatibility with Windows 11 (#752)
- Fix the Dart representation of the
- Update the UI Automation example (#719)
- Fix projection of COM get properties (#720)
- Update the screenshot example to support multiple displays (#704, thanks to @ilopx)
- Add Windows UI Automation APIs (#711)
- Add some additional user32 exports (#707, thanks to @ilopX)
- Add service management APIs (#709)
IWebAuthenticationCoreManagerInterop(#702, thanks to @solbirn)
Note: This package no longer supports 32-bit architectures. It assumes 64-bit.
[BREAKING CHANGE] Experimental WinRT APIs are now removed, in favor of the new
windows_*packages (see https://win32.pub for more information) 🎉
Finalizeris now attached to COM objects. Therefore, you no longer need to call
.release()to decrement the reference count, because
Finalizerwill do it for you when they go out of scope (#691).
Finalizerattached may result in use after free and cause the process to crash
Note: If you're manually managing the lifetime of the object, you need to call
.release()to decrement the reference count
Add Windows metadata interfaces (
Fixed memory leak in
Upgrade to Dart 3 and add class modifiers to
IUnknown, which detaches the object from
Finalizerif you want to manually manage the lifetime of the object yourself (#677)
- Add some minor network APIs
- Add registry constants for win32_registry (#682)
- Fix missing export of crypt32 APIs (#673)
- Fix a dartdoc comment reference (#666)
- Fix memory leak in
- Convert acronyms in method/property names to lowercase (#649, @halildurmus)
- Mark methods/properties that return WinRT objects as nullable (#650, @halildurmus)
- Mark WinRT object parameters as nullable (#652, @halildurmus)
- Tidy up various samples (#653, @timsneath)
- Add missing display enumeration funcs (#662, @timsneath)
- Add job object APIs (#663, @timsneath)
- Add low-level keyboard hook constants (#632, @timsneath)
- Add WinRT geolocation classes and example (#633, #635, @timsneath/@halildurmus)
- Convert acryonyms in enums, methods and properties to match Dart style guide (#637, #649, @halildurmus)
- Generalize map collection interfaces to support enum arguments (#638, @halildurmus)
- Add extra Bluetooth APIs (#640, @timsneath)
winrtUninitializeare no longer required. Windows Runtime classes automatically activate the runtime as required for a given thread. Added example of interaction between Dart isolates and COM apartments (#642, @halildurmus/@timsneath)
- Revert upper Dart SDK constraint update due to pub analyzer bug.
- [BREAKING CHANGE] COM objects now inherit from
NativeFinalizer. Instead of directly releasing the memory allocated for them, you can now call
.release()to decrement the reference count, and the memory will be automatically disposed when the refcount falls to zero (#623, @halildurmus)
- Update examples for new COM release mechanism (#623, @halildurmus)
- Update to latest Win32 metadata (#626, @timsneath)
- Add APIs for processor / firmware information (#627, @timsneath)
- Add APIs for shell file operations (#630, @timsneath)
- Update upper Dart SDK constraint to explicitly support Dart 3
- Fix missing export of crypt32 APIs
- Restructure generator util to use JSON for all data files (#605, @timsneath)
- Add more K32* APIs (#607, @timsneath)
- Remove unnecessary nullability from HSTRINGs (#608, #615, @halildurmus)
- Add UISettings (#610, @halildurmus)
- Add doc comments for COM and WinRT classes (#611, @timsneath)
- Clean up generation of WinRT imports (#616, @halildurmus)
- Add VirtualQuery and VirtualQueryEx (#619, @Smotto)
- Add SetDisplayConfig (#621, @timsneath)
- Support generating IIDs for parameterized types (#596)
- Clean up GUID implementations (#599)
- Wrap WinRT representations of GUID as Dart Guid (#602)
- Fix documentation bug (@timsneath)
- Add URI support to the WinRT generator (@halildurmus)
- Fixed memory leaks in COM and WinRT code when an exception is generated.
- Update to the latest Win32 metadata from Microsoft.
- [BREAKING CHANGE] The WinSock APIs now use upper cased naming for structs. For
HOSTENT. This will only affect you if you explicitly imported
- [BREAKING CHANGE] TouchInputParameters is now upper-cased in the metadata.
- Improve projection of Map, Vector, and reference Windows Runtime types, with thanks as ever to Halil İbrahim Durmuş (@halildurmus).
- Add CryptoAPI functions (
- Add pointer and touch APIs
- Fix WinRT FilePicker demo
- Add raw printer API example
- Remove console example
console.dart(use https://pub-web.flutter-io.cn/packages/dart_console instead).
- This release includes an overhaul of the COM and WinRT API generation, as described below. Apps and packages that call traditional Win32 APIs should not require changes, but apps that use COM or the highly-experimental WinRT APIs should expect to make changes.
- [BREAKING CHANGE] WinRT APIs have been moved to a separate library. This
provides isolation for apps that only use traditional APIs (Win32/COM) from
the more experimental WinRT APIs. To use WinRT from your code, change your
import statement to
import 'package:win32/winrt.dart';. The WinRT library also exports all Win32 APIs, so you don't have to import both libraries.
- [BREAKING CHANGE] COM and Windows Runtime methods and properties are now camelCased, not TitleCased. This is inconvenient, but it avoids a whole class of name clashes and aligns COM and WinRT APIs more closely with Dart idioms. As the projections get smarter with more helpers, we think this is the right call for the future and worth a one-time tax to fix.
- [BREAKING CHANGE] You can now cast to a new COM interface without needing the IID for the target interface. Instead of:
final modalWindow = IModalWindow(fileDialog.toInterface(IID_IModalWindow));
final modalWindow = IModalWindow.from(fileDialog);
- [BREAKING CHANGE] WinRT classes now support projection of
- [BREAKING CHANGE] The WinRT
fromPointermethod is now
GUIDFromStringnow supports an optional custom allocator parameter.
- Added various APIs from iphlpapi.dll for tracking and renewing IP addresses.
SizeofResourceAPIs from kernel32.dll
GetClassFileAPI from ole32.dll
SetupDiGetDeviceRegistryPropertyWAPIs from setupapi.dll
GetGUIThreadInfoAPIs from user32.dll
- Added various foundational WinRT types, including
IReference, with tremendous thanks again to @halildurmus, who has driven much of the recent WinRT work.
- Major reworking of the WinRT generation code, thanks to @halildurmus.
- [BREAKING CHANGE] Major work on Windows Runtime APIs, with huge thanks to Halil İbrahim Durmuş (@halildurmus). Breaking changes are limited to WinRT APIs, which are now more idiomatic for Dart. Includes full implementation of Windows.Globalization.Calendar that is the new reference design for WinRT APIs.
- Restructure generation code into a separate package in tool\generator.
- Use super parameters introduced in Dart 2.17, with matching dependency upgrade.
- Tidy up examples to include consistent headers.
- All files now have lower case names (e.g. IUnknown.dart -> iunknown.dart)
- Improve pana compliance
- Add support for returning vectors from Windows Runtime APIs (#406, thanks to @halildurmus)
- Automatically convert Windows Runtime date properties to Dart DateTime equivalents (#418, thanks to @halildurmus)
- Add additional documentation on Windows Runtime APIs
- Update IDispatch sample to show how to supply parameters
- Add example for Windows Audio Session API (#422, thanks to @postacik)
- Fix an error with strings in structs (#425, thanks to @postacik)
- Update contributor documentation
- Add example for monitor EDID data (#393, thanks to @krjw-eyev)
- Expand Bluetooth example (#397, thanks to @Sunbreak)
- Fix a comment typo (#398, thanks to @gaddlord)
- Improve fidelity of WinRT Calendar class and more tests (#396, #404, #405, #412 thanks to @halildurmus)
- Add additional spell checker COM interfaces
- Add example for an owner-draw (custom) titlebar
- Add new Wbem WMI interfaces
- Add example of WMI high-performance counters
- Add new theming APIs
- Update to latest Windows metadata (with a couple of minor changes to signed ints in MOUSEDATA and send()).
- Add GetProcessTimes (#396, thanks to @halildurmus)
- Add device interface and device class GUIDs
- Add examples for Bluetooth LE and Setup APIs (#390, #392, thanks to @Sunbreak)
- Fix setup APIs to project HDEVINFO correctly
- [BREAKING CHANGE] Use new projection tooling for WinRT classes. WinRT APIs are still in development and should be considered experimental; expect volatility as the projection tools mature and map types like String and DateTime, as well as WinRT primitives such as IVectorView, onto their Dart equivalents. (This doesn't affect COM and Win32 APIs, which can largely be considered stable, with the exception of changes to the underlying metadata exposed by Microsoft.)
- Add setupapi APIs, which were not being successfully projected. (#383, with thanks to @Sunbreak.) Add test to prevent that happening again.
- Add additional setup APIs (#386, with further thanks to @Sunbreak).
tools/folder from published package to reduce download overhead.
- Fix broken doc links.
- Add Bluetooth LE APIs
- Add speech API (SAPI) support and sample
- Add Windows Audio Session API (WASAPI) support
- Automate more struct generation
- Apply more lints to source code
- Add GetUserName and update sysinfo example
- Fix import error for gamepad APIs
- Add gamepad example
- Added various inline functions, tidied up projection logic.
- Add gamepad APIs
- Add DPI_AWARENESS_CONTEXT enum values.
- Add a few minor constants and handle typedefs. Nothing to see here.
- Update package:ffi minimum version to 1.1.0, allowing use of arena
Charwithin generated structs.g.dart in prep for new FFI feature.
- Declare platform support using new
platforms:declaration in pubspec.yaml
- Update minimum version to Dart 2.15.0 and use constructor tearoffs
- Add RegRenameKey.
- Add FileTimeToSystemTime and SystemTimeToFileTime.
- Added Windows Subsystem for Linux APIs (#342), with thanks to @ElMoribond. Add a new example that shows how to use them.
- Added SetEvent (#343) and CreateIcon (#344), with thanks to @untp.
- Add typedef for
- Add more optional lints.
- Tweaked Explorer example.
- Added CreateThread, CreateRemoteThread, CreateRemoteThreadEx() per request
- Added GetMachineTypeAttributes and added logic for Windows 11.
- Added CreateDIBSection per request.
- Upgraded to latest published Windows metadata from Microsoft, which modifies the signature of some registry-related APIs from Int32 to Uint32 for better accuracy with the original API.
- Updated to the latest code generator, ported back from the v3 code.
- Use automatic code generator for most structs. This may be a breaking change
if you use the Bluetooth APIs, since
BLUETOOTH_ADDRESS.rgBytesis now an
Array<Uint8>instead of a
List<int>. This is more accurate, but will require minor code change.
- Add additional raw input constants
- Completely overhauled the metadata generation tooling (tools\projection
directory). The code is much better structured, with each layer (type ->
parameter -> method -> class) in its own
___Projectionclass. Fixed a number of errors in the process, such as the assumption that all enums are of type
- Rewrote several complex structs to use the new
UnionFFI type introduced in Dart 2.14 (and updated the minimum version accordingly). Code that uses the
INPUTstruct will need to be slightly modified, since the
hifields are now nested rather than provided as an extension property.
- Cleaned up some COM
Pointertypes to be more explicit.
- Add raw input APIs
- Add low-level keyboard hooks example
- Add Windows 11 rounded corner window support along with sample (check Flutter app in example\explorer)
- Add magnifier APIs and example
- Add some missing GDI functions
- Add Native Wifi APIs (#299)
- Added ResetEvent and complete
- Added more virtual memory functions (#297)
- Add some requested APIs thanks to contributions from @ilopX, in particular a new sample for enumerating locally installed printers.
- Added ExtractAssociatedIcon, with thanks to @halildurmus.
- Add more DWM APIs, including
- Add various DWM and subclassing APIs
- Lazily evaluate
lookupFunctionFFI calls for improved performance.
- Add APIs for hooks and a few extra kernel32 APIs
- Add some more tests.
- Add Windows Spooler library support.
- Add initial support for the Windows Socket library (winsock2).
- Fixes convertToHString to return an int, since
HSTRINGs are handles. This is a breaking change for any apps that use WinRT APIs, but given the limited availability of WinRT classes that fall into this category, updating only the minor version.
- Add low-level Device IO and structured storage APIs and diskinfo.dart sample.
- Add smart card reader support.
- Add helper functions for COM along with extra documentation.
- Fix bug in shell COM APIs.
- Add examples for shortcut creation and named pipes.
- Add serial port comms APIs
- Add additional shell COM APIs
- Work around FFI regression in Dart master and dev builds.
Upgrade to Dart 2.13, which supports packed structs and arrays in FFI. This enables support for more automated generation of structs, which in turn increases development velocity for this package.
Other APIs included in this release include:
- More complete Bluetooth support
- MIDI support
- High DPI support
- Many more core user32 APIs
- Add some debugging APIs to allow enumerating exported symbols, along with a
- Free memory allocations in samples.
- Use latest version of Win32 metadata from winmd package, and generate most structs automatically using this metadata.
- Generate COM helper classes wherever metadata supports it, instead of requiring a manual decorator.
- Add about 20 new kernel32 APIs.
- Add network events, thanks to a contribution from @sunbreak.
- Update COM vtable generation, thanks to a contribution from @bonukai.
- Update to use the latest WinMD package.
- Add spellchecking COM APIs, thanks to a contribution from @bonukai.
- Adds named pipe APIs to support projects like TerminalStudio/pty.
- Adds a demo of custom window shapes.
- Removes Windows Metadata classes (now in the
winmdpackage). This is a breaking change, but it's not anticipated to be a problem since these classes are only used for code generation.
- Update to latest WinMD package
- Add shell folder APIs
- Add registry key APIs
- Stable version w/ sound null safety.
- Update to ffi 1.0.0 and address breaking changes.
- 100+ new APIs in kernel32, user32, ole32, advapi32, shell32 and gdi32, as well as a series of COM interfaces.
- Rework API wrapper to use functions instead of properties
- New JSON-based metadata format for Win32 APIs that supports API sets and minimum versions, and more robust tooling for loading and saving metadata
- Migrated Windows Runtime APIs into core unmanaged metadata
- Add waveOut* APIs from winmm.dll (thanks @slightfoot)
- Make VARIANT more representative of the underlying type.
- Add DLGTEMPLATE and DLGITEMTEMPLATE structs with extension methods.
- Add more tests.
- Add dialog box example and supporting extension methods
- New shell tray notification example (thanks @ilopX)
- Better documentation of constants and callbacks
- WinMM: Add PlaySound (thanks @Hexer10)
- Add SysAllocString, SysFreeString, SysStringByteLen, SysStringLen, SHCreateItemFromParsingName
- Rename VARIANT_POINTER to VARIANT
- Expand Win32 API documentation.
- New APIs:
- User32: ClipCursor, CopyIcon, DestroyIcon, DrawIcon, GetCursor, GetCursorPos, GetSystemMenu, SetMenuInfo, SetMenuItemInfo, ShowCursor
- Add Win32 API documentation and a couple of minor APIs.
- Add version information APIs and example.
- Changed how the C-style APIs are generated. This should result in far better code smarts in your editor, as well as major improvements to the auto-generated documentation.
- Added many new APIs, including GetCurrentProcess and GetModuleFileName
- New APIs
- Shell: LockWorkstation, SHEmptyRecycleBin, SHGetDiskFreeSpaceEx, SHGetDriveMedia, SHQueryRecycleBin, InitCommonControlsEx, DrawStatusText
- Add high-precision timing APIs: QueryPerformanceFrequency, QueryPerformanceCounter
- User32: SetParent, CreateWindow macro, MonitorFromPoint, SetWindowsLongPtr
- Kernel: Add SystemParametersInfo and related constants
- Kernel: Add EnumProcessModulesEx (thanks @Hexer10)
- Add example of using app manifests to declare support for UAC permissions and Windows 10 opt-in behavior
- Windows Runtime metadata
- Greatly expand WinMD utility to generate APIs directly from Windows Metadata
- Autogenerate all Windows Runtime classes except ICalendar and IFileOpenPicker from metadata
- Code tidy up
- Add more tests
- Go through all the code with a stricter linter
- Update README with screenshots and examples
- Update Flutter Windows examples to the v4 template
- Add credential management APIs (thanks @hpoul)
- Add battery and power management APIs
- Overhaul HRESULTs and add more tests
- Add font enumeration example
- Experiment with hosting documentation on GitHub
- Add basic registry checks
- Add initial Bluetooth discovery support
- Add a system information sample
- Guard tests so that they work on Windows 7
- Add some shell APIs and more tests
- Add more process management APIs
- Add high level monitor configuration API
- Add a broader array of console APIs
- Add a wallpaper example
- Lots of documentation and linter cleanup
- Add TaskDialog and dynamic library loading APIs
- Add dynamic load and Windows Runtime metadata samples
- Fix an annoying bug with
- Add more tests and restructure code
- More library-level documentation
- Add script for generating classes
- Clean up some of the generated documentation
- Lots of minor refactoring and tidy up
- Some early WinMD parsing
- Add many more unit tests
- Add WinRT examples, including Windows.Globalization.Calendar and Windows.Storage.Pickers.FileOpenPicker
- Add various process management and kernel APIs: CloseHandle, EnumProcesses, EnumProcessModules, GetModuleBaseName, GetModuleFileNameExt, OpenProcess, ReadProcessMemory and WriteProcessMemory.
- Add modules.dart sample
- Lots of refactoring and tidy up work.
- Add GetTempPath()
- Use automated Dart tool to generate all COM classes
- Add IFileDialogCustomize, IShellItem2, IShellItemArray, IShellItemFilter
- Fill out all the class methods
- Fix some embarrassing bugs
- Fix a few bugs
- Add support for desktop background management with IDesktopWallpaper
- Expand COM support to include IShellItemArray and various WMI classes
- Add COM support
- Add implementations for IOpenFileDialog, IFileDialog, IModalWindow, IShellItem, IUnknown
- Add common item dialog example
- Add Snake GDI example
- Add PeekMessage, MoveTo, VirtualAlloc/Free, StretchDibBits, Beep
- Tidy up code and test
- Add RegisterWindowMessage
- Fix bugs in ACCEL and FINDREPLACE structs
- Fix various bugs in Notepad example
- Add notepad example
- Add 20+ new APIs for common dialogs, message sending, accelerators, menus, fonts and GDI object manipulation
- Fix APIs to be 32-bit safe
- Fix some minor bugs
- Add window enumeration (FindWindowEx, EnumWindows, IsWindowVisible, GetWindowText, GetWindowTextLength) and example
- Added Flutter example
- Added common dialog example
- Added volume management APIs
- Add scrolling APIs and example
- Add 'new' known folder API
- Add some basic unit tests
- Add known folder plus GUID classes
- Added SendInput, Sleep and ShellExecute
- Implemented a good sample of GDI calls
- Added support for timers
- Added virtual keyboard constants
- Added a GDI paint sample
- Added a more comprehensive sample game (Tetris)
- Add class styles
- Match recommended package structure per pub-web.flutter-io.cn
- Added MessageBox and console APIs
- Initial version