摘要:
WM_SYSCOMMAND 阅读全文
摘要:
Union部分只能放在最后,这和C的不太一样,要放在前面先用Type定义一个单独的Union类型就可以了。unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs;type TForm1 = class(TForm) procedure FormCreate(Sender: TObject); private { Private declarations } public { Public declaratio... 阅读全文
摘要:
{*******************************************************}{ }{ Remote Inject }{ Creation Date 2010.12.23 }{ Created By: ming }{ ... 阅读全文
摘要:
//use Tlhelp32function GetProcessIDEx(List:TStrings; ProcessName: string = ''): TProcessEntry32;var ret: Boolean; processID: Cardinal; _processName: string; FSnapshotHandle: HWND; FProcessEntry32: TProcessEntry32;begin FSnapshotHandle := CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0); FProce 阅读全文
摘要:
interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, OleCtrls, SHDocVw, ActiveX; type IDocHostShowUI = interface(IUnknown) ['{c4d244b0-d43e-11cf-893b-00aa00bdce1a}'] function ShowMessage(hwnd: THandle; lpstrText: POLESTR; lpstrCaption: POLESTR;dw 阅读全文
摘要:
var hMutex: HWND;begin //hMutex := CreateMutex(nil,True,'_MingTest'); hMutex := CreateEvent(nil,False,False,'_MingTest'); if GetLastError = ERROR_ALREADY_EXISTS then begin MessageBox(0,'This program has executed!','Error!',0); Exit; end; Application.Initialize; Applic 阅读全文
摘要:
View Code {*******************************************************}{ }{ Delphi Thread Sample 2 } { Creation Date 2011.06.30 }{ Created By: ming }{ }{*******************************************************}unit unitWorkThread;interfaceuses Classes,Windows, Messages, SysUtils, Graphics, StdCtrls;type 阅读全文
摘要:
View Code {*******************************************************}{ }{ Delphi Thread Sample } { Creation Date 2011.06.29 }{ Created By: ming }{ }{*******************************************************}unit unitWorkThread;interfaceuses Classes,Windows, Messages, SysUtils, Graphics, StdCtrls;type TW 阅读全文
摘要:
View Code TCriticalSection = class(TObject) protected FSection: TRTLCriticalSection; public constructor Create; destructor Destroy; override; procedure Enter; procedure Leave; function TryEnter: Boolean; end;{TCriticalSection}constructor TCriticalSection.Create;begin InitializeCriticalSection(FSecti 阅读全文
摘要:
procedure getBits(aByte:Byte; bitArr: array of Byte);asm mov ecx,0 @@1: shr al,1 jnc @@2 mov [edx],1 @@2: inc cx inc edx cmp ecx,8 jnz @@1end;procedure TForm1.Button1Click(Sender: TObject);var i: Integer; aByte: Byte; bitArr: array [0..7] of Byte;begin aByte := $0F; ZeroMemory(@bitArr,SizeOf(bitArr) 阅读全文