How to Use DLL correctly in LV ?

I'm trying to use a DLL from former S/W written in C++.
The DLL is using other DLLs.
The LV doesn't find the other DLLs although they are in the same directory .
Can you direct me how to pass this issue ?
Thanks
Edo

> I'm trying to use a DLL from former S/W written in C++.
> The DLL is using other DLLs.
> The LV doesn't find the other DLLs although they are in the same
> directory .
> Can you direct me how to pass this issue ?
>
You are using the DLL node correctly, but the problem is that it is
Windows looking for the supplementary DLLs, and it has a pretty fixed
set of places it looks. Putting the supplementary DLLs in the Windows
System directory definitely works -- this is why so many apps just dump
them in there. I think that setting your working directory to the
location of the DLLs will also work, but not real sure about that.
Greg McKaskle

Similar Messages

  • How to use dll in Labview ?

    I compile this code to dll file with VC++2010 filename is test_dll.dll .
    #include "stdafx.h"
    #include <iostream>
    #include <Windows.h>
    using namespace std;
    int main(int a){
        cout << "Test dll...............\n";
        return a;
    After that, I put Call Library Function node in editor and double click Call Library Function node. I browse test_dll.dll into Library name or path and set function prototype to int32_t main(int32_t a); but it show error Call Library Function Node 'test_dll.dll:main':function not found in libraly. How to use dll in Labview ?  And I have more question is what is differrent from Tools -> Import -> Shared Library(.dll) and use Call Library Function node.
    Solved!
    Go to Solution.

    The issue you are having is that LabVIEW is not capable of using C++ DLLs directly. It only handles C DLLs. This does not mean that if you you cannot use the DLL if it's compiled with the C++ compiler as opposed to the C compiler. Rather, it means that you must take extra steps in order to use it from LabVIEW. The primary issue is that of name mangling or adornment. This is discussed here: http://zone.ni.com/devzone/cda/tut/p/id/4877. Basically you need to prepend extern "C" in front of your prototypes in your header files. I would also suggest reviewing this article: https://decibel.ni.com/content/docs/DOC-14564.

  • How to use .dll compiled in Delphi in Java?

    Can anyone provide me information how to use .dll compiled in Delphi in Java? The .dll Delphi program may be non-OOP program.

    Hi
    If You want to write anything in PASCAL then simply write JNI code in C++ and call functions from this DELPHI DLL, but remember about changing the order of parameters etc when You call it. I had exactly the same problem, but it is possible, and we succeed.
    You will need exact description of input parameters required by PASCAL functions and of output parameters. Then construct in C++ objects wchich looks in memory exacly the same as they will look if You will be using PASCAL. Then PASCAL function will interprete this area in memory as known structure and will run.
    Maciek

  • How to use dll function in JDeveloper?

    I want to use function in dll to develope my application,but
    I can't find how to do that in the JDeveloper document.
    null

    You have to use the Java Native Interface to use dlls. The JNI
    tutorial at http://java.sun.com/docs/books/tutorial/native1.1/
    walks you through the basics and provides a sample too.
    Hope this helps.
    Regards,
    yinjun (guest) wrote:
    : I want to use function in dll to develope my
    application,but
    : I can't find how to do that in the JDeveloper document.Who can
    : give me an answer? Thanks a lot in advance.
    null

  • How to Use DLL Function in Java Applet

    Hi all,
    I have been assigned a task to develop java applet. The problem is, I need to use DLL functions in my applet to read records. Could you pls anyone guide me how to interface DLL and applet to read records with sample code?
    I'm using JDK 1.5.0_06 and Windows XP OS. thanx..
    best rgds,
    jpdbay

    You will need to use Java Native Interface JNI. Ther are many posts on the subject, please search, and this is the documentation:
    http://java.sun.com/j2se/1.5.0/docs/guide/jni/spec/jniTOC.html

  • "Only Get Delta Once" - How to use this correctly?

    Hi folks,
    we are currently facing the following situation:
    We have a data source only being able to deliver full update.
    That's why we proceed as follows:
    1.) Full-Load with Infopackage to PSA
    2.) Delta-Load with DTP from PSA to first-level-DSO (write-optimized)
    3.) Delta-Load with DTP from first-level-DSO to second-level-DSO (standard-DSO). As the activation aggregates all duplicate entries, we are therefore able to deliver a delta to all following data targets (e.g. infocubes)
    What we are now wondering about how to use the flag "Only Get Delta Once" which is available in all Delta-DTPs. The help explains it should be used when creating snapshot-scenarios like ours as each request is only delivered once, even if it gets deleted in the data target.
    But what other benefit would we have when setting this flag? As I mentioned, the snapshot-scenario also works without this flag...
    Could anyone perhaps provide me some more details about this flag and where it should be used?
    Thanks & regards
    bivision

    Hi,
    If you select the option 'Only get delta once', then every request in the PSA will only be loaded into the Data target once. For example. If you load a full request into the PSA through an InfoPackage and then load it to the Cube. In a snapshot scenario, when the new full load comes to the PSA you will need to delete the previous request from the cube before loading the new request.
    But if you delete the previous request from the cube, and not from the PSA - and if you haven't checked the 'Only get delta once' flag, when you execute the DTP, it will load both previous and the new requests from the PSA to the cube. In order to avoid this you have 2 options:
    1. You can delete a request from the PSA after every successful load into the Cube OR
    2. You can check the 'Only get delta once' flag in the DTP so that it won't load any request it has loaded into the cubes previously even if it was deleted from the cube.
    Using the second option de-couples the PSA maintenance from your regular data loading and also saves you an additional step of deleting the PSA request in your process chain.

  • How to use DLL written in VB in JSP

    I have a .dll written in Visual Basic. I want to use that dll in JSP. can anyone tell me is it possible? if yes than how.
    please rely with a complete example.
    Thanks in advance
    Lalit

    I thought JNI required that it be a C++ DLL.
    Maybe you could wrap that DLL as a COM object and used a COM bridge to talk to it.
    "please rely with a complete example." - I don't have one, but if I did I'd ask you to please reply with a lot of USD. This isn't an on-demand free consultancy, you know.

  • How to use DLL in JSP?

              Hello, all,
              I wrote a program to check the user authentication by call Windows's cryptography
              functions. I have generated a DLL file,
              and have put it in the C:\bea\jdk131_03\jre\bin. But my jsp
              page seems ignoring the java code to call the function in the
              DLL. I am not sure what should be imported at the head of the
              jsp file. Would somebody kindly help me out? Thanks a lot!!!
              My jsp code is here:
              <%@ page import="java.sql.Connection"%>
              <html>
              <head>
              <title>
              Jsp1
              </title>
              </head>
              <body>
              <h1>
              JBuilder Generated JSP
              </h1>
              <%
              try{
              if(Ntauth.authenticate("gecorg", "almond", "1025"))
              out.println("Valid user credenticals");
              else
              out.println("Invalid user credenticals");
              }catch(Exception e)
              out.println(e);
              %>
              </body>
              </html>
              

              One of my friend helped me to generate a new dll,
              just changed the package name. Then it works. I don't
              know why. But anyway, it works. Thanks everybody for
              your attention.
              "Sylvie" <[email protected]> wrote:
              >
              >Sorry, I found the function names are not match in my previou
              >post. The name is too long. I missed to type "authenticateNTUser" as
              >"authenticateUser"
              >in the SimpleNTAuthentication.java. I have fixed it. I repost them in
              >the following.
              >So the function name in the .h also corrected. But I still get the same
              >error.
              >
              >Do you know what's wrong?
              >
              >
              >"Sylvie" <[email protected]> wrote:
              >>
              >>Hi, Ann,
              >>
              >>Thanks for replying! But I have checked the function names.
              >>They looks the same. I post the code here, would please have
              >>a look.
              >>
              >>Thanks a lot,
              >>Sylvie
              >>---------------------------------------------------------
              >>SimpleNTAuthentication.java
              >>
              >>package Infolenz.Authentication;
              >>
              >>public class SimpleNTAuthentication {
              >>
              >> static {
              >> System.loadLibrary("ntauth");
              >> }
              >>
              >>
              >> private static native boolean authenticateNTUser(
              >> String domainName, // string that specifies the domain
              >> String userId, // string that specifies the user name
              >> String password // string that specifies the password
              >> );
              >> public static boolean authenticate(String domainName, String userId,
              >>String
              >>password)
              >> {
              >>
              >> if (domainName == null || userId == null || password == null)
              >> return false;
              >> else
              >> return authenticateNTUser(domainName, userId, password);
              >>
              >> }
              >>
              >>
              >>}
              >>---------------------------------------------------------
              >>javah generated Infolenz_Authentication_SimpleNTAuthentication.h
              >
              >/* DO NOT EDIT THIS FILE - it is machine generated */
              >#include <jni.h>
              >/* Header for class Infolenz_Authentication_SimpleNTAuthentication */
              >
              >#ifndef IncludedInfolenz_Authentication_SimpleNTAuthentication
              >#define IncludedInfolenz_Authentication_SimpleNTAuthentication
              >#ifdef __cplusplus
              >extern "C" {
              >#endif
              >/*
              > * Class: Infolenz_Authentication_SimpleNTAuthentication
              > * Method: authenticateNTUser
              > * Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Z
              > */
              >JNIEXPORT jboolean JNICALL Java_Infolenz_Authentication_SimpleNTAuthentication_authenticateNTUser
              > (JNIEnv *, jclass, jstring, jstring, jstring);
              >
              >#ifdef __cplusplus
              >}
              >#endif
              >#endif
              >
              >>----------------------------------------------------------------
              >>ntauth.cpp
              >>
              >>#include "Infolenz_Authentication_SimpleNTAuthentication.h" // native
              >>library
              >>included
              >>#include "stdio.h" // standard input and output
              >>#include "afxwin.h" // MFC core and standard components
              >>#include "jni.h"
              >>
              >>JNIEXPORT jboolean JNICALL
              >> Java_Infolenz_Authentication_SimpleNTAuthentication_authenticateNTUser
              >> (JNIEnv *env,
              >> jclass javaClass,
              >> jstring jDomainName,
              >> jstring jUserId,
              >> jstring jPassword )
              >>{
              >> jboolean authenticated;
              >> HANDLE hToken;
              >>
              >>
              >> // get the provided domain name, user id and password
              >> const char *cDomainName = env->GetStringUTFChars(jDomainName, 0);
              >> const char *cUserId = env->GetStringUTFChars(jUserId, 0);
              >> const char *cPassword = env->GetStringUTFChars(jPassword, 0);
              >>
              >>
              >> // Copy the char array to temporary variables to be
              >> // passed to LogonUser. This copy is done to guarantee the
              >> // const nature of the jstring char array.
              >> // Inappropriate access to this data can crash the VM!
              >> char *domainName = new char[env->GetStringUTFLength(jDomainName)
              >+
              >>1];
              >> char *userId = new char[env->GetStringUTFLength(jUserId) + 1];
              >> char *password = new char[env->GetStringUTFLength(jPassword) + 1];
              >>
              >> strcpy(domainName, cDomainName);
              >> strcpy(userId, cUserId);
              >> strcpy(password, cPassword);
              >>
              >> // release the chars back to the VM
              >> env->ReleaseStringUTFChars(jDomainName, cDomainName);
              >> env->ReleaseStringUTFChars(jUserId, cUserId);
              >> env->ReleaseStringUTFChars(jPassword, cPassword);
              >>
              >> // try to authenticate
              >> if (LogonUser( userId,
              >> domainName,
              >> password,
              >> LOGON32_LOGON_NETWORK,
              >> LOGON32_PROVIDER_DEFAULT,
              >> &hToken))
              >>
              >> authenticated = JNI_TRUE;
              >> else
              >> authenticated = JNI_FALSE;
              >>
              >> // delete the memory that was allocated
              >> delete domainName;
              >> delete userId;
              >> delete password;
              >>
              >> // close the handle created by LogonUser
              >> CloseHandle(hToken);
              >>
              >> return authenticated;
              >>}
              >>
              >>-------------------------------------------------------------
              >>
              >>Ann Cao <[email protected]> wrote:
              >>>Are you using JNI? There are two problems that could cause Unsatisfied
              >>>link errors. One is the DLL not found, and the other is that the DLL
              >>>is
              >>>found but is unreadable or the specific function cannot be found in
              >>it.
              >>>Since you have set your path correctly, I guess the reason you got
              >the
              >>>error is the second cause.
              >>>
              >>>Sylvie wrote:
              >>>
              >>>> I wrote a test java program to call the authenticate function.
              >>>> but get a Unsatisfied Link Error. It seems that my program
              >>>> has problem to load the DLL. But I have set the path to include
              >>>> the directory containing the DLL. Dose somebody know what is going
              >>>on?
              >>>>
              >>>> Thanks,
              >>>> Sylvie
              >>>>
              >>>> "Sylvie" <[email protected]> wrote:
              >>>> >
              >>>> >Hello, all,
              >>>> >
              >>>> >I wrote a program to check the user authentication by call Windows's
              >>>> >cryptography
              >>>> >functions. I have generated a DLL file,
              >>>> >and have put it in the C:\bea\jdk131_03\jre\bin. But my jsp
              >>>> >page seems ignoring the java code to call the function in the
              >>>> >DLL. I am not sure what should be imported at the head of the
              >>>> >jsp file. Would somebody kindly help me out? Thanks a lot!!!
              >>>> >My jsp code is here:
              >>>> >
              >>>> ><%@ page import="java.sql.Connection"%>
              >>>> >
              >>>> ><html>
              >>>> ><head>
              >>>> ><title>
              >>>> >Jsp1
              >>>> ></title>
              >>>> ></head>
              >>>> >
              >>>> ><body>
              >>>> ><h1>
              >>>> >JBuilder Generated JSP
              >>>> ></h1>
              >>>> ><%
              >>>> > try{
              >>>> > if(Ntauth.authenticate("gecorg", "almond", "1025"))
              >>>> > out.println("Valid user credenticals");
              >>>> > else
              >>>> > out.println("Invalid user credenticals");
              >>>> > }catch(Exception e)
              >>>> > {
              >>>> > out.println(e);
              >>>> > }
              >>>> > %>
              >>>> >
              >>>> >
              >>>> ></body>
              >>>> ></html>
              >>>> >
              >>>
              >>>--
              >>>Regards,
              >>>Ann
              >>>Developer Relations Engineer
              >>>BEA Support
              >>>
              >>>
              >>
              >
              

  • How to use BAPI_INTERFACE_GETDOCU correctly?

    Folks,
    I need to get the list of parameters and their definitions for a specified BAPI. It appears I need to call BAPI_INTERFACE_GETDOCU to get this information. However, there is not enough information on how to call the function correctly. The following .NET code, for example, returns an error that objname or objtype is not specified.
    p.Bapi_Interface_Getdocu(null,   null,   null,  "BAPI_MATERIAL_SAVEDATA",  null, null, null, null, out ret2, ref tbl);
    Can someone please help me on calling this function correctly?
    Thank you in advance for your help.
    Regards,
    Peter

    Hello Peter
    The documentation of BAPI_INTERFACE_GETDOCU is quite verbose:
    FU BAPI_INTERFACE_GETDOCU
    Short Text
         Read BAPI Interface Documentation
    Functionality
         This method reads the interface documentation for a BAPI.
         The method enables you to read out and make available to developers the
         information they need to implement BAPIs correctly.
         The parameters of this method delimit the documentation to be displayed.
         With these parameters you can specify whether you want to display the
         documentation on a business object, method, parameter or field. The BAPI
         interface documentation below can be accessed with this method:
         o   The documentation on the business object, if one of the two
             parameters OBJTYPE or OBJNAME contains a value and the parameters
             METHOD, PARAMETER and FIELD are BLANK.
         o   The documentation on the method, if one of the two parameters
             OBJTYPE or OBJNAME contains a value and the method name is specified
             in the parameter METHOD. The parameters PARAMETER and FIELD must
             also be BLANK.
         o   The docmentation on the parameter, if the parameter name is also
             transferred in the field PARAMETER.
         o   The field name, if the field name is also transferred in the
             parameter FIELD. This is only possible, if a structure has been used
             for the parameter.
    Example
         In this example the documentaion on the BAPI  "Employee.GetList" is
         retrieved without the parameter documentation. It is displayed in
         English (EN) in RTF text format.
         Import Parameter    Value
         OBJTYPE
         OBJNAME             "Employee"
         METHOD              "GetList"
         PARAMETER
         FIELD
         LANGUAGE            "EN"
         TEXTFORMAT          "RTF"
    Notes
         Messages are returned in the parameter RETURN. This parameter
         documentation contains the return codes and their descriptions.
    Parameters
         OBJTYPE
         OBJNAME
         METHOD
         PARAMETER
         FIELD
         LANGUAGE
         TEXTFORMAT
         LINKPATTERN
         RETURN
         TEXT
    Exceptions
    Function Group
         BATG
    I did not find the BAPI immediately in the BOR (transaction SWO1) therefore I searched table SWOTLV with VERB = 'SAVEDATA'. And here I found the BAPI belonging to business object BUS1001006.
    To retrieve data from BAPI_INTERFACE_GETDOCU use the following IMPORTING parameter:
    OBJTYPE = 'BUS1001006'
    LANGUAGE = 'EN'
    TEXTFORMAT = 'RTF'
    I tried to call the BAPI using
    OBJNAME = 'StandardMaterial'
    OBJTYPE = 'SaveData'
    but here I did not retrieve any data.
    I just tried another combination of IMPORTING parameter:
    OBJNAME = 'StandardMaterial'     " no OBJTYPE !!!
    It worked.
    Other textformats are:
    SCR     SAPscript
    ASC     ASCII
    RTF     Rich text format
    HTM     HTML
    Regards
      Uwe

  • Afther repeatedly wrong pass code (iPhone 4) How to use the correct code now?

    Others used repeatedly the wrong pass code on my iPhone 4. I do have the correct code and don't want to loose my content. How to handle now?

    If you no longer are permitted to enter the right passcode, then it's too late to save anything:
    Locked Out, Forgot Lock or Restrictions Passcode, or Need to Restore Your Device: Several Alternative Solutions
    A
    1. iOS- Forgotten passcode or device disabled after entering wrong passcode
    2. iPhone, iPad, iPod touch: Wrong passcode results in red disabled screen
    3. Restoring iPod touch after forgotten passcode
    4. What to Do If You've Forgotten Your iPhone's Passcode
    5. iOS- Understanding passcodes
    6. iTunes 10 for Mac- Update and restore software on iPod, iPhone, or iPad
    7. iOS - Unable to update or restore
    Forgotten Restrictions Passcode Help
                iPad,iPod,iPod Touch Recovery Mode
    You will need to restore your device as New to remove a Restrictions passcode. Go through the normal process to restore your device, but when you see the options to restore as New or from a backup, be sure to choose New.
    You can restore from a backup if you have one from BEFORE you set the restrictions passcode.
    Also, see iTunes- Restoring iOS software.

  • Trying to get into the app store and it asks for my password. The problem is that it is showing an Apple ID I don't use ghosted in. I can't figure out how to use my correct ID.

    Trying to get into the App Store to update some apss. It asks for my password but the problem is that it is showing ghosted an Apple ID I don't use. Can't figure out how to fix it.

    You installed a hacked app, originally from the Mac App Store. It contains the receipt for a different app, downloaded using an account that you don't control. You need to identify and remove the hacked app.
    Important: The app you need to remove is not necessarily the one named in the App Store alert. For example, if the App Store says you need to update "Twitter," the hacked app may be "Angry Birds" or something else entirely. Don't make any assumptions about which app you're looking for. To find it, you have to carry out a systematic search.
    Triple-click anywhere in the line of text below on this page to select it:
    kMDItemAppStoreHasReceipt=1
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    In the Finder, press command-F to open a search window, or select
    File ▹ Find
    from the menu bar. In the search window, select
    Search: This Mac
    from the row of tokens below the toolbar. Below that is a popup menu initially showing Kind. From that menu, select  Other...
    A sheet will drop down. In that sheet, select Raw Query and click OK or press return.
    Now there will be a text box to the right of popup menu. Click in that box and paste (command-V).
    The search window will show all the App Store products you've installed. Compare those search results with the list of your purchases from the App Store. To see the complete list, you may need to unhide hidden purchases. If any apps were download from the App Store using other Apple ID accounts that you control, sign in to the store under each of those ID's and check the purchases.
    At least one of the items listed in the search window is not among your purchases in the App Store. Move each such item to the Trash. You may be prompted for your administrator password. Empty the Trash.
    Log out and log back in. Test.

  • How to use dll's(Functions) in java ?

    Hi
    I want to use the windows : shell32.dll. The declaration is as follows:
    Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" ( _
         ByVal hwnd As Long, _
         ByVal lpOperation As String, _
         ByVal lpFile As String, _
         ByVal lpParameters As String, _
         ByVal lpDirectory As String, _
         ByVal nShowCmd As Long) As Long
    I load the library via System.loadLibrary("shell32") and define the native methods(in java code):
    public native long ShellExecute(
    long hwnd, String lpOperation, String lpFile,
              String lpParameters, String lpDrectory, long nShowCmd);
    but i get a: java.lang.UnsatisfiedLinkError: ShellExecute. Whats wrong ? For long hwnd i used "0" for the first time, but this shouldn't be the problem. Any idea ?
    hte problem i have is to execute a very difficult programm. this need a system(windows) shell to run. so i try to start it with the shell32.dll. in VisualBasic i found my aim using this topic, but it doesn't run in java.
    thanks for help.
    pain
    pain

    work at this addresses: http://java.sun.com/docs/books/tutorial/native1.1/stepbystep/index.html
    If you understand anything write me, too. because I have the same problem and I worked and I coul not understand
    Good Luck..
    ABDURRAH&#304;M KAPLAN [email protected]

  • How to use DLL files in java?

    hi!
    i am working on hardware based java programming. the drivers which i have are in dll format. the manufacturers dont have a java based driver api's for the hardware. i want to invoke the dll file using a bridge between windows invironment and jvm invironment. more over i am not preferring to use native interface interface and c program to tackle this problem.
    is there a way out?

    Is it a COM dll? You could use JACOB. If it's not COM, there's also JNA which as I understand it, is simpler than JNI, although I've never used it
    Edited by: georgemc on Aug 22, 2008 11:05 AM links not working at moment for some reason
    Edited by: georgemc on Aug 22, 2008 11:10 AM

  • How to use DLL file

    if i have a DLL file and i want to use them in my program
    is it possible to import them for example
    import Node.DLL
    or what , please tell me it's important for me

    You can use the DLL file by using System.loadLibrary().
    To use the functions in the DLL, you have to provide a JNI interface to it.
    Here's a good link to a tutorial.
    http://java.sun.com/docs/books/jni/html/start.html#769
    Budyanto

  • How to use dll function

    I have written a program which calls dll function from a dll in eclipse platform.But I am getting Unsatisfied Linker Error.How can I solve this problem?Can anyone help me out?

    Have a look at JNA:
    https://jna.dev.java.net/

Maybe you are looking for

  • Is there a way to retrieve an Apple ID using the backup email?

    Hi! So I have an iPad mini that I purchased about a year ago and I activated it with an apple ID that was under by brother's name. Recently I updated iTunes on it and it reset. I have to put the apple ID that i activated it with but I can't remember

  • Problems installing itunes 64 bit in windows 7

    Hello I have a new pc windows 7 and can't instal itunes 64 bit. When I try to install an error appears: an error ocurred during installation of assembly Microsoft.VC80.CRT, version="8.0.50727.4053" type="win32", publicKeytoken="1fc8b3b9a1e18e3b", pro

  • Photoshop CS6 crashing when using Place

    PS has started crashing on me today when I try to use Place to apply a texture. It opens up the folder then almost immediately crashes. Anyone else having this problem? I really need help!

  • ThinkVantage Toolbox crashes after launch

    Hi, I have some trouble with the newest ThinkVantage Toolbox for Win 7 64 bit. I install it, I launch it and right then it just crashes. Anybody else experiencing something similar? Any solution yet or do I have to wait for the next update? Thanks fo

  • How to recover HP tools partition

    Hello, I want to recreate HP Tool Partition. I have deleted it. But I keep the HP_Recovery Partition. I tried to create HP Tool Partion with sp61632.exe, But It was not able to do it. "Main Drive already has four partitions. Additional partition can