Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!mordor!sri-spam!nike!ucbcad!ucbvax!CITHEX.CALTECH.EDU!carl From: carl@CITHEX.CALTECH.EDU (Carl J Lydick) Newsgroups: mod.computers.vax Subject: Re: SMG problem and help requested Message-ID: <860726121655.079@CitHex.Caltech.Edu> Date: Sat, 26-Jul-86 15:17:04 EDT Article-I.D.: CitHex.860726121655.079 Posted: Sat Jul 26 15:17:04 1986 Date-Received: Sat, 26-Jul-86 22:26:12 EDT References: <8607251720.AA15195@rayssd.UUCP> Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 24 Approved: info-vax@sri-kl.arpa > Has anyone had any success with the SMG routine, > SMG$DISABLE_UNSOLICITED_INPUT in VAX C. I'm running VMS V4.4 > and C V2.2. I tried the three permutations below and received > the noted error messages. The first attempt is the way it is > documented in the RTL Part II (5D) reference manual. > > Attempt #1: > ... > unsigned int new_pid; > int status; > > status = smg$create_pasteboard(&new_pid,0,0,0,0); > if (status != SS$_NORMAL) exit(status); > status = smg$disable_unsolicited_input(&new_pid); > if (status != SS$_NORMAL) exit(status); You've almost got it there. The only problem is you're trying to disable something that isn't already enabled. What you need to do is have something like: if ((status = smg$enable_unsolicited_input(&new_pid, kbdattn, new_pid)) != SS$_NORMAL) exit(status); between the creation of the pasteboard and the call to smg$disable_unsolicited_input, with kbdattn the address of a routine to service the ast's.