随笔分类 - Delphi-Process
摘要:函数原型 1 2 3 4 5 6 The PostThreadMessage function posts a message to the message queue of the specified thread. It returns without waiting for the threa
阅读全文
摘要:被调用的应用程序: [delphi] view plain copy print? unit Unit2; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes
阅读全文
摘要:[delphi] view plain copy print? [delphi] view plain copy print? http://blog.csdn.net/huang_xw/article/details/8015286
阅读全文
摘要:第一种:比较简单,根据标题,找到窗口,再找到进程,杀死进程 [delphi] view plain copy procedure KillProgram(WindowTitle : string); const PROCESS_TERMINATE = $0001; var ProcessHandle
阅读全文
摘要:原文地址:C++得到当前进程所占用的内存作者:雪碧狗 使用SDK的PSAPI (Process Status Helper)中的BOOL GetProcessMemoryInfo( HANDLE Process, PPROCESS_MEMORY_COUNTERS ppsmemCounters, DW
阅读全文
摘要:procedure KillSelf;begin Sleep(1000); if not TerminateProcess(GetCurrentProcessId, 0) then WinExec(PChar('TaskKill /F /PID ' + inttostr(GetCurrentProc
阅读全文
摘要:闲暇时间随便写了个小例子,代码很简单,有注释 代码如下: http://blog.csdn.net/zicheng_lin/article/details/8151448
阅读全文
摘要:执行一个程序,必然就产生一个进程。最直接的程序执行方式就是在shell中以鼠标双击某一个可执行文件图标,执行起来的App进程起始是shell调用CreateProcess激活的。 1.shell调用CreateProcess激活App.exe 2.产生一个进程核心对象,计数值为1 3.系统为此进程建
阅读全文
摘要:function FindWindowThroughWindowText(WindowText: string): THandle;var hCurrentWindow: THandle; cnt: Integer; WindowTitle: array [0 .. 254] of Char;beg
阅读全文
摘要:unit FileMap;interfaceuses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, StdCtrls, Dialogs;type //定义TFileMap类 TFileMap = class(TCom
阅读全文
摘要:type TProcessCpuUsage = record private FLastUsed, FLastTime: Int64; FCpuCount:Integer; public class function Create: TProcessCpuUsage; static; functio
阅读全文
摘要:http://www.cnblogs.com/hssbsw/archive/2012/03/10/2389199.html
阅读全文
摘要:var Str:TStream; begin Str:=TFileStream.Create('c:/windows/system32/taskmgr.exe',fmOpenWrite); end; http://www.cnblogs.com/key-ok/p/3358784.html
阅读全文
摘要:http://blog.csdn.net/zswang/article/details/1214827
阅读全文
摘要:Controls.pas单元中有一个FindControl函数,通过句柄获得对应的TWinControl对象。 function FindControl(Handle: HWnd): TWinControl;begin Result := nil; if (Handle <> 0) then beg
阅读全文
摘要:http://blog.csdn.net/zswang/article/details/297038
阅读全文
摘要:type TMainWindow = packed record ProcessID: THandle; MainWindow: THandle; end; PMainWindow =^ TMainWindow; function IsMainWindow(AHandle: THandle): Bo
阅读全文
摘要:建议先参考我上次写的博文跨进程获取Richedit中Text: 获得QQ聊天输入框中的内容 拿到这个问题,我习惯性地会从VCL内核开始分析。找到TRichEdit声明的单元,分析TRichEdit保存为RTF流的代码。(分析VCL内核代码方便了解Windows标准API的封装和使用) 打开声明TRi
阅读全文
摘要:using System.Runtime.InteropServices;[DllImport("User32.DLL")]public static extern int SendMessage(IntPtr hWnd, uint Msg, int wParam, int lParam);publ
阅读全文