WORD
getcookie( target, p_value )
LONG target;
LONG *p_value;
{
	char *oldssp;
	COOKIE *cookie_ptr;
	
	oldssp = (Super(SUP_INQUIRE) ? NULL : Super(1L));

	cookie_ptr = *(COOKIE **)0x5A0;

	if(oldssp)
		Super( oldssp );

	if(cookie_ptr != NULL)
	{
		do
		{
			if(cookie_ptr->cookie == target)
			{
				if(p_value != NULL)
					*p_value = cookie_ptr->value;

				return 1;
			}
		} while((cookie_ptr++)->cookie != 0L);
	}

	return 0;
}
