I thought I should come back and let readers know that this turned out to be fairly easy, once I sat down and actually began!
Also, the resulting DLL is a lot smaller, much simpler, and loads faster.
So, whilst temporarily painful, it turned out to be a change for the better! Cheers!
;o) Cor
guinness
A very nice UDF indeed, thank you for all the time and effort you have put into it.
Which one do you prefer?
$dBytes = DllStructGetData($tBuffer, 'array')
$dBytes = $tBuffer.array