Can't step into CVI step that calls LabVIEW DLL?

Windows 2000 SP1
TestStand 2.01f
LabWindows CVI 6.0
LabVIEW 6.1 Runtime
We have a framework based on TestStand and CVI. A customer has supplied us
with a DLL written in LabVIEW 6.1 and packaged with the Application Builder
that we need to call from a CVI test library DLL. They say they can't
supply us with a non-LabVIEW implementation. We installed the LabVIEW 6.1
run-time. We added code to the CVI test library to dynamically load and
unload the LabVIEW DLL using LoadLibrary and FreeLibrary. LoadLibrary is
called in a function in the MainSequence Startup step group, FreeLibrary is
called in a function in the MainSequence Cleanup step group.
Things run as expected when the CVI DLL is built as Release or Debug and the
CVI
adapter is configured to run in-process.
However, if we try to debug CVI DLL by building it as Debug and configuring
the CVI adapter to run in an external instance of CVI, things hang the first
time we try to step into, or run, a CVI test library step that calls one of
the functions in the LabVIEW DLL. On the Applications tab in Task Manager,
the item named LabVIEW is marked as 'Not Responding'. The only way to
recover is to kill the LabVIEW process, which takes down CVI and TestStand
with it. If none of the LabVIEW DLL functions are called, no problems are
seen (no hang).
I assume the problem has something to do with the library getting mapped to
the wrong process space (TestStand v. the external CVI instance). Is there
any way to solve this problem? Any ideas or suggestions would be
appreciated.
Joe

> Out of curiousity, what happens if you attempt to debug your DLL from
> CVI? For example, configure TestStand to run its steps 'inProcess'...
> but then close the TestStand application and in CVI, configure it so
> that the Specified External Process dialog points to TestStand's
> SeqEdit.exe (CVI launches TestStand when debugging the project). Once
> TestStand is running, run your test and set your break points as
> usual, you should be able to step into the CVI code if nothing else.
> If not, I would be interested in hearing what problems you encounter.
When 'debugging' SeqEdit from CVI, we experienced no lock up.
Thanks for this suggestion. Debugging from CVI is a workaround for now,
though not highly desirable as it is reverse from normal debug proc
edure
(user can't step into CVI from TestStand). Still would like to know if
'normal' debugging of this problem is possible.
> The nice thing about debugging directly from Labwindows/CVI while
> TestStand runs 'inprocess' is that you can avoid some library linking
> errors, which may be the source of the troubles you are seeing.
The problem appears to be general to LabVIEW DLLs called from an external
instance of CVI under TestStand. We were able to reproduce the problem with
a simple LabVIEW VI compiled to a DLL, then called from a simple CVI DLL
under TestStand. We will package up some sample code and submit it to NI
tonight or tomorrow.
Thanks for you help.
Joe

Similar Messages

  • Problem in using Step into and Step Over button in Test Stand user interface development.

    hi,
    I am developing operator interface in VC++
    currently I am facing a problem, I have created Teststand UI button controls dynamically on the dialog, I have assigned the buttons for break, Resume, Break all, Resume all, Step into and step over.
    Break, Besume, Break all , Resume all buttons are working fine, the Step into and step over buttons are enabling if I break the execution, but after breaking the execution when I click the Step into button I expect that the current step will be executed and, breaks at the next statement, but when I click the Step Into button It is behaving like resume button, I mean the executioin is going on till the end of the sequence file, it is not breaking at the next statement,
    Is my Step into button working the way it is supposed to be?, it is the same case with my step over button alsoI am connecting the TSUI button control to the execution view mgr in the  CTestExecDlg:nDisplayExecutionApplicationMgr(LPDISPATCH exec, ExecutionDisplayReasons reason)
    message funciton , and nothing I am doing nothing else, this is my code statement how I am connecting the button to the execution view manager. 
    mExecutionTab.m_pControlPtrArray[0].mExecutionViewMgr->ConnectCommand(mExecutionTab.MiscControls.m_StepInto,CommandKind_StepInto,0,CommandConnection_NoOptions);
    mExecutionTab.m_pControlPtrArray[0].mExecutionViewMgr->ConnectCommand(mExecutionTab.MiscControls.m_StepOver,CommandKind_StepOver,0,CommandConnection_NoOptions);
    Am I missing anything wrong? Can anyone please help me out.

    Al B,
    I'm not the original author of this post, but I have encountered a similar problem.  My C# application has implemented the following "debug" buttons that work just fine: Run All, Pause, Continue, Stop.  But my Step Over button causes the Sequence to run to completion.  When the user clicks on the StepOver button, only one line is executed:
              this.axExecutionViewMgr.Execution.StepOver();
    but it behaves like its calling
              this.axExecutionViewMgr.ResumeExecution();
    Can you offer any insight into this issue?

  • How to call labview DLL from C#, passing char, char[], float[], long, short

    Hi,
    I'm having trouble calling labview dll from C# to perform certain function.
    The function supposed to return the values in the float Analysis[] array. However, when I execute it it only returns zero values.
    It seems that some parameters are not properly passed to the dll.
    Below is the function in the header file:
    void __stdcall Optical_Center(char FileDirectory[], long ImagePtr,
        short int Height, short int Width, char ReadFromFile, float Analysis[],
        long lenAnalysis);
    and my corresponding dll import in c#:
    [DllImport(@"SMIA.dll", CharSet = CharSet.Ansi)]
            public static extern void Optical_Center([MarshalAs(UnmanagedType.LPStr)]string FileDirectory, long ImagePtr,
                short Height, short Width,char  ReadFromFile, IntPtr Analysis,
                long lenAnalysis);
    string str = @"C:\SMIA.raw";
    int len = 3;
    long m_lenAnalysis = 3;
    long m_ImagePtr = 0;
    short m_Height = 2464;
    short m_Width = 3280;
    IntPtr m_PtrArray = Marshal.AllocHGlobal(len * Marshal.SizeOf(typeof(float)));
    char m_ReadFromFile = '1';
    Optical_Center(str,m_ImagePtr,m_Height,m_Width,m_ReadFromFile,m_PtrArray,m_lenAnalysis);
    float[] m_Analysis = new float[len];
    Marshal.Copy(m_PtrArray, floatArray,0,len);
    Marshal.FreeHGlobal(m_PtrArray);
    string printstr = "";
    for (int i=0; i<len; i++)
        printstr = printstr + floatArray[i].ToString() + "\n";       
    MessageBox.Show(printstr);
    Appreciate if anyone can help, thanks.
    KL

    I was just about to post the header file of the DLL, when
    I noticed that there's a function called LVDLLStatus.
    This little thingie turned out to be a rather handy tool.
    With that function I found that in the DLL I had a problem
    with another function that prevented the DLL to be correctly
    loaded.
    This other function in the DLL is for generating digital output
    and it worked as it should, when tested from LV.
    Anyway if someone is interested, I got it working by using
    the LoadLibrary and GetProcAddress function, as in the
    source code thatI posted earlier.
    I will investigate what is wrong with that digital output, and
    post into a another thread if I have problems with that.

  • Error 1073 when building LabVIEW app which calls LabVIEW dll

    I am trying to use application builder to build an application that calls a dll created in LabVIEW. I get an error referencing a vi within the dll (Parse Stored String(multibyte).vi) saying that "This property is writable or this method is available only when the VI is in edit mode." The only option is to Continue which cancels the build. I had sucessfully built this application prior to including vis that call the dll and the program runs fine in the development environment.
    Do you have any idea what is causing this and what I cam do about it?

    I have found a temporary workaround in which I created a dummy dll that removed all functionality from exported vis but had the same name and function signatures. I then built the application using this dummy dll. Once complete, I replaced the dummy dll with the real dll.
    This is not a satisfactory work around because we have to build and maintain two dlls. Also, I'm not sure we can do the same trick when creating the installer with application builder. So, I'd still appreciate any help you can give.

  • How to call LabVIEW dll from ATL COM dll

    I have tried to call simple LabVIEW 8.6 Dll from win32 test application, class Library.
    I have include LabVIEW generated SharedLib.h file and SharedLib.lib file in the test application which I created as simple win32 console project and also from win32 class Library. I was sucessfully able to call my LabVIEW dll funtion. 
    But when I create ATL COM project and try to add SharedLib.h file and SharedLib.lib file I used to get following erors
    Error 1 error C2733: second C linkage of overloaded function 'StrCatW' not allowed d:\program files\national instruments\labview 8.6\cintools\extcode.h 463 
    Error 2 error C2733: second C linkage of overloaded function 'StrCpyW' not allowed d:\program files\national instruments\labview 8.6\cintools\extcode.h 464 
    Error 3 error C2733: second C linkage of overloaded function 'StrCpyNW' not allowed d:\program files\national instruments\labview 8.6\cintools\extcode.h 465 
    Error 4 error C2733: second C linkage of overloaded function 'StrCmpW' not allowed d:\program files\national instruments\labview 8.6\cintools\extcode.h 466 
    Error 5 error C2733: second C linkage of overloaded function 'StrCmpNW' not allowed d:\program files\national instruments\labview 8.6\cintools\extcode.h 467 
    these many errors.
    Will some one explain me how to call LabVIEW dll from ATL COM dll.
    Thanks & Regards,
    Jay

    I also had this problem.  My application is unicode-aware, but I was attempting to link it to a library with primitive C-string arguments.  You could dynamically load the DLL as suggested (more work), modify the header files (really not recommended), or if you are feeling lucky you could try fooling the compiler, as I was successfully able to do in Visual Studio 2010, by steering the preprocessor around those functions (assuming you're not using them, of course -- otherwise this probably wouldn't work):
    // prepare for NI extcode.h inclusion. avoid linker errors for this project.
    #define StrCatW(a,b)     IgnoreLinkError_StrCatW(a,b);
    #define StrCpyW(a,b)     IgnoreLinkError_StrCpyW(a,b);
    #define StrCpyNW(a,b,c)  IgnoreLinkError_StrCpyNW(a,b,c);
    #define StrCmpW(a,b)     IgnoreLinkError_StrCmpW(a,b);
    #define StrCmpNW(a,b,c)  IgnoreLinkError_StrCmpNW(a,b,c);
    // header file for my LabView-built DLL (ASCII single-byte character arguments)
    #include <MyLibraryHeader.h>
    // clean up afterwards, put things back to 'normal'
    #undef StrCatW
    #undef StrCpyW
    #undef StrCpyNW
    #undef StrCmpW
    #undef StrCmpNW

  • A breakpoint problem (step into and step over makes differences)

    Hi All, I have a subvi to implement read data and return it to display on front panel. Right now it is not working well on display. But when I set the breakpoint to debug, I found the step into the sub vi can make everything work, but if step over this block, it will be the same as the normal operation. Could anyone advise why this differences happend? Thank you very much!
    Attachments:
    breakpoint.PNG ‏49 KB

    It's hard to tell, but you might have a race condition.  Where is the VISA Resouce coming out of inside of the Diagram Disable Structure?  If it is connected to the property node, then you have a race condition.  Please attach a snippet or the actual VI to make debugging a little easier.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How can I calling LabView DLL within LabView and pass similar Data Types?

    I am trying to use an Instrument Driver, which is created in LabView6.1 as a DLL. At this point I have only LabView to test this DLL. I was wondering, is there easy way to find out what sort of Parameter or Data Type I should be using.
    How can I pass the following data with in LabView:
    LVRefnum as Type?
    LVBoolean as Type?
    TD1 (a structure) as Type?
    It is funny to see that I am able to create a DLL in labview but having trouble calling it within LabView. I thought, it would be easier to test the DLL within the same environment.
    Basically, I am more worried about the VISA calls that are used in the driver to communicate with instrument. Because, there is no link to �VISA32.dll� in
    the header file, is that handled by the LV Run-time engine? I guess more details are needed on using the LabView DLL within LabView from National Instrument Technical Support.
    Attachments:
    RL5000.h ‏1 KB

    A LVRefNum seems to be an unsigned long data type (32bit). You can cast it
    in LV then use that as a parameter to call the DLL. (an Occurrence type
    seems to be a Ulong32)
    When you created the DLL what was the resulting type for the LVRefNum?
    Happy Holidays
    "Enrique" wrote in message
    news:[email protected]..
    > I see...
    >
    > After doing some research, it seems to me that there is no easy way to
    > find out the type of data, other than looking at the header file and
    > have documents like Using External Code in LabVIEW handy. The
    > following information is from that document:
    >
    > LVBoolean is an 8-bit integer. 1 if TRUE, 0 if FALSE.
    >
    > LabVIEW specifies file refnums using t
    he LVRefNum data type, the
    > exact structure of which is private to the file manager. To pass
    > references to open files into or out of a CIN, convert file refnums to
    > file descriptors, and convert file descriptors to file refnums using
    > the functions described in Chapter 6, Function Descriptions.
    >
    > I know you are creating a dll in LabVIEW, but I am pretty sure the
    > information applies as well and is useful. For your dll this can be
    > interpreted that, rather than passing a LVRefnum, try passing the file
    > descriptor.
    >
    > From the header file, is can be deduced that TD1 is a cluster in
    > LabVIEW.
    >
    > You are right in saying that "more details are needed on using the
    > LabView DLL within LabView from National Instrument Technical
    > Support.".
    >
    > Enrique

  • How to terminate VB process that calls VI Dll Library when application closed

    I have simple VB application to call VI DLL library. The problem is the VB executable file will reside in processes list even close the VB application. Looks like VI DLL does not free from memory when VB application unloaded. Did I miss something to terminate or unload VI DLL in VB program or VI program?

    Well, I'm afraid we're down to good old-fashioned debugging tricks - something is happening that the OS doesn't want to kill. You can try to comment out sections of the VI (new feature in LV 8.2!) to see when it starts to work, or review the code looking for things like event handlers, callbacks, mutexes, open file handles, etc. It's hard to say what going wrong at this level. Also if you are calling out to 3rd party code (Call Library Node, ActiveX, .NET), make sure that it isn't creating such items and holding onto them.
    General rules of thumb...
    1. If you don't have a shutdown VI, or some sort of reference close VI, each VI you call from outside (DLL function) must exist with nothing left in LabVIEW - for example, no registered event handlers, no open file handles, etc. Just like camping, "leave it like you found it".
    2. If you do have such a shutdown, ensure that everything is indeed being shutdown correctly.
    Sorry I can't be more specific.
    Brian Tyler
    http://detritus.blogs.com/lycangeek

  • How to call labview DLL from visual C++?

    Hi,
    I'm trying to call a LV DLL from a VC++ application
    by using the LoadLibrary and GetProcAddress functions.
    The DLL contains a simple sum function. The Library is
    loaded correctly, but the result is always 0.0000.
    I have loaded a VC++ DLL in a similar way and it works
    correctly. Also, I have tested the DLL by loading it in LV,
    and it works correctly. The calling convention is defined
    to be stdcall in LV Application Builder.
    I have also tried this solution, but I will get a compiler error
    from one the header files that are created by the LV when
    the DLL is made. The error comes from this line
    typedef char                int8;
    and the error states that
    ..\fundtypes.h(107) : error C2371: 'int8' : redefinition; different basic types
    If someone knows of newer tutorial(for LV 8.2) or knows how to use those
    LoadLibrary and GetProcAddress function for LV DLLs, I will appreciate the
    information greatly.
    Below is the code that I'm using for loading the LV DLL.
    Thanks
    #include "stdafx.h"
    #include <stdio.h>
    #include <stdlib.h>
    #include <map>
    #include <windows.h>
    int _tmain(int argc, _TCHAR* argv[])
        HINSTANCE LVLib = LoadLibrary(TEXT("Testdll"));
        typedef double (__stdcall *MYPROC)(double, double);
        if (LVLib != NULL)
            MYPROC ProcAdd = (MYPROC) GetProcAddress(LVLib, "Add");
            if (ProcAdd != NULL)
                double d = (ProcAdd)(5.5, 6.6);
                printf("sum = %f\n", d);
            else
                printf("Invalid function pointer\n");
        else
            printf("Failed to load the library\n");
        return 0;

    I was just about to post the header file of the DLL, when
    I noticed that there's a function called LVDLLStatus.
    This little thingie turned out to be a rather handy tool.
    With that function I found that in the DLL I had a problem
    with another function that prevented the DLL to be correctly
    loaded.
    This other function in the DLL is for generating digital output
    and it worked as it should, when tested from LV.
    Anyway if someone is interested, I got it working by using
    the LoadLibrary and GetProcAddress function, as in the
    source code thatI posted earlier.
    I will investigate what is wrong with that digital output, and
    post into a another thread if I have problems with that.

  • How to call Labview DLL from VB2005

    Dear all expert,
    I'm a student and very new in Labview programming.
    Currently i have build a simple vi and need to convert it to dll so that i can call it from my VB.net. But the problem is how to call the labview dll from my VB.net?
    I know we must declare function something like this,
    Auto function Bodeplot Lib"..\\Bodeplot.dll" (Byval Val1 as double, Byval Val2 as double,...) as double
    but how to determine Val1, Val2 (and so on) is input for which data?  if my vi have 10 input (frequency, Kc,Fcz,Fcp,Wzrhp,Wp,k,Wz,Beta and Operation) ? and how to select the output (my application have 3 possible output : magnitup loop,phase loop, and degree loop)
    In addition, since I'm using Labview 8.0 , and as i know apllication  builder for this version cannot convert vi to dll which contain Mathscript (but unfortunely, my vi all use Mathscript), so really hope someone can help me to convert my vi to dll using Labview 8.2 (which remove this limitation).
    here I'm attach my Vi and really hope someone willing to help.
    Thank you.
    Attachments:
    bodeplot.vi ‏1049 KB

    On Sep 17, 6:40 am, cckoh <[email protected]> wrote:
    > Dear all expert,
    > I'm a student and very new in Labview programming.
    > Currently i have build a simple vi and need to convert it to dll so that i can call it from my VB.net. But the problem is how to call the labview dll from my VB.net?
    > &nbsp;
    > I know we must declare function something like this,
    > &nbsp;
    > Auto function Bodeplot Lib"..\\Bodeplot.dll" (Byval Val1 as double, Byval Val2 as double,...) as double
    > &nbsp;
    > but how&nbsp;to determine Val1, Val2 (and so on) is input for which data?&nbsp; if my&nbsp;vi have&nbsp;10 input (frequency, Kc,Fcz,Fcp,Wzrhp,Wp,k,Wz,Beta and Operation)&nbsp;? and how to&nbsp;select the output (my application have 3 possible output : magnitup loop,phase loop, and degree loop)
    > &nbsp;
    > In addition, since I'm using Labview 8.0 , and as i know apllication&nbsp; builder for this version cannot convert vi to dll which contain Mathscript (but unfortunely, my vi all use Mathscript), so really hope someone can help me to convert my vi to dll using Labview 8.2 (which&nbsp;remove this limitation).
    > &nbsp;
    > here I'm attach my Vi and really hope someone willing to help.
    > &nbsp;
    > Thank you.
    > &nbsp;
    >
    > bodeplot.vi:http://forums.ni.com/attachments/ni/170/272124/1/bodeplot.vi
    If you insist on using Labview with your project then you should
    consider using ActveX in place of using a dynamic link library to
    interface to your VB.net code. You don't need "Application Builder"
    if you use ActiveX. The Student, Basic and Full development versions
    of Labview for Windows come with ActiveX capability. For more
    information on ActiveX look up the subject ActiveX in Labview's Help
    File.
    Howard

  • Calling LabVIEW DLL from C with 2d array strings

    I am trying to write a DLL in C that calls a LabVIEW DLL that has a
    number of functions that each return a 2D array of strings which are the formatted
    measurements, with column 1 being the measurement name and column 2
    being the measurement. I wanted to use the 2D array of strings since
    this would give a uniform interface for returning measurements. Ive
    cobbled together bits and pieces of messages and example code I've
    found here into something that almost works, and was hoping someone
    with a little more experience in interfacing C with LabVIEW DLLs would
    be able to help me.
    Here's a little
    snippet from the header file generated when building the LabVIEW DLL:
    typedef struct {
    long dimSizes[2];
    LStrHandle String[1];
    } TD1;
    typedef TD1 **TD1Hdl;
    long __cdecl TestVI(char serialNumber[],  TD1Hdl *formattedMeasurements, char ErrorDescription[], long len);
    The "TestVI" VI generates a 2D array of strings. The cell contents and number of rows are random to
    simulate different measurement names and measurements.
    Here's a snippet for the wrapper class:
    class CArgoTestsLabVIEW 
    public:
    CArgoTestsLabVIEW();
    virtual ~CArgoTestsLabVIEW();
    // test modules called from parent DLL
    BOOL GetResult_LV(CString resultName, double *result);
    long TestVI_LV(CString serialNumber);
    private:
    TD1Hdl m_LVStringArray;
    CMapStringToString m_resultMap;
    InitMeasurementsArray();
    PopulateResultMap();
    The "m_LVStringArray" is intended to hold the 2D array of strings that
    the test modules spit out. The "m_resultMap" is just for accessing the
    measurements from the parent DLL via the "GetResult_LV" function.
    The implementation of TestVI_LV is:
    long CArgoTestsLabVIEW::TestVI_LV(CString serialNumber)
    long rc = 0;
    char errStr[BUFFERLEN];
    strcpy(errStr,"");
    rc = InitMeasurementsArray();
    if (rc == 0) {
    rc = TestVI(serialNumber.GetBuffer(serialNumber.GetLength()), &m_LVStringArray, errStr, BUFFERLEN);
    PopulateResultMap();
    return rc;
    The accessor functions InitMeasurementsArray and PopulateResultMap are:
    long CArgoTestsLabVIEW::InitMeasurementsArray()
    MgErr err;
    if (m_LVStringArray)
    DSDisposeHandle(m_LVStringArray);
    m_LVStringArray = (TD1Hdl)DSNewHandle(sizeof(TD1));
    // code to check for NULL
    // Set number of strings in array to 0
    (*m_LVStringArray)->dimSizes[0] = 0;
    (*m_LVStringArray)->dimSizes[1] = 0;
    // Set total size of array structure. For now it is only as big as the long variable.
    err = DSSetHandleSize((UHandle)m_LVStringArray, sizeof(long));
    // code to check for error
    return 0;
    void CArgoTestsLabVIEW::PopulateResultMap()
    int numberOfResults;
    int i;
    int charCnt;
    numberOfResults = (*m_LVStringArray)->dimSizes[0];
    if (numberOfResults == 0) {
    return;
    m_resultMap.RemoveAll();
    for (i = 0; i < numberOfResults; i++) {
    charCnt = (*((*m_LVStringArray)->String[i * 2]))->cnt;
    (*((*m_LVStringArray)->String[i * 2]))->str[charCnt] = '\0';
    charCnt = (*((*m_LVStringArray)->String[i * 2 + 1]))->cnt;
    (*((*m_LVStringArray)->String[i * 2 + 1]))->str[charCnt] = '\0';
    m_resultMap.SetAt((LPCTSTR) (*((*m_LVStringArray)->String[i * 2]))->str, (LPCTSTR) (*((*m_LVStringArray)->String[i * 2 + 1]))->str);
    The problem I have is that I eventually get an access violation from
    the run-time engine if I try to call the test VI in a loop. I'm
    obviously having a memory management problem, but it escapes me as to
    where the problem is. Anybody have any ideas?

    smercurio_fc wrote:
    The problem I have is that I eventually get an access violation from the run-time engine if I try to call the test VI in a loop. I'm obviously having a memory management problem, but it escapes me as to where the problem is. Anybody have any ideas?
    (*((*m_LVStringArray)->String[i * 2]))->str[charCnt] = '\0';
    Hi smercurio,
          Have you solved this?  I don't work with C much anymore, but it looks, here, as if the memory at str[charCnt] isn't yours to address/change.
    Is index "charCnt" one char past the end of the String-memory allocated by LabVIEW? 
    just an idea!
    Hmmm, maybe page 9 is a bit far back to fish in the unanswered posts.
    Message Edited by Dynamik on 03-03-2006 02:03 AM
    When they give imbeciles handicap-parking, I won't have so far to walk!

  • Calling LabView DLLs from C/C++

    Hi!
    Is it possible to call functions in the LabView DLLs directly from
    C/C++?
    Functions like InvChiSquare in lvanlys.dll has "Adapt to Type" void *
    parameters. How do I specify those parameters from C/C++?
    I have tried to use the "Build Shared Library" function in LabView to
    make a wrapper dll of the "Inv Chi Square Distrubution" vi, but when I
    call this function in the dll from C/C++ the function never returns.
    Other functions in the same dll that does not use functions in the
    lvanalys.dll are working ok.
    Regards
    Hans Forssell

    There are 2 great places to get infomraiton on passing data to dlls, and the data types used. First would be this manual. Using External Code in LabVIEW
    The second is the dll examples that ship with LabVIEW 7.0. Go to LabVIEW 7.0\examples\dll\data passing\Call Native Code.vi

  • (Un)Managed Wrapper calling LabView-Dll

    Hello,
    I am focused with a strange behaviour which i could not explain.
    I had to extend the NI272x in my C++ unmanaged environment for a StepType http://sine.ni.com/cs/app/doc/p/id/cs-11443/lang/de/pdf/yes/pdf that descripes a functional testsystem.
    Unfortuanately NI provieds no C Api for this devices. But LabView drivers were available. So i made LabView Wrapper
    to consume it. This is worked fine.
    A current extension development is done in C#. It loads the old unmanaged StepType-Dll during runtime. If the LabView Dll is
    used. I am not able to load the DLL with C# via SDK LoadLibrary to memory.
    To understand whats going on i have provied a small project that descripes the task.
    Regards
    Juergen
    =s=i=g=n=a=t=u=r=e= Click on the Star and see what happens :-) =s=i=g=n=a=t=u=r=e=
    Solved!
    Go to Solution.
    Attachments:
    TestProject.zip ‏129 KB

    I believe the problem is that the dll you are loading has dependent dlls. The normal behavior of LoadLibrary does NOT automatically look for dependent dlls in the same directory as the dll you are loading. You should use LoadLibraryEx with the LOAD_WITH_ALTERED_SEARCH_PATH option instead (This is what teststand uses when loading dlls with the c++ adapter). See Microsoft's help info on MSDN for more details about LoadLibraryEx and LOAD_WITH_ALTERED_SEARCH_PATH.
    Hope this helps,
    -Doug

  • Call labview dlls in release mode

    Hi all,
    I built a LabVIEW dll for the bluetooth connection, at the beginning I called this dll in the VS C++ in the debug mode, it worked very well.
    but due to the application, all the code should run in release mode. Unfortunately error occured, " Runtime error, R6030 CRT not initialized".
    I googled, but i did not get something useful.
    I appreciate any comments and  information, and apologize for my poor english.
    ps.  I tried to use different runtime library, and finially I got only multi-thread DLL was suitable.

    the attachments are the VC code and the dll files, 
    I really appreciate any comments about thie problem.
    Attachments:
    bluetooth test.zip ‏869 KB
    lib.zip ‏340 KB

  • How can I get into my account that I do not have the password for

    A new Photoshop serial number was created for me earlier.  It was put in an old account that was still on Adobe's books and I do not have a password for it.  My current account has all of my software licenses but does not have the new one that replaced what is listed in my main account.  

    Customer service can merge both of your accounts into a single one.
    Unfortunately, only Adobe customer service can assist you with your issue. These are user forums; you are not addressing Adobe here.
    Click on the link below, and after that click on "Still need Help? Contact us."
    Then on the next page, click Chat
    There is also a phone option. 1 (800) 833-6687
    http://helpx.adobe.com/contact.html?step=PHXS_downloading-installing-setting-up_licensing- activation

Maybe you are looking for

  • IPhone using cellular network to transmit/receive data even while on Wi-Fi

    I have recently noticed a strange problem with my 15 month-old 3GS. Although my phone sits at home most of time time and is constantly connected to my wi-fi network, it is still using the AT&T network to send and receive some data. I can see this by

  • J2EE cannot start  ?

    Hi, Recently, my j2ee enginee cannot start dispacher and j2ee server always in yellow colour (Starting framework forever). This is the error i got from server.log : Thread[SAPEngine_EnquReader,5,main]##0#0#Error#1#com.sap.engine.core.locking.impl3.Lo

  • Position showing in PA30 not PPOME

    Hi, I am using ECC6 and we have a problem where some times when an action is run we can see the employee is linked to their position via their PA record , however in PPOME the employee is not showing as occupying the position. If I run RHINTE00 repor

  • Connecting XML Gateway outbound to BPEL.

    Hello Folks, I am trying to use XML Gateway as a notification mechanism to trigger BPEL in Fusion middleware suite. For example XML Gateway in eBiz will publish a new hire event from XML Gateway to invoke a BPEL process. The problem I am having is ge

  • Using HTML, JSP, JavaBeans and Access database

    I'm trying to create a login page that will allow users to query, insert, modify, and delete information. I have an HTML page that the user chooses which option they want to do. I have 4 JSP's set up for each option. My biggest issue is getting them