Sunday, June 17, 2007

UDT (User Defined Types) and COM

During one of my recent projects I came across a typical problem of passing user-defined types from my COM component. The problem I had was that I was using Attributed ATL (one which even Microsoft seems to have abandoned ;) ). I came up with the following way to expose UDT from COM. Beware though, passing UDT supporting IDispatch interface is a different ball-game altogether and scripting languages don't readily support UDT's.