Link with network library functions

Hi C gurus,
we have a problem compiling software from outside with the latest Studio 12.3 compiler. We have the following command
CC -m64 -xlang=f90,c99 -o mars mars.o -L/usr/lib libmars.a /soft/ECMWF/emos-64_i86pc/libemosR64.a -L/opt/solarisstudio12.3/lib -lsunmath -L/soft/EC MWF/grib_api-64_i386/lib -lgrib_api -L/soft/jasper-64_i86pc/lib -ljasper -lm
and get linker errors like
Undefined first referenced
symbol in file
bind libmars.a(tcp.o)
sys_nerr libmars.a(environ.o)
getsockname libmars.a(server.o)
accept libmars.a(netbase.o)
xdr_string libmars.a(marsxdr.o)
xdr_pointer libmars.a(marsxdr.o)
listen libmars.a(server.o)
gethostbyaddr libmars.a(tcp.o)
gethostbyname libmars.a(tcp.o)
socket libmars.a(tcp.o)
xdr_bytes libmars.a(marsxdr.o)
getdomainname libmars.a(environ.o)
setsockopt libmars.a(tcp.o)
connect libmars.a(tcp.o)
xdrrec_create libmars.a(netbase.o)
xdrmem_create libmars.a(account.o)
xdrrec_skiprecord libmars.a(queue.o)
xdr_free libmars.a(queue.o)
xdr_long libmars.a(marsxdr.o)
inet_addr libmars.a(tcp.o)
inet_ntoa libmars.a(tcp.o)
sys_errlist libmars.a(environ.o)
xdrrec_endofrecord libmars.a(queue.o)
xdr_int libmars.a(marsxdr.o)
shutdown libmars.a(webbase.o)
Some of this function are Network library function. See http://docs.oracle.com/cd/E19683-01/817-0696/6mgfrf0gr/index.html
Do we miss some options or flags the CC command line?
Any help or hints are warmly welcome
Anton

You say you are having trouble with Studio 12.3. Did this code work before with some earlier Studio version? I suspect not, because you need to link system libraries that are not on the CC command line that you show.
First, some general comments.
1. The -xlang=f90 option should be used if and only if you are linking Fortran 90 binaries to your program. Ditto for -xlang=c99 and C 99.
2. Never use -L options that point into /usr/lib or into the compiler installation area. The CC driver knows where to find default system libraries and in what order to search for them. Specifying these directories with -L can cause the wrong libraries to be linked. If you added those options because they seemed to solve a linking problem, something else is wrong, and should be fixed.
Now some specifics about missing libraries.
Check the man page for a missing function, and see if the man page lists a library that needs to be linked. Unfortunately, not all man pages are so helpful. Let's track down one set of functions as an example of how to find the missing library.
A set of missing functions starts with "xdr". Let's try "man xdr_string". Although the page does not tell you what library to link, the man page is in section 3NSL, and some xdr functions in the "see also" are in the same section. Is there a library with nsl in its name?
% cd /usr/lib
% ls -R | grep nsl
libnsl.so
% nm libnsl.so | grep xdr_
[ long list of xdr functions]So we know we need to add -lnsl to the CC command line. Repeat this process until done.
The author of an application library usually knows what system libraries to link, and a helpful programmer would include this information in README or man page for the application libraries that you are using. Did you check for documentation first?

Similar Messages

  • Passing arrays with Call Library Function does not work after application builder

    Calling a DLL with Call Library Function which requires an array of data works correctly in Labview, but after building an exe with application builder, the call no longer works.  Dereferecing the pointer in the DLL retuns all 0s and not the actual values.
    Solved!
    Go to Solution.
    Attachments:
    TEST.zip ‏28 KB

    I did not run your code because it is a little unclear to me what it does.
    Two things:
    First, is the DLL you are calling the DLL-ified version of PopUpNames.vi? Then the problem is likely that the panel is not being built into the DLL.
    When LabView builds an application / dll, it strips the front panel and block diagram from all VIs that it doesn't think need to show a panel at run time. This reduces file size and increases code security. The App Builder's panel inclusion logic can be overridden by Build Specifications -> Source File Settings -> Remove front panel. A better method is to put a property node on a control in a window you want to show marking it "visible"; this is sufficient to tell the App Builder it should keep the panel.
    Currently Source File Settings shows "no dependencies" (clearly incorrect---another evil side effect of Express VIs I guess) but if you change the settings as shown below to keep ALL panels, one might hope the App Builder can figure it to keep the panel when it deconstructs the Express VI. (Alternatively convert the Express VI into a regular one.)
    A second comment: I am a bit flummoxed at the larger goal here. You are calling LabView DLL from LabView, which doesn't make a lot of sense, so I assume your larger goal is to call LabView from C or vice-versa. In that case be aware that your DLL is x86 (32-bit) but you are passing 64-bit ints as your pointers. In this case it is 32-bit LabView with 32-bit pointers in embedeed in 64-bit containers calling 32-bit LabView with 32-bit pointers in embedeed in 64-bit containers, so it all works, but if your going to call this from C or whatnot you're going to have to follow that same design.
    When calling C code the LabView Call Library Function does have a "unsigned pointer-sized integer" data type that always appears to be 64 bits in the dev env but which actually passes a 64 or 32-bit int to the DLL depending on the environment. The "pointer sized int" has to be 64 bits in the "LabView" part of the code because LabView's strong typing requires the data type to be determined at compile time. Casting all pointers to the largest data type in LabView makes it possible to write platform-independent code, but down at the Call Library level you still have to put the right number of bytes on the stack.

  • Call multiple functions from same dll with call library function

    hi,
    i am working on a project in wich we need to make a UI to read out a sensor network.
    the UI should be usable in any project, but every node needs a different piece of code depending on the type of sensor with wich it is equipt.
    so i need to be able to call different pieces of code when i need them, and still be able to use the UI in future projects with possibly new types of node we now don't have.
    so someone told me to use DLL's, cause then i would be able to call the code i need the moment i need it.
    but i have never worked with DLL's (just learned about this option 3 day's ago) so i have a question.
    i know i can dynamicly change the DLL i call with the call library function, but can i dynamicly change the function i call from that DLL ?
    or do i have to put a new call library function for each function i want to call, even if its from the same DLL ?
    kind regards,
    stijn

    nazarim wrote:
    ok so there is no (easy and ubderstandable) way for me to dynamicly change wich function i want to call from a certain DLL.
    but now i started wondering, the path on the call library function is not ment to dynamicly change a DLL
    but it does work so, if i am carefull, can i use it for that purpose or will labview give me a series of problems once i start using it in larger programs ?
    Thepath on the Call Library Node can be used to load a different DLL. Obviously since you can't change the function name your other DLL would have to export exactly the same function name and of course with the same parameters. This is seldom the case so it is not the main use of the path input to the Call Library Node. It's main use is as indicated to load DLLs at runtime rather than at load time of a VI. So that an application can run even when the DLL is missing, until the moment the functionality from that DLL is needed.
    If you can make sure that all your DLLs export the same function name with the same parameter you can use the Call Library Node to call into different DLLs through the path input. If however you would need to call different function names you would have to resolve to some DLL which does do the dispatching and invocation using LoadLibrary() and GetProcAddress(). But unless you need to go with DLLs for some reason using the Call By Reference Node can give you an even more flexible approach. 
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Problem with Call Library Function. Want to pass a string and return a string, but my compiler does not recognize "CStr" and Labview does not recognize my "char *function()" callout

    Hi, I'm trying to use a .DLL I wrote in Visual C++ .NET. The Call Library Function generates a function prototype of "CStr Parser(CStr arg_raw)"
    but my compiler won't accept this. So I change it to how C normally deals with strings "char *Parser(char *arg_raw). Now the Call Librafy Function does not find "Parser" in my .DLL though it is definitely there!
    Help!
    -Fong

    Hello
    You will need to include extcode.h in your C file. You can find this under ..\LabVIEW\cintools folder.
    The include has all the defines you will need.
    Bilal Durrani
    NI
    Bilal Durrani
    NI

  • Linking with Sunperformance library

    Hi
    I trying to link with static version of libsunperf. So I link with
    libsunperf.a
    from Studio 12.2 but get the errors
    ld: Software Generation Utilities - Solaris Link Editors: 5.10-1.500
    Undefined first referenced
    symbol in file
    __mt_ibarrier_rtc_ /home/eda/mosekprj/dev/bld/newbury/devel/default/sunc-12.2.0/dll/libmoseknoomp64.so
    __mt_static_for_loop /home/eda/mosekprj/dev/bld/newbury/devel/default/sunc-12.2.0/dll/libmoseknoomp64.so
    __mt_get_next_chunk_invoke_mfunc_once_ll_ /home/eda/mosekprj/dev/bld/newbury/devel/default/sunc-12.2.0/dll/libmoseknoomp64.so
    __omp_in_parallel_ /home/eda/mosekprj/dev/bld/newbury/devel/default/sunc-12.2.0/dll/libmoseknoomp64.so
    __f90_allocate2 /home/eda/mosekprj/dev/bld/newbury/devel/default/sunc-12.2.0/dll/libmoseknoomp64.so
    __omp_get_max_threads_ /home/eda/mosekprj/dev/bld/newbury/devel/default/sunc-12.2.0/dll/libmoseknoomp64.so
    __mt_MasterFunction_cxt_ /home/eda/mosekprj/dev/bld/newbury/devel/default/sunc-12.2.0/dll/libmoseknoomp64.so
    __f90_deallocate /home/eda/mosekprj/dev/bld/newbury/devel/default/sunc-12.2.0/dll/libmoseknoomp64.so
    ld: fatal: Symbol referencing errors. No output written to bld/newbury/devel/default/sunc-12.2.0/bin/mosek
    How can I resolve that? Note I would prefer to use sunperf in sequential mode.
    Thanks.
    Erling

    Sorry and thanks. It still have a problem.
    eda@newbury:~/mosekdbg$ cc -# testblas.c -o testblas -library=sunperf -staticlib=sunperf -lc -lm
    ### cc: Note: NLSPATH = /remote/public/solaris/x86/S12.2/prod/bin/../lib/locale/%L/LC_MESSAGES/%N.cat:/remote/public/solaris/x86/S12.2/prod/bin/../../lib/locale/%L/LC_MESSAGES/%N.cat
    ### command line files and options (expanded):
    ### -# testblas.c -otestblas -library=sunperf -staticlib=sunperf -lc -lm
    /remote/public/solaris/x86/S12.2/prod/bin/acomp -Qy -Xa -xc99=%all,no%lib -i testblas.c -D__SunOS_5_10 -D__SUNPRO_C=0x5110 -D__unix -D__SVR4 -D__sun -D__SunOS -D__i386 -D__BUILTIN_VA_ARG_INCR -D__C99FEATURES__ -D__PRAGMA_REDEFINE_EXTNAME -Dunix -Dsun -Di386 -D__RESTRICT -D__FLT_EVAL_METHOD__=-1 -D__SUN_PREFETCH -I-xbuiltin -I/remote/public/solaris/x86/S12.2/prod/include/cc -fsimple=0 -m32 -fparam_ir -xF=%none -xdbggen=no%stabs+dwarf2+usedonly -xdbggen=incl -xldscope=global "-g/remote/public/solaris/x86/S12.2/prod/bin/cc -library=sunperf -staticlib=sunperf -lc -lm " -destination_ir=yabe -y-fbe -y/remote/public/solaris/x86/S12.2/prod/bin/fbe -y-verbose -y-comdat -y-xarch=generic -y-comdat -y-xthreadvar=no%dynamic -y-o -ytestblas.o -y-s
    /remote/public/solaris/x86/S12.2/prod/bin/fbe -s -o testblas.o -warn=%none -Qy /tmp/yabeAAAMFaOGL
    rm /tmp/yabeAAAMFaOGL
    ### cc: Note: LD_LIBRARY_PATH = (null)
    ### cc: Note: LD_RUN_PATH = (null)
    ### cc: Note: LD_OPTIONS = (null)
    ln -s /remote/public/solaris/x86/S12.2/prod/lib /tmp/lib_link.1340957116.19204.01
    /usr/ccs/bin/ld -zld32=-S/tmp/lib_link.1340957116.19204.01/libldstab_ws.so -zld64=-S/tmp/lib_link.1340957116.19204.01/amd64/libldstab_ws.so -zld32=-S/tmp/lib_link.1340957116.19204.01/libld_annotate.so -zld64=-S/tmp/lib_link.1340957116.19204.01/amd64/libld_annotate.so /remote/public/solaris/x86/S12.2/prod/lib/crti.o /remote/public/solaris/x86/S12.2/prod/lib/crt1.o /remote/public/solaris/x86/S12.2/prod/lib/values-xa.o testblas.o -lc -lm -o testblas -Y "P,/remote/public/solaris/x86/S12.2/lib:/remote/public/solaris/x86/S12.2/prod/lib:/usr/ccs/lib:/lib:/usr/lib" -Qy -R/remote/public/solaris/x86/S12.2/lib -Bstatic -lsunperf -Bdynamic -lfui -lfsu -lsunmath -lmtsk -lpicl -lm -lc /remote/public/solaris/x86/S12.2/prod/lib/crtn.o
    Undefined first referenced
    symbol in file
    __mt_static_for_loop /remote/public/solaris/x86/S12.2/prod/lib/libsunperf.a(dtrsm_x86g.o)
    ld: fatal: Symbol referencing errors. No output written to testblas

  • VI analyzer: Wire under object test fails with Call Library Function Nodes

    Hi,
    If I wire a Call Library Function Node with an ErrorIn and an ErrorOut, the VI Analyzer Test "Wire under Object" fails always with two occurrences per Call Library Function Node.
    A double click to the occurrence highlights the error lines connected with the call... node.
    The test does not fail, if the error lines are not connected.
    Thanks!
    H
    Solved!
    Go to Solution.

    This became a problem when Call Library Nodes got error terminals (and optional path terminals) in LabVIEW 8.20.  I should be able to get a fix in to VI Analyzer Toolkit 2010.
    Thanks for taking the time to report the bug.
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

  • Using an external DLL with "Call Library Function"

    Hi!
    I am trying to use an external DLL which is used from Visualbasic & Delphi:
    http://www.keb.de/common/tools/KEBCOMDriver.zip
    the protKEB.dll accesses the serial port to control an KEB frequency
    inverter.
    Unfortunatly there is no prototype header file for the DLL (no help on that
    from KEB).
    I only have a VisualBasic example program which works with the DLL.
    (Unfortunatly I am no Visual basic expert)
    To initialize the com port I have to use the function: setprotproperties &
    getprotproperties
    they are declared as:
    'Setting the protocol properties
    'ctrl is a pointer to a data structure of type tProtProperty
    Declare Sub setprotproperties Lib "protkeb.DLL" (ctrl As Any)
    'Reading the protocol properties
    'ctrl is a pointer to a data structure of type tProtProperty
    'the desired protocol is entered in ctrl.prottype before calling
    Declare Sub getprotproperties Lib "protkeb.DLL" (ctrl As Any)
    and tProtProperty is:
    Public Type tProtProperty
    ProtType As Long 'Type of Protocol (tProt)
    TimeOut As Long 'ALL protocols
    Baudrate As Long 'ANSI, HSP5
    Comport As Long 'ANSI, HSP5
    Flag As Long 'ANSI, HSP5: 01 = Sendslow
    / IP: 01 = UDP
    Port As Long 'IPort number
    Txtlen As Byte 'IP : length of following
    text or 0
    txt As String * 100 'IP : IP-Address or name
    (maximum length)
    End Type
    I already tried to use a cluster with tProtProperty entries as an Input for
    the function
    setprotproperty in a call library function with:
    Parameter Type : Adapt to type
    Data Format: Pointer to Handle
    but I always get an "exception within external code....."
    What am I doing wrong?
    How does a cluster & a "call library function node" look like that works?
    Any help is really appreciated!
    thanks
    tom
    ,-Thomas Kerberger Physikalisch-Technische Bundesanstalt-.
    | Abbestr.2-12 D-10587 Berlin fon: +49-30-3481338 |
    | mailto:[email protected] fax: +49-30-3481386 |
    `--------Labor 7.33 Messung thermischer Energie---------'

    Thomas,
    LabVIEW cannot call a DLL that has structures directly, you will need to create either a wrapper DLL or CIN that will take in all of the data individually construct the structure, and send it to the DLL function.
    For more information on what a cluster looks like in native code, I would suggest creating a simple cluster, creating a Call Library Function Node on the block diagram with a cluster input. Then right-click on the Call Library Function Node and choose "Create .c file". This will generate the data structure for the cluster and give you a better feel for it. I would then suggest going to the Using External Code in LabVIEW manual that can be found in the LabVIEW Bookshelf (Start»Programs»National Instruments»LabVIEW 6»LabVIEW Manuals or »LabV
    IEW 6.1»Search the LaBVIEW Bookshelf).
    There is also the following: Developer Zone: Passing a Variety of Data Types from DLL to LabVIEW.
    Randy Hoskin
    Applications Engineer
    National Instruments
    http://www.ni.com/ask

  • Can an ipod only be linked with one library on itunes on one computer?

    I have set up my ipod on one computer and downloaded a load of music on to it. now i want to put more music on from another computer but the computer is telling me that all the music i have on it already will be replaced by this new library from a different computer. Can't an ipod be linked with two different librarys without all music being deleted?

    See: Using iPod with multiple computers.

  • Problems with /Network/Library/Fonts/ automount

    Okay, so I am having problems with setting up a /Network/Library/Fonts/ automount in order to share a master set of fonts among designers.
    I created a folder on our XServe RAID volume called "Shared Libraries". Inside it, I created a folder called "Fonts" and installed some test fonts. So the path is /Shared Libraries/Fonts.
    I went to Workgroup Manager, I enabled Sharing for "Shared Libraries". Privileges for Everyone are set to Read Only. it is set to Share this item Using AFP. Guest access is enabled. I enable Network Mounting of this share point via AFP, and I set it to Use for Shared Library.
    So, I restart the client. I login, I go to Network, then Libraries, and my fonts folder shows up.
    HOWEVER, when I go to FontBook, it shows Network with "OFF" next to it. None of my fonts are displayed. I right click on Network and select Enable Network, and nothing happens. None of my fonts show up.
    Any ideas what could be causing this? Am I missing a step?
    Thanks!
    Tyler

    Figured out the problem - PRivileges need to be set to READ AND WRITE. Made the change, and all is well.

  • Win SDK function conflict with CVI library function

    I do not have  SDK_CONFLICT_PRIORITY defined.  Is this new to CVI 2009?
    The following code gives me an error  "11, 58   Too many arguments to `CVI_WriteFile'."
    #include <windows.h> 
    #include <formatio.h>  
    void function (void) {
        HANDLE hHandle = INVALID_HANDLE_VALUE;
        char buffer [1000] = {'\0'};
        DWORD dwWriteCount;
      if (!WriteFile (hHandle, buffer, 5, &dwWriteCount, NULL)) {
    I have included  <windows.h>   before   <formatio.h>  but CVI still wants to use the formatio version of WriteFile - it appears to have been renamed   CVI_WriteFile  ?!?!?
    If I eliminate the #include <formatio.h>  it compiles OK.
    Message Edited by menchar on 03-06-2010 04:00 PM

    Well, the complete source for formatio.h I reported before is this one:
    #ifdef _NI_mswin32_
    extern int CVIFUNC      cviprefix(CloseFile)(int handle);
    extern int CVIFUNC      cviprefix(OpenFile)(const char *filename,int rd_wrt, int action, int bin_ascii);
    extern int CVIFUNC      cviprefix(ReadFile)(int handle, char *buf, int count);
    extern int CVIFUNC      cviprefix(WriteFile)(int handle, const char *buf, int count);
    extern int CVIFUNC      cviprefix(SetCommitMode)(int commit);
    #define CloseFile       cviprefix(CloseFile)
    #define OpenFile        cviprefix(OpenFile)
    #define ReadFile        cviprefix(ReadFile)
    #define WriteFile       cviprefix(WriteFile)
    #define SetCommitMode   cviprefix(SetCommitMode)
    #else
    In the header this warning is present:
    /* This header must be included after any Windows SDK header or any header */
    /* that directly or indirectly includes a Windows SDK header.              */
    /* Some of the function names conflict with Windows SDK functions.         */
    As far as I can understand (but I'm not an expert on these very technical and tricky aspects of C) first of all CVI functions are renamed CVI_xxx, after it a call to WriteFile or any other function in that group is defined to be translated to CVI_WriteFile, so when you call WriteFile the preprocessor actually translates it in the CVI version of the function and SDK one is superseded.
    My understandment is that if you undefine WriteFile, you can actually use both functions if you want: native CVI one by calling CVI_WriteFile and SDK one by simply calling WriteFile.
    ...or I can be missing some other hint, which can surely be possible!
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Using an array with a library function

    I have a library function that I would like to use on the data in an array. My problem is that the function(which I am using as a subVI) will not accept an array as the input data. So I need to pass each element of the array through the function, and rebuild the array so it is in the same configuration that it started at. I am hoping that there is a easy way to do this in labveiw without having to use a formula node. Any help would be appreciated.
    Amy

    I tried to do what you suggested, but for some reason I still can not wire the indexed array to the subVI. The error I'm getting say that I've wired two terminals not of the same type. The type of the sorce is 2D array of long. The type of the sink is unsigned long. I find that error odd seeing that the array has been indexed. I've attatched my VI. What the for loop is trying to do is pass each element of the array through the subVI, then return an array.
    Attachments:
    VolttoPress.vi ‏41 KB

  • Probel with call library function: I have a dll based on a complicated struct data type. How can I pass this structure?

    The data type is
    typedef enum {false, true} bool;
    typedef float flt4;
    typedef double flt8;
    typedef int i32s;
    typedef unsigned int i32u;
    typedef short int i16s;
    typedef unsigned short i16u;
    typedef signed char i08s;
    typedef unsigned char i08u;
    struct t_UnwrapData {
    struct {
    i08u flags;
    i16u unwrap_m;
    i08u weight_m;
    } status;
    flt4 *ph2pi;
    flt4 *weight;
    flt4 *gamma;
    flt4 *phase;
    i08u *flags;
    i08u *neigh;
    i32s neighOfst[8];
    i32s r,c;
    i32s x0,y0,xSz,ySz;
    flt8 unwTime;
    flt4 binCut;
    Please Could someone help me suggesting how I pass this dat
    a type to call library function?

    Hi Setu,
    Here is a solution that I have been playing to return back an array of clusters
    typedef struct
    int32 dimSize;
    uInt8 array[1];
    } LVU8;
    typedef LVU8 **LVU8Hdl;
    typedef struct
    U32 DeviceId;
    U32 VendorId;
    U32 BusNumber;
    U32 SlotNumber;
    LVU8Hdl SerialNumber;
    } LVDEVICE_LOCATION;
    typedef LVDEVICE_LOCATION **LVDEV_LOC_HANDLE;
    typedef struct
    int32 dimSize;
    LVDEVICE_LOCATION cluster_array[1];
    } LVDEV_LOC_ARRAY;
    typedef LVDEV_LOC_ARRAY **LVDEV_LOC_ARRAY_HANDLE;
    LVPLX_API void GetAllDevices(LVDEV_LOC_ARRAY_HANDLE cluster_array)
    int i,j;
    int numDevices = 3;
    DSSetHandleSize(cluster_array, sizeof(int32)+3*(sizeof(LVDEV_LOC_ARRAY)+(sizeof(int32)+16*sizeof(L
    VU8))));
    (*cluster_array)->dimSize = 3;
    (*((*cluster_array)->cluster_array[0]).SerialNumber)->dimSize =16;
    (*((*cluster_array)->cluster_array[1]).SerialNumber)->dimSize =16;
    (*((*cluster_array)->cluster_array[2]).SerialNumber)->dimSize =16;
    for(i=0; i<3; i++)
    ((*cluster_array)->cluster_array[i]).BusNumber = i;
    ((*cluster_array)->cluster_array[i]).VendorId = i*5;
    for(j=0;j<16;j++)
    (*((*cluster_array)->cluster_array[i]).SerialNumber)->array[j] = (10*j)+i;
    The code doesnt do much but returns back 3*cluster which the array in my cluster is sized for 16. The problem I've been having , was ensuring I have allocated enough memory to handle the complete structure. This works for me, now all I have to do is put the real code in which get my array of data from the instruments.
    Hope it helps
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • How to use structure pointer with « Call Library Function node » in LabVIEW

    I use GetTimeZoneInformation from kernel32.dll. It definition is :
    DWORD GetTimeZoneInformation( LPTIME_ZONE_INFORMATION lpTimeZoneInformation );
    Where
    lpTimeZoneInformation
    [out] Pointer to a TIME_ZONE_INFORMATION structure to receive the current time-zone parameters.
    http://msdn.microsoft.com/library/default.asp?url=​/library/en-us/sysinfo/base/gettimezoneinformation​...
    I don't know how to set this parameter with my cluster based on the TIME_ZONE_INFORMATION structure.
    Your help will be appreciate
    Thanks
    INKSPEC

    INKSPEC wrote:
    I use GetTimeZoneInformation from kernel32.dll. It definition is :
    DWORD GetTimeZoneInformation( LPTIME_ZONE_INFORMATION lpTimeZoneInformation );
    Where
    lpTimeZoneInformation
    [out] Pointer to a TIME_ZONE_INFORMATION structure to receive the current time-zone parameters.
    http://msdn.microsoft.com/library/default.asp?url=​/library/en-us/sysinfo/base/gettimezoneinformation​...
    I don't know how to set this parameter with my cluster based on the TIME_ZONE_INFORMATION structure.
    Your help will be appreciate
    Thanks
    INKSPEC
    If creating a wrapper DLL which does the conversion for you is not an option (I think it won't since that would require C programming and if you knew C programming you wouldn't ask this here) then you will have to create a byte array of appropriate length and just configure the Call Library Node to pass this array as an Array of unsigned bytes and as C pointer.
    On return you will have to copy out the interesting data at the right position.
    First the length of this structure would be:
    typedef struct _TIME_ZONE_INFORMATION {
    LONG Bias; 4
    WCHAR StandardName[32]; 32 * 2
    SYSTEMTIME StandardDate; 8 * 2
    LONG StandardBias; 4
    WCHAR DaylightName[32]; 32 * 2
    SYSTEMTIME DaylightDate; 8 * 2
    LONG DaylightBias; 4
    } TIME_ZONE_INFORMATION
    Total 172 bytes
    Now the fun part will be to actually get out the information. There are a number of difficulties.
    First the strings are 16 bit Unicode so if you are interested in them you will have to call a different Windows API function WideCharToMultiByte function to convert the 16bit Unicode string into an ASCII string. For this part there has been a post here:
    http://forums.ni.com/ni/board/message?board.id=170​&message.id=123821&requireLogin=False
    For the LONG values you would pick 4 bytes at the appropriate offset from the array through the Array Subset function and then typecast it into an int32 and pass that through the Swap Bytes and Swap Words functions to reverse the LabVIEW Big Endian byte swapping in the Typecast function.
    The SYSTEMTIME is a structure with eight 2 byte integers so it would be best to use Array Subset again to extract 16 bytes at the correct offset, typecast this into a cluster with eight int16 numerics and pass it through Swap Bytes too.
    You see accessing such API functions in LabVIEW directly can get easily quite a mess and that is the reason why creating a wrapper DLL to convert properly between LabVIEW datatypes and C datatypes gets soon the easier solution if you need to interface with more than one or two functions taking such complicated data structures.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Crash "DAbort 0x37C03D in MemoryMana​ger.cpp" when calling DLL with "Call Library Function Node"

    Hi all,
    I would like to work with a LabVIEW program that I did not programm by myself.
    In this programm an external DLL needs to be called. in the Momente this dll ist called with the "Call Library Dunction Node" LabVIEW crashes with this Error Message:
    DAbort 0x37C03D in MemoryManager.cpp
    Attached is the entire Log.
    The programm runs on the computer of the original programer.
    I have never handeled with DLLs or something like that before, so I have absolutely no idea how to rsolve this problem.
    Thanks for your help!
    Attachments:
    lvlog.txt ‏2 KB

    A DLL can be compiled by different compilers. By "generic" C DLL, i refer to ANSI C (so no C++, no Borland C or something else).
    My question is raised as parameters, esp. arrays and strings, can lead to this behavior when used in the wrong way (including "Calling Convention").
    Also, interfacing with the LV memory manager can lead to crashes like this, but this wouldn't be a "generic" DLL as it binds to LV (due to LV API calls).
    Without a better knowledge on the DLL and its functions, there is not much we can help you with.
    Where does the DLL come from?
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Converting Units in LabView and specifying sampling rate with Universal Library functions

    Hi,
    I am having trouble converting units in LabView 7.0 and having it write to a file / output on a chart in Nm instead of in volts.  I can't seem to find any straightforward instructions, eventhough it seems like a simple task. 
    Another task that would seem rather simple is changing the sampling rate with the XAIn program from the Universal Library for LabView (this is version 5.40).
    If anyone could help me out, I would greatly appreciate it - I have tried other sources without much luck!
    Thanks
    Jenna

    Are you really needing to change units or do you need to scale the voltages read from your sensors? If it's scaling, it would be trivial to set this up in mAX or with the DAQ Assistant if you were using an NI board. Since you are not, then you could use the Scaling and Mapping Express VI. The y axis of a chart is just a label. You can use the text tool to change it to anything you want.
    I have no idea how to change sample rate for your board. Have you asked the vendor?

Maybe you are looking for

  • Osa.exe Missing From Office 2010

    Has osa.exe been removed from Office 2010? I can't seem to locate it. My installation was done as a custom install and selecting all options except for Access and Visio Viewer. Office is installed on Win 7 Enterprise x64. I tried to copy osa.exe from

  • Password protecting a wireless network

    I have just set up a wireless network in my house, it's a shared house and the aim was simply to have everyone else in the house connected to the same broadband connection and no-one else from outside using it. I am using an i-book with Airport Extre

  • Create a JDBC system resource using MBeans i Weblogic  v10 server

    Hi, I'm trying to create a JDBC resource on Weblogic V 10 Admin server from a remote java client using MBeans. At the client side the following exception is thrown: Exception in thread "main" weblogic.management.NoAccessRuntimeException: [JMX:14 9520

  • Looking for 8.1 equivalent to portal 4.0 tag

    I'm trying to find how to generate an equivalent to the WL Portal 4.0 CreateWebflowURL tag in 8.1. We have a situation where we utilize the pageName, portletName, and event arguments to the CreateWebflowURL tag to switch to a specific page and trigge

  • Firefox does not open on MacOSX v. 10.4.11. AT all. What should I do?

    Downloaded new FF4 and it could not run on Mac OSX v 10.4.11. It just crashes.