Can i use malloc function while using DLL created from C program

Hi,
I have written a simple program in C , which uses malloc function for allocating memory for the array.When iam calling that DLL using call library function node in labview, it is not giving any output, my doubt is can we use malloc function in C program from which we will create DLL and is called in labview? I am attaching my C code and DLL and also labview file please tell me where i am doing wrong?
Thanks & Regards,
Vishnu
Attachments:
first.zip ‏1010 KB

Hi Vishnu,
There's no problem using the Malloc function in C and call it as a DLL in LabVIEW.
But LabVIEW has a different memory management than C.
It is probably not recommended to allocate array memory in C for labVIEW arrays
You can use initialize array in LabVIEW instead.
Good luck
Van L
NI Applications Engineer

Similar Messages

  • How to use SQL() function while writing scripts in BODS 4.0

    How to use SQL() function while writing scripts in BODS 4.0

    Hello,
    I think you want to post your question to the [Data Integration and Data Quality Management|Data Services and Data Quality; forum. This forum is for other BusinessObjects SDK development questions.
    Sincerely,
    Dan Kelleher

  • I just purchased the airport Express to use in hotels while traveling to create a wireless network from the hotels wired dsl.  A friend said to set up the network from home prior to traveling.  How do I set this up?  Thanks.

    I just purchased the airport Express to use in hotels while traveling to create a wireless network from the hotels wired dsl.  A friend said to set up the network from home prior to traveling.  How do I set this up?  Thanks.

    In addition to RyanJC's comments, the 802.11n AirPort Express Base Station (AXn) can store up to five different http://docs.info.apple.com/article.html?artnum=108081 configuration profiles. You will need to use the AirPort Utility to create & save these profiles.
    To create a new profile:
    Open AirPort Utility, select your AX from the list, and then, click "Manual Setup."
    From the AirPort Utility menu, select "Base Station," and then "Manage Profiles."
    Click "+" to create a new profile; give it a name, and then, click OK.
    Set options, such as network name, passwords, Internet connection method, etc.
    When done setting the options, click Update.
    To switch profiles:
    Open the AirPort Utility, select your AX from the list, and then, click "Manual Setup."
    From the AirPort Utility menu, select "Base Station," and then "Manage Profiles."
    Click on the desired profile, and then, click OK to apply the new profile and restart the AX.
    Just remember to switch to the desired configuration profile before removing power from the AX.

  • I am using a Application in c dll calling from jni jar by java applet in firefox version 19.0 , the problem is click event message box will not working correct

    I am using a Application in c dll calling from jni jar by java applet in firefox version 19.0 , the problem is button click event message box or popup window will not working correctly. Please any one suggest me the steps to overcome this not responding or slowness in the responding problem of Button click event.

    Hello,
    In Firefox 23, as part of an effort to simplify the Firefox options set and protect users from unintentially damaging their Firefox, the option to disable JavaScript was removed from the Firefox Options window.
    However, the option to disable JavaScript was not removed from Firefox entirely. You can still access it from about:config or by installing an add-on.
    '''about:config'''
    # In the address bar, type "about:config" (with no quotes), and press Enter.
    # Click "I'll be careful, I promise"
    # In the search bar, search for "javascript.enabled" (with no quotes).
    # Right click the result named "javascript.enabled" and click "Toggle". JavaScript is now disabled.
    To Re-enable JavaScript, repeat these steps.
    '''Add-ons'''
    You can alternatively install an add-on that lets you disable JavaScript, such as
    *[https://addons.mozilla.org/firefox/addon/noscript/ No-Script] (to disable JavaScript on a per page basis, as required)
    *[https://addons.mozilla.org/firefox/addon/quickjava/ QuickJava] (to easily disable and enable JavaScript, automatic loading of images, and other content)
    Thank you and I hope this helps!

  • Shutdown ports that is not in use for a while using LMS 4.x

    Hi,
    Is there a way to disable switch ports that has not been in use for a while using LMS 4.x
    Your assistance would be much appreciated.
    Regards,
    Clifton

    Hi,
    Is there a way to disable switch ports that has not been in use for a while using LMS 4.x
    Your assistance would be much appreciated.
    Regards,
    Clifton

  • HI,Can anybody pls explain me, while extracting database table from sap-r/3

    HI,Can anybody pls explain me, while extracting database table from sap-r/3 to sap-bw using GENERIC DATA SOURCE it will ask us Name of the APPLICATION COMPONENT what does it means?

    Application Component is a collcetion of tightly coupled S/W component. You can think of it is like folder, where all the related S/W will be put in. Like MM will have all the DS related to MM.
    Thanks..
    Shambhu

  • Calling C Functions in existing DLL's from Java

    Hi Guys ,
    The tutorial in this site talks about creating ur own DLL's and then calling them from Java . I need to call C functions in existing DLL's from Java . How do I go about doing this ? . Any help on this would be much appreciated.
    regards
    murali

    What you are interested in can be done with what's called "shared stubs", from the JNI book (http://java.sun.com/products/jdk/faq/jnifaq.html), although you don't need the book to do it (I didn't).
    The example code will call functions with any number and kind of parameters, but doing that requires some assembly language. They supply working examples for Win32 (Intel architecture) and Solaris (Sparc).
    If you can limit yourself to functions to a single function signature (number and types of parameters), or at least a small set that you know you'll call at compile time, you can modify the example so that the assembly language part isn't needed, just straight C code.
    Then you'll have one C library that you compile and a set of Java classes and you can load arbitrary functions out of arbitrary dynamic libraries. In my case you don't even have to know what the libraries and functions are ahead of time, the user can set that up in a config file.
    You mentioned doing this with Delphi. One thing to watch out for is C versus Pascal (Win32) function calling convention. A good rule of thumb; if it crashes hard, you probably picked the wrong one, try the other. :-)

  • Using numbers for roster information. Imported from another program. Now seem to have extra headers, one listing name, address, etc.

    Using numbers for roster information. Imported from another program. Now seem to have extra headers, one listing name, address, etc. & another A, B, C. They don't mesh & can't get rid of either. All info there, but can't change width of columns.

    I think my problem is that I have inadvertently created three tables (I only want one). I have included a screen shot of the light grey line under B and the words Table 1 behind it.

  • Can a PDF of an Indesign doc be created from Bridge CS3

    Can a PDF of an Indesign doc be created from Bridge CS3 without opening the Indesign file; and retain version cue version info as you would "page information", using an "Adobe PDF Preset" ?

    Hi Willi:
    Thanks for your prompt response.  Do you know if there are any scripts that can do this or at least help automate some of this process?
    Thanks!
    Kevin

  • Can I increase the resolution in a jpg created from an imovie clip?

    Can I increase the resolution in a jpg created from an imovie clip? I've done the steps to create/extract a "still" from an iMovie clip (which started as a small clip in iphoto). I did the steps of creating the freeze frame, and then doing a "screen shot", but the resolution is only 97 kb, so it won't be good to print. Help!

    Klaus1 wrote:
    … Of course you can, and it will look great from about 2km away.

  • After the most recent firefox update I can no longer copy and paste. the fuinction only works in Windows and I HATE usign it. Any suggestions on how to restore the copy and paste function while using Mozilla?

    I have been unable to use the copy and past command while using mozilla. the fucntion does work in windows IE, but I don't want to use windows. How do I restore or fix this function? I varies, works some days and not others.

    See http://kb.mozillazine.org/Clipboard_not_working
    Try to use the keyboard if the buttons on the web page aren't working.
    * Copy: Ctrl+C or Ctrl+Insert
    * Paste: Ctrl+V or Shift+Insert
    * Cut: Ctrl+X or Shift+Delete

  • Regardin handling exception in a function, while using that function in sql

    Hi gurus,
    I have a question regarding logging exceptions while using functions.
    I wrote a separate package to handle errors, where i have a procedure.
    In this proc i'm logging my error into a table and then raise the error to the front end.
    Ex:
    proc_log_and_raise    -- this proc... inserts my error into a table and then raisenow i included this error procedure in all functions and procedures.
    consider an example with a sample procedure and function.
    function func_1(( v_var   varchar2) return varchar2 is
    begin
         select   column2
         from     table2
        where col1 = v_var;
    exception
        when others then
             proc_log_and_raise;
    end;  
    procedure proc_1( v_var   varchar2) is
    begin
        select   func_1(v_var)  -- error occurs here..
        from     table_a
        where   col1 = v_var;
    exception
        when others then
             proc_log_and_raise;
    end;    now i do
    exec  proc_1( v_var );but now my problem is, when an error occurs in func_1, i'm getting an error with DML operation ( as we are inserting into error table)
    ORA-14551: cannot perform a DML operation inside a query.
    so what i want to do is, log both function and procedure where error occured.
    So is there any other better way, we can write our exception handling, so that i can log error and use function in a select statement.
    thank you.

    I changed my procedure a little, to make it simple.
    FUNCTION        PKG_WEEKLY.FUNC_1
                RETURN NUMBER IS 
                exc exception;
    BEGIN                         
                raise exc;
                RETURN           v_provr_rcoupt;
    EXCEPTION
                when exc then
                            PKG.PKG_ERROR.USP_LOG_AND_RAISE(
                                        'batch_1',
                                        'func_1',
                                        SQLCODE,
                                        DBMS_UTILITY.FORMAT_ERROR_STACK || DBMS_UTILITY.FORMAT_ERROR_BACKTRACE()); 
    END FUNC_1;     
    PROCEDURE    PKG_WEEKLY.PROC_1(
                cur_details                                OUT      sys_refcursor) IS
    BEGIN
                OPEN cur_details FOR
                SELECT            NVL(PKG.PKG_WEEKLY.FUNC_1,0))    FROM DUAL;
    EXCEPTION
                WHEN OTHERS THEN
                            REPORT_APP_PKG.PKG_REPORT_ERROR.USP_LOG_AND_RAISE(
                                        'batch_1',
                                        'PROC_1',
                                        SQLCODE,
                                        DBMS_UTILITY.FORMAT_ERROR_STACK || DBMS_UTILITY.FORMAT_ERROR_BACKTRACE());  
    END PROC_1; Now i execute it.
    exec PKG_WEEKLY.PROC_1(:cursor); Error logged into the table:
    242 batch_1 func_1 ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "REPORT_APP_PKG.PKG_REPORT_WEEKLY_CAO", line 230
    04/14/2009 16:09:25
    ERRORS displayed to the front end:
    ORA-20156: ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "PKG.PKG_WEEKLY", line 230
    ORA-06512: at "PKG.PKG_ERROR", line 48
    ORA-06512: at "PKG.PKG_ERROR", line 226
    ORA-06512: at "PKG.PKG_WEEKLY", line 261
    thank you

  • Can I use my iPhone while using it as a hotspot?

    CCan I use my iPhone while it is being used as a hotspot?

    Yes if your cell provider supports it.

  • Can't Syc to AppleTV while using iMac Firewall

    I am unable to sync from my iMac to AppleTV while I have the Firewall activated on the iMac. I read where you are supposed to be able to choose "AppleTV" to add to the "exceptions" list on the iMac Firewall settings page, however, since updating to OSX version 10.5.4, the AppleTV exception is no longer an option to add to the list. Is there any way I can sync to Apple TV without having to disconnect from iMac's firewall every time I want to sync?

    I have tried two different settings. In OSX 10.5.4 the options are 1.) Allow All 2.)Allow Essential Services Only (to which I have added iTunes) and 3.) Allow Specific Services & Applications (also to which I have added iTunes). Neither the "Allow Specific...", nor the "Allow Essential..." lets me sync to the AppleTV. I get the "3689" error message with both. I do not have security of any type enabled on my router and am not aware of any other security unless my iMac came with something else from the factory I'm not aware of. To sync to the AppleTV, I have to "Allow All Incoming Connections" or it's a no-go.

  • How does one use Sound sticks while using HDMI at the same time ??

    How does one use Soundsticks while using HDMI at the same time ??

    Hi Caleb,
    This isn't a precise answer but a possible workable solution. SoundSource puts a menu extra which allows you to switch input/output and has an option for Auto-Switch to Headphones. The auto-switch feature doesn't work with USB headphones but I believe it will with 'regular' headphone plugs such as you use.
    http://www.rogueamoeba.com/freebies/
    (Oh, did I mention it's free Universal and works with Leopard?)

Maybe you are looking for