From:	CSBVAX::CSBVAX::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX" 22-MAR-1989 18:20
To:	MRGATE::"ARISIA::EVERHART"
Subj:	Re: Strange error message...


Received: From KL.SRI.COM by CRVAX.SRI.COM with TCP; Wed, 22 MAR 89 15:01:36 PDT
Received: from ucbvax.Berkeley.EDU by KL.SRI.COM with TCP; Wed, 22 Mar 89 14:57:11 PST
Received: by ucbvax.Berkeley.EDU (5.61/1.36)
	id AA17301; Wed, 22 Mar 89 13:19:52 -0800
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for info-vax@kl.sri.com (info-vax@kl.sri.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 22 Mar 89 16:31:13 GMT
From: pitt!cisunx!wpn@cadre.dsl.pittsburgh.edu  (Bill Nixon)
Organization: University of Pittsburgh, Information Services
Subject: Re: Strange error message...
Message-Id: <16970@cisunx.UUCP>
References: <8903201915.AA20509@ucbvax.Berkeley.EDU>
Sender: info-vax-request@kl.sri.com
To: info-vax@kl.sri.com

MAIL$_USER_NEW_MESSAGES wants the item length to be a 2 corresponding to
an UNSIGNED WORD.  

This code fragment would set up a call to get the new mail count of the
user running it.

-------------------------------------------------------------------------
ITEM_LIST new_list[2];
UNSIGNED_WORD new_count;  /* UNSIGNED_WORD :== unsigned short int */

MAIL$USER_BEGIN(&User_cnxt, &null_list, &null_list);

new_list[0].buffer_length = sizeof(new_count);
new_list[0].item_code     = MAIL$_USER_NEW_MESSAGES;
new_list[0].buffer_address.wordbuf = &new_count;

new_list[1].buffer_length = 0;
new_list[1].item_code     = 0;

if ((Status=MAIL$USER_GET_INFO(&User_cnxt, &null_list, &new_list))!=SS$_NORMAL)
  LIB$SIGNAL(Status);

printf("You have %d New Messages.\n", new_count);

MAIL$USER_END(&User_cnxt, &null_list, &null_list);
------------------------------------------------------------------------------

If any one if interested in the complete code for this, let me know and
I can put it all together.

-- 
William Nixon, University of Pittsburgh, Information Services
Bitnet:	WPN@PITTVMS		CC-Net:	CISVMS::WPN
UUCP:  	{decwrl!allegra,bellcore,cadre,psuvax1}!pitt!cisunx!wpn
InterNet: wpn%vms.cis.pittsburgh.edu@vb.cc.cmu.edu

