DLL and array of pointers to incomplete struct

I think that this has probably been dealth with before, but I tried searching and have not found an answer that solved my problem.

I have a function implemented in a DLL that returns a pointer to an incomplete structure.  Everything works very well.

Now, I want to write a function that passes an array of the DLL (pre-allocated in LV) and fills that table with a set of pointers to the incomplete struct (same data as type works well on it).

I can't get this to work.

I tried:

int function (struct incompletestruct * table) as a function prototype, but I get complaints of "unknown of the incomplete struct size" if I then try to reference table [value].

I tried

int function (struct incompletestruct * array []) as a prototype of function, but the LV crashes hard when what I call with setting "a pointer to the data in the table.

I tried

int function (struct incompletestruct * array [16]) as a prototype function, but even lock as indicated above.

What combination of prototype of function and the convention in DLL call BT need me for this?

I use LV 2009 SP1 and CVI 9.0.

Shane

I am not able to solve the complete problem, but can at least give a few tips:

* Array of pointers is an array of I32 (I guess that's not true 64-bit more).

* Hidden in the LabVIEW.exe there is some undocumented functions that allow to perform pointer operations. Somewhere, there should be a LabVIEW.h file. And just type in labview under the name of the dll in the call library node.

* So the full concept would be to deal with pointers as I32 pass inside the LV and get pointer to data via these functions build-in

Felix

Tags: NI Software

Similar Questions

  • "incomplete struct pointer" error

    I keep geeting error "Type error in argument 1 of 'DLLStruct '; "found"pointer struct parameters' expected ' struct pointer incomplete parameters "

    I'm trying to pass a pointer to a structure as an argument to a function in a DLL.  It's just a test code to see if it works, but it is pass the pointer struct to DLLStruct() and it is supposed to update a, b, c the values of 1,2,3).  Here is my code:

    void __stdcall DLLStruct (struct parameters * tester_params);

    struct parameters
    {
    int a;
    int b;
    int c;
    } tester_params;

    int main (int argc, char * argv [])
    {
    resultstr char [256];

    struct parameters * structPtr;
     
    structPtr = & tester_params;
     
    structPtr-> a = 0;
    structPtr-> b = 0;
    structPtr-> c = 0;
     
    DLLStruct (structPtr);
     
    sprintf (resultstr, 'a = %i ", structPtr-> one);
    MessagePopup ('test... (', resultstr);
     
    sprintf (resultstr, "b = %i", structPtr-> b);
    MessagePopup ('test... (', resultstr);
     
    sprintf (resultstr, 'c = %i ", structPtr-> c);
    MessagePopup ('test... (', resultstr);
     
    return 0;
    }

    Here's the DLL function:

    void __stdcall DLLStruct (struct parameters * tester_params)
    {
    tester_params-> a = 1;
    tester_params-> b = 2;
    tester_params-> c = 3;
    }

    If the code is written as stated in your post, this error depends on the fact that when you define your function DLLStruct structure is not yet defined. After the function declaration, you define the struct and use it when calling DLLStruct: right now you pass a structure completely defined for a function that expects an incomplete struct (which is not yet defined structure).

    Definition of the structure in motion before the function definition should eliminate the error.

  • Satellite A300 - w c:\windows\system32\rpcnet.dll and rpcnet.exe recognized as Trojans

    Hello

    while I was scene analysis antivirus on the laptop Satellite A300-15 b, my software recognized w c:\windows\system32\rpcnet.dll and rpcnet.exe as Trojans and deleted. These files are essential?
    How can I get back them? If someone of you cannot answer, I'd appreciate any help.

    Hemoth

    What anti-virus software are you using and have you updated to the latest list of detection of virus/trojan?
    To retrieve these files, you can use the windows repair console, which can be entered by pressing the F8 key before the windows operating system starts.
    Will take you to a list where you repair or somehow mode called option.

    If this does not work, you can try using recovery media.

  • Loading of a DLL on RT: Missing Export "DecodePointer" "Kernel32.dll" and 7 error when calling the DLL

    Hi, I recently changed to Visual Studio 2010 and Windows 7 64-bit.

    I have an existing Office RT system running RT 2009.  This system calls a DLL that I already built using Visual Studio .net 2003 and Windows XP.

    Since I've recompiled the DLL I get an error 7 file not found error when I call the RT DLL, even if I simply replaced the old DLL with a new one in the file system so the path has not changed.

    I also noticed that the message on the screen connected to the RT system during startup:

    "achieveworldpeace.dll" load error: lack of export 'DecodePointer' of ' Kernel32.dll'.

    Any ideas on this problem?  It is perhaps as simple as a switch in the compiler?

    Thank you.

    I'm not sure it's a simple switch in the project settings in Visual C. The problem is clearly in the standard C runtime library that gets linked to your DLL and refers to exports of Windows which are not available on the RT system. Don't forget that the RT system is a limited Win32 API emulation.

    I usually avoid these problems using Visual C 6 to create DLLs for LabVIEW projects. The standard library of the C runtimes will not know what Windows API reference more recent exports because they have supported even under Win95. So unless your explicitedly reference code not supported RT APIs you wouldn't have problems. If you do not use the standard C file i/o functions and management of memory in your DLL functions, you can also try to link statically C runtime libraries in your DLL, or vice versa depending on what you have now. It may or may not work. Otherwise there is not much else but by using an earlier version of Visual Studio.

  • DLL and LVLIB

    Could someone explain what is the difference between DLL and LVLIB?

    One last thing:

    DLL * contain * shared code, means to distribute a library shared in this form, all you need to do is provide the 1 file (admitidly headers files and documentation are nice, but not essential).

    On the other hand LVLibs do not contain the actual code, they contain only a list of the screw which must be included (and where to find them) etc. So, to distribute a shared library LVlib you must include the file associated with lvlib AND the EIS.

    PS. LabVIEW 2010 has a new feature called packaged the project libraries that are very similar to dll libraries of regular project (LVLibs) - in simple terms, they are a lvlib and all its contents screws packed into a single file.

  • run without end c - dll and use GUI in parallel

    Hello

    I want to start a function from a c - DLLs in LabVIEW (which works fine) and during execution of this function (it can be run for

    very long time), I want to collect entries from the interface (e.g., a change in a digital control) LabVIEW.

    I put these two tasks in two unrelated while loops, but still, as long as the c function is market I can't

    collect the GUI changes (at least the changes do not appear, the c function once stopped, the)

    the changes are visible).

    If in the course of execution of the function of the c - dll completely blocks the LabView graphical user interface. Can anyone give me a tip

    How can I run those two things at the same time?

    Thank you

    FC

    You must change the configuration of the node function call library of 'Run in the user interface thread' to 'run in any Thread. '.  Normally, this option should be used only when you know that the DLL is re-entrant (thread-safe).  However, if you use only a function of the DLL, and it runs continuously, it will stay in the same thread for the duration of the call then it won't matter in the thread which you call it.  Allowing it to operate in any thread you will free the UI thread to handle the user interface.

  • Cannot find the shared library nilvaiu.dll and nican.dll.

    I'm using Labview 8.5.1 on windows XP 32-bit systems. Recently, I installed labview on a 64-bit XP system.  I feel what I think, problems of drivers on the 64-bit system, now. When executable files are run files are not: nilvaiu.dll and nican.dll.  Someone at - he lived these errors and now where to find the latest 64-bit drivers?

    Well, the list of drivers that are supported for XP 64-bit is quite short. And although NI-VISA, DAQmx and NI-CAN are not on this list, unfortunately.

  • How can I find MSVCR71.dll and how to download MSVCR71.dll on my computer?

    How can I find MSVCR71.dll and how to download MSVCR71.dll on my computer?

    If I use the sites in this search, it will download another unwanted SW (spy, etc.) with the DLL file?

    It's almost a universal recommendation that not download you file DLL download sites. Many, if not most of these sites are created to support a useless program as a tuneup program, registry cleaner, etc.

    Is MSVCR71. DLL.3 a typo? I found MSVCR71. DLL on 2 computers, but not MSVCR71. DLL.3 (with le.3)

    This DLL seems to be part of .NET (dot net) when you access Windows Update, updates Dot Net Framework listed as recommended downloads?

    The DLL can be installed, but not saved. Follow the instructions in tha to

    http://support.Microsoft.com/kb/175775#method5 (method 5 - re-register necessary...)

    Re-register with the command regsvr32 msvcr71.dll msvcr71.dll

    Don

  • Named Instance/Application DLL and LabVIEW FIFO

    Hi all

    I'm working on a logging of sensor application in LabVIEW 8.5.

    Each driver (written in LabVIEW) sensor has its own loop and a named FIFO correspondent the latest read values written in. One of the pilots use VISA for RS - 232 and another DLL call to a library that is interface with a USB - I2C converter.

    The main recorder reads all the of the FIFO, concatenates the data in chronological order they are sampled from the FIFO and writes in a combined log file.

    The third recorder that I add now must be written in C the nature of the sensor with it's interface. Each new data set that comes in will be written to the file. I would like to send a message in the C program to the main recorder that includes the name and the position of all writes data; This information will be concatenated in the main newspaper for purposes of time synchronization.

    My intuition first easy synchronization is to write a VI (compiled into a DLL by using the LabVIEW application builder and called from C) who will use a FIFO named to pass a string to the C recorder for the main recorder. But I don't know how the appointed FIFOs are shared between instances of the application.

    In other words, if I have a reference to FIFO named 'test' in a VI compiled and called as a DLL and a FIFO named "test" in reference to the Application Instance main (or specific application instance to the project running on the same Windows computer), point to the same structure? Alternatively, they are specific to each instance? If they are specific to each instance, what do you suggest me as a method to be less hassle to get data between instances of the application?

    Thanks in advance!

    Bradley Hughes

    My intuition first easy synchronization is to write a VI (compiled into a DLL by using the LabVIEW application builder and called from C) who will use a FIFO named to pass a string to the C recorder for the main recorder. But I don't know how the appointed FIFOs are shared between instances of the application.

    In other words, if I have a reference to FIFO named 'test' in a VI compiled and called as a DLL and a FIFO named "test" in reference to the Application Instance main (or specific application instance to the project running on the same Windows computer), point to the same structure? Alternatively, they are specific to each instance? If they are specific to each instance, what do you suggest me as a method to be less hassle to get data between instances of the application?

    Thanks in advance!

    Bradley Hughes

    Queues, semaphores etc. are not shared between all instances of the application (although they were in LabVIEW 8.0, but it really was a bug). But just because you call a DLL that uses a DLL of LabVIEW with a queue does not necessarily mean that you work in two different application instances. If however you intende to write an independent C program that runs in a separate way of the process you can certainly not connect to a queue of LabVIEW in this way. The LabVIEW DLL will be loaded in the runtime LabVIEW according to but part of your C program process.

    Even if it would make you a C DLL that you call your LabVIEW application and calls said LabVIEW DLL to communicate through the queue, you can be problem. This will not work unless the DLL of LabVIEW and the LabVIEW application that calls your DLL is written in the same version of LabVIEW. In this case, the DLL is loaded into the LabVIEW development system already running or in the case of a DBMS built in the running system. Once your main application LabVIEW and the LabVIEW DLL are not the same version, the DLL will be launched out of process in the enforcement system according to itself, that it really run in its own process.

    Rolf Kalbermatter

  • wczdlg.dll and netshell.dll missing and cannot start my Windows Firewall

    Hi all
    I hope that someone will be so good to help my with this situation I tried (and failed) solve this past week or so.

    I lost my firewall, l, and network connections.  As advised I checked the status of the automatic Wireless Configuration.  The State was "arrested" and was not a solution for this.  I continue typing applications for a solution ot wczdlg.dll and netshell.dll missing.   Now I can sign BT.openzone - it's the only way I can use the web.

    Also I can't start my Windows Firewall.  I have no idea why my system is so badly damaged - the only situation I had was that my charger no longer works and my laptop crashed.  I also brought my laptop (HP compaq nc4200-Xp) to my daughter.
    I don't have a recovery disc and the disc I have with drivers does not download.  I would be grateful for any resolution of this problem.    I'm only a moderate ad user have no knowledge regarding the actual system so need advice step by step.
    Thank you very much
    Jacky

    Hi Jacky,

    Thank you for your response.

    I suggest you follow the steps in the link below.

    Could not start the Windows Firewall service in Windows XP SP2:

    http://support.Microsoft.com/kb/920074

    Note: This also applies to Windows XP Service Pack 3.

    To do: Important this section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base:

    322756 (http://support.microsoft.com/kb/322756/ )

    Let us know the status of the issue. If you need help, please after return. We will be happy to help you.

  • Replacement for "Microsoft.vsa.dll" and "Microsoft.VisualBasic.vsa.dll" in Visual studio 2005

    Hi all

    I am in the process of migrating a Visual studio 2003 project in Visual studio 2005.While recompilation of code with VS2005, I'm getting below error-

    ' 1. ' Microsoft.Vsa.IVsaEngine ' is obsolete: ' use of this type is not recommended because it is is deprecated in Visual Studio 2005; There is no replacement for this feature.

    ' 2 ' Microsoft.VisualBasic.Vsa.VsaEngine ' is obsolete: ' use of this type is not recommended because it is is deprecated in Visual Studio 2005; There is no replacement for this feature.

    Could someone please suggest me any solution for this problem?

    Any replacement is available for the files 'Microsoft.vsa.dll' and 'Microsoft.VisualBasic.vsa.dll '?

    Thanks in advance

    Arpita

    Hi Arpita,

    If I understand correctly you have a problem with Microsoft Visual Studio 2003, I suggest you send the same question in the Microsoft MSDN forums for assistance.

    http://social.msdn.Microsoft.com/forums/en-us/category/VisualStudio

    Hope the information is useful.

  • We monitor windows servers using pdh.dll and we receive "error PDH 0xc0000bc6:9 - > data are not valid" a few times in the meantime.

    We monitor windows servers using pdh.dll and we receive "error PDH 0xc0000bc6:9-> the data is invalid" a few times. Need to understand what causes this and how to fix the same.

    Hello

    The question you posted would be better suited in the TechNet Forums. I would recommend posting your query in the TechNet Forums. You can follow the link to your question:

    http://social.technet.Microsoft.com/forums/en-us/winserverManagement/threads

    Hope this information helps.

  • CertCli.DLL and XEnroll.dll

    I need to import the CertCli.dll and XEnroll.dll so that I can program a Microsoft certification authority.  How both dll do not import.  LabView reports that there is no functions defined in header files.  I imported the dll in LabWindows without problem.


  • Error messages: specified module could not be found for c:\windows\system32\tuvujuka.dll and c:\PROGRA-1\MYWEBS-1\bar\4.bin\M3PLUGIN. DLL

    I get two error messages when windows is loaded.  Specified module could not be found for c:\windows\system32\tuvujuka.dll and c:\PROGRA-1\MYWEBS-1\bar\4.bin\M3PLUGIN. DLL
    How can I fix?

    Hello

    • When you receive this error message?
    • What were the changes made before the issue started?

    I suggest you make a system full scan just to be sure.

    http://www.Microsoft.com/security/scanner/en-us/default.aspx

    Note: The data files that are infected must be cleaned only by removing the file completely, which means that there is a risk of data loss.

  • Error loading c:\windows\apoyuwax.dll and load c:\windows\apieta2.dll error

    Error loading c:\windows\apoyuwax.dll and error loading c:\windows\apieta2.dll what I need to fix this and if so, how?  Using Dell Dimension 8250 and XP Professional

    Hello

    Google who provides virtually no information that suggests it might be the malicious program or a start remains for her entry search

    Download update and scan with the free version of malwarebytes anti-malware

    http://www.Malwarebytes.org/MBAM.php

    You can also download and run rkill to stop the process of problem before you download and scan with malwarebytes

    http://www.bleepingcomputer.com/download/anti-virus/rkill

    If it does not remove the problem and or work correctly in normal mode do work above in safe mode with networking

    Windows Vista

    Using the F8 method:

    1. Restart your computer.
    2. When the computer starts, you will see your computer hardware are listed. When you see this information begins to tap theF8 key repeatedly until you are presented with theBoot Options Advanced Windows Vista.
    3. Select the Safe Mode with networking with the arrow keys.
    4. Then press enter on your keyboard to start mode without failure of Vista.
    5. To start Windows, you'll be a typical logon screen. Connect to your computer and Vista goes into safe mode.
    6. Do whatever tasks you need and when you are done, reboot to return to normal mode.

    If the error persists after scanning use this program to out startup

    This utility, which has a knowledge of auto-starting locations of any startup monitor, shows you what programs configured to run at system startup or login and that the entries in the order of processing windows. These programs include those in your startup folder, Run, RunOnce, and other registry keys. You can configure Autoruns to show other locations, including Explorer shell, toolbar extensions, helper objects to the browser, Winlogon notifications, auto and many start-up services even more.

    http://TechNet.Microsoft.com/en-us/sysinternals/bb963902

Maybe you are looking for

  • Change the title of the album

    Just to ask if anyone is still struggling to change the title of an album bought on iTunes. A year ago, I myself remember that, although it seemed that iTunes would allow me to change the title, a few days later, it was renamed to its original name.

  • How to uninstall Norton AntiVirus of my EL Capitan iMac running?

    The version of Norton Antivirus, I had before the update to EL Captian does not work with El Capitan, apparently. I want to uninstalled and you are using Symantec Endpoint Protection (which, by the way told me, works better than Norton). When I tried

  • Firefox cannot load page Deviantart Messenger

    This is what firefox show the Deviantart Messenger page after that I updated for Fire Fox http://uploadpic.NET/1SZV.PNG

  • How to disable Intel HD on my Qosmio X 770-103?

    Hello! I'm Italian. (Use google translator) :( I have a * Qosmio X 770-103 - series PSBY5E *. _A big favor: _ can you tell me how you managed to disable the Intel HD? You have disabled the Intel HD via the control panel or BIOS? If you have disabled

  • looking for software for Microsoft UAA for High Definition Audio - Adi 1986 function driver

    Looking for software or download for Microsoft UAA Function Driver for High Definition Audio - Adi 1986, I don't know where the drive is now?I tried a few links, but they do not fix the problem. My driver has been removed, where can I find the driver