MIDI in using DLL callback function

I am trying to get MIDI into LV. The dll used is winmm.dll and the function midiinopen (plus others) is described here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_midiinopen.asp
The main problem is I don't know how to program the Call Library Function Node properly in order to perform the call
plus set it to start receiving callback data, being midi messages. I have tried creating and registering a User Event and
passing the Event ref to the dll's "dwCallback" and then trapping the callback in an Event Structure, but nothing happens.
I have studied the "Communicating with a Windows MIDI Device in LabVIEW" example but it gives no hint since midi out
does not require the use of callbacks.
Please advice,
Stefan

Vedeja wrote:
I am trying to get MIDI into LV. The dll used is winmm.dll and the function midiinopen (plus others) is described here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_midiinopen.asp
The main problem is I don't know how to program the Call Library Function Node properly in order to perform the call
plus set it to start receiving callback data, being midi messages. I have tried creating and registering a User Event and
passing the Event ref to the dll's "dwCallback" and then trapping the callback in an Event Structure, but nothing happens.
Damn! Need to make this post shorter as this message
board just silently told me that it needs to be shorter than 5000 words
and ate up my lengthy repsonse with no way to get it back.
You can't configure a Call Library Node to pass a Callback function to
another function. Callback functions have been alien to LabVIEW for a
long time with good reasons and what it has now as callback function in
LabVIEw 7.1 and newer is not directly compatible with C callback
functions.
Basically as you want to get data from the callback function back into
LabVIEW there is really no way around some intermediate software layer
which in this case almost surely means your own specific wrapper DLL
written in C.
If you use LabVIEW 7.1 you could use user events but not in the way you
describe. Attached is an example of how you can use user events from
external code. Note the extra DLL you will have to write. You have to
watch out what data you pass back to the user event as it has to match
exactly the type you configured the user event for, otherwise LabVIEW
will simply crash on you.
For numerics this is quite simply and also shown in the example. For
strings you can't just pass back a C string pointer but you will have
to allocate a LabVIEW string handle with
handle = DSNewHandle(sizeof(int32) + <length of C string>)
and then copy the C string into it. For specifics about how to do this
you should refer to the External Code reference manual in your Online
Bookshelf. Similar rules apply for arrays or clusters for that matter.
If you want or need to do this for LabVIEW < 7.1 there are two
possible approaches but both are even less trivial. You could either
create a wrapper DLL that translates your callback events into LabVIEW
occurrences and for the data transfer back to LabVIEW you would have to
implement your own queing too, or you could use the Windows Message
Queue example somewhere here in the NI examples and adapt it to return
your specific data. That would solve the data queueing more or less for
you without having to worry about that.
Rolf Kalbermatter
Message Edited by rolfk on 05-22-2006 11:22 AM
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions
Attachments:
userevent.zip ‏27 KB

Similar Messages

  • Import dll callback function

    Having trouble with this line "void   (*m_callback)(_t_pciCommand *cmd);" in PciApi.h file. I have replaced it with NULL and was able to import 2 functions, PciAllocCommand and PciSendCommand. I was then able to get valid information using GetValueByPointer.VI, but crash most of the time.
    typedef struct _t_pciCommand
                    t_pciCommandType                      m_command;
                    t_commandError                          m_error;
                    long                                               m_gpVal;
                    void                                                (*m_callback)(_t_pciCommand *cmd);
                    long                                              m_param[MAX_PCI_PARAMS];
                    int                                               m_state;
                    int                                               m_retries;
                    int                                               m_expected;           
                    long                                            m_origParam[MAX_PCI_PARAMS];
    } t_pciCommand;
    All files attached. Based on this callback funtion, I can't seem to resolve 2 functions, called PciAllocCommand and PciSendCommand.
    Thanks,
    John
    Solved!
    Go to Solution.
    Attachments:
    PciApiDll7.zip ‏630 KB

    The manual is "pci_api_manual_jb.doc", The funtion I care most about is PciAllocCommand and the #1 issue I have is how to pass "m_param[0]" , "m_param[1]" and "m_param[2]" to the dll. The original h file is "PciApp(original).h" . The second issue would be if removing the callback functionality I need a VI to poll the status of "t_PciCommand "Function without writing to it.
    For example, PciAllocCommand(c_baudrate, NULL, 0). How do I set baud = m_param[0]?
    Also I am adding a TestApp.exe example of what I want to do in Labview, focusing on the Param1 and Param2
    Attachments:
    PciApiDll7.zip ‏630 KB
    TestApp.zip ‏67 KB

  • 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]

  • Issue using DLL / library function node

    Hi All
    I am using labview 8.2 / 8.0
    I am writing a wrapper DLL to convert compex data types of a DLL to simpler ones for labview intefacing.
    I have read the forums on all related items and could not find a solution.
    I have cut my code back to basics and I am still getting error 1097 with 8.2 and a crash with 8.0
    The error occurs as follows:
    1) Start labview, open the vi.
    2) Run vi - everything works (so far the wrapper DLL I am writing call just does a simple open handle and close handle on a driver dll).
    The handle is passed back to the vi, and everything is good.
    I can re-run the application numerous times and it always works
    3) IF I close the vi, but not labview and re-open I get the following:
    Labview 8.0 crashes on closing the vi
    Labview 8.2 does not crash, but I get error 1097 if I re-open and run the vi.
    So it seems like it's almost working but the issue comes on the release of the dll from one invocation of the vi to another.
    I don't know what the error is, but I've tried everything I can think of! Any suggestions would be appreciated!
    Note: I am not passing any arrays at the moment, but I am passing one unsigned 32 bit int pointer. I declare a constant for this in the call, so there is something for the pointer to use, and it seems to return the data ok.

    Hi Kaem,
    Thanks for your reply.
    I have written C++ standalone programs that link to the DLL and these work fine. I have even called my wrapper DLL from a C++ program and that too works fine (just to check if the wrapper would cause issues there). I have a hunch that it is actually the DLL that my wrapper is 'wrapping' that is causing the issue, but I guess I don't know for sure.
    The difference (IMHO) is that these C++ programs all run through once and then exit, so everything works fine. However if they load the DLL and unload it and try to load it again, maybe there would be an issue. I think labview is doing this.
    The reason I think labview does something funny with the DLL after you exit a VI (but not labview) is because labview crashes in 8.0 when the VI is closed (8.2 is ok, but the next DLL invocation fails when the VI is reopened), so something must be happening at this point - and I think it's an ungraceful unload of the DLL.
    Also, I've noticed that I cannot overwrite my wrapper DLL with a new version until I exit a VI - so labview is definitely doing something on VI close - it's releasing some lock on the DLL.
    I don't use any consts in my code  - sorry if I indicated that. What I have is a U32 constant in labview, and I connect that to the input of  the library function node, and pass it as a pointer. And the DLL writes into this then. Are you saying that a labview constant cannot be used as an input to a function and passed as a pointer ? What should I use instead, a control?
    Note: while writing - I just tried that - same error -  so I don't think this is it.
    I'm willing to take any and all suggestions!!
    Cheers
    John

  • Error raised when using a CallBack function on a Richtextbox

    Hi,
    I am using a RichTextBox with a Callback VI attached to the Keypress event.  Everytime I cause the kepress event to go off I get the attached error.
    I have created a small project to demonstrate the issue, also attached.
    I'm running Labview 2009 but have seen the issue on other version as well.
    Any ideas on what is causing the error would be most useful.  Have not implemented the CallBack VI correctly or is there some other issue I need to be aware of?
    Thanks
    Attachments:
    Error message.png ‏24 KB
    RichTextBoxCallback.zip ‏23 KB

    Hello Ruffdi,
    In order to get your 8.5 code to work as intended, you should wire the RichTextBox reference to your User Parameter input on the Event Callback (see pic below), and you should see the "KeyPress Detected" appear on your front panel.
    Also, make sure you add a little delay in your while loop, and a Close Reference function at the end of your code right after the while loop, to close the reference you open with the RichTextBox.
    I hope this helps for now, as I cannot find a workaround to the issue we are seeing in LabVIEW 2009.
    Let me work on this slightly more and see what we can do.
    smercurio_fc, thank you kindly for all your help so far, it is much appreciated.
    Kind Regards,
    Michael S.
    Applications Engineer
    NI UK & Ireland

  • Trouble retrieving Button value when using OnPlotAreaMouseUp() Callback function

    I'm using an NiGraph control and have set it up for the OnPlotAreaMouseUp event. I get to the OnPlotAreaMouseUp() callback fine, but the *Button value is always set to 0, and therefore I cannot ascertain which mouse button has been released. The *Shift value seems to work fine however.

    This appears to be a bug in the current version of the graph - I will log a bug report about this issue. The button parameter is set correctly in the PlotAreaMouseDown event, so for now you could work around it by caching the button value in the PlotAreaMouseDown event and evaluating the cached value in the PlotAreaMouseUp event.
    - Elton

  • Need an example how to use SCAN_Start with a callback function

    I would appreciate if someone helps me with a working example of how to use SCAN_Start with a callback function. I need just a basic functionality: to specify a channel list (with gains probably), to start a data acquisition task and to receive data buffers utilizing a callback function. t this time whatever I was trying to do caused computer hangups, though it is supposed to be one of the most regular tasks to perform.
    Thank you in advance,
    Mike

    Hello Mike,
    Thank you for contacting National Instruments.
    Attached is an example project which uses a callback function to begin analog acquisition (AI) by calling SCAN_Start. This project acquires from the first 2 channels on your DAQ device. Make sure to modify the device number in the code to match the number of your card.
    Let me know if you have any further questions...
    Sincerely,
    Sean C.
    Applcications Engineer
    National Instruments
    Attachments:
    Acquire_multichannel_61xx.zip ‏11 KB

  • I am trying to write a double buffered data acquisition program using MFC and a callback function.

    i am trying to do a double buffer data acquisition using MFC application framework in Visual Studio.i want to use a callback function to notify when the buffer is half full.do you have some sample reference program that can help me?

    What DAQ board are you using? When you installed NI-DAQ you should have selected to install the support files for VC++. Then there will be several examples on how to do double buffered data acquisition.
    If you have already installed NI-DAQ 6.8 or higher and did not select to include the support files, you can run the NI-DAQ setup program and just add them. If you are using an older version, you will have to uninstall and reinstall.
    Once you have the support files, follow this path to the examples.
    >>Program Files>>National Instruments>>NI-DAQ>>Examaples>>Visual C>>
    If you are doing digital acquistion, goto the di folder, if you are doing analog acquisition goto the ai folder.
    As for the callback function, you can use the NI-DAQ function Config_DAQ_
    Event_Message with DAQEvent Type = 1, where N would equal half your buffer.
    Brian

  • In VB6, why is the "GPIBNotify sub" (from the GPIBNotify AtiveX Ctrl) all the time called even if no Event happened? This callback function is started then stopped permanently as if its received SRQ from the GPIB Bus. Any ideas?

    I'm programming in Visual Basic 6 to communicate between a computer and HP Measurement Devices (BER-Meter) with GPIB. I have already read information and code for this. My platform is W98. The NI488.2 commands can be sent without any problem between the equipements. However when I'm using the GPIBNotify ActiveX Control to use the callback function, there is a permanent starting and stop of the GpibNotify Sub. The SetupMask and RearmMask are set to RQS and the HP Device is well configured. Moreover an oscilloscope measuring the 10th line (SRQ
    ) of the bus didn't show any pulse on the line behalf the right one. Any Idea?

    Hello-
    So, the SRQ is not detected by the oscilloscope? It must be a setting that is not correct with the instrument. Try contacting the manufacturer of the instrument for details about SRQ's. The GPIBNotify ocx will not be able to react to an SRQ if there isn't one.
    Randy Solomonson
    Application Engineer
    National Instruments

  • How do I pass a com object to a callback function

    I am trying to program the PCI-6527 card within a COM object. With the DIG_Change_Message_Config command I'm setting the notification for when the input signal changes using a callback function. To make the callback function work I have to declare that function as a static member of the object class. This means that I have no access to the this pointer in this function. After I receive the notification, my actions in the callback function depend on settings in member variables in the class. MSDN gives as a solution to pass the this pointer as an argument to a static member function to have access to the class. I've tried this but the compiler keeps barfing at me.
    The code used is:
    stat = DIG_Change_Message_Config(
    m_CardNum,1, msg,"",0,0, (unsigned long)DealWithInput );
    with DealWithInput defined as: static void DealWithInput();
    Is there a way of getting access to the class in DealWithInput either by passing it as an parameter or through some other ingenous trick that I can't find documentation for

    The thing is that you cannot change the parameters of the callback functions. It is always :
    void yourCallbackFunc (DAQEventHandle handle,
    DAQEventMsg msg,
    DAQEventWParam wParam,
    DAQEventLParam lParam);
    When yourCallbackFunc is called back, all the parameters get filled in the calling function in DAQ driver. What you have to do is pass the this pointer in message parameter in DIG_Change_Message_Config function, so that whatever you pass in message gets passed back in your callback function. Message can be any type.

  • Notification custom callback function

    Hi,
    I want use a custom callback function instead of the default wf_engine.cb.
    Can someone tell me how to proceed?
    Thanks.

    Hi Dany,
    Is your scenario is where you have a custom application and want to complete that application process using the callback function? In such cases, you should be using the callback function.
    You should the Notification APIs to send such notifications. The Notification Send API includes a parameter for the Custom Callback function.
    The Notification API section of the workflow guide also documents the signature and other details of a custom callback function.
    Workflow also provides a Post Notification Function api which could perform back-end logic to either validate the legitimacy of the forward/transfer or execute some other supporting logic.
    Hope this helps,
    Raja

  • How to access Call Back Functions using *.dll in the Labview?

    Hai,
    I am Pavan Ram Kumar Somu.
    I am new to Labview, currently I am working on MVB Interface.
    I need to access the API functions from *.dll file in Labview, as of now , I am doing this with Call function Library node in Labview but it does not support the following data types like
        1. Pointer Arguments(To which memory it points in Labview)
        2. function pointers Arguments
        3 .pointers in structures and pointer structures in structures and many other data types.
    Please Answer the below queries also:
    1. How to pass pointer arguments to API functions in DLL and how to collect pointer  
        return types from API functions in DLL
    2. How to pass structure arguments to API functions in DLL and how to collect structure
        return types from API functions in DLL
    3. How to use callback functions(nothing but function pointers) in Labview and how to
        collect callback fuctions return types from API functions in DLL
    I need your help while passing these datatypes to API functions in DLL from labview.
    Suggest me if there is any other alternative for implementing this task.
    I am referencing some examples here:
    Examples:
    I)
    Unsigned short int gf_open_device(void *p_device_config, unsigned long int client_life_sign_timeout, unsigned short int *device_error)
    void *p_device_config: How to access/pass these arguments in LabView and to which memory location it points in LabView.
    II) #include <windows.h>
         #include <process.h>
         HANDLE rcvEvent0, rcvEvent1;
    /* Function call*/
    CanGetReceiveEvent(handle[0], &rcvEvent0);
    Above is a piece of C code, Now I want to use HANDLE datatype which is windows based, how to use these type in the LABVIEW.
    With regards
    Pavan Ramu Samu

    "Somu" <[email protected]> wrote in message news:[email protected]...
    Hai,
    I am Pavan Ram Kumar Somu.
    &nbsp;
    I am new to Labview, currently I am working on MVB Interface.
    &nbsp;
    I need to access the API functions from *.dll file in Labview, as of now , I am doing this with Call function Library node in Labview but it does not support the following data types like
    &nbsp;&nbsp;&nbsp; 1. Pointer Arguments(To which memory it points in Labview)
    &nbsp;&nbsp;&nbsp; 2. function pointers Arguments
    &nbsp;&nbsp;&nbsp; 3 .pointers in structures and pointer structures in structures and many other data types.
    &nbsp;
    Please Answer the below queries also:
    &nbsp;
    1. How to pass pointer arguments to API functions in DLL and how to collect pointer&nbsp;&nbsp;
    &nbsp;&nbsp;&nbsp; return types from API functions in DLL
    &nbsp;
    2. How to pass structure arguments to API functions in DLL and how to collect structure
    &nbsp;&nbsp;&nbsp; return types from API functions in DLL
    &nbsp;
    3. How to use callback functions(nothing but function pointers) in Labview and how to
    &nbsp;&nbsp;&nbsp; collect callback fuctions return types from API functions in DLL
    &nbsp;
    I need your help while passing these datatypes to API functions in DLL from labview.
    &nbsp;
    Suggest me if there is any other alternative for implementing this task.
    &nbsp;
    &nbsp;
    I am referencing some examples here:
    Examples:
    I)
    Unsigned short int gf_open_device(void *p_device_config, unsigned long int client_life_sign_timeout, unsigned short int *device_error)
    &nbsp;
    void *p_device_config: How to access/pass these arguments in LabView and to which memory location it points in LabView.
    &nbsp;
    II) #include &lt;windows.h&gt;
    &nbsp;&nbsp;&nbsp;&nbsp; #include &lt;process.h&gt;
    &nbsp;&nbsp;&nbsp;
    &nbsp;&nbsp;&nbsp;&nbsp; HANDLE rcvEvent0, rcvEvent1;
    &nbsp;
    /* Function call*/
    CanGetReceiveEvent(handle[0], &amp;rcvEvent0);
    &nbsp;
    Above is a piece of C code, Now I want to use HANDLE datatype which is windows based, how to use these type in the LABVIEW.
    &nbsp;
    With regardsPavan Ramu Samu
    Search the forum (forums.ni.com) for callback, pointer or handle, and you'll find that it is all possible, but not very easy.
    e.g.: http://forums.ni.com/ni/board/message?board.id=170&message.id=88974&requireLogin=False
    Regards,
    Wiebe.

  • 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

  • External Function with a Pointer to a Callback Function Inside a DLL

    Hi.
    I'm loading a DLL and trying to call a function with the following prototype:
    Func1(HANDLE, hHandle, LPVOID (*pCallback)(UINT, UINT LPVOID), CHAR* sPath)
    Now, I have no problem with the variable types, because CVI 9.0.1 recognizes all of them and I have no problem with LoadLibrary() nor with GetProcAddress().
    But, how do I pass a pointer to a callback that is inside the DLL I'm trying to use.
    I've tried to declare the callback like this:
    LPVOID (CALLBACK Callback)(UINT iDevNo, UINT evEvent, LPVOID pData);
    and call the function Func1 like this:
    (Func1)(hHandle, &Callback, NULL);
    but this gets me:
     Undefined symbol '_Callback@12' referenced in "source.c".
    Hope I can get some help.
    I appreciate your time on this issue.
    Regards.
    Daniel Coelho
    VISToolkit - http://www.vistoolkit.com - Your Real Virtual Instrument Solution
    Controlar - Electronica Industrial e Sistemas, Lda
    Solved!
    Go to Solution.

    Hi Daniel,
    First, you have to make sure that the callback function is exported by the DLL, so that the program that uses the DLL can access the function name identifier. Then, you have to make sure that you call GetProcAddress not just on Func1, but also on the exported callback function. You need to store both function address values in their respective function pointers. You then can pass the callback function pointer as an argument to the Func1 call.
    It's probably cleaner if you define typedefs for all your function pointers, in the calling program:
    typedef LPVOID (__stdcall *CallbackType) (UINT , UINT, LPVOID);
    typedef ??? (__stdcall *Func1Type) (HANDLE, hHandle, CallbackType, CHAR*);
    CallbackType     CallbackPtr;
    Func1Type        Func1Ptr;
    dllHandle = LoadLibrary ("...");
    CallbackPtr = (CallbackType)GetProcAddress (dllHandle, "Callback");
    Func1Ptr = (Func1Type)GetProcAddress (dllHandle, "Func1");
    Func1Ptr (..., hHandle, CallbackPtr, NULL);
    Boa Sorte!
    Luis

  • Using call library function on a dll file created in an old version of labview

    So I'm trying to update an old labview program to work in labview 2012. Everything converted over just fine but labview will always crashoverwrote some while using a  library function in a DLL that was compiled using labview 8.5. Labview exits, stating that it vital memory area. It passes an array of data to the library call and an empty array for output. I thought I could get around this problem by changing my code to initialize the array being passed in so that it would be large enough to hold all the expected output. Now instead of overwritting areas of memory it shouldn't, I get a pop up message that says:
    fatal internal error
    memorymanager.cpp line 406
    8.5.1.f5 
    So it appears because I don't have the ability to recompile the DLL file it runs off of the 8.5 runtime instead of the more recent one. Is there any thing I can do about this?

    rjpierce wrote:
    So I've been trying to figure out a way around this on my own while waiting on a response. From what I'm reading, a dll created in one version of the labview runtime can't be used by a different labview runtime. Am I correct in this? I feel like I must be mistaken since that's basically the opposite of how a dll should work. If nothing else works I have access to the original code for the DLL but it requires the control and simulation toolkit. I would like to avoid having to recompile the DLL since it was put in to a DLL to avoid the need for the toolkit to begin with. 
    Your problem most likely is that you try to pass native datatypes to the DLL function? That only can work if the caller and callee use the same LabVIEW runtime engine. Otherwise the memory block created in the memory manager of the caller will be accessed by the memory manager in the callee and bad things happen. Instead you should define the DLL function to use standard C datatypes (Pointer to C array) and also make sure to allocate the according buffer in the caller for all output array parameters.
    An even more elegant way would be to completely abandon the DLL approach and call the according functions directly in LabVIEW. Then you won't have the problems about mismatched runtime engines. Passing C array pointers to a DLL is less performant than passing native datatypes, but if you use native datatypes you have to make sure the DLL is compiled in the same LabVIEW version as the one you call it from.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

Maybe you are looking for

  • Output of Quicktime File from FCP 7 for iDVD

    I just finished a client project using FCP 7 and he seems to have issues doing the following (on a MacBook Pro): 1) Placing the file on the main hard drive 2) Importing to QuickTime, or iMovie, iDVD Ideally, my client would like to have the ability t

  • Problem in Saving Image Code

    Hi, I'm been dealing with this code that should be saving an image as a JPEG format. public static void saveAsJPEG(RenderedImage image, String file) throws java.io.IOException { String filename = file; if(!filename.endsWith(".jpg")) filename = new St

  • New install HTMLDB in 9.2.0.2 - no access

    I started with a new 9.2.0.4 instance on Redhat and installed HTML DB from a Windows client. Install log list no unusual issues, but trying to go to http://host:7777/pls/htmldb gives the following error: Service Temporarily Unavailable The server is

  • Is it possible to have the "lock screen" stay lit up while I am charging my iPhone 4S?

    Is is possible to have the "lock screen" stay lit up, and not go dark, while I am charging my iPhone 4S?  I would like to turn off the sounds and vibrate but still be able to see the clock and see if any new messages come in. Also, is there a setting

  • Does the Environment Results show IP phones?

    I am running the Microsoft Assessment and Planning toolkit on my company's network and I had a simple question about it. I have hundreds of IP phones throughout the building and I was wondering if it's possible that they are showing up on the report.