2018年11月13日 星期二

Undocumented MessageBoxTimeOut function 時間 倒數 訊息


http://www.delphibasics.info/home/delphibasicssnippets

Undocumented MessageBoxTimeOut function
function MessageBoxTimeOut( 
      hWnd: HWND; lpText: PChar; lpCaption: PChar; 
      uType: UINT; wLanguageId: WORD; dwMilliseconds: DWORD): Integer; stdcall;
function MessageBoxTimeOutA( 
      hWnd: HWND; lpText: PChar; lpCaption: PChar; 
      uType: UINT; wLanguageId: WORD; dwMilliseconds: DWORD): Integer; stdcall;

function MessageBoxTimeOutW( 
      hWnd: HWND; lpText: PWideChar; lpCaption: PWideChar; 
      uType: UINT; wLanguageId: WORD; dwMilliseconds: DWORD): Integer; stdcall;

implementation 

// this const is not defined in Windows.pas 
const 
  MB_TIMEDOUT = 32000; 

function MessageBoxTimeOut; externaluser32 name 'MessageBoxTimeoutA'; 
function MessageBoxTimeOutA; external user32 name 'MessageBoxTimeoutA'; 
function MessageBoxTimeOutW; external user32 name 'MessageBoxTimeoutW';


var 
  iResult: Integer; 
  iFlags: Integer; 
begin 
  // Define a MessagBox  with an OK button and a timeout of 2 seconds 
  iFlags  := MB_OK or MB_SETFOREGROUND or MB_SYSTEMMODAL or MB_ICONINFORMATION;
  iResult := MessageBoxTimeout( 
   Application.Handle, 
   'Test a timeout of 2 seconds.', 
   'MessageBoxTimeout Test', iFlags, 0, 2000); 

  // iResult will = 1 (IDOK) 
  ShowMessage(IntToStr(iRet)); 

  // Define a MessageBox with a Yes and No button and a timeout of 5 seconds 
  iFlags  := MB_YESNO or MB_SETFOREGROUND or MB_SYSTEMMODAL or MB_ICONINFORMATION; 

  iResult := MessageBoxTimeout( 
    Application.Handle, 
    'Test a timeout of 5 seconds.', 
    'MessageBoxTimeout Test', iFlags, 0, 5000); 

  // iResult = MB_TIMEDOUT if no buttons clicked, otherwise 
  // iResult will return the value of the button clicked 

  case iResult of 
  IDYES:  // Pressed Yes button 
    ShowMessage('Yes'); 

  IDNO:  // Pressed the No button 
    ShowMessage('No'); 

  MB_TIMEDOUT: // MessageBox timed out 
    ShowMessage('TimedOut'); 
  end; 
end;

Using NtDeleteFile from Delphi 刪除 檔案



Using NtDeleteFile from Delphi

The required structures (not defined in Delphi) are UNICODE_STRING and OBJECT_ATTRIBUTES.
function NtDeleteFile(ObjectAttributes:POBJECT_ATTRIBUTES):DWORD; stdcall; external 'ntdll.dll'; RtlDosPathNameToNtPathName_U

2018年11月12日 星期一

完整 抓取 記憶體 驗證 鏡像

memory text Dynamic Section Image Verification


LoadLibrary GetDllDirectory  GetProcAddress FreeLibrary GetModuleHandle DllMain MapViewOfFile


Dynamic TEXT Section Image Verification - CodeProject
Dynamic Code Checksum Generator - CiteSeerX
Dynamic Section - Assembly Language Programmer's Guide

memory Dynamic  process Section Image list api monitor

2018年11月7日 星期三

delphi VCL Web-Frameworks RIA




http://delphi625.rssing.com/chan-54815889/all_p14.html

delphi VCL Web-Frameworks

delphi Web ria

Rich Internet Application Frameworks


VCL Web-Frameworks
RealThinClient
IntraWeb
AthTek WebXone
UniGui
Raudus
xxm
DelphiOnRails
WebHub VCL
Kitto
p2js
extPascal
DelphiMVCFramework
Pas2Php