Total Commander WDX plugin Test.

Implements content plugin interface functionality. Prints all fields' values
with all measurements (if exists).

Version 0.6

May be useful for testing plugins because plugin can write to stdout or stderr.

Usage:
  wdxtest <wdx> <file> [-f[<N>]] [-a] [-s] [-w<field>[=<value>]]

<wdx>   - path to WDX plugin
<file>  - path to file

-f[<N>] - out ft_fulltext/ft_fulltextw fields. <N> - maximum number of bytes to
          output. If <N> not specified, out all field data
-a      - use ANSI functions even if Unicode (W) functions are present
-s      - emulate <SPACEBAR> for ft_ondemand fields (query them too)
-w<field>[=<value>]
        - roundtrip: read field <field>, write it back via ContentSetValue and
          read it again, reporting whether the value is identical; with
          =<value> the given string is written instead of the current value
--help  - print this help and exit

If only <wdx> specified wdxtest shows plugin's supported fields. If <file>
specified too it shows contents of all fields with all units.

For ft_numeric_floating wdxtest shows float number and string stored by plugin
in parenthesis (if plugin have stored such string).

Unicode values (ft_stringw, ft_fulltextw) are read through ContentGetValueW and
converted to the local code page for display. The 64-bit build is named
wdxtest64.exe and loads 64-bit plugins (*.wdx64).

Slow fields are handled like Total Commander does. Every field is first queried
with the CONTENT_DELAYIFSLOW flag. A plugin may then answer ft_delayed, in which
case the placeholder string is shown and the field is queried again at once (TC
does this in a background thread), or ft_ondemand, in which case the placeholder
is shown and the field is only queried again when -s is given (TC waits for
<SPACEBAR>).

ERRORLEVEL: 0 - success, non zero - some (m.b. unknown) error. Program NOT
tested with file names that contains non-ASCII chars.

Building
Visual Studio 2017 Community and CMake are used:

  cmake --preset win32
  cmake --build --preset win32-release
  cmake --preset x64
  cmake --build --preset x64-release

Results:
  build32/Release/wdxtest.exe    - 32-bit
  build64/Release/wdxtest64.exe  - 64-bit

wdxtest page: http://www.totalcmd.net/plugring/wdxtest.html


Changelog

0.6, 2026/09/13

	Added -w switch to roundtrip a field value through ContentSetValue

0.5, 2026/09/13

	Added --help switch to print the usage text

0.4, 2026/09/13

	Added support for ft_delayed and ft_ondemand fields (CONTENT_DELAYIFSLOW)
	ft_delayed fields are queried again automatically
	Added -s switch to query ft_ondemand fields (emulates <SPACEBAR>)
	Shows the placeholder string returned with ft_delayed/ft_ondemand

0.3, 2026/09/13

	Added support for ft_stringw and ft_fulltextw (ContentGetValueW)
	Added 64-bit build (wdxtest64.exe) able to load *.wdx64 plugins
	Added -a switch to force the ANSI plugin functions
	Fixed ft_numeric_64 output (was truncated to 32 bits)
	Added CMake build for 32-bit and 64-bit

0.2, 2007/09/07

	Added support for ft_fulltext

--
Copyright (c) 2007 Oleg Bondar.
<hobo-mts <at> mail <pnt> ru> (change <at> to @ and <pnt> to '.')
Subject of message must contain word 'wdxtest'.
