Need help with a struct that i need to pass to a dll

I have just received an SDK from a third party vendor.
I need to pass a struct to a dll in order to use our measuring arm.
Here's the definition of the struct
struct vOpenInfo
        int                 nFuncType;       // = DLL_OPEN_CMM (or 1)
        HWND         hwnd;
        WCHAR      sSaveDir[128];
        void             (*HelpCallBack)();
Here's the definition of the only function that I can access from the DLL
int CmmSpecific(void *)
From what I understand the CmmSpecific function use the pointer on the structure to know what I want to do.
The only problem, is that I need to transform LabVIEW data onto that type of struct.
Does anybody have an idea how can I do it?
Thanks in advance

Julien Tozzi wrote:
I have just received an SDK from a third party vendor.
I need to pass a struct to a dll in order to use our measuring arm.
Here's the definition of the struct
struct vOpenInfo
        int                 nFuncType;       // = DLL_OPEN_CMM (or 1)
        HWND         hwnd;
        WCHAR      sSaveDir[128];
        void             (*HelpCallBack)();
Here's the definition of the only function that I can access from the DLL
int CmmSpecific(void *)
From what I understand the CmmSpecific function use the pointer on the structure to know what I want to do.
The only problem, is that I need to transform LabVIEW data onto that type of struct.
Does anybody have an idea how can I do it?
The previous post is basically correct but one thing catches my eye here and that is the fourth element in the structure which is a function pointer. The LabVIEW system can't really deal with this without quite some involved programming I would not recommend anyone to try without some very good C programming knowledge.
So if the API description doesn't tell you that it is valid to just pass in here a NULL value to disable the callback, writing a wrapper DLL that translates this into a more LabVIEW friendly interface is by far easier to do.
Rolf Kalbermatter
Message Edited by rolfk on 01-11-2007 10:09 AM
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions

Similar Messages

  • Need help with WMI code that will send output to db

    'm new to WMI code writing, so I need some help with writing code that we can store on our server. I want this code to run when a user logs into their computer
    and talks to our server. I also want the code to:
    * check the users computer and find all installed patches
    * the date the patches were installed
    * the serial number of the users computer
    * the computer name, os version, last boot up time, and mac address
    and then have all this output to a database file. At the command prompt I've tried:
    wmic qfe get description, hotfixid
    This does return the patch information I'm looking for, but how do I combine that line of code with:
    wmic os get version, csname, serialnumber, lastbootuptime
    and
    wmic nicconfig get macaddress
    and then get all this to output to a database file?

    Thank you for the links. I checked out http://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx and
    found lots of good information. I also found a good command that will print information to a text file.
    Basically what I'm trying to do is retrieve a list of all installed updates (Windows updates and 3rd party updates). I do like that the below code because it gives me the KB numbers for the Windows updates. I need this information so my IT co-workers &
    I can keep track of which of our user computers need a patch/update installed and preferably which patch/update. The minimum we want to know is which patches / updates have been installed on which computer. If you wondering why we don't have Windows automatic
    updates enable, that's because we are not allowed to.   
    This is my code so far. 
    #if you want the computer name, use this command
    get-content env:computername
    $computer = get-content env:computername
    #list of installed patches
    Get-Hotfix -ComputerName $computer#create a text file listing this information
    Get-Hotfix > 'C:\users\little e\Documents\WMI help\PowerShell\printOutPatchList.txt'
    I know you don't want to tell me the code that will print this out to a database (regardless if it's Access or SQL), and that's find. But maybe you can tell me this. Is it possible to have the results of this sent to a database file or do I need to go into
    SQL and write code for SQL to go out and grab the data from an Excel file or txt file? If I'm understanding this stuff so far, then I suspect that it can be done both ways, but the code needs to be written correctly for this to happen. If it's true, then which
    way is best (code in PowerShell to send information to SQL or SQL go get the information from the text file or Excel file)?

  • Hi can anyone help with a mac that had magnet put on it. I turned it on and then off but a white screen appears with a file with a question mark on it?

    Hi can anyone help with a mac that had magnet put on it. I turned it on and then off but a white screen appears with a file with a question mark on it?

    File icon with ? mark on it means it can't read from the hard drive. The hard drive is now wiped or bad. If just wiped then you will need to reinstall your operating system, OS X. If bad you will need to replace the drive.
    Start with booting the computer from the OS X install DVD that came with your system. If the Mac came with Lion Pre-Installed then you use the Lion internet recovery system to reinstall (Hold down Command+r keys or Command+Option+r keys to boot the computer from over the internet to the Lion recovery HD system).
    Good Luck.

  • How can I get help with pending songs that have taken over 12 hours to fully download?

    How can I get help with pending songs that have taken over 12 hours to fully download?

    You can only suspend service for 3 months at a time (with or without payment) and only twice a year.

  • Can i get help with 2 songs that i downloaded on my itunes? it didnt download, said there was an error and then is stuck at PURCHASED.

    can i get help with 2 songs that i downloaded on my itunes? it didnt download, said there was an error and then is stuck at PURCHASED.

    I'd report the problem to the iTunes Store. 
    Log in to the Store. Click on "Account" in your Quick Links. When you're in your Account information screen, go down to Purchase History and click "See all".
    Find the items that are not downloading properly. If you can't see "Report a Problem" next to the items, click the "Report a problem" button. Now click the "Report a Problem" links next to the items.

  • Need help with a workflow that will restrict resize to 720x540

    I need help constructing a workflow that will resize any image I choose to 720x540. I want this to be restrictive to this size, in other words I don't want 720x468 or etc. I have tried this too many times, will no success so now I am reaching out for help. HELP. Once I have correct resized an image as needed I want to change its format and save a copy.
    As always thanks for your reading and replying to my Post,
    Sebastian

    Hi there,
    what Image editing software do you have, if any ?
    regards
    Ric

  • Help with working script that won't convert på higher version player (As2)

    HI have an issue with a file that was created some time ago to Fplayer v6 and when I now “upgrade” it to 8-9 or 10 it does not load the xml links ;/
    I have no idea why, the file(s) works fine in the old player 6
    I have a set of xml files (note: one file for each country on a map,and the possible solution should not include to put all links in the same xml file)
    the xml looks like this (example is for Denmark file called dk.xml):  [code]
    <broadcast>
    <story>
    <lead>www.alink.com</lead>
    <URL>http://www.alink.com/</URL>
    </story>
    </broadcast>
    So in the flash file I have a set of buttons the does a few actions
    one action is to call/go to a specific frame in a MC in that frame I put the Xl loading stuff for each frame (lable)
    [code]
    headlineXML = new XML();
    headlineXML.onLoad = myLoad;
    headlineXML.load("be.xml");
    function myLoad(ok) {
                                 if (ok == true) {
                                 Publish(this.firstChild);
    function Publish(HeadlineXMLNode) {
    if (HeadlineXMLNode.nodeName.toUpperCase() == "BROADCAST") {
    content = "";
    story = HeadlineXMLNode.firstChild;
    while (story != null) {
                                 if (story.nodeName.toUpperCase() == "STORY") {
                                 lead = "";
                                 URL = "";
                                 element = story.firstChild;
    while (element != null) {
    if (element.nodeName.toUpperCase() == "LEAD") {
    lead = element.firstChild.nodeValue;
    if (element.nodeName.toUpperCase() == "URL") {
                                 URL = element.firstChild.nodeValue;                                                                                                                   
    }                                                         element = element.nextSibling;
    content += "<font size='+2' color='#3366cc'><a href='"+URL+"'>"+lead+"</a></font><br>"+body+"<br><br>";
    txt.htmltext=content;
    story = story.nextSibling;
    the button (main stage)  that calles the MC frame lable with the xml that loads the load thex and a link into a dynamic txt box (called “txt”), has this code on it: [code]
    on (press) {
                                 infoon("DK");
    on (rollOver) {
                                 DK._alpha = 50;
    on (releaseOutside, rollOut, dragOut) {
                                 DK._alpha = 100;
    so as said it works fine in FP 6 (as2)  but when published to FP 8 -9 or 10 only the XML does not load at all
    What could be the issue (I know that it is old code and it is pretty poor and should be fully upgraded but my
    skills is not on that level, I managed to make the above work from some tutorials but understanding the publishing issues
    is a bit over my head J
    I would be extremely gratefull if anyone could help me out it is really frustrating especially since the file actually works fine
    in the old player ;/
    best
    OrsonB

    the two most common issues when converting from as2 vp 6 to as2 vp 6+ are:
    1.  failure to initialize some variable.  (if not explicitly initialized in vp 6, understood to be zero.  in vp+, it's undefined.)
    2.  vp6 is not case-senstive.  vp 6+ is case- sensitive.
    you have both.
    body is undefined and htmltext is not the same as htmlText.  fix those and retest.

  • Need Help With An Application That Produces Live Images Within Tilelists

    At the moment I have an application which is meant to produce live thumbnail images of websites. Currently how it does this is a html component (myhtml) loads websites via it's location property changing from website to website and upon fully loading of each site a "snapshot" is taken of the html component and saved as a bitmap and applied as the source of an image corresponding to that particular site (abcnewsimage and bbcnewsimage). However I now need to insert these snapshots within the 'icon' properties of 2 array collections (myTilelistAArrayCollection and myTilelistBArrayCollection) which act as dataproviders to populate 2 tilelists (mtTilelistA and myTilelistB).
    Basically I need the same images to appear automatically within the tilelists the way they do in the 2 images as the snapshots are taken by applying the same bitmaps into the currently empty 'icon' properties of the 2 tilelists i.e. the icon of the ABC News Item of both array collections must be the same as the abcnewsimage and appear as it appears and the same for the BBC News Item icon being the same as the bbcnewsimage picture as that appears.
    It should look like the images are appearing in the tilelist at the same time as they are appearing in the regular images. What will I need to put into the icon properties to do this?
    I hope this makes sense and if anyone can help me out it would be much appreciated. :-)
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication
    xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" verticalAlign="middle" backgroundColor="white" width="1024" height="768">
    <mx:Script>
    <![CDATA[
    import mx.graphics.ImageSnapshot;
    import mx.collections.*;
    private function takeSnapshot(event:Event) :void{
    var imageBitmapData:BitmapData = ImageSnapshot.captureBitmapData(myhtml) ;
    switch(myhtml.location){
    case "http://abcnews.go.com/":abcnewsimage.source =
    new Bitmap(imageBitmapData);myhtml.location =
    "http://news.bbc.co.uk/";
    break;
    case "http://news.bbc.co.uk/":bbcnewsimage.source =
    new Bitmap(imageBitmapData);
    break;}
    private var myTilelistAArrayCollection:ArrayCollection = new ArrayCollection([{id:
    "ABC New Item", label:"ABCNews", icon:""},{id:
    "BBC News Item", label:"BBC News", icon:""}]);
    private var myTilelistBArrayCollection:ArrayCollection = new ArrayCollection([{id:
    "ABC News Item", label:"ABCNews", icon:""},{id:
    "BBC News Item", label:"BBC News", icon:""}]);
    ]]>
    </mx:Script>
    <mx:HBox x="10" y="10">
    <mx:Image id="abcnewsimage" width="100" height="100" scaleContent="true"/>
    <mx:Image id="bbcnewsimage" width="100" height="100" scaleContent="true"/>
    </mx:HBox>
    <mx:HTML id="myhtml" location="http://abcnews.com/" complete="takeSnapshot(event)" width="250" height="250" horizontalScrollPolicy="off" verticalScrollPolicy="off" x="10" y="118"/>
    <mx:TileList x="268" y="118" width="294" height="250" id="myTilelistA" dataProvider="{myTilelistAArrayCollection}" rowHeight="100" columnWidth="100"/>
    <mx:TileList x="570" y="118" width="294" height="250" id="myTilelistB" dataProvider="{myTilelistBArrayCollection}" rowHeight="100" columnWidth="100"/>
    </mx:WindowedApplication>

    Cheers Flex harUI. From what I can see superimage is mainly used to keep images at better quality. What I'm concerned with is having the images set within the 'icon' properties of the 2 tilelists AS they are set within their specific images. I've tried databinding by doing this for example:-
    {id:
    "ABC New Item", label:"ABCNews", icon:"{abcnewsimage.source}"},
    I hoped that would cause the icon field of the array collection to be populated by the source of the abcnewsimage so that as the abcnewsimage is populated by the snapshot that is taken of the abcnews website the icon field of the abc news item in the array collection would be too so that furthermore the tilelists would then be populated by these images. Basically as each snapshot appears in it's specfic image it needs to be loaded into the icon property of the array collection too. In the end the icons should look as if they are appearing within both the tilelists the same way as they are appearing within the images if that makes sense. The images should be loading within the tilelist one at a time as they are in the regular image components.

  • Need help with an applet that will only run as an application

    I am working on a slide show applet. The problem is that is won't run as an applet. I added a quite standard main method to stick the applet in a JFrame and this worked. I believe that the problem lies in how I am trying to open the files.
    here are two of the methods that I believe contain part of the problem
         private void showImage( String image_name )
              image_file = Toolkit.getDefaultToolkit().getImage( image_name );
              display_image.loadImage( image_file );
              repaint();
         private void setFileFolder( String folder )
              file_finder = new File( folder );
              file_results = file_finder.list();
         }image_file is an object of class Image, display_image is an object of class ImageComponent (extends JComponent to draw an image), and file_finder and file_results are both objects of class File
    I would greatly appreciate it if some one would help me with this.
    The full source can be found at http://www.geocities.com/enchantedforest/3688/ImSP.zip

    Ok. I got the image loading to work.
    Now how do I fix the second method shown in my first post? It is needed to find all of the images in one specific folder so that the slide show can run.

  • Need help with href link that submits

    I need some help. I dynamically create HTML that displays a horizontal row of page numbers in Position 8. Although they look like page numbers to the use, are not true Apex pages, but rather "logical" pages that change the content in a single Apex physical page. The URL that gets returned from the HREF sets a variable in the page. Then I need a submit to occur so that all my "after submit" processes run, and the page re-renders. Is this even possible? I've been unsuccessful so far.
    Thanks.

    Martin,
    Two things...
    1. Be careful about "hard coding" values in a link. I don't know if you've already done this, but the link should use substitution variables as so...
    f?p=&app_id.:&app_page_id.:&app_session.::NO::P94000_LOGICAL_PAGE_NUM:2
    When the page renders each substitution variable will be replaced with the correct value.
    2. Not that it really matters, but you named your variable starting with P94000. Typically this would indicate the variable appears on page 94000. Is this the case?
    The problem with what you want to do is that it can be done so many different ways. Each way is not necessarily better than the other. Number 1 above is using a link in the traditional sense. It's a link to the same page (achieved by using app_page_id). It will not submit the page but it contains enough information to set the value of a variable and you can code off of that variable's value.
    You could use a JavaScript trick, but I wouldn't bother for this. In addition, you could use the request value over a variable value to feed off of but since you already started with the variable I'd stick with that.
    The first thing you need to do is figure out if your variables value is being set with the link... Let me know if you have more questions.
    Regards,
    Dan

  • Need help with digital photos that turn fuzzy in Final Cut Pro 5

    I read the whole thread on using still pictures in FCP 5 without finding a solution to the problem I am having these days. The digit pictures I am using are all around 1632 x 1232 pixels (230 dpi), they are about 43.8% after I drop them onto the timeline and I zoom in to no more than 75%. I don't know why dark colour edges in the pictures look pixelated. The picture quality (sharpness) also does not look not as good as it appears in the viewer. I tried resizing them in photoshop before bringing them onto FCP but that does not improve the picture quality. I also tried various video filters: Shift, de-interlace, but without any satisfactory result.
    Thank you in advance for any suggestions on this issue.

    It's almost to start guessing because you seem to have tried everything. But we can't tell if you applied these changes or filters properly without watching you or your output.
    My main problem is pixelated edges especially when there is a big contrast in colour. <</div>
    this could just be what you're stuck with. DV and MPEG2 are terrible codecs for hard edges. Professionally produced DVDs are carefully encoded using bigger-badder tools than you have at your disposal.
    Don't resize your images in PS, just bring them in full size and scale them locally in FCP. An image that is 1kx1k will only display about one-fourth of the image in the Canvas at full size because the Canvas only displays about 500x700 pixels.
    The scaling algorithm in FCP totally blows but it's a video app and should not be compared to PS. You do not need Photoshop scaling quality, wasted energy. What you DO need is proper motion blur for your moves, a bit of Gaussian to hide the inevitable artifacting.
    Open the manual and look up rendering options and render settings and realtime settings. The FCP5 settings offer some interesting options with meaningless descriptions.
    bogiesan

  • REALLY NEED URGENT HELP with typedef struct char in LabVIEW

    Hi,
    So I am calling a DLL inside my LabVIEW VI.
    Inside the DLL, I have the following structure:
    typedef struct
          char string[21];
    } Geo_Tuple;
    Then I used it here in a function by calling:
    set_Geo_Coordinates(const File_or_Interactive State, const Input_or_Output Direction, const Geo_Tuple coordinates)
    (Note that File_or_Interactive and Input_or_Output are typedef enum.)
    So now, I am trying to implement this function in LV using the Call Function Node.
    However, it's not working --> const Geo_Tuple coordinates does not have the correct structure.
    So my question:
    How do I implement
    typedef struct
          char string[21];
    } Geo_Tuple;
    So that I can use it here: set_Geo_Coordinates(const File_or_Interactive State, const Input_or_Output Direction, const Geo_Tuple coordinates)
    Thanks!

    How have you configured your call library node?  To get a representation in LabVIEW of your Geo_Tuple type you'll need to create a cluster that contains 21 U8 elements, which you can do by creating an empty U8 array and wiring it to "Array to Cluster" set to 21 elements.  Connect this to the input side of the call library node.  On the output side, convert back to an array, and from there convert it to a string.

  • Need help with .mov files that won't open

    Here's the situation...
    I have 2 dvdr's with 4 .mov files on them. when i try to copy them to my desktop it tells me that
    "the finder cannot complete the operation because some data in "BonJovi_Who_SaysDV NTSC.mov" could not be read or written. (Error code -36)
    I have to gain access to these .mov files tonight or I'm gonna be a real shithead. I just got the discs fedex'd to me today so I didn't put it off til the last minute. Can anyone offer any possible solutions? If so, please help.
    Java

    Putting aside copyright issues in (naive?) belief you have a legitimate use of the material, your problem lies in the file or disk. One of them is either corrupt or not compatible with the drive you are trying to read it on. Try it on another computer (even a PC) and if you can read it on that computer make a new copy of the file on a new disk or a firewire drive (or USB stick if it fits).

  • Need help with control system that reduces a flat output signal every time a certain input exceeds given value

    I'm having difficulty setting up a closed loop control system that reduces one of my voltage outputs (connected to a high voltage system) by 30% every time a measured voltage exceeds a certain threshold value.  I'm using a USB 6229 DAQ.  I've been trying to create a waveform that looks like a DC signal, but the only waveforms that I can seem to manipulate while my VI is running are the stock waveform types.  Also, I've tried to use a formula node or conditional structure to update the output value every time the measured voltage exceeds a given value, but everything I do reinitializes the output value every time it runs or won't store the previous signal value.  I'm using LabVIEW 8.6 and don't have the PID or similar express VI's.  I've attached the mess I've got working right now.  Can anyone help?  I'm really stuck!
    Thanks! 
    Attachments:
    HiV step down.vi ‏40 KB
    output control.vi ‏100 KB

    I'm sorry it's such a mess; I'm still pretty new at this.  These are both little driver programs for a larger overall control program. 
    Output control is meant to send a flat signal to the DAQ whose value can be manipulated while the VI is running.  I have the second activated segment merely to check the values being output.  I didn't realize I attached a version with a meaningless control...I had a control where the user would put in the stating voltage (the high voltage source has a 1V-100V setting for external control).  I've attached this slightly different but equally dysfunctional version.  Ideally, I would have liked something like the analog signal generator vi to come with an input wiring for offset on the DC signal.  Most of the code was diabled because it is copied from an example; it is largely rubbish.  I initially used the DAQ Assistant, but when things weren't working out I switched to putting in each step manually to try to troubleshoot.
    As far as HiV step down is concerned, I've tried something different with a nested case structure (if that's the right terminology?), and I've attached that file.  I think this problem has been solved, but you never know!
    Attachments:
    output control slightly different.vi ‏100 KB
    HiV step down w case structures.vi ‏44 KB

  • HT5622 i need help with emails addresses that are registered with my apple ID

    Hi Apple,
    when i set up Apple ID, I added a second email address as a back up but its not the one i use daily. So all the emails im getting from you at the moment are going to the second email and not the first email address. How do i reset it so that i get the emails from you in the email address i do use daily?

    Hi squara,
    Welcome to the Support Communities!
    The article below may be able to help you with this issue.
    Click on the link to see more details and screenshots. 
    Associating and verifying email addresses with your Apple ID
    http://support.apple.com/kb/HE68
    Cheers,
    - Judy

Maybe you are looking for