ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use an InstanceDataPtr in a Call Library Function?

When you create a Call Library Function, you can use a InstanceDataPtr... it is explained as...

 

 

  • Instance Data Pointer—Specifies to use the Instance Data Pointer data type. The instance data pointer references a pointer sized allocation that you may use at your own discretion. This allocation is also passed to each of the callback functions on the Callbacks tab.
  •  


    I would like to know what is it useful for and how can I use it when dealing with DLLs and the Call Library Function node, but I could not fin any example using this parameter. so, if anybody can give a brief explanation and example, it would be great.

     

    Thanks.

    0 Kudos
    Message 1 of 4
    (4,573 Views)

    Hello,

     

    Would you mind describing your application and how you intend to use the Call Library Function Node within it?

     

    Thanks,

    National Instruments
    Applications Engineer
    0 Kudos
    Message 2 of 4
    (4,537 Views)

    It is an application that needs to call an external API. This API needs to create and initialize some particular variables for each Labview node calling the API... in order to be able to have more than one Labview node calling the API's functions running at once. So, I need to associate some variables to each different instance of each Call Library Function (all CLF Nodes call the same DLL).

     

    Thanks.

    0 Kudos
    Message 3 of 4
    (4,523 Views)


    Here is some information about configuring call backs. I believe this means  that you should only use this data type if you are using callbacks but I will confirm this.

     

    Regards,

    National Instruments
    Applications Engineer
    0 Kudos
    Message 4 of 4
    (4,504 Views)