Git Product home page Git Product logo

gpii-edge-experiment's Introduction

gpii-edge-experiment

This repo contains experimental code for calling the Win32 API via .NET via Edgejs for the GPII.

##Contents The repo has three projects:

lib-windows-gpii is the c# .NET class library providing a .NET wrapper around Windows API functionality like the SystemParemeterInfo function.

lib-windows-gpii-driver is a c# .NET console application used in development to test functionality within lib-windows-gpii

lib-windows-gpii-edgejs-driver is a nodejs application that demonstrates how functionality in lib-windows-gpii can be accessed from nodejs.

##Tools You will need Visual Studio 2015 (Community) to build the .NET projects.

##Set up

  1. Clone this repository
  2. Download and install nodejs and Visual Studio 2015 (Community)
  3. Run npm install within lib-windows-gpii-edgejs-driver folder
  4. Build lib-windows-gpii with Visual Studio to ensure a .dll file is created in the project's Debug folder
  5. Run node index.js to demonstrate accessing Windows API functionality via node->edge->.NET
  6. Build lib-windows-gpii-driver
  7. Run the lib-windows-gpii-driver.exe to demonstrate Windows API use from just .NET

##Tracing the code Lets look at High Contrast as an example:

There are many layers of code and technology in this experiment. The top most layer is the nodejs project in lib-windows-gpii-edgejs-driver. The dotnetfunctions.js module uses edgejs to export nodejs bindings for .NET functions contained within the lib-windows-gpii library. The highcontrast.js module makes use of these bindings.

The entry point from nodejs to .NET is in the lib-windows-gpii/EdgeBindings.cs class which provides async conveinence methods that can be called from edgejs/nodejs. These methods use the lib-windows-gpii/HighContrast.cs class, a .NET wrapper around the Windows API SystemParametersInfo function. The HighContrast class accesses the Windows API via .NET's ability to call out to native functions which is set up in lib-windows-gpii/user32.cs.

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.