Skip to content

Latest commit

 

History

History
54 lines (38 loc) · 1.21 KB

README.md

File metadata and controls

54 lines (38 loc) · 1.21 KB

Calli Import c#

An alternative of dllimport with calli

Getting Started

Allows you to import native methods where you should normally use GetProcAddress, using syntax like dllimport

Usage

  • Declare your import (declare your args in <>)
    [CalliImport( "opengl32.dll", EntryPoint = "glClear")]
    public static CalliMethode<int> Clear;
  • Load native methodes
    CalliImport.LoadMethods();

Tips

  • Declare your import with a return (first args is the return type)

    [CalliImport( "opengl32.dll", EntryPoint = "glClear")]
    public static CalliMethodeType<int, int> Clear;
  • Preload library (not methods)

    CalliImport.LoadLibrary("opengl32.dll");
  • Load library specific imports

    CalliImport.LoadMethods("opengl32.dll");
  • For a faster execute don't forget

    [SuppressUnmanagedCodeSecurity]

Authors

License

This project is licensed under the GNU General Public License v3.0 License - see the LICENSE.md file for details

Acknowledgments

  • Thanks to Весьмой Шум (wholemy.ru)