Home
Auto Debug On Line Help
 
User Script: Auto Debug System

getParamAddress

The getParamAddress function to get function parameter address when the function has be called.

LONG getParamAddress(
  LONG ppAddress,    // The parameters array.
  int nParam         // which parameter want to get.
);

Parameters

ppAddress
The parameters array.
nParam
which parameter want to get.

Return Values

Return the parameter address. This function only can be call at OnBreakPointEntry or OnBreakPointReturn event.

Examples

VBscript Example:

sub main
  addMenuItem "Save Log", "SaveLogFile"
  addMenuItem "Kill Trace Process", "KillTraceProcess"
  startProcess "Notepad.exe", "c:\a.txt"
end sub

sub SaveLogFile
    MsgBox "Call Save Log File"
    saveLog "c:\aaa.dsf"
end sub

sub KillTraceProcess
    MsgBox "Call Kill Process"
    killProcess false
end sub

sub OnBreakPointEntry(pszDll, pszName, nParam, pParam, dwProcessId)
  rc = getParamAddress(pParam, 0)
  buf = getProcessMemory(rc, 100, 0)
end sub

JavaScript Example:

function main(){
  addMenuItem("Save Log", "SaveLogFile");
  addMenuItem("Kill Trace Process", "KillTraceProcess");

  startProcess("Notepad.exe", "c:\a.txt");
}

function SaveLogFile(){
    echo("Call Save Log File");
    saveLog("c:\aaa.dsf");
}

function KillTraceProcess(){
    echo("Call Kill Process");
    killProcess(false);
}

function OnBreakPointEntry(pszDll, pszName, nParam, pParam, dwProcessId)
{
  rc = getParamAddress(pParam, 0);
  vbTemp = getProcessMemory(rc, 100, 0);
  buf = new VBArray(vbTemp);
}

Requirements

Auto Debug for Windows: Unsupport.
Auto Debug Professional: Requires version 5.0 or later.

See Also

Script Information Overview, Script Functions, getProcessMemory,OnBreakPointReturn ,OnBreakPointEntry

Copyright c 2003-2017, www.autodebug.com All Rights Reserved