⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 insidecom.java

📁 经验交流,从网上下载的好东西望大家分享
💻 JAVA
字号:
/**
 * 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 are exposed as methods on the 
 * default COM interface. 
 * @com.register ( clsid=DB379AA0-D639-11D2-BB51-006097B5EAFC, typelib=DB379AA1-D639-11D2-BB51-006097B5EAFC )
 */
import com.ms.com.*;

/**
 * @com.register ( clsid=2652CA66-D6CF-11D2-BB51-006097B5EAFC, typelib=2652CA65-D6CF-11D2-BB51-006097B5EAFC )
 */
public class InsideCOM implements component.ISum
{
    // TODO: Add additional methods and code here
    public int Sum(int x, int y)
    {
        if(x < 0 || y < 0)
            throw new ComFailException(0x80070057, 
                "Negative numbers not allowed");
        return x + y;
    }

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

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -