(bind-func toString
(lambda (pmdi:PmDeviceInfo*)
(let ((str:i8* (zalloc 256)))
(sprintf str "<PmDeviceInfo: interface=%s name=%s I/O?:"
(tref pmdi 1)
(tref pmdi 2))
(if (= (tref pmdi 3) 1)
(sprintf str "I"))
(if (= (tref pmdi 4) 1)
(sprintf str "O"))
(sprintf str ">")
(String str))))