How to execute C#-DLL-functions in labview?

Hello,
i created a c#-dll that communicates to a LAN-module using modbus. (ReadDI, WriteDO).
The c#-dll references two external DLLs.
How can i call my dll in labview and execute the functions?
Thanks for help

C# is .NET, so use .NET interface.
Norbert
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.

Similar Messages

  • How to eliminate advapi32.dll error in Labview RT

    Hi all,
    I am having a problem deploying a RT application to the remote machine. I get an error stating Error loading 'WS2Help '.dll: Missing
    export 'AllocateAndInitializeSid' from ADVAPI32.DLL'  After searching the internet for a while I know that this is a dll that the labview realtime os cannot use.  However I do not know if there is a tool/debugger that I can use that will tell me what vi's are calling this dll.  If I know what is calling it I figure I can figure out an alternative to that function.  Any help is appreciated. Thanks.

    Hi KidMoe,
    In addition to the information (and the program) from the thread that mathan linked, here is a little more about that dll.  WS2Help.dll is used by Internet and network applications.  Specifically, the file contains functions used by the Windows Sockets API.
    Regards,
    Charlie Piazza
    Staff Product Support Engineer, RF
    National Instruments

  • Calling DLL function using LabVIEW 7.1?

    Here's the scinario:
    I have LabVIEW 7.1 and i'm trying to call a DLL function using 'CALL LIBRARY FUNCTION NODE'.
    I have used this in the past with no problem. But right now, when I use this node and link it to the
    library and function name, i get 'ERROR loading Dllname.dll' message.
    NOTE that the DLL is generated using VStudio2003 or VStudio.NET. Could this be a problem??
    Also, i noticed that there are some JUNK characters before & after the function name that show
    up in function prototype:
    long ?EcpvsSign@@YAHHPBEH0HPAE1@Z(long Signer, CStr NonRMsg, long NonRMsgLen,
    CStr RMsg, long RMsgLen, CStr SigR, CStr SigS);

    tbd wrote:
    Hi rkpat,
          You might check-out this thread on building WIN32 DLLs - expecially the bit re: "mangles names" under the paragraph titled "C Language Source File".  My recollection is that 'extern "C"' directive in the header file for the DLL solved the name-mangling problem, but it's been a few years!
    Cheers!
    Message Edited by tbd on 03-01-2007 11:19 PM
    tbd is right. You have to first disable name mangling as it creates all kind of troubles. Other issues might be that your Visual Studio 2003 or .Net edition links in dynamic runtime libraries that are not standard available on every Windows PC so that you need to redistribute the according runtime library installer together with your app for the DLL to be even loadable.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How to execute a packaged function from within DML

    Hi
    can someone explain in how many ways can we execute a packaged function from within a DML statement.
    examples will help.
    Thanks

    Hi,
    There's no difference between using functions in DML and using functions in any other SQL statement. Almost any place where a literal is allowed, you can have any kind of expression, including a an expression involving one or more functions.
    For example, in
    UPDATE  table_x
    SET     column_a = 0
    WHERE   column_b > SYSDATE;You could use functions instead of 0, column_b, or SYSDATE. (Actually, SYSDATE is a function.) You can not use functions instead of table_x or column_a (since it is to the left of the "=" sign).

  • How to execute/invoke this function

    Hello gurus
    I have this as a part of a business event package. When a person from business side tested this using a java front end, it gave a pl-sql error.
    I have not worked with business events a lot.
    Can someone guide me on how to invoke/test and make sure this works
    function test(v1 In RAW,
    v2 IN OUT NOCOPY WF_EVENT_T) return varchar2
    SHould i write another procedure to invoke the business event so that this function can be tested.
    How to execute these?

    Try using setTimeout() instead.

  • How to execute an sql function containing a SELECT query as paramete

    Hi
    I want to execute this sql query using JDBC methods , but could not be able to find any appropriate method to execute this query.
    select dbms_xmlgen.getxml(select * from departments) from dual
    please some one help with appropriate java code to execute it.
    Thank you

    >
    I want to execute this sql query using JDBC methods , but could not be able to find any appropriate method to execute this query.
    select dbms_xmlgen.getxml(select * from departments) from dual
    please some one help with appropriate java code to execute it.
    >
    Java code? You can't execute that query at all since it is invalid. The parameter needs to be a query string NOT a query.
    select dbms_xmlgen.getxml('select * from departments') from dual See the DBMS_XMLGEN package in the docs
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_xmlgen.htm#i1013206
    >
    Converts the results from the SQL query string to XML format, and returns the XML as a temporary CLOB, which must be subsequently freed using the DBMS_LOB.FREETEMPORARY call:
    DBMS_XMLGEN.GETXML (
    sqlQuery IN VARCHAR2,
    dtdOrSchema IN number := NONE)
    RETURN CLOB;
    >
    Then you execute that query like any other query that returns a result set. The result set will consist of one row and one column of CLOB datatype.
    See the JDBC Developer's Guide - it has examples of how to execute queries that return result sets.
    And this section shows how tow read/write CLOBs
    http://docs.oracle.com/cd/B28359_01/java.111/b31224/oralob.htm#sthref755

  • How to execute Show Desktop.scf in Labview?

    Dear all,,
     Can anyone tell me how to excute Show Desktop.scf in labview?
    Regards,
    Santhosh
    Solved!
    Go to Solution.

    Hi Naveen,
    I was trying to find right command for this.
    CMD /C "C:\Documents and Settings\Username\Application Data\Microsoft\Internet Explorer\Quick Launch\Show Desktop.scf"
    This is string generated and given to command line input. (In your code)
    I did not write "/c"..I was trying with following string.
    CMD  "C:\Documents and Settings\Username\Application Data\Microsoft\Internet Explorer\Quick Launch\Show Desktop.scf"
    So close..this was something I enjoy..Try to do something new. Thanks for the solution.
    Gaurav k
    CLD Certified !!!!!
    Do not forget to Mark solution and to give Kudo if problem is solved.

  • How to implement a callback function using LabView's Call Library Function Node?

    I am trying to call a fuction from a SDK.dll library using the Call Library Function Node. The SDK was provided to
    me and I do not have the source code, just the .dll and .h files.
    The SdkSetPropertyEventHandler function has a callback fuction as one of its parameters. How do I implement the
    callback using the CLF node? I am a good LabView programmer but this is my first time using the Call Library
    Function Node. I have read all the info I can find on NI's web site and the discussion board but cannot figure
    this one out. I am using LabView 8.6.
    The SDK.h deacribes the function as:
    //  Function:   SdkSetPropertyEventHandler
    SdkError SDKAPI SdkSetPropertyEventHandler(
                SdkCameraRef                    inCameraRef,
                SdkPropertyEvent                inEvnet,          
                SdkPropertyEventHandler         inPropertyEventHandler,
                SdkVoid*                        inContext );
    //  Description:
    //       Registers a callback function for receiving status
    //          change notification events for property states on a camera.
    //  Parameters:
    //       In:    inCameraRef - Designate the camera object.
    //              inEvent - Designate one or all events to be supplemented.
    //              inPropertyEventHandler - Designate the pointer to the callback
    //                      function for receiving property-related camera events.
    //              inContext - Designate application information to be passed by
    //                      means of the callback function. Any data needed for
    //                      your application can be passed.
    //      Out:    None
    //  Returns:    Any of the sdk errors.
    A separate header file called SDKTypes.h contains the following data:
    typedef  SdkUInt32  SdkPropertyEvent;
    typedef  SdkUInt32  SdkPropertyID;
    typedef  void       SdkVoid;
    typedef  struct __SdkObject*    SdkBaseRef;
    typedef  SdkBaseRef    SdkCameraRef;
     SdkPropertyEventHandler
    typedef SdkError ( SDKCALLBACK *SdkPropertyEventHandler )(
                        SdkPropertyEvent        inEvent,
                        SdkPropertyID           inPropertyID,
                        SdkUInt32               inParam,
                        SdkVoid *               inContext );
    Thanks for your help.
    Alejandro
    Solved!
    Go to Solution.

    alejandroandreatta wrote:
    I am trying to call a fuction from a SDK.dll library using the Call Library Function Node. The SDK was provided to
    me and I do not have the source code, just the .dll and .h files.
    The SdkSetPropertyEventHandler function has a callback fuction as one of its parameters. How do I implement the
    callback using the CLF node? I am a good LabView programmer but this is my first time using the Call Library
    Function Node. I have read all the info I can find on NI's web site and the discussion board but cannot figure
    this one out. I am using LabView 8.6.
    Basically you do not do that. LabVIEW does not know pointers and certainly not function pointers. What you should do instead is writing a C DLL that implements the callback and also exports a function to be called by LabVIEW that translates between the callback and a LabVIEW user event. Look for PostLVUserEvent() here on the NI site to find examples how to do that.
    Rolf Kalbermatter
    Message Edited by rolfk on 02-11-2009 08:00 PM
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How to call the DLL functions through Java

    Hello,
    I have already got a VC++ generated DLL. It has serveral functionalities. I need to call those functions from my Java Application. Now i know that it can be possible only through writing Java JNI Interfaces.
    Everywhere i only see they give an example where in they tell to create an DLL. Now how do i will call if an DLL is ready and exists.
    If anyone can give an example then it will be very helpful to me. Please mail me at [email protected] .
    Thank you
    vvpatro

    You can't call functions in an arbitary DLL form Java. You need to use JNI to produce a 'wrapper' DLL that maps Java methods to the methods in the target DLL. The purpose of the wrapper is to allow type conversion between Java types and C/C++ types. The complexity of this task depends largely on the types used in th target DLL. If the targer DLL uses only primitive types such as char, byte, int, long, string, the translation is simple and the wrapper DLL will be 'thin'. If however, the target DLL passes arrays and objects, or employs callbacks, these more work to do, and the wrapper will be correspondingly 'thicker'.
    Hope this helps.

  • How to execute a javascript function in the body onload?

    Hi everyone!
    As you know in the HTML body attribute. You must specify the value of onload
    What is the correct sintaxis for execute a function since in the onload body?
    I only want to do some like this, but only I do it in APEX:
    <body onload ="javascript:namefunction();" >
    I do not know how to use #ONLOAD# when you using want to set some value.
    Could u help me please ?
    Any help would be very appreciated.
    Thank u in advance
    Best Regards

    Hi Chris
    Thank you for your help
    I tried with the next code but it doesn´t work.
    Do you know for what?
    Best Regards
    I paste the next code in the HTML Header :
    <head>
    <script language="JavaScript" type="text/javascript">
    function addLoadEvent(func){
    var oldonload = window.onload;
    if (typeof window.onload != 'function'){
    window.onload = func;
    else {
    window.onload = function() {
    oldonload();
    func();
    function ejecuta()
    doSubmit('ACEPTAR_R')
    addLoadEvent( ejecuta );
    </script>
    </head>

  • How to execute a system functions ??

    Hello,
    I would like to know how we can execute system functions from the command line in Java. Is there a menthod to run something like shell or anything like that to execute some command line function???
    Any help would be appreciated !!

    Runtime.exec(), but read the following first: Navigate yourself around pitfalls related to the Runtime.exec() method

  • How to execute an JS function OnRefresh or change in data of Analysis item

    Hi Friends,
    I want one my java script method to be executed when the data displayed in the Analysis Web Item is changed.
    So can any body suggest me how to achieve this.
    Thank You

    Hi.
    What do you mean exactly by "Analysis Web Item is changed" ?
    Regards.

  • Hyperlink - How to execute it action function(Java) and then JavaScript

    Hi all, I have a hyperlink in a popup window. When the hyperlink is clicked I want it's action function to be executed. This works fine, the problem is when I put java code in the hyperlink's javascript onClick() function, only the onClick() gets called and not the action function.
    I need the onClick to close the window and submit the main form and I need the action function to set some session variable.
    Thanks in advance for any replies.

    Hi, thanks to anyone that read my post. I found a solution. I removed the code from the hyperlink's javascript onClick and placed it the body onload javascript function. I also set a flag to true when the hyperlink is clicked and only execute the code in the body onLoad() when the flag is true.

  • How to execute visibroker corba functions?

    Hello
    i have application that the api is exposed throw visibroker coraba
    that mean to execute function throw the web i need to talk cobra
    is there any layer in jsb that provide me to possibility to talk with visibroker ?
    thanks

    Runtime.exec(), but read the following first: Navigate yourself around pitfalls related to the Runtime.exec() method

  • How to execute a specific function only in DEBUG and AdHoc modes

    Hi,
    What i would like to do is a simple button with an action method, This button is initialized, created, assigned to its action method and shown ONLY in Debug and AdHoc modes. So as a developer or tester, i can see the button, but in the release, the client won't be able to see that button.
    What i did so far is the following:
    -In my project-->Build Settings Tab, i set the Debug values to 1 in both Debug and Adhoc, like this:
    -Then i opened up the prefix.pch file, and there, i am blocked and i don't know what to do.
    Basically, my action method is something like this:
    UIButton btnSwitch=[[UIButton alloc]init];
    //Etc...
    The above code should be called in a specific file (The UIViewController class which should contain the button).
    How can i do that, i mean, how can i tell my application to execute that code in a specifi file only in DEBUG and Adhoc modes.
    Thanx in advance.

    Hi,
    What i would like to do is a simple button with an action method, This button is initialized, created, assigned to its action method and shown ONLY in Debug and AdHoc modes. So as a developer or tester, i can see the button, but in the release, the client won't be able to see that button.
    What i did so far is the following:
    -In my project-->Build Settings Tab, i set the Debug values to 1 in both Debug and Adhoc, like this:
    -Then i opened up the prefix.pch file, and there, i am blocked and i don't know what to do.
    Basically, my action method is something like this:
    UIButton btnSwitch=[[UIButton alloc]init];
    //Etc...
    The above code should be called in a specific file (The UIViewController class which should contain the button).
    How can i do that, i mean, how can i tell my application to execute that code in a specifi file only in DEBUG and Adhoc modes.
    Thanx in advance.

Maybe you are looking for

  • Importing to iTunes moves previously proper files to unknown folder.  Metadata missing inside of iTunes.  Help!

    I've been having problems with iTunes for a long time now and have yet to find the solution.  I store my complete library on my external hard drive.  When I import a CD into the iTunes on my Mac that had previously been imported on another computer,

  • Error "A critical error has occurred" Due Microsoft SP2 and Excel 2007

    Hi, I am not able to run a query using BEx after I'm installed the Microsoft SP2. I have 2 errors: 1.- The first has to do with the a pop up window that said creation of item text element_24 failed, it is like 24 lines similar     Then the query is o

  • Iomega 250 external hard drive - not all files show up

    Hello, I purchased a MacBook Pro last weekend. I have an Iomega 250 Gig external USB/Firewire hard drive. I have been able to connect it through USB and Firewire to my Mac. I have video clips in windows media player, quicktime and real player formats

  • Issue at change  admin password

    Hi Guys, All in my environment works well I have APEX 4.0.2 installed on a WLS 10.3.5. I have ended my developments and a user tell me that the password for the URL http://app88:37001/apex/apex_admin is not working. So I follow a note in support to c

  • Write digital output on wireless node

    hello i have wsn kit with 9791 gateway, i need to program node 3202 to write a digital output, i want to know how can i do this in labview ? do i have to write program ? what library in labview should i chose ? is it using FPGA module in labview ? i