Code Monkey home page Code Monkey logo

node-winapi-bindings's Introduction

Introduction

The goal of this project is to expose windows api functions to node to provide functionality that Node doesn't have otherwise. These functions mostly attempt to be functionally equivalent to the windows api function while still providing a somewhat more comfortable api for javascript (e.g. by using exceptions to report errors instead of GetLastError and using arrays of identifiers instead of bitmasks)

This module is windows-only, when writing cross-platform applications, wrap the calls on the JS side.

Implemented Functions

Filesystem

  • SetFileAttributes
  • GetDiskFreeSpaceEx
  • GetVolumePathName
  • GetFileVersionInfo (partial)

Ini

  • GetPrivateProfileSection
  • GetPrivateProfileSectionNames
  • GetPrivateProfileString
  • WritePrivateProfileString

Registry

  • WithRegOpen (wrapper for RegOpenKeyEx and RegCloseKey)
  • RegGetValue
  • RegEnumKeys (wrapper for RegEnumKeyEx retrieving all keys in one call)
  • RegEnumValues (wrapper for RegEnumValue retrieving all value names in one call, not the values themselves though)
  • RegSetKeyValue

Shell

  • SHGetKnownFolderPath
  • ShellExecuteEx

Language

  • GetSystemPreferredUILanguages
  • GetUserPreferredUILanguages
  • GetProcessPreferredUILanguages
  • SetProcessPreferredUILanguages

Tasks (wrappers for the ITaskFolder interface)

  • CreateTask
  • GetTasks
  • DeleteTask
  • RunTask
  • StopTask

Processes

  • GetProcessList (wrapper for Process32First/Process32Next)
  • GetModuleList (wrapper for Module32First/Module32Next)
  • GetProcessToken (wrapper for OpenProcessToken, very limited)
  • GetProcessWindowList (return HWND all windows of a process)
  • SetForegroundWindow
  • CreateProcessIntegrity (run a process with reduced integrity level)

Permissions (these are much higher abstractions than usual)

  • AddFileACE
  • GetUserSID

Auxiliary

  • IsThisWine (returns true if process is being run in wine)
  • WhoLocks (given a file path, returns list of processes with a lock on the file)
  • WalkDir (recursive directory walk (more efficient on windows than the usual readdir/stat algorithm))

App Container

  • CreateAppContainer (wrapper for CreateAppContainerProfile)
  • DeleteAppContainer (wrapper for DeleteAppContainerProfile)
  • GrantAppContainer (wrapper for Get(Named)SecurityInfo/SetEntriesInAcl/Set(Named)SecurityInfo)
  • RunInContainer (wrapper for CreateProcess using an app container)

Supported OS

  • Windows (duh!)

node-winapi-bindings's People

Contributors

dependabot[bot] avatar idcs avatar odensc avatar tanninone avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

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.