T_______________________________Single Step one instruction TASK____________________________Display windows task list THREAD__________________________Display thread information U_______________________________Un-Assemblers instructions VER_____________________________SoftICE Version WATCH__________________________Add watch WHAT___________________________Identify the type of expression WMSG ___________________________Display windows messages X________________________________Return to host debugger or program Những lệnh cấp cao : CPU_____________________________Display CPU register information GDT_____________________________Display global descriptor table GENINT__________________________Generate an interrupt HEAP____________________________Display windows global heap LHEAP___________________________Display windows local heap IDT_____________________________Display interrupt descriptor table I, IB, IW, ID______________________Input data from I/O Port O. OB, OW, OD____________________Output data form I/O Port LDT_____________________________Display local descriptor table MAP32___________________________Display 32Bit section map MAPV86__________________________Display v86 memory map PAGE____________________________Display page table information PCI______________________________Display PCI device information PEEK____________________________Read from physical address PHYS______________________Display all virtual addresses for physical address POKE____________________________Write to physical address PROC____________________________Display process information QUERY__________________________Display process virtual address space map TSS_____________________________Display task state segment STACK___________________________Display call stack VCALL___________________________Display VxD calls VM______________________________Display virtual machine information VXD_____________________________Display windows VxD map XFRAME__________________________Display active exeption frames Mode Control : FAULTS__________________________Enable/Disable SoftIce fault trapping I1HERE__________________________Direct INT1 to SoftICE I3HERE__________________________Direct INT3 to SoftICE SET_____________________________Change an internal variable ZAP_____________________________Zap embedded INT1 or INT3 Những lệnh chỉnh sửa : ALTKEY_________________________Set key sequence to invoke window ANSWER______________________Auto-answer and redirect console to modem CODE___________________________Display insctruction bytes in code window COLOR__________________________Display/Set screen colors DEX____________________________Display/Assign window data expression DIAL____________________________Redirect console to modem FKEY____________________________Display/Set function keys LINES___________________________Set/Display number of lines on screen MACRO__________________________Define a named macro command PAUSE___________________________Control display scroll mode PRN_____________________________Set printer output port SERIAL__________________________Redirect console TABS____________________________Set/Display tab setting Window Commands : ._______________________________ Locate current instruction EC______________________________Enable/Disable code window WC_____________________________Toggle code window WD_____________________________Toggle data window WF_____________________________Toggle float point stack window WL_____________________________ Toggle locals window WR_____________________________Toggle register window WW_____________________________Toggle watch window Window Control : ALTSCR__________________________Change to alternate display CLS_____________________________Clear window FLASH___________________________Restore screen during P and T RS______________________________Restore program screen Symbole / Source Commands : EXP_____________________________Display export symbols FILE____________________________Change/Display current source file LOCALS__________________________Display locals currently in scope SRC_____________________________Toggle between source, mixed & code SS______________________________Search source module for string SYMLOC_________________________Relocate symbol base TAB_____________________________Select/Remove symbol table TYPES___________________________List all types, or display type defination Back Trace Commands : SHOW___________________________Display from backtrace buffer TRACE__________________________Enter backtrace simulation mode XT______________________________Step in trace simulation mode XP______________________________Program step in trace simulation mode XG______________________________Go to address in trace simulation mode XRSET___________________________Reset backtrace history buffer Special Operators : ._______________________Preceding a decimal number specifies a line number $______________________Preceding an address specifies SEGMENT addressing #______________________Preceding an address specifies SELECTOR @______________________Preceding an address The_lighthouse(REA) (típ theo) PHẦN 3 : Breakpoint và Win API Details 03.1 Crippled Programs ================ EnableMenuItem Hàm EnableMenuItem có nhiệm vụ enable, disable, hay gray 1 item nào đó trong menu Code: BOOL EnableMenuItem( HMENU hMenu,_________________// handle of menu UINT uIDEnableItem,____________// menu item to enable, disable, or gray UINT uEnable__________________// menu item flags ); Returns Giá trị trả về sẽ chỉ rõ trạng thái trước đó của menu item (đó là MF_DISABLED, MF_ENABLED hay MF_GRAYED). Nếu menu item không tồn tại, giá trị trả về sẽ là 0xFFFFFFFF EnableWindow Hàm EnableWindow có nhiệm vụ enable hoặc disable chuột và bàn phím input vào specified window hoặc control. Khi input bị disable, window không thể nhận input như click chuột và gõ phím. Khi input enable, window nhận tất cả input Code: BOOL EnableWindow( HWND hWnd,________________// handle of window BOOL bEnable_______________// flag for enabling or disabling input ); Returns Nếu window đã bị disable, giá trị trả về là TRUE, ngược lại giá trị trả về là FALSE. Để biết thông tin về lỗi, chúng ta dùng lệnh GetLastError. 03.2 Dialog Boxes =========== CreateDialogIndirectParamA / CreateDialogIndirectParamW Hàm CreateDialogIndirectParamA có nhiệm vụ tạo ra modeless dialog box từ dialog box template trong memory. Trước khi display dialog box, function sẽ pass program-defined value vào dialog box procedure giống như thông số Iparam của WM_INITDIALOG message. Chương trình có thể sử dụng giá trị này để initialize (chạy) dialog box controls Code: HWND CreateDialogIndirectParam( HINSTANCE hInstance,______________// handle of application instance LPCDLGTEMPLATE lpTemplate, ________// address of dialog box template HWND hWndParent,________________// handle of owner window DLGPROC lpDialogFunc,_____________// address of dialog box procedure LPARAM lParamInit_________________// initialization value ); Returns Nếu function succeed (tạm dịch là hoàn thành), giá trị trả về là handle của dialog box. Còn nếu function fail (không hoàn thành), giá trị trả về là NULL, giá trị là 0xFFFFFFFF CreateDialogParamA / CreateDialogParamW Hàm CreateDialogParamA có nhiệm vụ tạo ra modeless dialog box từ dialog box template resource. Trước khi display dialog box, function sẽ pass program-defined value vào dialog box procedure giống như thông số Iparam của WM_INITDIALOG message. Chương trình có thể sử dụng giá trị này để initialize dialog box controls Code: HWND CreateDialogParam( HINSTANCE hInstance,____________// handle of application instance LPCTSTR lpTemplateName, _________// identifies dialog box template HWND hWndParent,_____________ // handle of owner window DLGPROC lpDialogFunc,___________// address of dialog box procedure LPARAM dwInitParam ____________// initialization value ); Returns Nếu window bị disable, giá trị trả về là TRUE, ngược lại giá trị trả về là FALSE. Để biết thông tin về lỗi, chúng ta dùng lệnh GetLastError DialogBox Hàm DialogBox có nhiệm vụ tạo ra modal dialog box từ dialog box template resource. DialogBox không return control cho đến khi specified callback function kết thúc modal dialog box bằng cách gọi EndDialog Code: int DialogBox( HANDLE hInstance,__________________ // handle of application instance LPCTSTR lpTemplate,_________________// identifies dialog box template HWND hWndParent,_________________// handle of owner window DLGPROC lpDialogFunc ______________// address of dialog box procedure ); Returns Nếu function hoàn thành, giá trị trả về là thông số nResult trong lệnh call EndDialog được dùng để kết thúc dialog box. Nếu function không hoàn thành, giá trị trả về là -1 DialogBoxIndirect Hàm DialogBoxIndirect có nhiệm vụ tạo ra modal dialog box từ dialog box template trong memory. Code: int DialogBoxIndirect( HANDLE hInstance,___________________// handle of application instance . PHẦN 3 : Breakpoint và Win API Details 03 .1 Crippled Programs ================ EnableMenuItem Hàm EnableMenuItem có nhiệm vụ enable, disable, hay gray 1 item nào đó trong menu Code: BOOL. : FAULTS__________________________Enable/Disable SoftIce fault trapping I1HERE__________________________Direct INT1 to SoftICE I3HERE__________________________Direct INT3 to SoftICE SET_____________________________Change. SET_____________________________Change an internal variable ZAP_____________________________Zap embedded INT1 or INT3 Những lệnh chỉnh sửa : ALTKEY_________________________Set key sequence to invoke window