Search Results

Search found 2 results on 1 pages for 'puretechy'.

Page 1/1 | 1 

  • FindWindowEx from user32.dll is returning a handle of Zero and error code of 127 using dllimport

    - by puretechy
    I need to handle another windows application programatically, searching google I found a sample which handles windows calculator using DLLImport Attribute and importing the user32.dll functions into managed ones in C#. The application is running, I am getting the handle for the main window i.e. Calculator itself, but the afterwards code is not working. The FindWindowEx method is not returning the handles of the children of the Calculator like buttons and textbox. I have tried using the SetLastError=True on DLLImport and found that I am getting an error code of 127 which is "Procedure not found". This is the link from where I got sample application: http://www.codeproject.com/script/Articles/ArticleVersion.aspx?aid=14519&av=34503 Please help if anyone knows how to solve it. UPDATE: The DLLImport is: [DllImport("user32.dll", SetLastError = true)] public static extern IntPtr FindWindowEx(IntPtr parentHandle, IntPtr childAfter, string className, string windowTitle); The Code that is not working is: hwnd=FindWindow(null,"Calculator"); // This is working, I am getting handle of Calculator // The following is not working, I am getting hwndChild=0 and err = 127 hwndChild = FindWindowEx((IntPtr)hwnd,IntPtr.Zero,"Button","1"); Int32 err = Marshal.GetLastWin32Error();

    Read the article

  • Autohotkey to map F5 to Shift+Home and then F5 - eventually executing a single line query in sql server?

    - by puretechy
    Reading the syntax from autohotkey, I am trying to achieve this. But the first step of selecting the entire line is not working:- F5:: send {Shift Home} return I have tried few others too, but its not working. This is not sending Shift+Home combination on pressing F5 key. Please tell me what's wrong with this? Also if possible, what to do next?, as if I will write send {F5} I believe, it will recursively fire this script again and again..

    Read the article

1