ActiveX control from Java

Hi.
I have few ActiveX components which I want to control from Java.
I have googled for some solutions and found the following:
1. Write a C code which will behave as a bridge between ActiveX component and Java (using JNI). But this seems to be rather very complicated :p
2. I have found one very interesting paper at javaworld (http://www.javaworld.com/javaworld/jw-03-1997/jw-03-avb-tech.html?page=7). They compare ActiveX components and Java Beans there. There is also stated that (for example) it is possible to "develop an ActiveX control in Visual Basic that opens a window and adds a C++ AVI player (an ActiveX control), and then operate the player from a Java applet." However, I can't find any sources or samples which shows how to do such things in practise.
Can anybody help me with this?
Many thanks
Miso

See Tool at
http://www.simtel.net/product.php[id]93010[SiteID]simtel.net

Similar Messages

  • Is it possible to call a activeX control from PL/SQL...?

    Hi all,
    Is it possible to call a activeX control from PL/SQL...? If yes, please give me sample code or any link.
    Thanks,
    Pal

    The LoadLibrary() Win32 call is used to find the physical DLL and load it into memory. This API call first look in the current directory for the file, and then uses the PATH environmental variable to try and find the file.
    Thus you need to make sure PATH is properly set. A Win32 process runs in a 32bit VM (Virtual Machine). Been a very long time since I did Windows server side development, but as I recall this VM inherits the default o/s environment (unlike Unix where the parent process environment is inherited).
    You can set the environment using the Properties menu of the System desktop icon (or via Control Panel).
    However.. Oracle does not run as your user. Typically it is installed as the o/s user Oracle and this user owns all the Oracle processes (listener, instance, etc).
    So you will need to make sure that this user's environment is correctly configured... Further more than this, I'm out of my depth. Did a lot of Windows stuff back in the 90's, but for many years now I'm only using Unix/Linux professionally - with Windows being my console platform for playing games at home. :-)
    On the Linux/Unix side, I configure the environment variable via the Listener. E.g. Under the entry SID_LIST_LISTENER, I configure the external procedure handler as follows:
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME=/tjs-dev/app/oracle/product/10.2.0)
    (PROGRAM = extproc)
    (ENVS = "EXTPROC_DLLS=ANY")
    )No idea how this applies and works on the Windows side.

  • How to create ActiveX control in Java

    I know there are lots of experts in this forum
    thats y i'm putting this general question.
    Will all devices come with an Active X Control.
    "To capture a device's events we can use ActiveX Control."
    Hows this statement implemented.???
    Thanks for the Sample code

    I am new to this. I want to display the data from database like a grid control. Ok, what problems are you having. You been given a link to the tutorial which shows you how to build a table.
    There is also a tutorial on [url http://java.sun.com/docs/books/tutorial/]JDB Database Access here:
    http://java.sun.com/docs/books/tutorial/
    Start by creating your SQL statement and iterating throught the ResultSet. Once you know how to do that, instead of outputting the data you simply build a DefaultTableModel and create the JTable.

  • Data Control from Java Class

    Using JDev 11gPS4
    I have a java class that i want to use as a DC:
    (simplified)
    public class AccountDC {
        public AccountDC() {
            super();
        public void insertAccount(Account account){
            //Do some things
    }Account:
    public class Account {
        private String name,alias;
        public Account() {
            super();
        public void setName(String name) {
            this.name = name;
        public String getName() {
            return name;
        public void setAlias(String alias) {
            this.alias = alias;
        public String getAlias() {
            return alias;
    }When I create the data control from the first class, i get the insertAccount operation.
    When i drop the account parameter on my JSPX page, JDev suggest an ADF Form which is fine.
    When I drop the insertAccount method below the form, JDev suggest an ADF Button which is also fine.
    JDeveloper doesn't seem to know that the values provided in the above form should be mapped to an Account object for the insertAccount.
    How should I do this?
    In the bindings I do have the individual attributeValues for each attribute but I don't seem to have a reference to an Account object. Do i need to add something to my DC?
    Another question... Is it maybe better to create a VO with only transient attributes and an Application Module where i expose my own custom createInsert method?
    It's all custom code. It does not write anything to a database.

    You should have an object that represent your method's parameter in your data control - if you'll drag it into your page you'll get the fields needed.
    Similar to the way it is done in this example:
    http://blogs.oracle.com/shay/entry/updateinsert_with_adf_web_serv

  • Create data control from java class, not see "ADF Parameter Forms" option

    Hi,
    I have created a Fusion Web Application (ADF) in jdev 11g. In the application model project, I created a java class. Inside the java class, I have a public method as below
    public Asset [] searchAsset3(SearchTerm s) // SearchTerm is a java bean. It implements java.io.Serializable.
    I created data control from my java class. After that, I see an xml file generated under the same folder of my java class. Here is the xml content.
    <?xml version="1.0" encoding="UTF-8" ?>
    <JavaBean xmlns="http://xmlns.oracle.com/adfm/beanmodel" version="11.1.1.53.62"
    id="AIAAsset" Package="oracle.apps.aia.oer.model"
    BeanClass="oracle.apps.aia.oer.model.AIAAsset" isJavaBased="true">
    <MethodAccessor IsCollection="true"
    Type="com.flashline.registry.openapi.entity.Asset"
    BeanClass="com.flashline.registry.openapi.entity.Asset"
    id="searchAsset" ReturnNodeName="Asset"
    CollectionBeanClass="UpdateableCollection">
    <ParameterInfo id="name" Type="java.lang.String" isStructured="false"/>
    <ParameterInfo id="version" Type="java.lang.String" isStructured="false"/>
    <ParameterInfo id="description" Type="java.lang.String"
    isStructured="false"/>
    </MethodAccessor>
    <MethodAccessor IsCollection="true"
    Type="com.flashline.registry.openapi.entity.AssetSummary"
    BeanClass="com.flashline.registry.openapi.entity.AssetSummary"
    id="searchAssetSummary" ReturnNodeName="AssetSummary"
    CollectionBeanClass="UpdateableCollection">
    <ParameterInfo id="name" Type="java.lang.String" isStructured="false"/>
    <ParameterInfo id="version" Type="java.lang.String" isStructured="false"/>
    <ParameterInfo id="description" Type="java.lang.String"
    isStructured="false"/>
    <ParameterInfo id="type" Type="java.lang.String" isStructured="false"/>
    </MethodAccessor>
    <MethodAccessor IsCollection="true"
    Type="com.flashline.registry.openapi.entity.Asset"
    BeanClass="com.flashline.registry.openapi.entity.Asset"
    id="searchAsset3" ReturnNodeName="Asset"
    CollectionBeanClass="UpdateableCollection">
    <ParameterInfo id="s" Type="com.flashline.registry.openapi.query.SearchTerm"
    isStructured="true"/>
    </MethodAccessor>
    <ConstructorMethod IsCollection="true"
    Type="oracle.apps.aia.oer.model.AIAAsset"
    BeanClass="oracle.apps.aia.oer.model.AIAAsset"
    id="AIAAsset"/>
    </JavaBean>
    Then, in application user interface project, I created a JSPX page. From the data controls palette, I want to drag and drop the searchAsset3 onto my page. However, I don't see an option for me to choose "Create -> Parameters -> ADF Parameter Form". I only see "Create -> Methods". Unlike other public methods (e.g.searchAssetSummary and searchAsset) which have simple data type as input, I can see the "Create -> Parameters -> ADF Parameter Form" option when I drag and drop to my jspx page. Is that something I missed while creating data controls?
    Thanks.
    Arnold.

    Then, my other question is how do you do the bindings? I drag and drop the attributes from SearchTerm bean. Now the pagedef file has the AttributeValues added but my method is actually expecting one input parameter of type SearchTerm. How do you bind the attributes to the input of the method? Thanks.
    See below of my pagedef xml file.
    <?xml version="1.0" encoding="UTF-8" ?>
    <pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
    version="11.1.1.53.62" id="SearchAssetBySearchTerm1PageDef"
    Package="oracle.apps.aia.oer.view.pageDefs">
    <parameters/>
    <executables>
    <variableIterator id="variables"/>
    <methodIterator Binds="SearchTerm.result" DataControl="AIAAsset"
    RangeSize="25"
    BeanClass="com.flashline.registry.openapi.query.SearchTerm"
    id="SearchTermIterator"/>
    </executables>
    <bindings>
    <methodAction id="SearchTerm" RequiresUpdateModel="true"
    Action="invokeMethod" MethodName="SearchTerm"
    IsViewObjectMethod="false" DataControl="AIAAsset"
    ClassName="com.flashline.registry.openapi.query.SearchTerm"
    ReturnName="AIAAsset.methodResults.SearchTerm_AIAAsset_SearchTerm_result"/>
    <attributeValues IterBinding="SearchTermIterator" id="key">
    <AttrNames>
    <Item Value="key"/>
    </AttrNames>
    </attributeValues>
    <attributeValues IterBinding="SearchTermIterator" id="operator">
    <AttrNames>
    <Item Value="operator"/>
    </AttrNames>
    </attributeValues>
    <attributeValues IterBinding="SearchTermIterator" id="value">
    <AttrNames>
    <Item Value="value"/>
    </AttrNames>
    </attributeValues>
    <methodAction id="searchAsset3" RequiresUpdateModel="true"
    Action="invokeMethod" MethodName="searchAsset3"
    IsViewObjectMethod="false" DataControl="AIAAsset"
    InstanceName="AIAAsset.dataProvider"
    ReturnName="AIAAsset.methodResults.searchAsset3_AIAAsset_dataProvider_searchAsset3_result">
    *<NamedData NDName="s"*
    NDType="com.flashline.registry.openapi.query.SearchTerm"/>+
    </methodAction>
    </bindings>
    </pageDefinition>

  • Is it possible to seperate an ActiveX control from the GUI thread?

    I have an activeX control (*ocx) that we use for communicating with external instruments. We are running into some difficulty because if the communication with the instrument is held up it can take up to 30 seconds to timeout and our LabVIEW user interface is frozen in the mean time. The VI that contains the control itself does not have to be visible and all the subVIs that use the ActiveX reference have been set to run in the "instrument" execution system thread, but the GUI still freezes. Its my theory that since the ActiveX control itself is in a container and part of a front panel, all refernces to it must be executed in the GUI thread. I just wanted to confirm that this was the case. Also if anyb
    ody would like to suggest any work arounds, feel free. The only idea I've had so far was to move all use of the ActiveX control to external code, which is not a very attractive solution for us.

    ....Also if anybody would like to suggest any work arounds,
    > feel free. The only idea I've had so far was to move all use of the
    > ActiveX control to external code, which is not a very attractive
    > solution for us.
    ActiveX controls are loaded into the UI thread and all interactions with
    them, property nodes, and invoke nodes, have to take place in the UI
    thread/main thread of LV. So, setting the VIs to run in the
    instrumentation or other execution systems, doesn't do much good since
    each call to the property or invoke will just have to switch back.
    What other choices do you have? If the control doesn't have a UI
    anyway, it would improve matters if the control were simply an
    automation server. The automation server can be set to run in a single
    thr
    eaded apartment, or a MT apartment. Changing it to MT means that you
    will have to deal with protecting the code from being called from
    different threads, and having those calls interleaving and competing
    with one another. When you change it to be MT, it can tie up other
    threads in LV and leave the UI thread alone. Another alternative is to
    change the ActiveX control to spin up its own thread and have a method
    that initiates, and one that reads the results or returns the status.
    Greg McKaskle

  • Calling methods located inside ActiveX objects from Java

    Hi folks,
    I understand that I can wrap ActiveX methods in C and call using JNI, but I am looking for an elegant way to call methods inside of Active X controls directly. There are a set of classes in com.ms.ActiveX package that allow this, but I am receiving a java.lang.UnsatisfiedLinkError: initPolicyEngine at runtime. I can't find any documentation from Microsoft on this (go figure). Has anyone ever used the com.ms packages, or does anyone know of an elegant solution avoiding wrappers and JNI? I have sucessfully used the neva objects vendor classes, but I find them too bulky for mainstream use. Any thoughts are appreciated. Thanks.

    Hi,
    - If you use the package com.ms.* You'll need to run your application in the Microsoft VM (jview.exe).
    - If you run it inside the browser you cannot use the java plugin, and your applet needs to be signed.
    If this doesn't help, please provide the version of your msjava.dll.
    Regards,
    Kurt.

  • Problems with data controls from java classes in JSF pages.

    Hi! We have a problem in our Application that we are developing with JSF pages using Data Controls generated from facades java classes. When we running a page in debug mode and the page are loading, if we insert a breakpoint in the first line of method referenced in the data control, the execution enter two times in the method, and this is a problem for us. How to solve this?
    We are using JDeveloper 11.1.1.2 with ADF faces.

    You might need to play around with the refresh property of the action binding.
    http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/adf_lifecycle.htm#BJECHBHF

  • Proplem: Access HTMLB controls from java code

    Hi,
    I am new to iView development for EP6. So my problem should be easy to solve (for you ).
    I created in the NW Dev Studio a JSP DynPage.
    The following files were created or edited:
    1.     JSP file (created)
    2.     java file (created)
    3.     portalapp.xml (edited)
    In order to make the page running (proccessing) I changed the following things:
    1.     JSP file – Add taglib reference to HTMLB-class
    2.     portalapp.xml – Remove the „native“ property so the JSP file will not be accessed directly.
    Now I want to do the following:
    On the JSP page I placed severeal HTMLB controls (textViews).
    From the java code I try to access these controls in the „doProcessBeforeOutput“ method and change/set values.
    But I get all the time a null-Exception.
    Code (JSP)
    <%-- mcmsprovider.jsp --%>
    <%@ taglib uri= "tagLib" prefix="hbj" %>
    <hbj:content id="cntMcmsProvider" >
      <hbj:page title="MCMS Provider Dynpage">
       <hbj:form id="frmMcmsProvider" >
                 <hbj:textView id="tvwScript" encode="false"></hbj:textView>
                 <hbj:textView id="tvwStyle" encode="false"></hbj:textView>
       </hbj:form>
      </hbj:page>
    </hbj:content>
    Code (JAVA):
    public void doProcessBeforeOutput() throws PageException {
           this.setJspName("mcmsprovider.jsp");
           TextView tvw = (TextView) this.getComponentByName("tvwStyle");
           tvw.setText("Here the dynamic text");
    I also tried to add raw text to the form but also null excpetion:
    public void doProcessBeforeOutput() throws PageException {
           this.setJspName("mcmsprovider.jsp");
           Form frmCurrent = (Form) this.getForm();
           frmCurrent.addRawText("<h3>This comes from here</h3>");
    My goal is to dynamically add controls to the form, but until now I think it will be a dream:
    public void doProcessBeforeOutput() throws PageException {
           this.setJspName("mcmsprovider.jsp");
      Form form = (Form)this.getForm();
           TextView tvw  = new TextView("tvwDynamic");
           tvw.setText("Here the dynamic control");
           form.addComponent(tvw);
    The normal page processing runs:
    public void doProcessBeforeOutput() throws PageException {
           this.setJspName("mcmsprovider.jsp");
    Any help is greatly appreciated.

    Eike
    Here is the example straight from the PDK documentation. This should help you a little
    UsingAbstractPortalComponentWithHTMLB.java
    import com.sapportals.htmlb.*;
    import com.sapportals.htmlb.enum.DataType;
    import com.sapportals.htmlb.enum.GroupDesign;
    import com.sapportals.htmlb.event.Event;
    import com.sapportals.htmlb.rendering.IPageContext;
    import com.sapportals.htmlb.rendering.PageContextFactory;
    import com.sapportals.portal.prt.component.AbstractPortalComponent;
    import com.sapportals.portal.prt.component.IPortalComponentRequest;
    import com.sapportals.portal.prt.component.IPortalComponentResponse;
    public class UsingAbstractPortalComponentWithHTMLB extends AbstractPortalComponent {
        //Fill in your output for "normal" content creation mode here
        protected void doContent(IPortalComponentRequest request, IPortalComponentResponse response) {
            IPageContext myContext = PageContextFactory.createPageContext(request, response);
            if (myContext == null) {
                System.out.println("htmlb service did not start up as expected.");
            Form myForm = myContext.createFormDocument("First Experiment");
            Event lastEvent = myContext.getCurrentEvent();
            Group myGroup = new Group();
            myGroup.setWidth("350");
            myGroup.setTitle("First Experiment");
            myGroup.setDesign(GroupDesign.SAPCOLOR);
            myForm.addComponent(myGroup);
            GridLayout gl = new GridLayout();
            myGroup.addComponent(gl);
            if ((lastEvent != null) && (lastEvent.getComponentName().equals("submit"))) {
                String name = myContext.getDataForComponentId("USER_NAME").toString();
                TextView label = new TextView("Hi, " + name);
                gl.addComponent(1, 1, label);
                Button myButton = new Button("goback", "Go back");
                myButton.setOnClick("goBack"); // ignored anyway
                gl.addComponent(2, 1, myButton);
            } else {
                TextView label = new TextView("What's your name?");
                gl.addComponent(1, 1, label);
                InputField inf = new InputField("USER_NAME");
                inf.setType(DataType.STRING);
                gl.addComponent(1, 2, inf);
                Button myButton = new Button("submit", "Tell");
                myButton.setOnClick("submit");
                gl.addComponent(2, 2, myButton);
            myContext.render();

  • I am using Activex controls from Labview to log the data into Excel spreadshee​t. My applica

    tion is running fine without giving any error messages. But even after the vi stops, excel process does not shutdown. "Excel.exe" process keeps running until I end it from Windows NT Task Manager. Is there any way to end the excel.exe process from Labview?

    tion is running fine without giving any error messages. But even after the vi stops, excel process does not shutdown. "Excel.exe" process keeps running until I end it from Windows NT Task Manager. Is there any way to end the excel.exe process from Labview?I use Excel Active X control frequently to save and then analysis test data. In order to properly destroy the "Excel.exe" process it is important to close all the automation refnums opened when using the Excel active x controls. After completing your desired Excel task wire all the refnums in reverse order they were created into the Automation Close function in Functions->Communication->Active X pallette. This includes all Application, Workbook, Worksheet, or Range refnum. Missing even one of these refnums will mean that Excel.exe will still persist in the task manager and cause problems when excel is opened from outside LabVIEW. I hope this helps.
    Stephan

  • Best practice concerning embedding script in report vs.  controlling from Java

    Hi,
    I'm faced(probably not the only one) with adding some intelligence to my reports.  In a prior post I was curious about displaying/hiding sections based on conditions found in the bean/pojo. 
    Is there a best practice concerning embedding logic in the report in the form of formula(s), vs. using Java to get or create a field and then creating a formula on the fly?  I suspect the answer has something to do with truely dynamic fields, and perhaps a little bit of both Java, and script.
    Anyone on staff care to try answering??
    Peter

    Hi,
    log into your SAP ERP system using the SAP GUI and choose in the SAP Menu the following path:
    SAP Menu -> Accounting -> Controlling -> Cost Cetner Controlling ->Environment->Set Controlling Area.
    Set the desired controlling area for your user there (DO NOT FORGET TO CLICK ON THE DISKETTE ICON) and try again.
    Regards,
    Stratos

  • Matlab ActiveX control from Diadem don't work

    I tried to transfer data from Diadem to Matlab as discribed in the KnowledgeBase 2QUAUTZL: Running MatLab M Scripts from DIAdem, transferring data between MatLab and DIAdem.
    I can only open a Matlab command window, but can't assign a variable to the Matlab workspace.
    Any help?
    Ralph Schmidt

    Hello Ralph,
    have you registered the "Matlab-DIAdem-Connectivity" yet? To do so:
    Detach ScriptLibrary.OCX in to the DIAdem directory and register it through regsrv32, either by pressing “Windows R” or “Start\Run” to bring up the run menu. At the Run prompt type:
    For Windows 2000 & NT
    c:\winnt\system32\regsvr32 "c:\program files\National Instruments\diadem 8.10\ScriptLibrary.ocx"
    For Windows Xp
    c:\Windows\system32\regsvr32 "c:\program files\National Instruments\diadem 8.10\ScriptLibrary.ocx"
    This will register the ScriptLibrary.ocx on your computer.
    You'll find the file here:
    http://digital.ni.com/public.nsf/websearch/1706BA4C65A8533686256C630062DD03?OpenDocument
    Kai Kratt

  • Device control from Java

    I hope this is the right forum for this topic.
    I want to write a Java program which can find the CD drives on my machine (direct and USB connected), and use the IOCTL device functions to get CD track information and CD text. Is there a suitable Java class that I can use for this? I've never been able to look down the list of hundreds of Java classes in the API documentation and find the right one!
    I'm aware of the CD Text Reader DLL, but this doesn't work properly on Windows 7 64-bit and the web site has disappeared.

    Thanks. The only problem is that AFAIK there's only one such DLL - CDTextReader which doesn't work properly in Windows 7 (or maybe it's the 64-bit OS which throws it). And the developer's disappeared off the Web.
    Maybe downloading a 32-bit version of Java would help. Do you think so? The problem then is how to make sure that this particular program uses the 32-bit version while everything else uses the 64-bit one. Which question probably belongs in another forum.

  • Internet Explorer begins blocking out-of-date ActiveX controls

    On Wednesday 6th August 2014, we announced that as part of our ongoing commitment to delivering a more secure browser, starting September 9th Internet Explorer will block out-of-date ActiveX controls. (Note: The original post stated that the ActiveX blocking
    would begin on August 12th. Please refer to the addendum for further details).
    Please take a look at this important update via the
    blog post as well as the FAQ contained therein and commence testing within your domain.
    Thanks and Regards
    Mark
    http://blogs.msdn.com/b/ie/archive/2014/08/06/internet-explorer-begins-blocking-out-of-date-activex-controls.aspx
    Mark Feetham Senior Supportability Program Manager, Internet Explorer.

    Hello,
    There seems to be an entry missing in the
    versionlist.xml file.
    There is an entry missing for wsdetect.dll (isInstalled Class ActiveX Control) from Java 1.7, I believe (there is an entry for 1.6, 1.5, 1.4 but 1.7 is missing).
    Here is the relevant portion of the XML file:
    <blocklistentry key="{5852f5ed-8bf4-11d4-a245-0080c6f74284}" entrytype="2">
    <versionentries numberofelements="4">
    <versionentry groupname="Java(TM) 1.6.0_81" filename="wsdetect.dll" productversion="6.0.810.0-6.65535.65535.65535" fileversion="6.0.810.0-6.65535.65535.65535" />
    <versionentry groupname="Java(TM) 1.5.0_71" filename="JavaWebStart.dll" productversion="5.0.710.0-5.65535.65535.65535" fileversion="5.0.710.0-5.65535.65535.65535" />
    <versionentry groupname="Java(TM) 1.4.2_43" filename="JavaWebStart.dll" productversion="1.4.2.430-1.4.65535.65535.65535" fileversion="1.4.2.430-1.4.65535.65535.65535" />
    <versionentry groupname="Java(TM)" filename="*" productversion="*" fileversion="*" />
    </versionentries>
    This causes the alert prompt to appear when using Java 1.7 update 67 even though it's allowed by XML.
    To reproduce, please go to a site that uses wsdetect.dll like Wikipedia (like here
    http://commons.wikimedia.org/wiki/File:Example.ogg) and check if the prompt appears for you.

  • Javascript from Java - calling html control functions

    i have called the attributes of an html control from java using this method
    private JSObject iframeObject;
    iframeObject=(JSObject)win.eval("parent.document.getElementById('"+popupIFrame+"')");
    iframeObject.setMember("src", "../Applet/Popup.html");but how can i call the functions of a control
    for example the focus() function of a textbox or someother controls???

    its ok i got it.
    win.eval() can do it

Maybe you are looking for