windows-process

Hooking into a running process to monitor its status

天大地大妈咪最大 提交于 2019-12-25 01:55:30
问题 I'm new to C# hooking and am looking for a little information on where to do my research. I figured there are some folks here who may have done this before that might have a good idea of where to start! My overall goal is simple- to create a C# application, if possible, that can search the current running processes on a machine for one matching a certain name (we can assume for this situation that it is unique, only 1 process of that name) and "hook" into the process. The goal would be to

What does « program is not responding » mean?

Deadly 提交于 2019-12-23 17:31:28
问题 What does this message means, is there an API to « respond » to Microsoft Windows status queries ? I'm looking for a technical answer. Thanks :) 回答1: What this means is that the program is failing to service its message queue. From the documentation: If a top-level window stops responding to messages for more than several seconds, the system considers the window to be not responding. In this case, the system hides the window and replaces it with a ghost window that has the same Z order,

VB6 Application Stops Responding

只愿长相守 提交于 2019-12-12 11:14:29
问题 I Have a program written in VB6 that reads a long text file and performs a very long operation. I have also implemented progress bar, but my problem is that, after while my program says "Not responding" and it starts responding again when the task is completed. How do I remove this 'Not responding' problem? 回答1: Windows/Explorer will change a process to the "Not responding" state when it goes too long without processing any messages. In VB6, this will happen when running a long section of

Filtering/Parsing list produced from EnumWindows in C++

天涯浪子 提交于 2019-12-11 08:42:11
问题 I am using the following code to get a list of windows running on my machine #include <iostream> #include <windows.h> using namespace std; BOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lParam) { TCHAR buffer[512]; SendMessage(hwnd, WM_GETTEXT, 512, (LPARAM)(void*)buffer); wcout << buffer << endl; return TRUE; } int main() { EnumWindows(EnumWindowsProc, NULL); return 0; } I want to get a list of what is normally refered to as a Window - I say this because when running the above code I get a

How to pass a message from windows service to windows desktop application using c#?

我只是一个虾纸丫 提交于 2019-12-10 16:25:51
问题 I want to pass a message from windows service to an windows desktop application that is already running. I have implemented a timer on windows service. after an interval the service send a message to the windows application. The service or sender code is below: System.Diagnostics.Process[] lProcs = System.Diagnostics.Process.GetProcessesByName("TestProcess2"); if (lProcs.Length > 0) { IntPtr handle = lProcs[0].MainWindowHandle; if (handle != IntPtr.Zero) SendMessage(handle, 232, IntPtr.Zero,

Is it possible to start a process with uiAccess=true from another process with uiAccess=true

别来无恙 提交于 2019-12-06 14:43:51
问题 A process is already running that has uiAccess=true in it's manifest. Is it possible for this program to start another such process with uiAccess=true ? Currently, whenever Process.Start is called for the second process a Win32Exception is thrown with message: The requested operation requires elevation Running the first process as Administrator stops the failure however this is not an option for me. I know it is possible to do this from a service using SetTokenInformation etc. (and I'm

Get command line string of 64-bit process from 32-bit process

青春壹個敷衍的年華 提交于 2019-12-03 09:38:46
问题 The code below works for me well to get command line string of 32-bit process from a 32-bit app, 64-bit process from a 64-bit app and 32-bit process from 64-bit app. This will break if I try to use for 64-bit process from 32-bit app. The reason being the structure size difference in PROCESS_BASIC_INFORMATION and address size. So here are my questions - 1) The suggestion given in process hacker ( http://processhacker.sourceforge.net/forums/viewtopic.php?f=15&t=181 ) to use wow64 function doesn

Get command line string of 64-bit process from 32-bit process

[亡魂溺海] 提交于 2019-12-03 01:17:53
The code below works for me well to get command line string of 32-bit process from a 32-bit app, 64-bit process from a 64-bit app and 32-bit process from 64-bit app. This will break if I try to use for 64-bit process from 32-bit app. The reason being the structure size difference in PROCESS_BASIC_INFORMATION and address size. So here are my questions - 1) The suggestion given in process hacker ( http://processhacker.sourceforge.net/forums/viewtopic.php?f=15&t=181 ) to use wow64 function doesn't seem to work and fail with following error - NtWow64ReadVirtualMemory64 error: 8000000D while

Maximize another process' Window in .NET

妖精的绣舞 提交于 2019-11-27 09:04:49
I have a handle on another process' main window in .net (proc.MainWindowHandle). How do I maximize the window inside of .net? You can pinvoke to ShowWindow with SW_SHOWMAXIMIZED to maximize the window. Pinvoke.net has an entry for ShowWindow here . For example, // Pinvoke declaration for ShowWindow private const int SW_SHOWMAXIMIZED = 3; [DllImport("user32.dll")] static extern bool ShowWindow(IntPtr hWnd, int nCmdShow); // Sample usage ShowWindow(proc.MainWindowHandle, SW_SHOWMAXIMIZED); You could also use SetWindowPlacement . There's further info about it on Pinvoke.net. I had some problems

Maximize another process&#39; Window in .NET

一个人想着一个人 提交于 2019-11-26 14:31:22
问题 I have a handle on another process' main window in .net (proc.MainWindowHandle). How do I maximize the window inside of .net? 回答1: You can pinvoke to ShowWindow with SW_SHOWMAXIMIZED to maximize the window. Pinvoke.net has an entry for ShowWindow here. For example, // Pinvoke declaration for ShowWindow private const int SW_SHOWMAXIMIZED = 3; [DllImport("user32.dll")] static extern bool ShowWindow(IntPtr hWnd, int nCmdShow); // Sample usage ShowWindow(proc.MainWindowHandle, SW_SHOWMAXIMIZED);