Coder Social home page Coder Social logo

dapplo / dapplo.windows Goto Github PK

View Code? Open in Web Editor NEW
130.0 130.0 20.0 3.13 MB

A library with a different approach to calling Win32 APIs, e,g providing reactive access to the clipboard or global hotkeys.

License: MIT License

C# 100.00%
clipboard dapplo hacktoberfest hacktoberfest2021 keyboard mouse

dapplo.windows's Introduction

Dapplo

This is the repository for Dapplo, a modular .NET desktop application.

Sometimes an Windows Store App just can't do what you want, like interact closely with the Operation System. In this case, the solution might be a Dapplo "application".

More to come...

dapplo.windows's People

Contributors

coenm avatar kosorin avatar lakritzator avatar vladimir-poleh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dapplo.windows's Issues

Write better documentation

Currently it's still all in development but it would be good to see some better documentation on usages.

Excluding child window events

Hi,
I'm trying to subscribe create window event and exclude one emitted by children.
However, it seems the child windows is still generating events.
Can you suggest please, what is wrong here:

            var winEventObservable = WinEventHook.Create(
                Dapplo.Windows.Enums.WinEvents.EVENT_OBJECT_CREATE 
                ).Where(winEventInfo => 
                winEventInfo.IsSelf &&
                winEventInfo.ObjectIdentifier == Dapplo.Windows.User32.Enums.ObjectIdentifiers.Window
                )
                .Select(info => InteropWindowFactory.CreateFor(info.Handle).Fill())
                .Subscribe(interopWindow =>
                {
                    Console.WriteLine("Window created: {0}. Title = {1}", interopWindow.Handle, interopWindow.Caption);
                    replaySubject.OnNext(interopWindow);
                }, exception => Console.WriteLine("An error occured: {0}", exception));

Thank you for the nice project.

Software list

Provide a simple API to query for software

A class for the information, this is just quickly thrown together with the values from the registry at SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

public class Software {
  Guid Id {get;set;}
  string AuthorizedCDFPrefix {get;set;}
  string Contact {get;set;}
  string DisplayName {get;set;}
  string DisplayVersion {get;set;}
  int EstimatedSize {get;set;}
  string HelpLink {get;set;}
  string HelpTelephone {get;set;}
  /// YYYYMMDD
  string InstallDate {get;set;}
  
  string InstallLocation {get;set;}
  string InstallSource {get;set;}
  int Language {get;set;}
  string Publisher {get;set;}
  string Readme {get;set;}
  string Size {get;set;}
  string UninstallString {get;set;}
  string URLInfoAbout {get;set;}
  string URLUpdateInfo {get;set;}
  int Version{get;set;}
  int VersionMajor {get;set;}
  int VersionMinor {get;set;}
  bool WindowsInstaller {get;set;}
  bool NoModify {get;set;}
  bool NoRepair {get;set;}
  
}

Code to retrieve the installed software:

public IEnumerable<Software> InstalledSoftware()
{
    string uninstallKey = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall";
    using (RegistryKey rk = Registry.LocalMachine.OpenSubKey(uninstallKey))
    {
        foreach (string skName in rk.GetSubKeyNames())
        {
            using (RegistryKey sk = rk.OpenSubKey(skName))
            {
                try
                {
					// Map values to Software Class, take the ID from the skName?
					yield return new Software {
					  Id = new Guid(skName),
					  DisplayName = sk.GetValue("DisplayName");	
					};
                }
                catch (Exception ex)
                {
				   Log.Warn
				}
            }
        }
    }
}

KeyboardHook doesn't work when key handler takes to long

When the handling of a key takes to long, the key-up is not detected and next key presses are suddenly causing weird detections.

I need a test-case for this, so we can see if changes in the KeyboardHook to the IObservable work as needed.

I expect a .ObserveOn(TaskPoolScheduler.Default) to solve this...

Device Name / Ids ... weirdly formatted / Device Class Guids different than in Windows Device Manager?

When I use devcon.exe, WMI and so on to query for a particular graphics card in my system I get the following identifier(s):

PCI\VEN_10DE&DEV_1FB8&SUBSYS_09061028&REV_A1\4&32AF3F68&0&0008

image

However, using your library (๐Ÿ‘) I do get a similar id.. but.. only similar & not the same, i.e. when listenting for removal events (read: enabling/disabling the device via Windows' device manager):

\?\PCI#VEN_10DE&DEV_1FB8&SUBSYS_09061028&REV_A1#4&32af3f68&0&0008#{1ca05180-a699-450a-9a0c-de4fbe3ddd89}

image

I am a bit confused why there are #s in the .Name and also the DeviceClassGuid.. is this an encoding issue.. or on purpose?

And a slightly related note: the graphics card(s) in my system all have the very same (Device) Class Guid (in the device manager's details) which is "{4d36e968-e325-11ce-bfc1-08002be10318}", however none of the DeviceNotification.OnDeviceArrival() / DeviceNotification.OnDeviceRemoved() events fired (and there are 6 or so per enabling/disabling in the device manager) has that DeviceClassGuid set.

So I am again a bit puzzled why I see info a) in Windows its tools etc but b) the info not matching with the info of the events. I think I must be missing something here, some missing link / mapping or something.. but if you had any ideas / suggestions what might be going on it would be highly appreciated!

Thanks and thanks especially for all your work on this library!!

No release notes beyond 2016

It's hard to update the package from Nuget when there are no release notes. Is it possible to have release notes generated for packages beyond 0.1.30 (or at least for current release)?

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.