/**
 * This class is designed to be packaged with a COM DLL output format.
 * The class has no standard entry points, other than the constructor.
 * Public methods will be exposed as methods on the default COM interface.
 * @com.register ( clsid=5C7C2401-FB22-11D2-92FD-006097402523, typelib=5C7C2402-FB22-11D2-92FD-006097402523 )
 */
public class Class1
{
	public String HelloMessage = "Hello, World" ;
	private String BadWords = "heck darn Netscape" ;
	final int E_FAIL = 0x80004005 ;

/*
Caller wants us to say hello. Pop up a message box containing
the current value of the "HelloMessage" property.
*/
	
	public synchronized void  SayHello ( )	
	{
		com.ms.wfc.ui.MessageBox.show (HelloMessage, "jhellodll") ;
	}
/*
Caller wants to set the value of the "HelloMessage" property.
*/
	
	public synchronized void setHelloMessage (String msg)
	{
/*
Make sure someone doesn't say a dirty word.
Take exception if they do. 
*/

		if (BadWords.indexOf (msg) != -1)
		{
			com.ms.com.ComFailException cfe = new com.ms.com.ComFailException 
					(E_FAIL, "You said a naughty word!") ;
			
			throw cfe ;			
		}
/*
Otherwise remember the new value.
*/
		
		HelloMessage = msg ;	
	}
	
/*
Caller wants to get the value of the "HelloMessage" property.
*/
	
	public synchronized String getHelloMessage ( ) 
	{
		return HelloMessage ;	
	}

	/**
	 * NOTE: To add auto-registration code, refer to the documentation
	 * on the following method
	 *   public static void onCOMRegister(boolean unRegister) {}
	 */
}
