1Password and C# application login

Hi,
I want to integrate 1Password functionality into my application (to fill the password fields). This application is written using C#. The problem is the following:

  1. I start my application
  2. Then I start 1Password
  3. I create new item, click Ctrl and then Add App.
  4. I see the list of open applications (I guess you're using Window class names), but unfortunately I don't see my application in the list (although it is opened).

The question is how can I make my application visible to 1Password? As I've read before, when you're developing C# application using Visual Studio, VS automatically assigns the Window class name and this behaviour cannot be overriden. Do i need to make some modifications to my application? I really want to use 1Password as Password Manager for my app.

Thanks in advance,
Alexey


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Windows 7
Sync Type: Not Provided

Comments

  • svondutch
    svondutch
    1Password Alumni

    @alexey_saferoom Are you developing a Win32 app or a RT app? Win32 apps we should "see". We cannot detect RT apps as those are running in an isolated world.

  • alexey_saferoom
    alexey_saferoom
    Community Member

    @svondutch, thanks for your answer

    Sorry, I forgot the specify the specs. This application is a .NET application, written in C#, that can be run on Windows 7/8/8.1. You can find the application here:

    http://en.softonic.com/author/saferoom (check the Windows versions)

    When application is first started, it displays the window with some fields to input. I want to use 1Password App to fill Password fields. If it is possible it will be great and convenient for users.

    Thanks in advance,
    Alexey

  • Hi @alexey_saferoom,

    I was trying to install the app to figure out if 1Password properly recognises the window.
    When launching the installer, I'm being warned that the installer prevents the Windows Smart Screen filter from checking the file.
    Why would that be?

    Cheers!

  • alexey_saferoom
    alexey_saferoom
    Community Member

    Hi, @AlexHoffmann

    Our application installer file is signed by our own Code Signing certificate, issued by our Certificate Authority. Since this CA's root certificate is not installed on your computer, OS considers this file as "Untrusted" and that's why it displays this warning. You can right-click file and click Properties. There you can see tab "Digital Signatures" (or "Signing" - it depends on OS). In this tab you can check certificate information.

    This application is not a virus or some malware - it is an official encryption extension for Evernote. If you google "saferoom evernote" you can find official site and official Twitter/Youtube/Google Plus pages.

    Thanks in advance,
    Alexey

  • Hmm, 1Password sees the app but there are a couple of windows to choose from.
    It's hard to identify the right one without knowing the title.

    Do I need to select one of the '3D Builder' windows, or the 'Program Manager' one?

  • alexey_saferoom
    alexey_saferoom
    Community Member

    @AlexHoffmann

    Thanks for reply. Actually I am not sure. According to documentation, Progman is related to Windows Program Manager application, "3D Builder" - not quite sure what is it :)

    How does 1Password discovers the list of applications to work with? What method is used? Maybe if you give me this information, I'll try to understand, how .NET application can be made visible to 1Password

    Thanks in advance,
    Alexey

  • MikeT
    edited September 2015

    Hi @alexey_saferoom,

    You nailed it on the first guess, it is based on the name of the Windows class. It's a bit basic but we do plan to go deeper in the future if possible.

    Unfortunately, there isn't a way to change this as you said that VS automatically assigns it. If you find the class name for the window that has the password field, that should be the one that shows up in 1Password's list of applications.

    If you're not sure of the name, you probably could run the method on the window handle to return Window.name() or something like it.

  • Building on what @MikeT already told you, the function is GetNextWindow.
    With regards from our developer, this is the code we're using:

    var H: HWND; WindowText: array[0..255] of WideChar;

    And this is what we display in the auto-type window:

    H := GetNextWindow(Application.MainForm.Handle, GW_HWNDNEXT); while H <> 0 do begin if IsWindowVisible(H) then if GetWindowTextW(H, WindowText, 256) > 0 then cboWindowText.AddItem(WindowText, TObject(H)); H := GetNextWindow(H, GW_HWNDNEXT); end;

    I hope this helps.

  • alexey_saferoom
    alexey_saferoom
    Community Member

    @MikeT, @AlexHoffmann

    Thanks for your response. I got it working. The problem was that initial Application window was using the WindowStyle="ToolWindow". Because of that this application was not seen by 1Password.

    Once again, thanks for your support,
    Alexey

  • AGAlumB
    AGAlumB
    1Password Alumni

    Excellent! Thanks for the update. On behalf of MikeT and Alex, you are most welcome. I'm glad to hear it's working for you now. We're here for you if you need anything else! :)

This discussion has been closed.