java操作控件加密

ActiveXcomponentInit.java

 1 import com.jacob.activeX.ActiveXComponent;
 2 
 3 public class ActiveXcomponentInit {
 4 
 5     public static ActiveXComponent getActiveXcomponentInit(){
 6         ActiveXComponent activeX= new ActiveXComponent(Keys.ACTIVEXCOMPONENT);
 7         return activeX;
 8          
 9     }
10     public static ActiveXComponent getActiveXcomponentInits(){
11         ActiveXComponent activeX= new ActiveXComponent(Keys.ACTIVEXCOMPONENTS);
12         return activeX;
13          
14     }
15 
16 }

 

调用:

1                 ActiveXComponent app = ActiveXcomponentInit
2                         .getActiveXcomponentInit();
3                 Dispatch ob = (Dispatch) app.getObject();
4                 Variant Udecry = Dispatch.call(ob, "decry_card", tcardEntity
5                         .getCardPsw());//调用decry_card函数
6                 String pass = Udecry.getString();

 

 

 

posted on 2014-04-08 11:06  Brown Qin  阅读(291)  评论(0编辑  收藏  举报

导航