How to handle UDT with Win32OLE?

I have a function in com dll which return a UDT(user defined type). How
do I use win32OLE to receive this data? It seems like it didn’t return
the UDT after the function call. I also found that ruby Win32OLE can’t
handle SAFEARRAY in com dll.
Anyone has any idea how to use solve this issue?