Giter Site home page Giter Site logo

sharplibwin32's Introduction

NuGet Badge Build status

SharpLibWin32

SharpLibWin32 is a .NET library exposing Platform Invoke declarations for some Win32 API functions, data structures, macros and constants.

⚠️ Consider using Dotnet Pinvoke instead, as SharpLibWin32 is not being maintained.

Binary Distribution

The easiest way to make use of this library in your own project is to add a reference to the following NuGet package.

sharplibwin32's People

Contributors

johannesegger avatar slion avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

sharplibwin32's Issues

Missing field in RAWHID struct

Hello, I‘m a beginner in C#, and recently have been writing a project on HID communication using SharpLibHid which has a refrence of this Lib.
I noticed that a Byte array field is commented out in the file Win32RawInput.cs, so that the instance of RAWINPUT won't contain any byte array data when the device registered is Hid.

    [StructLayout(LayoutKind.Sequential)]
    public struct RAWHID
    {
        [MarshalAs(UnmanagedType.U4)]
        public uint dwSizeHid;
        [MarshalAs(UnmanagedType.U4)]
        public uint dwCount;
        //
        //BYTE  bRawData[1];
    }

So, is there any method to get raw data from Hid in this library?
Thanks.

Adding a reference to PrintWindow

Hello,

Would it please be possible to add a reference to PrintWindow,

That is, to add the following 2 lines in Winuser.cs Function class:
[DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall, SetLastError = false)]
private static extern bool PrintWindow(IntPtr hWnd, IntPtr hdcBlt, int nFlags);

Other functions if interrest:

[DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall, SetLastError = false)]
public static extern bool SetForegroundWindow(IntPtr hWnd);

[DllImport("user32.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall, SetLastError = false)]
public static extern bool ShowWindow(IntPtr handle, int nCmdShow);

I wanted to do it by myself but not very fluent with github usage...

Thank you in advance

Support netstandard2.0

The NuGet package and the project currently target net20. So when referencing this project from a netstandard library or in my case a netcoreapp app you always get the following warning:

warning NU1701: Package 'SharpLibWin32 0.2.0' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.2'. This package may not be fully compatible with your project.

Any chance that you add a netstandard target? Do you need net20 at all? I think I could create a PR quite quickly that drops net20 support and instead targets netstandard2.0 (if the library is fully compatible with netstandard2.0 which I'm not sure about).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.