Well, I can now send the reports to the boards using WriteFile. HidD_SetOutputReport still fails, no idea why at present. Here's what I found.
The ST demo code was creating a Read and Write thread. CreateFile was called with the FILE_FLAG_OVERLAPPED attribute, so the ReadFile and WriteFile calls included an OVERLAPPED pointer. This makes sense, as the ST code allowed INPUTs and OUTPUTs.
I did not implement thread, just wanted to send some commands to the board. Threads will be needed later.
hHidDeviceObject = CreateFile((LPCTSTR)lpDevicePath,
GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ FILE_SHARE_WRITE,
NULL, //&SecurityAttributes,
OPEN_EXISTING,
0, NULL);
and later
returnValue = WriteFile(hHidDeviceObject,
&ReportBuffer,2,
&dwBytesWritten,
NULL);
This (of course, now, in hindsight) makes sense. No OVERLAPPED I/O is needed in this case.
Still don't see why HidD_SetOutputReport fails.
SD