From: MERC::"uunet!WKUVX1.BITNET!MacroMan" 25-AUG-1992 12:12:15.80 To: MACRO32 CC: Subj: Re: finding the ImageHeader from the SHL From: IN%"<@cunyvm.cuny.edu:MACRO32@WKUVX1.BITNET>" "MACRO32" 24-AUG-1992 20:29:44.92 To: IN%"<@cunyvm.cuny.edu:MACRO32@WKUVX1.BITNET>" "MACRO32" CC: Subj: finding the ImageHeader from the SHL >> >>good day. i'm trying to waltz my way through the image list >> via the CTL$GL_IMGHDRBF value, which points me to the header >> for the main executable, which contains a pointer to the IAF, >> which has a count and array of SHL structures. my goal is simple: >> to emulate the output for the SHOW PROCESS /IMAGES and SHOW PROCESS /CHAN >> commands for $ ANAL/SYS. my questions are: (1) given the SHL for >> each activated image, where can i find the resultant filespec? >> do i have to call sys$open() myself? (2) why does SHOW PROC /IMAGES >> show many more files than i seem to see in the SHL entries? >> (3) am i doing this the hard way? i'd prefer not to >> if at all possible. >> >> anyone wanna tell me RTFM is invited to quote a page number. >> i've gone over chapter 21 (image activation) of IDS >> but cannot find what i'm looking for. thanks for any help. Walk the list of ICB's (Image Control Blocks) from IAC$GL_IMAGE_LIST. The image name is stored as a counted ascii string at offset ICB$T_IMAGE_NAME. This will only be the image name (Current VMS allow for a maximum image name length of 39 bytes. This plus the one count byte account for the maximum length of this field - 40 bytes.) At offset ICB$L_KFE is the address of the KFE (Known File Entry) of the image if is is an installed image. Use this to obtain the FIle name (again a counted ascii string) starting at KFE$B_FILNAMELEN. The directory string of the file must be obtained from the associated KFD (Known File Directory) block. Its address is found at KFE$L_KFD and tghe directory string (again a counted ascii string) is found at KFD$B_DDTSTRLEN in the KFD block. The device will be found using the WCB (Window COntrol Block) at KFE$L_WCB. The UCB of the device is located at WCB$L_ORGUCB. You may wish to simplify matters and extract the FID (File ID) from the FCB (File Control Block) which is located at WCB$L_FCB and pass this to one of the executive's routines which xlate FID to file spec... I left my file internal manual at home so I can't give you this call. search the .MAP's of STS.STB and/or RMS.STB. you should be able to find it. -------------- BJS "VAXectomies yeild Unix!!!" SCHENKENBERG@EISNER.DECUS.ORG SCHENKENBERG@MONMOUTH-ETDL1.ARMY.MIL 70253.114@COMPUSERVE.COM Personal AutoFAX (908)363-7551