How to call an API available in C++ dll?

Can we make a call to an API available in C++ dll(COM or non-COM)?
If so, can you point me to a sample?
Thanks in advance?

Java Native Interface (JNI) is the most complex solution, you have to make a wrapper as a library in C/C++.
JNA (Java Native Acess) is an extension of JNI which consist of rewritting in java the native functions in the lib.
In any cases the big workaround is the linking at java side, two solutions:
Integrate your natives libs correctly in a jnlp file and jar (see runtime jnlp as an exemple)
Extract manaualy at runtime the content of the lib in the root path.
In conclusion, for java/javaFX & C/C++, JNA and dependency walker are your friends.
Ask me if you need more details.
NB: be carrefull with 32 / 64 bit

Similar Messages

  • How to call custom API in ODI

    Hi All,how to call custom API in ODI and how can multiple people run the scenario at same time. I explained my process below
    1. Through ODI console pass parameter (file name) to scenario and read the file form configured location
    2. Insert the data from flat file to custom table
    3. Call custom API
    4. Generating a report in ODI in same location where we read the file from. Creating sample report just reading from custom table
    5. The above design should be such that multiple people can run the scenario at same time.
    can any one help me on step 3 and step 5 how to go forward..
    Thanks in Advance.
    Edited by: 981371 on Mar 4, 2013 3:19 AM

    You can invoke java api in the procedure or KM tasks. You can select Jython technology type and can call the custom java API.
    You may find relevant info at
    http://docs.oracle.com/cd/E23943_01/integrate.1111/e12643/procedures.htm#CHDIDDFE
    http://docs.oracle.com/cd/E23943_01/integrate.1111/e12645/intro.htm#sthref5
    http://docs.oracle.com/cd/E23943_01/integrate.1111/e12645/api_intro.htm#CEGFCFHC
    You can directly put DB functions in the your mapping expressions.

  • How to call Java API from BSP?

    I have a requirement to call Java API from BSP application.
    I have checked the forum and found that it is possible by using some ABAP codes.
    However there is no pointer on how this is done.
    Can someone explain the details on how to call Java API from BSP is done?
    I found class CL_EJB_JAVA_OBJECT_METHODS to call a method in EJB but can't find function or SAP class to call Java API.
    Actually is there any BSP extention which can used to call Java API?
    Thanks,
    Hendri

    check out these weblogs, it should give you an idea how to go about it.
    /people/ignacio.hernndez/blog/2006/12/04/speech-synthesis-listen-the-application-server-is-talking-to-you
    /people/puru.govind/blog/2006/12/20/let-abap-speak
    Regards
    Raja

  • How to call an API through Forms

    Hi,
    I want to call 'inv_quantity_tree_pub.query_quantities' from a custom form developed using Template.fmb.
    It is displaying error that 'remote package can not be called '.
    can any one help me on this issue.

    Hi;
    What is your OS?
    Please check below which could be helpful for your issue
    Oracle E-Business Suite Java APIs for Forms Troubleshooting Guide, Release 12 [ID 966982.1]
    http://drupal.org/node/751826
    http://oracle.ittoolbox.com/groups/technical-functional/oracle-dev-l/how-to-call-windows-apis-through-oracle-forms-developer-6i-1082381
    Regard
    Helios

  • How to call SOAP API from JavaScript

    Hi,
    I'm trying to call the SOAP API to get statistics about emails. Are there any examples on how to call the API from JavaScript?
    Here is a link to my original question about using the REST API. REST API URL for email statistics
    Thanks,
    Tim

    Tim,
    In order to consume a SOAP API I recommend you use something other than JavaScript.
    Any platform can offer you a good SOAP client should be OK. (.Net, Java, php, Ruby, python).
    I didn't see anyone successfully used javascript and consume the Eloqua SOAP API.
    I know you can create a SOAP client in Java script but it will be too much work to handle the Eloqua response in some cases.
    Regards,
    Daniel

  • How to call remote API from root SharePoint 2013 domain (not an app)

    I'm trying to follow the article
    http://msdn.microsoft.com/en-us/library/office/fp179895%28v=office.15%29.aspx
    For a SharePoint 2013 hosted under O365, do I need to create an app to use the SP.* methods in sp.js? I need to call a remote API from the root domain (https://mycompany.sharepoint.com). But the app, as mentioned in the article
    above, deploys on a whole different URL (https://mycompany-a2d3f4t454.sharepoint.com).
    I need to be able to call the API from pages like https://mycompany.sharepoint.com/pages/default.aspx. Is this not possible?

    Hi,
    According to your description, my understanding is that you want to call remote API from the root domain site.
    Yes, you can use SharePoint hosted app to achieve it. SharePoint hosted app has app web and host web, you can create an app to call the remote api in the host web from app web.
    Here are some detailed articles for your reference:
    http://blog.ctp.com/2014/06/23/data-access-in-sharepoint-hosted-apps/
    http://msdn.microsoft.com/en-us/library/office/fp179925(v=office.15).aspx
    Best Regards
    Zhengyu Guo
    TechNet Community Support

  • How to call Soap API plsql package with ws security ?

    Hi all,
    I want to consume a webservice which comes with the basic authentication (username and password in soap header).
    By calling Soap api through a anonymous block shows this error
    "Error report:
    ORA-20000: wsse:InvalidSecurity - Missing <wsse:Security> in SOAP Header
    ORA-06512: at "APPS.SOAP_API", line 124
    ORA-06512: at "APPS.SOAP_API", line 157
    ORA-06512: at line 76
    20000. 00000 -  "%s"
    *Cause:    The stored procedure 'raise_application_error'
               was called which causes this error to be generated.
    *Action:   Correct the problem as described in the error message or contact
               the application administrator or DBA for more information."
    My Anonymous Block is:
    set serveroutput on
    declare
      l_request   soap_api.t_request;
      l_response  soap_api.t_response;
      l_return    VARCHAR2(32767);
      l_url          VARCHAR2(32767);
      l_namespace    VARCHAR2(32767);
      l_method       VARCHAR2(32767);
      l_soap_action  VARCHAR2(32767);
      l_result_name  VARCHAR2(32767);
      l_envelope       VARCHAR2(32767);
    BEGIN
       l_url         := 'my wsdl url';                                 -- i provided the original URL in my actual code
      l_namespace   := 'xmlns="my namespace"';       -- same here
      l_method      := 'get_details';                              -- same here
      l_soap_action := 'my soap action';                        -- same here
      l_result_name := 'REQUEST_STAT';
      l_request := soap_api.new_request(p_method       => l_method,
                                        P_Namespace    => L_Namespace);
       soap_api.add_parameter(p_request => l_request,
                             p_name    => 'Username',
                             p_type    => '',
                             p_value   => 'user1');
      soap_api.add_parameter(p_request => l_request,
                             p_name    => 'Password',
                             P_Type    => '',
                             p_value   => 'passwd');
      soap_api.add_parameter(p_request => l_request,
                             p_name    => 'empid',
                             p_type    => '',
                             p_value   => '9989');
      soap_api.add_parameter(p_request => l_request,
                             p_name    => 'emp_TYPE',
                             P_Type    => '',
                             p_value   => 'COCD');
      soap_api.add_parameter(p_request => l_request,
                             p_name    => 'name',
                             P_Type    => '',
                             p_value   => 'Danny');
      soap_api.add_parameter(p_request => l_request,
                             p_name    => 'STATUS',
                             P_Type    => '',
                             p_value   => 'pending');
      soap_api.add_parameter(p_request => l_request,
                             p_name    => 'mgr_name',
                             P_Type    => '',
                             P_Value   => 'Auditore');
      soap_api.add_parameter(p_request => l_request,
                             p_name    => 'ADDRESS',
                             P_Type    => '',
                             p_value   => '13 new street');
      soap_api.add_parameter(p_request => l_request,
                             p_name    => 'PHONE',
                             P_Type    => '',
                             p_value   => '123456');
      l_Response := Soap_Api.Invoke(P_Request => l_Request,
                                    P_Url     => l_Url,
                                   P_Action  => L_Soap_Action);
      l_return := soap_api.get_return_value(p_response  => l_response,
                                            p_name      => l_result_name,
                                            P_Namespace => Null);
    -- DBMS_OUTPUT.put_line(l_return );                                    
    END;
    I have Two questions :
    1) Where to give the soap header details ?
    2) In my soap header am also having the header atributes like "Responsiblity" ,"Resp Application" ,"Security Group" ,"Language" ,"Org ID"
    Where to give these values in my anonymous block?
    My Request.xml looks like this:
    <soapenv:Header>
        <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
             <wsse:UsernameToken wsu:Id="UsernameToken-4" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
                <wsse:Username>user1</wsse:Username>
                <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">passwd</wsse:Password>
             </wsse:UsernameToken>
          </wsse:Security>
          <sr:SOAHeader>
             <!--Optional:-->
             <sr:Responsibility>PURCHASING_SUPER_USER</sr:Responsibility>
             <!--Optional:-->
             <sr:RespApplication>PO</sr:RespApplication>
             <!--Optional:-->
             <sr:SecurityGroup>standard</sr:SecurityGroup>
             <!--Optional:-->
             <sr:NLSLanguage>american</sr:NLSLanguage>
             <!--Optional:-->
             <sr:Org_Id></sr:Org_Id>
          </sr:SOAHeader>
       </soapenv:Header>
       <soapenv:Body>
          <get:InputParameters>
             <!--Optional:-->
             <get:EMP_NUMBER>9969</get:EMP_NUMBER>
             <!--Optional:-->
             <get:EMP_TYPE></get:EMP_TYPE>
             <!--Optional:-->
             <get:name></get:name>
             <!--Optional:-->
             <get:STATUS></get:STATUS>
             <!--Optional:-->
             <get:MGR_NAME></get:MGR_NAME>
             <!--Optional:-->
             <get:ADDRESS></get:ADDRESS>
             <!--Optional:-->
             <get:PHONE></get:PHONE>
          </get:InputParameters>
       </soapenv:Body>
    </soapenv:Envelope>

    Hi Arik,
    Thanks for the reply. I got the solution by configuring a NonXA data source. The problem was with internal commits of the fnd_global.initialize api.
    If the DB adapter is calling aPL/SQL procedure (written inside a pakcage) using the data source configured to support XA, will expect not to have any commits in side the procedure or anywhere, the XA driver will take of the commits and whole transactions. By default the FND_GLOBAL.INITIALIZE(...) procedure will have the internal commits, so it was throwing the errors.
    The solution was configuring the a NonXA Data source in the databae adapter configuration will allow the commits inside the callings procedures. So we created Two data sources one for XA and another for NonXA and we are using the NonXA datasource whereever we are calling the EBS APIs which have the internal commits.
    -- Khaleel

  • How to call OIM API from external app?

    Hi,
    I have an java application and I would like to call OIM API to accept a request. The application resides in separate server than OIM.
    My questions:
    *1.* What to do to call OIM API from external application (import any OIM jars etc.)?
    *2.* Which method to use, setRequestResponse , closeRequest or any other?
    I appreciate any help, thanks.
    Edited by: m.m. on Feb 2, 2010 5:33 AM

    Hello,
    If it is an external client, you need to provide the "login" and "password" details explicitly in the code (something like this), before getting any other Interface control to invoke the OIM APIs -
    public class OIMAPIClientTest {
    public static void main(String[] args) {
    try{
    System.out.println("Starting...");
    ConfigurationClient.ComplexSetting config = ConfigurationClient.getComplexSettingByPath("Discovery.CoreServer");
    Hashtable env = config.getAllSettings();
    tcUtilityFactory ioUtilityFactory = new tcUtilityFactory(env,"xelsysadm","abcd1234");
    System.out.println("Getting utility interfaces...");
    Regards,
    Amit
    Edited by: amitKumar on Feb 2, 2010 5:29 AM

  • LV memory leak - How to use windows API SetProcessWorkingSetSize (from Kernel32.dll)

    Hi fellow LV'ers
    Okay - this is a bit tricky, but i'll try and explain the problem, then ask for the solution, because it may be that someone knows a better way to deal with this.. might get a bit long, sorry - if a solution comes up this will enable all of us to make more memory efficient LV code so please read on..
    Here is the deal:
    When building even a very simple LV executable, looking at the windows task manager will yield a rather large amount of memory allocated for such a small program - and the only way to free this up is by physically clicking the windows minimize button, then suddenly the amount drops to only a few MB and upon maximizing the window again the memory consumption will increase somewhat again, but for a simple VI build to an exe this move may change the consumption from +70MB to less than 15 MB.. This is irregardless of the code you put in the VI, so no coding example in this post as it is how LV works - you can even test it with the development environment - look at the task mgr and check LabVIEW's memory consumption, minimze ALL open NI windows incl project explorer etc, and you will see a significant decrease in memory usage even after maximizing again.. This has annoyed me since day one, but since RAM is a near zero cost these days it is not something I stay awake at night to think about.. However - I have moved into the "publish to web" tools now, wanting to do a remote monitoring part for my application for my customers to experience increased usability from the software i sell them..
    All is well, publishing is really easy (i use the monitor function, NOT the embeded, as customers need not have Labview RunTimeEngine installed, because they might look at it from a non RTE supported platform such as a mobilephone web browser)
    Everything is working fine also for the build application. However - I have noticed that once users start to remote monitor the running application - memory consumption of the running LV application starts to increase - and it keeps doing so - to such an extend that you can drain the computer complete and run off the cliff with a windows error... This is off course not very productive for me, being specialized in measurement applications that usually runs for a long period of time - I initially thought that I had done some poor programming in the VI used to display on the webpage - but it turns out that I can reproduce this behaviour with a simple boolean on an empty front panel..
    NI support has been informed, and they admit there is a problem, but so far solutions from them has been a bit too exotic for my taste, and thus I'm seeking the help of fellow LV programmers...
    You see - The method to solve the increasing memory consumption, is the exact same as mentioned above..minimize the application running with the "minimize" button and all memory will be freed, as soon as you maximize the application and users are viewing it remotely, the memory usage raises again, and history repeats... As previously mentioned, minimizing the window via normal LV calls to property nodes does not yield the same result, nor does a request deallocation of a VI(When you profile a project, there are no VI's increasing in memory, it is the LV process it self doing it) 
    After many many hours googling I stumbled upon this:
    http://support.microsoft.com/?kbid=293215
    I believe trimming the process with SetProcessWorkingSetSize would solve this problem, and now I would really like to be able to do this in my program, so that users are not forced to minimize the program every X hour depending on their system size...
    However - I have absolutely NO experience in calling windows API from LV, i need someone with that knowledge to provide an example of how to call this.. I've looked at examples on how to do calls to windows API - there is an example in this forum with some llb's in it, and I have gained a fair understanding of how parameters are passed between the calls, but none of those include the "hProcess" handle that is apparently needed for this specific winAPI call to work - Anyone in this forum with the knowledge on how to obtain this handle from a VI, if at all possible, and could provide an example VI for me to use - or even better , someone with the knowledge of how to do this within LV it self??
    Your help is much appreciated
    Best Regards
    Jacob
    LV8.6.1 patch something
    Win XP 
    Solved!
    Go to Solution.

    Hi Enrico
    Finally I can give something to the community that has given me so much  :-)
    The "official" statement is that "yes we know it is a problem".. Not sure what that will do to the future.. 
    I have the problem on 8.6.1 as well  - and in fact it is a general LV problem, that I first time reported to NI with LV8.2 as I was pissed by the fact that even the smallest exe file would consume + 50MB of memory until you manually minimized the window. Well - thanks to the feedback from Cosmin I seem to have solved the problem.
    I most warn that having started to "empty process" once in a while has led to occasional program crashes in the lethal "app.exe performed an illegal action and is closed" windows dialog - however what I did was to move the webserver to a seperate exe file and then communicate the data that I want to use via datasocket in a cluster.. It works like a charm and I simply stall the single thread that the webserver is running when ever the empty process is called and I have not seen a crash since then.. (the initial implementation was done in the main app with 4 parallel loops running, and I guess that was a disaster waiting to happen)
    Either way - what I have done is made a VI that at a user defined interval calls the empty process, simply by getting the .exe name from the task manager of the calling program - it is simple and very effective. I call it every 5 minutes - needless to say that flushing too often will most likely kill performance of the system. I have not noticed problems with VM - are you sure you are not storing large arrays or moving around copies of data not used frequently?
    For future reference to this forum, it is attached here including the .dll required to call - it is a LV8.6.1 file as I have not had the time to yet again test every single function of my program for new problems that could occur with upgrading to LV2009 
    I hope this solves your problem..
    best regards
    Jacob
    www.10EaZy.com 
    Attachments:
    EmptyProcess.zip ‏32 KB

  • How to call UME API from ABAP?

    Hello all,
    I want to call the UME API using ABAP to change portal users from backend system.
    Is this possible without JAVA development? How?
    Thanks for your help,
    Regards,
    Guido Knapp

    Hi,
    Refer this link you wil get some idea
    http://help.sap.com/saphelp_nw04/helpdata/en/e0/3820a37edeec45a91dd6e45fba15b8/frameset.htm
    Regards,
    Senthil K.

  • How to call Java API

    Hi,
    Currently I am getting inputs from another composite, lets say Composite A and in composite B I need to pass the input values ( approx 40 elements are coming from composite A) to Java API ( end system). I have jar file for java API which has 20 different classes. Can you guys suggest me how to map the input values that are coming from composite A to Java API.
    I developed a Bpel process which receives the input from Composite A. Please suggest me for next steps and procedure to follow.
    Thanks.

    I would look into using the Spring component and wrapping your java api in a simple sprint bean class. SOA will then generate WSDL's and do marshalling/unmarshalling of the data between your BPEL and the spring component automatically. It will just look like another service call from within the BPEL but will actually invoke your spring component.
    Thanks,
    Adam DesJardin

  • How to call Java API classes from Javafx Main.fx?

    Hi
    Can anybody let me know how to include java.util.StringTokenizer in Main.fx file of Javafx?
    I need to split a concatenated String in Javafx. Is there any example available with anybody on this?
    When I use the split() of Javafx, I get error while assigning the value returned by split() to both String and String[] variables:
    1. var name = "test|string";
    2. var names: String[];
    3. var splitName: String = "";
    4. names[0] = name.split("|");
    5. splitName = names.split("|");
    6. var storeName: String[];
    Later I need to put the splitName into another String array to have a collection of all the concatenated string in one array.
    insert splitName into storeName;
    But I get error in line 4 and 5. The split() in javafx returns a String []. Is there anything that I missing here.
    Any reply to this post will be highly appreciated. I need this quite urgently.
    Thanks & Regards
    masrrev

    Hi Phil
    Thanks for the immediate response. I tried the code but getting the following exception, which I was getting earlier too.
    Inside on Mouse Clicked...
    Uncaught exception: java.lang.Error: 137_*
    - xing.Xing$2.lambda(), bci=43
    - xing.Xing$2.invoke(), bci=2
    - xing.Xing$2.invoke(), bci=5
    - javafx.scene.Node.mouseClicked$impl(), bci=68
    - javafx.scene.Node.mouseClicked(), bci=3
    - com.sun.fxme.runtime.FXNodeDelegate$4.run(), bci=6
    - com.sun.fxme.runtime.RunnableQueue$Manager.run(), bci=86
    - com.sun.fxme.runtime.RunnableQueue.run(), bci=38
    And the code in onMouseClicked Event is reproduced below:
    onMouseClicked: function(e : MouseEvent) : Void {
    println("Inside on Mouse Clicked...");
    def sample = "Sherlyn|masrrev|Other";
    var names = sample.split("\\|");
    println("{names.toString()}");
    // splitString();
    sceneNew = Scene {
    content: [nextScreen]
    Regards
    masrrev

  • How to call workflow api in procedure?

    I created a process in workflow,i call CreateProcess to starting from my procedure.But when i call the procedure in sqlplus i got a error message.That is ,ORA-20002: 3114: activity 'XTes/tes1' is not a process.
    Is there something wrong when i call CreateProcess in procedure?

    -make sure that you use the internal name of the item type and the process as
    defined in the workflow builder.
    -is your workflow definition successfully saved in the database?
    Lieven

  • With java how to call a function offered by user32.dll?

    Hi,everyone.
    Please think about my question.Now i want to retrieve all the user's
    information in NT OS.will it be possible? could it be done by calling a method
    of dll? i have tried to define a native method,but i got java.lang.UnsatisfiedLinkerror when i execute the class, what will be the problem?
    can you please offer me a piece of code like it. but the dll should be available with the OS,such as user32.dll,kernal32.dll ...ect, not the one using jni to generate.
    Thank you for suggestions.

    can you please offer me a piece of code like it. but
    the dll should be available with the OS,such as
    user32.dll,kernal32.dll ...ect, not the one using jni
    to generate.You cannot directly call C functions in this way. You have to use JNI. Have your native method written to normal JNI standards call the functions in the OS. Your native method will also have to take care of creating the data structures needed to make the OS call and also creating the Java data structure you want to return.

  • How to call Visual Basic Component's method (DLL)in Java

    Hi people ,
    I need to make calls to methods from a dll . Why ? because the main project is in java and I am a java developer . This dll is the API of an other system that we need to access .
    I have searched this on google as you normally do . I found Jacob and some examples using javah . But all the references are old . The latest file I downloaded (version 1.5) was written in 2004 .
    Like wise all the results I get on google are old like from 2000 and even 2001 . What are standard practices for this now a days . The dll is written in Visual Basic .
    Any help will be appreciated .

    mycoffee wrote:
    Shahzeb wrote:
    Hi people ,
    I need to make calls to methods from a dll . Why ? because the main project is in java and I am a java developer . This dll is the API of an other system that we need to access .
    I have searched this on google as you normally do . I found Jacob and some examples using javah . But all the references are old . The latest file I downloaded (version 1.5) was written in 2004 .
    Like wise all the results I get on google are old like from 2000 and even 2001 . What are standard practices for this now a days . The dll is written in Visual Basic .
    Any help will be appreciated .That is history
    Why do you need a method in VB? everything vb can do, java can do better :JK
    Need more information to know what are you going to doWell that's an invain argument but I agree in principle .
    That DLL is not my code , it is api for some other application that we need to access . A system written by some other company whose API is exposed to us in a DLL . I need to use that simple as that .

Maybe you are looking for

  • Samsung Widescreen Display

    I thinking about getting a Mac mini and I'm wondering if it would be compatible with my Samsund 940BW 19" widescreen display. I beleive the native resolution on the display is 1440x900. I'm currently using the monitor connected as second disply for m

  • ICR - Which process to use?

    Hi Experts, My company posts intercompany documents by all three methods, Vendors / Customers, Open Item GL accounts, and non Open Item GL Accounts (PL Accounts, Loans).  We were hoping to use ICR Process 002 for all of these items.  What is the sugg

  • Panasonic DMC-FZ8 and Leopard - third party plugins for use of RAW?

    Hello! I have a Panasonic DMC-FZ8 camera, and frequently find myself in situations that require the use of RAW image format. Unfortunately, even as of the 10.5.4 update, this camera's RAW format is not supported by OS X natively - only through Photos

  • Dynamic frosted window effect

    Hi, I need to have a sprite that acts as a blur filter for whatever is below it... i.e. if its a square on top of a photo, then the photo is blurred underneath the square, but nowhere else. I've seen a few examples where displayFilters were used to c

  • How migrate all mail (boxes and accounts) from 10.6.8 on Mavericks (without Migration Assistant)?

    How migrate all mail (boxes and accounts) from 10.6.8 on Mavericks (without Migration Assistant)? Install the system (10.9.1) on a blank disk, copied the program and set up manually. Mail accounts and folders does not work to install and configure. M