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

📄 javasink.java

📁 本书主要介绍以了COM+为核心的基本组件开发。全书的内容覆盖了COM+所提供的涉及建立软件组件并且有效地使用软件组件的各种基本服务。内容涉及COM+程序设计的最新概念。全书分为三个部分COM+的基本编
💻 JAVA
字号:
// Click Project | Add COM Wrapper
//   Select Inside COM+ Component Type Library and click OK
// Then build this Java project

import component.*;
import com.ms.com.ConnectionPointCookie;

public class JavaSink implements IOutGoing
{
    public void GotMessage(int Message)
    {
        System.out.println((char)Message);
    }
}

class Driver
{
    public static void main(String[] args)
    {
        ISum ref = (ISum)new component.InsideCOM();
        System.out.println("8 + 9 = " + ref.Sum(8, 9));
		
        try
        {
            JavaSink j = new JavaSink();
            ConnectionPointCookie EventCookie = new 
                ConnectionPointCookie(ref, j, 
                Class.forName("component.IOutGoing"));
            System.out.println("Press Enter to exit.");
            System.in.read();
        }
        catch(Exception e)
        {
        }
    }
}

⌨️ 快捷键说明

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