Skip to content

Calling API functions using .NET (without declaring prototypes)

License

Notifications You must be signed in to change notification settings

LyttleG/Apicall.NET

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Apicall.NET

Calling Win32 API functions using .NET 4.x

The Apicall.NET solution was developped using Visual Studio 2017. The purpose of this library is to allow any .NET developper to call any Win32 API without declaring any prototype function.

Content of the solution

1 - ApicallNET.dll: this is the core proxy library written in C# using generics. This DLL has a dependency with Apicall.dll, see below (*)

2- Test: this is a test project given with some examples

Compatibility is set to .NET 4.0, but you can compile it for version 3.0 as well it should work

(*) Each projects folders contains a directory named DLL that holds a file named Apicall.dll
Apicall.dll is a low level generic interface that allows you to invoke C standard libraries (STDCALL as well as in CDECL)
Apicall.dll was developped in pure C with a pinch os ASM code, then compiled using GCC version 5.1.0 (tdm-1)

Give a try, compile the .NET solution, and see what you can do with Win32 API from within .NET!

How to use Apicall class

The following C# code invokes 'MessageBoxW' unicode function from 'User32.dll'...

alt text

Here's the result!

alt text

Please have a look at the test source code here

Built With

  • VS2017 - Build smarter apps, fast using Visual Studio 2017
  • GCC51 - GCC, the GNU Compiler Collection version 5.1.0 (tdm-1)

Author

  • Gérôme GUILLEMIN

License

This project is licensed under the LGPL v3 License - see the LICENSE.md file for details

Acknowledgments

  • Hat tip to anyone whose code was used
  • Inspiration
  • etc

HTH,

Gérôme GUILLEMIN

About

Calling API functions using .NET (without declaring prototypes)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages