Well getting the power scheme APIs working on Windows 7 and Vista is taking a little longer than expected so I thought I would bring this new version out without the power related methods so that people can use the other new methods sooner rather than later. Download link for new version is at the end of this post, but I encourage you to read the full post to see what has changed in this version.
First of all, if you don’t know what this .NET Windows API Library is or what the previous version contained, have a read of this post.
See below for a list of all of the new methods in this version:
The ShareExistingFolder method signatures have been amended to follow conventions used in the rest of the library and in the .NET framework. The changes are only minor and should make it easier to use but anyone upgrading to this version after having used version 2.0 will find that if they have code using the ShareExistingFolder method they will need to alter the order of the arguments that they pass in. The intellisense prompts will make it clear which arguments should go where.
Releases all IPv4 addresses acquired via DHCP
Renews all IPv4 addresses acquired via DHCP
Gets the path where all user profiles are stored
Empties the recycle bin
Returns the number of items in the recycle bin
Gets the total size of the items in the recycle bin
Renames the local computer and corresponding domain account
Gets a NativeWindow instance for the window with the specified title
Same as GetWindowFromTitle but finds windows with the specified string anywhere in their title (useful if you do not know the full title of a window)
Gets the size in pixels of any window
Gets the currently active window (aka foreground window)
Makes the specified window a topmost window (i.e it stays at the foreground even when not in focus, like task manager)
Stops a window from being a topmost window if it currently is one
Makes the specified window a child of another window
Removes the specified user’s windows profile and settings
UPDATE Overloaded version of GetTopLevelWindows now has the option to include invisible windows
UPDATE Added the Change permission to the SharePermission Enum so you can now grant/deny Change permissions when sharing a folder via the ShareExistingFolder method
FIX XML/intellisense description for JoinToDomain method is now visible
and here is a list of the new Windows APIs included in the ApiDefinitions class in this version:
You can download the new version (for free of course) using this link: http://cjwdev.co.uk/…/Cjwdev.WindowsApi.zip and just make sure you extract both the DLL and XML file to the same directory, otherwise you wont get the intellisense descriptions/comments when you use methods from the DLL.
As always, let me know any feedback you have (good or bad) and I hope the new methods are useful to people. If you have any suggestions for APIs that you would like to see included in the next version then let me know – email@example.com