[This is preliminary documentation and subject to change.]
The DDIHook sample program (DDIHook.exe) shows how to get DDI information. The actual callback is called in a 16-bit DLL, that passes the information up to a 32-bit component, that saves the DDI information in a text file.