Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!decwrl!decvax!tektronix!tekcae!kurtk From: kurtk@tekcae.TEK.COM (Kurt Krueger) Newsgroups: comp.os.vms Subject: Re: LIB$ functions from C Message-ID: <1468@tekcae.TEK.COM> Date: 17 Feb 88 16:40:39 GMT References: <339@dalcsug.UUCP> <215@sdrc.UUCP> Reply-To: kurtk@tekcae.UUCP (Kurt Krueger) Organization: Tektronix, Inc., Beaverton, OR. Lines: 12 Keywords: how do you do it? I believe the problem lies in the fact that LIB$ routines almost always want character data passed by DESCRIPTOR. Fortran does this automatically, but C doesn't. Read the section about calling from C and pay close attention to descriptors. There is even a macro provided for creating a descriptor for a constant string. #include descrip.h $DESCRIPTOR(string,"[USER]THIS.IS.THE.PATH"); LIB$whatever(&string); /* Pass the ADDRESS of the descriptor */ For more advanced use, you will need to access the individual fields of the $DESCRIPTOR structure.