Share via


IOsAxsModule::GetData (Windows Embedded CE 6.0)

1/5/2010

This method returns module data.

Syntax

HRESULT GetData(
  DWORD* pdwId,
  DWORD* pdwHnd,
  DWORD* pdwPtr,
  IOsAxsProcess** ppiOsAxsOwningProc,
  LPOLESTR*  pszModName,
  LPOLESTR* pszModPath,
  ADDRESS_TYPE* pAddrStart,
  ADDRESS_TYPE*  pAddrEnd,
  BOOL* pfRelocRwData,
  ADDRESS_TYPE* pAddrRrwdStart,
  ADDRESS_TYPE* pAddrRrwdEnd
 );

Parameters

  • pdwId
    [out] Pointer to the debugger module identifier, which is an arbitrary 32-bit wide unique identifier that is not unique during execution.
  • pdwHnd
    [out] Pointer to the module or kernel handle.

    This value is NULL if the pointer is not available.

  • pdwPtr
    [out] Pointer to the module kernel data structure address.

    this value is NULL if the data structure is not available.

  • ppiOsAxsOwningProc
    [out] Pointer to the owning process.
  • pszModName
    [out] Pointer to the name of the module, without the path. The buffer for this value is allocated by CoTaskMemAlloc.
  • pszModPath
    [out]Pointer to the path of the module.The buffer for this value is allocated by CoTaskMemAlloc.
  • pAddrStart
    [out]Pointer to the starting address of the module.
  • pAddrEnd
    [out] Pointer to the ending address of the module.
  • pfRelocRwData
    [out]Boolean value that returns TRUE if relocating Read/Write data to another base address.

    This value is typically TRUE if the module is in ROM.

  • pAddrRrwdStart
    [out]Pointer to the starting address of the Read/Write data section.
  • pAddrRrwdEnd
    [out]Pointer to the ending address of the Read/Write data section.

Return Value

The following table shows return values for this method.

Value Description

S_OK

Indicates the function was successful.

E_FAIL

Indicates an unspecified failure.

Remarks

To avoid resource leaking, use CoTaskMemFree to free the task memory used by the buffer for pszModName and pszModPath.

The following example shows how you might use CoTaskMemFree to release the memory held for the return buffers.

DWORD dwModID, dwModHandle, dwModAddr;
IOsAxsEnumProcess *piOsAxsEnumProc;
LPOLESTR pszModName, pszModPath;
ADDRESS_TYPE AddrStart, AddrEnd;
BOOL fRelocRwData;
ADDRESS_TYPE AddrRwStart, AddrRwEnd;
HRESULT hr = piOsAxsModule->GetData (&dwModID, &dwModHandle, &dwModAddr, &piOsAxsEnumProc, &pszModName, &pszModPath, &AddrStart, &AddrEnd, &fRelocRwData, &AddrRwStart, &AddrRwEnd);
if (SUCCEEDED (hr))
{
    // Use module data ...
    CoTaskMemFree (pszModName);
    pszModName = 0;
    CoTaskMemFree (pszModPath);
    pszModPath = 0;
    piOsAxsEnumProc->Release ();
    piOsAxsEnumProc = 0;
}

Requirements

Header OsAcess.h
Library OSAXSC.lib
Windows Embedded CE Windows CE 5.0 and later

See Also

Reference

IOsAxsModule
IOsAxs Interfaces