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

Similar Messages

  • I have an iphone 5s....with the new IOS8 i have no sound on youtube vids in facebook...how can i correct this ?

    I have an iphone 5s....with the new IOS8 i have no sound on youtube vids in facebook...how can i correct this ? Also....I keep reading about a sideswitch mute in settings-general but do not see it.

    The SILENT switch on the side of the phone needs to be OFF-the red/orange means ON and Silver, Gray, Gold whatever color the phone is OFF. Switch needs to be switched closer to the screen in other words towards the screen. I had the same issue and discovered this was the culprit for NO SOUND in Videos.

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

  • HT1209 My Itunes Library and iPhone have fallen out of sync on music over the yearsare - how can I compare my itunes library with my Iphone  to see what songs are missing from my library so I can then bring my Library up to date

    My Itunes Library and iPhone have fallen out of sync on music over the yearsare - how can I compare my itunes library with my Iphone  to see what songs are missing from my library so I can then bring my Library up to date

    Hello Solid Buck,
    Thank you so much for providing the details about the duplicate song issue you are experiencing.  It sounds like you would like to remove the duplicate songs that will not play on your iPhone, but when you connect it to iTunes, iTunes only shows you one copy of the song on your iPhone. 
    In this situation, I recommend deleting the individual songs that do not play directly from your iPhone.  I found the steps to do this on page 61 of the iPhone User Guide (http://manuals.info.apple.com/en_US/iphone_user_guide.pdf):
    Delete a song from iPhone: In Songs, swipe the song, then tap Delete.
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • On certain web sites(with java applets embedded or rich content),sometimes browser hotkeys are beeing used with other functionality (eg.: youtube uses ctrl + tab for sliding between player controls).How can I prevent this?

    On certain web sites(with java applets embedded or rich content),sometimes browser hotkeys are beeing used with other functionality (eg.: youtube uses ctrl + tab for sliding between player controls).How can I prevent this ?

    Thanks for posting this!
    I would only mention that your definition is incomplete for this -
    Contextual selector A type of Style Sheet Selector that
    and that it's most often referred to now as a Descendent selector, not a contextual selector.  It's basically the same as the Compound selector that you have already defined....

  • My wife and I share one itunes account with separate libraries. When I sync her iphone in her library, it adds all of my iphone contacts to her contact list. How can we void this?

    My wife and I share one itunes account with separate libraries. When I sync her iphone in her library, it adds all of my iphone contacts to her contact list. How can we avoid this?

    Make groups of contacts in your Address Book and select the option to sync only selected groups to each phone.
    This explains how to create groups:  Mac 101: Address Book, http://support.apple.com/kb/ht2486

  • HT1495 i have an old apple id using an old email address how can i sync this one with my new id as i can not remember my old password

    i have an old Apple id using an old email address how can i sync this when i can not remenber the password wwith  my new account

    You'll have to contact iTunes store support to see if they can help you with this: http://www.apple.com/emea/support/itunes/contact.html.

  • When i try to play music on itunes it says the original file cant be found. I have music on exyernal dive and it is working . How can i correct this

    When i try to play music on itunes it says the original file cant be found. I have music on exyernal dive and it is working . How can i correct this?

    See if you have most of the songs with 'Exclamation' symbol precede the name under your music library.
    If so, double click a song with ! mark on side, you will be given an option to locate the file where the song is held. Select "locate" and direct it to your External Drive folder / file where the song is and open it.
    iTunes then will give you the option to use this process to update all of your library.  OK that as this will fix all automatically instead of doing them one by one.

  • My messages usage says I have 2.9GB of (saved) Messages. Thing is I have not 1 saved message, I delete them all. How can I clear this usage?

    My messages usage says I have 2.9GB of (saved) Messages. Thing is I have not 1 saved message, I delete them all. How can I clear this usage?

    AnAfromHi wrote:
    My messages usage says I have 2.9GB of (saved) Messages. Thing is I have not 1 saved message, I delete them all. How can I clear this usage?
    Firstly you DO NOT have to do a factory reset / wipe device, it is simply not required to get the space back!!
    Mine had 3GB and I just got rid of it all, here is how:
    METHOD ONE:
    Make a backup in iTunes
    open iBackupBot (Google it)
    Go to the relevant backup
    Click on Multimedia File Manager and click on the other Multimedia files tab
    Sort by filename by clicking the Filename tab
    Find MediaDomain/Library/SMS/Attachments and highlight all of them, then press delete.  You can also click to export to a folder of your choice, if you want to save them that is. 
    Then go to System Files>MediaDomain>Library>SMS>Attachments
    They will be all listed here, highlight them all and press delete
    Then just restore that backup using iTunes! 
      Tadaa! Space recovered, your messages are still there but without the attachments!  METHOD TWO:
    Backup your device in iTunes and then to iCloud
    Go to Settings>iCloud and toggle Documents & Data to OFF
    Then do a 2nd backup to iTunes and iCloud
    Then restore the device from iCloud and the message attachments should be gone, turn Documents & Data back on again in the settings
    PLEASE NOTE: Method two is a much longer process but some users may feel more comfortable with this method.
    P.S You may want to make two backups in case you get any of the above steps wrong, but it is simple to follow the above and not do anything wrong!
    P.P.S You could also just go through every single conversation and delete the attachments one by one, but if you have hundreds or thousands of attachments, this will take a VERY LONG TIME!!!

  • RAW JPEG PROBLEM  I'm new to Aperture and neglected to mark RAW JPEG pairs when I imported (from iPhoto).  Now I have two images for each photo.  Help!!  How can I change this?

    I’m new to Aperture and neglected to mark RAW+JPEG pairs when I imported (from iPhoto).  Now I have two images for each photo.  Help!!  How can I change this?

    How did you import from iPhoto? If you saw the Import panel with raw -jpeg pairs, then you probably did not import your iPhoto library as library, but as files, and then you will see plenty of duplicates - previews, thumbnails, originls, edited versions. If that should be the case, it would be better to delete the import from iPhoto and to import your iPhoto library again, but this time using "File > Import > Library".
    Only that would require compatible versions of iPhoto and Aperture.  What are your Aperture and iPhoto version numbers?

  • How can i fix my iphone i can't update or download apps, when i try it tells me toput my credit card info and i do but when i push done it tells me my payment has been declined, but why do i have to pay to update or download free apps. How can i fix this?

    how can i fix my iphone i can't update or download apps, when i try it tells me toput my credit card info and i do but when i push done it tells me my payment has been declined, but why do i have to pay to update or download free apps. How can i fix this?

    You must contact iTunes support to get the problem resolved.
    http://www.apple.com/support/itunes/contact/
    If there is a problem with your account or payment info, you cannot
    download anything (including free apps or updates) until the matter
    is resolved.
    In countries where the iTunes Store only sells apps, the accepted payment methods are Visa, MasterCard, and American Express. Other payment types such as gift cards, store credit, monthly allowances, ClickandBuy, and PayPal are not accepted. Depending on your App Store country, prices may be listed in your local currency, US Dollars, or Euros.    http://support.apple.com/kb/HT5552

  • I don't own an Apple device, but I have purchased an audio album from the iTunes store. How can I play this on my android phone, as I am unable to burn the album to mp3 format? Can I obtain a refund if this is not possible? Thanks

    I don't own an Apple device, but I have purchased an audio album from the iTunes store. How can I play this on my android phone, as I am unable to burn the album to mp3 format? Can I obtain a refund if this is not possible? Thanks
    p.s. I am not knowledgeable of Apple/iTunes etc, I was under the impression that if I purchased an album then I can use my purchase on a non-Apple device

    mickyja wrote:
    I don't own an Apple device, but I have purchased an audio album from the iTunes store. How can I play this on my android phone, as I am unable to burn the album to mp3 format? Can I obtain a refund if this is not possible? Thanks
    p.s. I am not knowledgeable of Apple/iTunes etc, I was under the impression that if I purchased an album then I can use my purchase on a non-Apple device
    Micky,
    The iTunes Store sells songs in AAC format.  Most Android phones can play AACs.  Just sync them to your phone per the instructions with the phone.
    If by any chance your phone does require MP3 format, you can use iTunes to convert the files, per this guide: 
    iTunes: How to convert a song to a different file format - Apple Support
    (This conversion does not require burning.)
    For future reference, note that the iTunes Store is really optimized for people using Apple devices.  You might find it more convenient to buy music in Mp3 format from Amazon Digital Music or Google Play Music.

  • When I am home, calls to my iPhone 5 also go to my other family members' iPhones.  How can I get this to stop happening?

    When I am home, calls to my iPhone 5 also go to my other family members' iPhones.  How  can I get this to stop happening?

    Or better yet, create and use new Apple IDs for others in your household. You could always use different Apple IDs for iCloud services (like iMessage and FaceTime) and iTunes and App Store., but it's even easier to share purchased content now with Family Sharing.

  • When i try to install windows 8 with bootcamp on my Macbook pro (early 2011) it says it only supports windows 7, how can i fix this?

    When i try to install windows 8 with bootcamp on my Macbook pro (early 2011) it says it only supports windows 7, how can i fix this?

    if your computer does not support the operating system you wish to install in bootcamp then you have to use a virtual machine like virtual box to install the operating system you wish to install

  • Have over 86GB of music now showing as "other" and although it is still on my iPod it is not playable.  Most is from imported CDs. I do have a backup file on an external hard drive. How can I fix this?

    Have over 86GB of music now showing as "other" and although it is still on my iPod it is not playable.  Most is from imported CDs. I do have a backup file on an external hard drive. How can I fix this?

    To import music into your iTunes library on the computer go to iTunes>Help>iTunes Help>Add items to iTunes and follow the instructions
    Delete the "songs" that do not play in your iTunes library and reimport them.

Maybe you are looking for

  • Opening Existing Word/Excel Files Using the LabVIEW Office Report Generation Toolkit

    Hi... Can anybody help me for opening an existing excel sheet with specified name Am using labview 8.0 Thanks in advance...

  • Re: Exchange Rate value is different in VF01-Header

    Hi, We maintain different Exchange Rate Type for Customer and Vendor. For Customer we maintain in Cust Master  AR( Rate for Sale).In OB08 we also maintan USD to INR for AR Exchange rate type.( Rs 48). In sales order Exchange rate is fine .It's coming

  • Customized Workspace Cannot open PDF forms anymore

    Hello, I have customizaed my workspace with Flex Builder 3, Flex SDK 2 Hotfix 3. In previous months, everything is ok, and my workspace with IE 7.0 can open PDF forms inside processes. However, I do not know what is changed, my previous customized wo

  • Wont install on WIndows

    Wont install on WIndows, what ever package I create with CC Acrobat Pro just doesn't install. Everything else works but not Acrobat Pro. It runs the installer, but nothing get installed. 32 & 64 bit versions of windows. The stand alone Pro download w

  • Reading SRM- MDM Catalog from R/3

    We need to validate which Product Hierarchy a user used when adding an item to a cart from the SRM Catalog. We are using Function Module BBP_PD_SC_GETDETAIL to get the key content of the selected cart(s) but this does not give us the required informa