Win32 API Class Library for .NET
PAGE UNDER DEVELOPMENT.
Introduction
- The .NET Framework has encapsulated the entire Win32 API into different namespaces and classes so that .NET developers can use these classes without calling the actual API Functions from their DLL Files. However, not all API Functions are documented and the developer has to resort to calling the desired API Function directly.
- Since the Common Type System (CTS) Data-Types differ in definition than those for some data-types used by the Win32 API, a number of errors occur. Not just that, Strings and Structures are handled in an entirely different manner in the .NET Framework.
- This means that the developer has to know the exact PInvoke (Platform-Invoke) Signature of each function to use an API function correctly.
- This Class Library consists of all the Win32 API Functions, Types (Structures) and Constants along with their correct PInvoke Signatures so that the Developer can access the Win32 API Functions with ease.
- It is completely Free and Open Source and is constantly being updated by me every week.
Features of this Library
- 103 API Functions, 18 Structures and over 600 Constants Documented.
- Hooking Functions Supported.
- Developer can use the functions without having any knowledge about the function's PInvoke Signature.
- Related Constants are grouped into Enumerations.
- No need to remember Constants passed to a function.
- FREE!!!
Organization and Design
- The Entire API is divided into three classes of the b2cLibs Namespace.
- Win32API Class : Contains Declarations of all API Functions.
- Win32Struct Class : Contains Definitions of all Win32 Structures.
- Win32Const Class : Contains Definitions of all Win32 Constants which are categorized into Enumerations to follow OOP Rules.
Why did I write this?
- It is difficult to remember the PInvoke Signatures of every API Function.
- It is easier to use API Functions from a single class without getting into Marshalling and PInvoke Details.
Who is this for?
- .NET Developers using VB.NET 2005, C# 2005 or VC++ 2005
Contributors Welcome
It is not possible for just one person to test
every Win32 API Function for use in the .NET Environment. If you are
interested in helping me expand this library, contact me via email.![]()
Since I'm in the process of adding more functions, I haven't provided the Source Code yet and I will be adding it sometime soon. However, if you need the source code before I upload it, contact me via email and I'll send it to you.
ScreenShots
- While Using a Win32 API Function
- Constants organized into Enumerations
Sample Code
System Shutdown using VB.NET 2005
System Shutdown using C# 2005
System Shutdown using VC++ 2005
Download
- Download the Class Library in DLL Format
- Download the Source Code (To Be Added Soon)