This is the same bug that Robert pointed out on your previous post.
It has to do with the usage thread-pointer not being mapped correctly to a .NET IntPtr data type which is required under the covers.
If you change the call so that it uses an IntPtr it should work OK.
01 sub-handle usage thread-pointer.
01 IntPtr type System.IntPtr.
set IntPtr to sub-handle as type System.IntPtr
call 'CBL_THREAD_IDDATA_GET' using sub-iddata-ptr
by value IntPtr
...