類比點擊網頁中的按鈕 – 回複 “starcraft_ly” 的問題

本例:代碼檔案:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, OleCtrls, SHDocVw;type TForm1 = class(TForm) WebBrowser1: TWebBrowser; Button1: TButton; Button2: TButton;

詳解 EnumWindows 與 EnumWindowsProc – 回複 “SplendourChiang” 的問題

問題來源: http://www.cnblogs.com/del/archive/2009/10/16/1584488.html#1727205// EnumWindows 的功能是遍曆所有頂層視窗function EnumWindows( lpEnumFunc: TFNWndEnumProc; {回呼函數指標} lParam: LPARAM {給回呼函數的參數, 它對應回呼函數的第二個參數}): BOOL; stdcall; //成功與否,

學 Win32 彙編[16]: 常用寄存器的常規功能

通用寄存器EAX累加(Accumulator)寄存器AX(AH、AL)常用於乘、除法和函數傳回值EBX基址(Base)寄存器BX(BH、BL)常做記憶體資料的指標, 或者說常以它為基址來訪問記憶體.ECX計數器(Counter)寄存器CX(CH、CL)常做字串和迴圈操作中的計數器EDX資料(Data)寄存器DX(DH、DL)常用於乘、除法和 I/O 指標ESI來源索引(Source Index)寄存器SI常做記憶體資料指標和源字串指標EDI目的索引(Destination

學 Win32 彙編[20]: 洞察標誌寄存器

1514131211109876543210 NTIOPLOFDFIFTFSFZF AF PF CF未使用嵌套標志I/O許可權標誌佔2位溢出標志方向標志中斷允許標志單步標志符號標志零標志未使用輔助標志未使用奇偶標志未使用進位標志上表是 32 位寄存器 EFLAGS 的低 16 位.不能直接讀寫 EFLAGS, 但有些方便的指令, 如:LAHF: 讀取EFLAGS 低 8 位到 AH; SAHF 是 LAHF 的反向操作.指令 STC、CLC、CMC 分別是給 CF(進位標誌) 置位、複位、取反;

學 Win32 彙編[10]: TYPE、$、LENGTHOF、SIZEOF、TYPEDEF

TYPE: 擷取類型大小, 對數組是擷取每個元素的大小; Test10_1.asm.386.model flat, stdcallinclude windows.incinclude kernel32.incinclude masm32.incinclude debug.incincludelib kernel32.libincludelib masm32.libincludelib debug.lib.data? v1 db ? v2 dw ? v3

如何使用 URLOpenStream 函數 – 回複 “天澤” 的問題

URLOpenStream 和 URLDownloadToFile 類似, 都是下載檔案的 COM 函數;前者是下載到 IStream 流, 後者是直接下載到指定路徑; 不如後者使用方便.它們都聲明在 UrlMon 單元, 本例還要同時 uses ActiveX, 因為要用到 IStream 介面.function URLOpenStream( p1: IUnknown; { 介面, 不用它, 給 nil 即可 } p2: PWideChar; {

學 Win32 彙編[21] – 傳送指令: MOV、LEA、XCHG、XLATB、XLAT、MOVZX、MOVSX

彙編指令的一般性要求: 1、兩個運算元的尺寸必須一致; 2、運算元不能同為記憶體.MOV(Move): 最常用的資料傳送指令;該指令不影響 EFlags;指令格式: (其中的 r、m、i 分別表示: 寄存器、記憶體、立即數)MOV r/m, r/m/i; Test21_1.asm.386.model flat, stdcallinclude windows.incinclude kernel32.incinclude masm32.incinclude

學 Win32 彙編[11]: 資料對齊相關的偽指令(ALIGN、EVEN、ORG)

32 位的寄存器容量是 4 位元組, 如果記憶體中的資料都按 4*n 位元組對齊, 肯定會加快吞吐速度;但事實並非如此, 不同大小的資料可能會讓寄存器別彆扭扭地去處理, 從而降低了運行速度!如果使用對齊, 就會浪費掉一些記憶體空間; 其實這是一個需要權衡 "速度" 與 "記憶體" 得失的問題.準備使用的測試檔案:; Test11_1.asm.586.model flat, stdcallinclude windows.incinclude kernel32.incinclude

學 Win32 彙編[17]: 關於壓棧(PUSH)與出棧(POP) 之一

記得剛學多線程的時候, 碰到一個結構://Delphi 的文法描述PContext = ^TContext;_CONTEXT = record ContextFlags: DWORD; Dr0: DWORD; Dr1: DWORD; Dr2: DWORD; Dr3: DWORD; Dr6: DWORD; Dr7: DWORD; FloatSave: TFloatingSaveArea; SegGs: DWORD; SegFs: DWORD; SegEs: DWORD;

學 Win32 彙編[12]: PTR、OFFSET、ADDR、THIS

PTR: 指定要操作的資料尺寸; Test12_1.asm.386.model flat, stdcallinclude windows.incinclude kernel32.incinclude masm32.incinclude debug.incincludelib kernel32.libincludelib masm32.libincludelib debug.lib.data val db 11h, 22h, 33h, 44h, 55h, 66h, 7

“島主” 同學給我出的演算法題

問題來源: http://www.cnblogs.com/del/archive/2010/04/09/1708619.html#1798022問題描述 - 給出幾組數值範圍, 如:組一: 2..5組二: 3..6組三: 1..8組四: 2..10...然後從每組中選一個數字, 依次排列成一個新的數字, 需要列出所有相片順序.實現代碼:type TArr = array of array[0..1] of Byte;procedure RangeNums(arr: TArr; List:

學 Win32 彙編[13]: 定義符號常量(=、EQU、TEXTEQU)

=、EQU、TEXTEQU 功能差不多, 它們定義的符號都將在編譯前輩替換成它們指定的常量值.相比之下 EQU 更好用些.= 舉例; Test13_1.asm.386.model flat, stdcallinclude windows.incinclude kernel32.incinclude masm32.incinclude debug.incincludelib kernel32.libincludelib masm32.libincludelib debug.

學 Win32 彙編[18]: 關於壓棧(PUSH)與出棧(POP) 之二

由於 "棧" 是由高到低使用的, 所以新壓入的資料的位置更低.ESP 中的指標將一直指向這個新位置, 所以 ESP 中的地址資料是動態.每次 PUSH, ESP = ESP - x; 每次 POP, ESP = ESP + x;其中的 x 只能是 4 或 2, 因為 Win32 的 PUSH 只可以壓入 32 位(預設)或 16 位的資料.ESP 有個名字叫 "棧頂", 其實它指向的是棧中最低位置的資料.執行個體查看 ESP 的變化:; Test18_1.asm.386.model flat,

學 Win32 彙編[14]: 使用中括弧 []

[地址] 是取地址指向的內容:; Test14_1.asm.386.model flat, stdcallinclude windows.incinclude kernel32.incinclude masm32.incinclude debug.incincludelib kernel32.libincludelib masm32.libincludelib debug.lib .data dwVal dd 123.codemain proc

如何刪除動態數組的指定元素 – 回複 “Splendour” 的部分問題

type TArr = array of TPoint; {把數組先定義成一個類型會方便許多, 這裡僅用 TPoint 測試}{刪除動態數組指定元素的過程: 參數 arr 是數組名, 參數 Index 是要刪除的索引}procedure DeleteArrItem(var arr: TArr; Index: Integer);var Count: Cardinal;begin Count := Length(arr); if (Count = 0) or (Index = Count)

使用 TClientDataSet(1)

本例:代碼檔案:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Grids, DBGrids, DB, DBClient, StdCtrls, ExtCtrls;type TForm1 = class(TForm) Panel1: TPanel; Button1: TButton; Button2:

TWebBrowser 與 MSHTML(3): window 對象的屬性、方法、事件縱覽

這還不是 TWebBrowser 控制項的屬性、方法、事件; 這和瀏覽器中 JavaScript 的 window 對象是基本一致的.window 對象是網頁指令碼中的頂層對象, 它代表網頁的視窗、或一個架構.{IHTMLWindow2 屬性:}frames //返回視窗中的架構數組location //返回視窗的 location 對象history //返回視窗的 history 對象navigator //

提取網頁中的所有連結、點擊第 n 個連結 – 回複 “劉麗” 的問題

問題來源: http://www.cnblogs.com/del/archive/2009/01/08/1370907.html#1425544本例:代碼檔案:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, OleCtrls, SHDocVw;type TForm1 = class(TForm)

如何讓 TreeView 的清單項目攜帶資料、並讀出或刪除這個資料 – 回複 “Splendour” 的問題

問題來源: http://www.cnblogs.com/del/archive/2009/12/18/1627110.html#1799657準備工作:1、在空白表單上添加 TreeView1 和 Button12、啟用表單的 OnCreate 事件, 啟用 TreeView 的 OnDblClick 事件全部代碼如下:unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics,

學 Win32 彙編[15]: LOOP 與標號

Loop 是反覆執行;從哪反覆? 這要用到 "標號";反覆幾次? 把反覆的次數告訴 ECX 寄存器即可.笨辦法計算 3 * 8 = 24; Test15_1.asm.386.model flat, stdcallinclude windows.incinclude kernel32.incinclude masm32.incinclude debug.incincludelib kernel32.libincludelib masm32.libincludelib

總頁數: 61357 1 .... 4747 4748 4749 4750 4751 .... 61357 Go to: 前往

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.