From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,c007e0091e42fc1,start X-Google-Attributes: gidf7344,public X-Google-Thread: 1164f8,c007e0091e42fc1,start X-Google-Attributes: gid1164f8,public From: atadashi@my-deja.com Subject: Dec C; System Services question.... Date: 2000/10/04 Message-ID: <8rg0j9$fhr$1@nnrp1.deja.com>#1/1 X-Deja-AN: 677576520 X-Http-Proxy: 1.0 x54.deja.com:80 (Squid/1.1.22) for client 206.213.40.100 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Wed Oct 04 19:31:53 2000 GMT X-MyDeja-Info: XMYDJUIDatadashi Newsgroups: comp.sys.dec,comp.os.vms X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt) Well. I've just about exhausted all my resources. So, as a last resort I'm posing this question to this newsgroup. I'm using the System Services routines, specifically, "SYS$DEVICE_SCAN", from DEC C to locate disk drives on the current node. I'm running DEC C v5.7-004 on OpenVMS Alpha v7.2-1. Here is a snipet of the source code: (The call to the system service...) if ((iStatus = sys$device_scan(&sReturn_DevName, &iRetDevNamLength, &sSearch_DevName, stItemList, &stContext)) == SS$_NORMAL) where parm1 and parm3 are: struct dsc$descriptor_s sReturn_DevName, sSearch_DevName; and... sReturn_DevName.dsc$w_length = iMaxDevNameSize; sReturn_DevName.dsc$b_dtype = DSC$K_DTYPE_T; sReturn_DevName.dsc$b_class = DSC$K_CLASS_S; sReturn_DevName.dsc$a_pointer = sRetDevName; sSearch_DevName.dsc$w_length = iMaxDevNameSize; sSearch_DevName.dsc$b_dtype = DSC$K_DTYPE_T; sSearch_DevName.dsc$b_class = DSC$K_CLASS_S; sSearch_DevName.dsc$a_pointer = sSearchDevice; where: const short int iMaxDevNameSize = 64; and... char sSearchDevice[iMaxDevNameSize], sRetDevName[iMaxDevNameSize]; where parm2 is, unsigned short int iStatus, iRetDevNamLength; where parm4 is, ILE3 stItemList[2] = { { 4, DVS$_DEVCLASS, &iItemCode, iZERO }, { iZERO, iZERO, iZERO, iZERO } }; and... ILE3 is the __NEW_STARLET typedef for an Item_List_3 struct and... unsigned long int iItemCode; and... DVS$_DEVCLASS is the device class in DVSDEF.H where parm5 is, GENERIC_64 stContext; /* __NEW_STARLET union within struct... */ stContext.gen64$q_quadword = iZERO; Through a FORIEGN command, I am passing the argument for the disk device as a quoted string, "$1$DUA*"; sprintf(sSearchDevice, "%s", argv[iCount - iONE) ; The code compiles properly, links properly and runs properly but only returns an iStatus of 2648 (SS$_NOMOREDEV - no device was found). So, the call is working but the device search criteria does not seem to be correct. The system call documentation indicates the search criteria can be based on name (string with all relevant wildcards) or device class, or device type. In my test, I have done just the name string, the name string AND the device class (disk), and I have altered the command line argument string as, "DSA*", "DUA*", "$1$DUA*", and "$1$DUA" (...like you would use with, SHOW DEVICE DUA, to see all dua disk devices) without success. If anyone out there has used this system service, could you please help me? Thanks. Sent via Deja.com http://www.deja.com/ Before you buy.