Xref: utzoo comp.sys.mac.system:3748 comp.sys.mac.programmer:22994 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!dsinc!ub!uhura.cc.rochester.edu!vince@cvs.rochester.edu From: vince@cvs.rochester.edu (Vincent Ferrera) Newsgroups: comp.sys.mac.system,comp.sys.mac.programmer Subject: OS queues and the File Manager Message-ID: <12959@ur-cc.UUCP> Date: 25 Mar 91 16:38:23 GMT Sender: news@uhura.cc.rochester.edu Organization: Center for Visual Science, U. of Rochester Lines: 32 I am trying to write an application in C which will access information in the volume-control-block queue. Looking in Inside Mac v. II, I noticed that all the queue elements for all OS queues are defined as a variant record in Pascal. I tried the following code: QHdrPtr vcb_head; QElemPtr vcb_elem; vcb_head = GetVCBQHdr(); vcb_elem = (*vcb_head).qHead; I naively assumed that I could then access the information in the volume control block by simply doing, e.g. volname = (*vcb_elem).vcbVN; To which the Think C compiler responded, "Surely you jest, I don't know anything about struct/union member 'vcbVN'." Using the debugger, I found that (*vcb_elem) contained only three fields: qLink, qType, and qData. Furthermore, qData was just an array, not a struct. I looked at the elements of qData and could figure out roughly which ones corresponded to the vcb info I wanted, but this struck me as an inelegant solution. Does anyone know a better way? Is there a general method for translating pascal variant record into C? Just asking, Vincent Ferrera