How do I set a public variable in a native ActiveX DLL using Java?

Hello,
I have run into an issue that I cannot seem to find any documentation on, and all of my efforts with search engines have returned no useful results.
Here is my situation:
I have an Active X DLL that has a very simple configuration, but it is a third party DLL which I cannot modify. To interface with the DLL I have to set a series of public variables and then call a method with no parameters that will use the current values of the variables to perform a calculation. There are no "set" or "get" methods.
At this point I have a very good idea about how to use JNI to create the class in java, and call the method. However, this does me no good at all if I cannot set the variables.
Everything I have found so far defaults to an assumption of no direct access to variables, and that getter and setter methods would be available for that purpose. Anyone know of a way that this might be handled? I would provide source code, but it seems useless unless I know how to actually do this.
Thanks in advance for any input.

OK. Those are OLE/ActiveX/COM/WhateverTheyCallIt getters and setters, that VB makes look like object 'properties'.
If you are familiar a bit with C#, they also have 'properties', which are getters and setters hidden behind a syntax that makes them look like member variables.
I am affraid my help has to stop here, as I don't remember COM anymore.
But, unless you find someone who really knows COM, you will have to investigate by yourself.
One suggestion though: open a C++ project in VisualStudio 2005 or 2008 (not Express, it seems not to support what I describe).
Go to something like References or Add Reference and you will see a tabbed dialog box with a COM tab (I describe all this from memory).
Add your DLL. After this do View->Object Browser or alike. It should show your COM object. You will be able to examine its methods and properties.
I think Visual Studio canl generate code for invoking them. This is the C code that somehow you should take from there and place in your JNI code.
Edited by: baftos on May 9, 2010 11:22 AM
Correction: VS2008 Express also supports this, but to get there, you do View->Object Browser->Click the "..." button->COM tab.
VS2008 Express is free.
Edited by: baftos on May 9, 2010 11:25 AM

Similar Messages

  • Music and Video on Nas in folders but how do i set up itunes on multiple computers to see and use these files and create libraries?

    Music and Video on Nas in folders but how do i set up itunes on multiple computers to see and use these files and create libraries?
    So i have had a itunes set up on my old PC, bought a NAS and copied the folders over to the NAS, i did this incorrectly and so then even when i told the old PC to use that folder it saw all the songs but wasnt able to play the songs as it was looking in the incorrect place.
    So now i want my Mac as well as my PC and others to all use the music, videos etc on the NAS they are in itunes friendly folders (as they were compiled this way by the itunes on the old PC.
    When i tell the mac to use the itunes library.itl file it sees the song list (about 100gb) but cant see any songs, so i have removed this file to another location for now with the hope to set up a new file and then get it to see the songs on the folder from the NAS.
    Can someone tell me how to do this for all the Mac's and PC's on my network as i really want one master library that all use and add too.
    Thanks for your help in advance.

    I have the same question but I am using two pc's

  • How do you set up a password for a wireless network when using an Airport Extreme?

    How do you set up a password for a wireless network when using an Airport Extreme wireless router?

    Thanks for the updated information.
    Open Macintosh HD > Applications > Utilities > AirPort Utility
    Click on the AirPort Extreme icon, then click Manual Setup
    Click the Wireless tab below the row of icons
    Check to make sure that the setting for Wireless Security reads either WPA2 Personal or WPA/WPA2 Personal
    Enter a Wireless Password and Verify Password
    Click Update to save any changes and wait a full minute for the AirPort Etreme to restart

  • How do i set up my email so i would need to use password to sign in, instead of clicking on icon and open it directly?

    How do i set up my email so i would need to use password to sign in, instead of clicking on icon and open it directly?

    You can't with the built-in Mail app. There may be third-party email apps in the App Store that have a password option, or you could access your account via Safari - go to your host's login page and then create a homescreen shortcut for it via the 'share' icon (the square with the upward pointing arrow), tapping on that homescreen shortcut will open Safari on your login page.

  • How to check whether a Document in KM is classified or not using JAVA API

    Hello Everyone,
      Can anyone tell me, How to check whether a Document in KM is classified or not, using JAVA API's??
    Thanks & Regards,
    Adren D'Souza

    Hi,
    The code is as follows:
    IIndexService indexService = null;
    try {
       indexService = (IIndexService) ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
    } catch (ResourceException e) {
       if (indexService == null) {
         log.errorT("Error on instanciating the index service");
         return this.renderMessage(this.getBundleString(RES_NO_INDEX_SERVICE), StatusType.ERROR);
    // get index
    IIndex index = null;
    try {
       index = indexService.getIndex("YourIndexID");
    } catch (WcmException e1) {
       log.errorT("Error when trying to get the index");
       return this.renderMessage(this.getBundleString(RES_NO_INDEX), StatusType.ERROR);
    // check if the index is a instance of AbstractClassificationIndex
    AbstractClassificationIndex classiIndex = null;
    if (index instanceof AbstractClassificationIndex) {
       classiIndex = (AbstractClassificationIndex) index;
    } else {
       log.errorT("The index " + index.getIndexName() + " is no classification index");
       return this.renderMessage(this.getBundleString(RES_NO_CLASSIFICATION_INDEX), StatusType.WARNING);
    //give your KM Resource here for which you want to know if it is classified or not
    boolean classified = classiIndex.isDocClassifiedInAnyTax(resource);
    Regards,
    Praveen Gudapati

  • IPhone 5S IOS 8. Can't figure out how to disable the "live" location feature within the native calendar app used for mapping/travel time.  Have looked everywhere and it's driving me nuts.  Thanks for any help on where to make the change!!

    iPhone 5S IOS 8. Can't figure out how to disable the "live" location feature within the native calendar app used for mapping/travel time etc.  Have looked everywhere and it's driving me nuts.  Thanks for any help on where to make the change!!

    iPhone 5S IOS 8. Can't figure out how to disable the "live" location feature within the native calendar app used for mapping/travel time etc.  Have looked everywhere and it's driving me nuts.  Thanks for any help on where to make the change!!

  • How to generate possiable no of words by taking A-Z letters using java

    How to generate possiable no of words by taking A-Z letters using java.please give the code don't take repeation of letters
    ex: lets take a,b,c & the possiable no of words are list below
    a
    b
    c
    ab
    ac
    ba
    bc
    ca
    cb

    srikanth wrote:
    How to generate possiable no of words by taking A-Z letters using java.please give the code don't take repeation of letters
    ex: lets take a,b,c & the possiable no of words are list below
    a
    b
    c
    ab
    ac
    ba
    bc
    ca
    cbSorry, but have you even attempted to do this yourself yet?

  • How do you set NLS_LANG environment variable in report builder

    How do you set up the reports builder environment to display foreign fonts.
    So far what I read makes me think that in report builder I have to set the NLS_LANG environment variable .
    If anyone has done this is that true and if so how.
    Also the languages I want to use are the following.
    Armenian
    Cambodian
    Chinese
    Russian
    Tagalog
    Vietnamese
    How do I find the NLS_LANG environment variables for these.
    Where I am at now+
    I have to set the DEVELOPER NLS LANG. I see the NLS LANG in the registry and I guess I have to add the DEVELOPER NLS LANG.
    Now I am searching for syntax. If anyone knows the syntax for those languages please let me know and how do I set more than 1 at a time.
    Howard
    Edited by: csphard on Apr 14, 2010 5:17 PM
    Edited by: csphard on Apr 14, 2010 5:22 PM
    Edited by: csphard on Apr 15, 2010 9:02 AM

    Hello Howard,
    Check out the following link here you can find your desired NLS parameters.
    http://www.oracle.com/technology/tech/globalization/htdocs/nls_lang%20faq.htm
    And about the NLS_LANG for developer why you want to create for developer. Its is already there in REGISTRY. Just seaching in developer registry you can find there.
    how do I set more than 1 at a time.
    You can set only one NLS_LANG parameter at a time.
    -Ammad
    Edited by: Ammad Ahmed on Apr 15, 2010 8:52 PM

  • In OBIEE 11g, how can you set a presentation variable value from javascript ?

    I want to set up presentation variable from a javascript variable. Does anyone knows the workaround for this ?

    SriniVEERAVALLI,
    Thanks for your suggestions. I want to make a custom prompt that is only my requirement. From JS I have made a custom slider prompt now I want to use this slider prompt to pass selected value in presentation variable. Since, we have slider prompt only for numbers, I have to use it for other values.
    I just want to make my post looks simple and focus on the specific problem.
    Anyways, thanks a lot for taking time to reply. Appreciate your help.

  • How can you get  the public variables from object that extends JLabel?

    I'm using the mouseClickedListener method e.getComponent(); to get the component that is clicked on the sceen. The component i clicked is type "object" and extends a jlabel, and i really need to acces a variable from it. Heres the code i'm using-
    MouseListener listenerDown=new java.awt.event.MouseListener() {
            public void mousePressed(MouseEvent e){
                paintAll();
                mX=e.getX();
                mY=e.getY();
            public void mouseClicked(MouseEvent e) {
                Component c = e.getComponent();
                drawResizeBox(c);
                selected=c;
            public void mouseReleased(MouseEvent e) {
            public void mouseEntered(MouseEvent e) {
            public void mouseExited(MouseEvent e) {
    package javapoint;
    import java.awt.Color;
    import java.awt.Graphics2D;
    import java.awt.Image;
    import java.awt.Rectangle;
    import java.awt.RenderingHints;
    import java.awt.geom.Line2D;
    import java.awt.image.BufferedImage;
    import javax.swing.Icon;
    import javax.swing.ImageIcon;
    import javax.swing.JLabel;
    public class object extends JLabel{
        public object(Rectangle rect,int id){
            idNum=id;
            Rect=rect;
            BufferedImage image = new BufferedImage((int)rect.getWidth()+1, (int)rect.getHeight()+1, BufferedImage.TYPE_INT_ARGB);
            Graphics2D g = (Graphics2D) image.getGraphics();       
            g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
            g.drawRect((int)rect.getX(), (int)rect.getY(), (int)rect.getWidth(), (int)rect.getHeight());
            Icon icon = new ImageIcon((Image)image);
            setIcon(icon);
            setBounds((int)rect.getX()-1, (int)rect.getY()-1, (int)rect.getWidth()+1, (int)rect.getHeight()+1);
            mainFrame.slideArr[mainFrame.sIndx].add(this);
            setVisible(true);
            r=true;       
        object(Oval oval,int id){
            idNum=id;       
            setBounds(oval.getX(), oval.getY(), oval.getWidth(), oval.getHeight());
            getGraphics().drawOval(oval.getX(), oval.getY(), oval.getWidth(), oval.getHeight());
            o=true;
            setVisible(true);
        object(Line2D line,int id){
            idNum=id;       
            setBounds((int)line.getX1(), (int)line.getY1(), (int)line.getX2(), (int)line.getY2()); //Not gunna work
            getGraphics().drawLine((int)line.getX1(), (int)line.getY1(), (int)line.getX2(), (int)line.getY2());
            l=true;
            setVisible(true);
        object(Icon icon,int id){
            idNum=id;
            setIcon(icon);
            setBounds(50,50,icon.getIconWidth(),icon.getIconHeight());
            i=true;
            setVisible(true);
        void drawObject(object obj){
            if(r){
                Rectangle rect=obj.Rect;
                setBounds((int)rect.getX()-1, (int)rect.getY()-1, (int)rect.getWidth()+1, (int)rect.getHeight()+1);          
                Rect=rect;
                BufferedImage image = new BufferedImage((int)rect.getWidth()+1, (int)rect.getHeight()+1, BufferedImage.TYPE_INT_ARGB);
                Graphics2D g = (Graphics2D) image.getGraphics();           
                g.setColor(Color.red);
                g.drawRect(0, 0, (int)rect.getWidth(), (int)rect.getHeight());           
                Icon icon = new ImageIcon((Image)image);
                setIcon(icon);
            }else if(l){
            }else if(o){
            }else if(i){
        public boolean r=false;
        public Rectangle Rect;
        public boolean o=false;
        public Oval Oval;
        public boolean l=false;
        public Line2D Line;
        public boolean i=false;
        public Icon Icon;
        public JLabel label;
        public int idNum;
    }Edited by: ghostbust555 on Feb 12, 2010 2:14 PM

    ghostbust555 wrote:
    Well see the problem is i have an array of 200 objects.What does that have to do with anything? And if it does, why isn't it in the code you posted?
    I dont understand what you mean in your "Edit..." part. could you show some code/ explain farther? sorry if its a dumb question I'm still a bit of a novice at java.Yeah.
    object yuck = (object) e.getComponent(); // That's a cast.
    boolean yucksR = yuck.r; // Get the "r" variable from the object.

  • Create Report Layout (Apex 3.2) - How can I set the substitution variables?

    Hi,
    I created a "Report Query" under "Shared Components". I now want to work on the corresponding "report layout". I created a "Generic Columns (XSL-FO)". I read the following in the documentation:
    The following are valid substitution strings:
    #PAGE_HEADER#
    #PAGE_HEADERFONT_COLOR#
    #PAGE_HEADER_FONT_FAMILY#
    #PAGE_HEADER_FONT_SIZE#
    #PAGE_HEADER_FONT_WEIGHT#
    #PAGE_FOOTER#
    #PAGE_FOOTER_FONT_COLOR#
    #PAGE_FOOTER_FONT_FAMILY#
    #PAGE_FOOTER_FONT_SIZE#
    #PAGE_FOOTER_FONT_WEIGHT#
    #PAGE_WIDTH#
    #PAGE_HEIGHT#
    #HEADER_BG_COLOR#
    #HEADER_FONT_COLOR#
    #HEADER_FONT_FAMILY#
    #HEADER_FONT_SIZE#
    #HEADER_FONT_WEIGHT#
    #BODY_BG_COLOR#
    #BODY_FONT_COLOR#
    #BODY_FONT_FAMILY#
    #BODY_FONT_SIZE#
    #BODY_FONT_WEIGHT#
    #BORDER_WIDTH#
    Where can I set the values for these substitution variables in my "Report Layout"? Could someone give an example? I can't seem to find documentation on this.
    Thanks!
    Francois

    Thanks for the tip however I'm not trying to do this through the print tab, I'm calling the report using the following get_print_document in pl/sql code:
    l_report_blob := apex_util.get_print_document(
    p_application_id => l_application_id,
    p_report_layout_name => l_report,
    p_report_query_name => l_report,
    p_report_layout_type => l_output_format,
    p_document_format => l_output_format,
    p_print_server => null);
    Where could I set these substitution variables ? I'm simply calling a report query and layout created under Shared Components.
    Thanks
    Francois

  • How do i set up the wireless option for printing rather than using an usb

    how do I set up wireless printing function on my hp photosmart C4780

    This should help: http://www.hp.com/global/us/en/wireless/reconfigur​ing-system-help2.html
    Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
    I am employed by HP

  • How to find bpel instance in 11g based on the index values using Java APIs

    Hi ,
    In SOA10G we had option to find the instances based on the index value using Java APIs like below.
    WhereCondition criteria= new WhereCondition(SQLDefs.CX_index_1 + " = ?");
    criteria.setString(1, "indexValue");
    Locator mLoc = getLocator();
    IInstanceHandle[] foundInstances = mLoc.listInstancesByIndex(criteria);
    Please tell me how to achieve the same functionality in SOA 11G using Java APIs
    Regards,
    Saba

    I have multiple bpel in my composite. I checked in ci_indexes table and it shows the instance number of the bpel process. But the em console is showing only the composite instance number. when I opened composite instance, I could see all the bpel process with instance number in the audit trail. How can I find the the actual composite instance number that I should search for in the em console ???

  • How to get the page numbers of a word/mpp/execl doc using Java?

    Hi,
    I meet a problem in Java programming. I want to get the page numbers of a Word/MPP/EXECL/PDF document. For exmaple, if a PDF docment have 10 pages, I need get the 10 . How to get it using Java?
    Please advise me as soon as possible if you have any good suggestions! Thanks!
    Yin

    There are several good tools that allow you to access COM objects from Java. Here are two of the better ones:
    Bridge2Java
    http://www.alphaworks.ibm.com/tech/bridge2java
    J-Integra
    http://www.linar.com/
    Both of these tools will allow you to access MS Office products (including Word and Excel) via COM interfaces.

  • How to Set up the  variables and others to compile and Run Java Programs

    Hello,
    I have just downloaded the jdk1.6.0_07 and jre1.6.0_07 and installed it in C:\Program files\Java in my Windows XP ,So please tell me how to sett up the enviroment variables etc to compile and run Java Programs from Command Prompt.
    thanks

    To set the PATH permanently, add the full path of the jdk1.6.0_<version>\bin directory to the PATH variable. Typically this full path looks something like C:\Program Files\Java\jdk1.6.0_<version>\bin. Set the PATH as follows on Microsoft Windows:
    1. Click Start > Control Panel > System on Windows XP or Start > Settings > Control Panel > System on Windows 2000.
    2. Click Advanced > Environment Variables.
    3. Add the location of bin folder of JDK installation for PATH in User Variables and System Variables. A typical value for PATH is:
    C:\Program Files\Java\jdk1.6.0_<version>\bin

Maybe you are looking for

  • Has this option been removed from iTunes?

    I'm trying to play video podcasts without having them run in a separate window. Before, I could simply run a video podcast and have the video play in the Now Playing box in the lower left corner of iTunes. Now, when I try to X out of the separate win

  • Xml transformation of element attributes ?

    I have already build a succesfull transformation with an xml file I could define myself. now I get an xml file out of another software pacakge that I also try to transform into tables. the structure is totally different since this vendor puts all the

  • Repeat On/Off in Account Assignment tab of PO

    Dear All, Working in ECC 6. Kindly explain Repeat On/Off in Account Assignment tab of PO and its usage. Where it is to be activated? Regards

  • BAPI in MM

    Hi MM Gurus Could any one share the BAPI's  in MM specific to Business Processes which was required by the client and it had been fulfilled and implemented successfully. Appreciate if you can elaborate on what was the requirement and steps to accompl

  • Punch in & multiple tracks recording

    I'm working with Logic Express for a few weeks now, and I need to know 2 things: How can I make a punch in/out with Logic Express? I worked with Adobe Audition, and I just needed to select the part of the track where the repair should be done, and pl