본문 바로가기

전체 글

(88)
[네트웍/인터넷] Winsock WriteFile and Overlapped IO procedure SendToSocket(Sock : TSocket; Data : PaData; Len : Integer); var Overlap : OVERLAPPED; BytesWritten : DWord; BytesSend : Integer; begin { create overlapped structure with controlling event } FillChar(OverLap, SizeOf(OVERLAPPED), 0); OverLap.hEvent := CreateEvent(nil, True, False, ''); if OverLap.hEvent = 0 then { event is not created } RaiseLastWin32Error; try BytesSend := 0; while Byte..
[시스템] 마우스 아래의 윈도우 핸들 구하기 // 아래처럼 타이머를 사용하지 않고 마우스 후킹을 사용하면 좀더 간결한 프로그램을 만들 수 있습니다 // SetWindowsHookEx(WH_MOUSE,...) 를 찾아보세요 unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls; type TForm1 = class(TForm) Timer1: TTimer; Memo1: TMemo; procedure Button1Click(Sender: TObject); procedure Timer1Timer(Sender: TObject); private { Private declarations..
[일반/컴포넌트] 표준 TListBox 에 Radio 버튼 올리기 unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) ListBox1: TListBox; procedure FormCreate(Sender: TObject); procedure ListBox1DrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState); procedure ListBox1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); private..
[COM/OLE] 특정 웹페이지의 모든 Link URL 구하기 unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, OleCtrls, SHDocVw, OleServer, MSHTML_TLB, ComObj, StdCtrls; type TForm1 = class(TForm) Button1: TButton; Edit1: TEdit; ListBox1: TListBox; procedure Button1Click(Sender: TObject); procedure FormCreate(Sender: TObject); private { Private declarations } FInternetExplorer: TInternetExplore..
[윈도우즈 API] Type Library 목록 구하기 unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ActiveX, ComObj, ComConst, registry, StdCtrls; type TForm1 = class(TForm) Button1: TButton; Memo1: TMemo; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } procedure tlibcallback(guid:TGuid; const version, tlibname, filename: string..
[일반/컴포넌트] 도넛(Doughnut) 모양의 폼 만들기 unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Buttons; type TForm1 = class(TForm) Button1: TButton; procedure FormCreate(Sender: TObject); procedure FormPaint(Sender: TObject); procedure Button1Click(Sender: TObject); private { Private declarations } rTitleBar : THandle; Center : TPoint; CapY : Integer; Circum : Double; S..
[네트웍/인터넷] IP Helper API 를 이용한 접속 상태 테이블 구하기 unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Button1: TButton; Memo1: TMemo; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; const MIB_TCP_STATE_CLOSED = 1; MIB_TCP_STATE_LISTEN = 2; MIB_TCP_STATE_SYN_SENT = 3; MIB_TCP_STATE_SYN_RCVD..
[시스템] IME 입력 시스템 정보 unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, imm, StdCtrls; type TForm1 = class(TForm) Button1: TButton; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} function GetImeName(const winctr :TWinControl):string; var kl: HKL; Imc:..