WindowsInspectString function (winstring.h)

Provides a way to for debuggers to display the value of a Windows Runtime HSTRING in another address space, remotely, or from a dump.

Syntax

HRESULT WindowsInspectString(
  UINT_PTR                  targetHString,
  USHORT                    machine,
  PINSPECT_HSTRING_CALLBACK callback,
  void                      *context,
  UINT32                    *length,
  UINT_PTR                  *targetStringAddress
);

Parameters

targetHString

[in]

The HSTRING to inspect.

machine

The format of the target address space. Valid values are IMAGE_FILE_MACHINE_AMD64 for Win64, IMAGE_FILE_MACHINE_I386 for Win32, or IMAGE_FILE_MACHINE_ARM for 32-bit ARM.

callback

[in]

A callback function to read the string buffer from the target address space. This function is called before the length and targetStringAddress parameters are computed by the WindowsInspectString function.

context

[in, optional]

Custom context data passed to the callback.

length

[out]

The length of the string in the target address space, if the call to callback is successful; otherwise, 0.

targetStringAddress

[out]

The target address of the raw PCWSTR, if the call to callback is successful; otherwise, NULL.

Return value

This function can return one of these values.

Return code Description
E_INVALIDARG
  • IMAGE_FILE_MACHINE_AMD64 was specified for machine, but the current platform is not Win64, or
  • machine is not IMAGE_FILE_MACHINE_AMD64, IMAGE_FILE_MACHINE_I386, or IMAGE_FILE_MACHINE_ARM, or
  • targetHString is not a correctly formed HSTRING.

Requirements

Requirement Value
Minimum supported client Windows 8
Minimum supported server Windows Server 2012
Target Platform Windows
Header winstring.h
Library RuntimeObject.lib
DLL ComBase.dll

See also

HSTRING

PINSPECT_HSTRING_CALLBACK

WindowsCreateString