Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/29/2011 in all areas

  1. National Instruments is donating a 4Gb DatastickPRO USB thumb drive: Well that doesn't sound very interesting, does it? What kind of lame-arse prize is that NI? I mean, come on - you've got to do better than a 4Gb thumb drive - seriously. Wait, what? What's that you say? There's something on the drive? You're kidding! A LabVIEW 1.0 Emulator, complete with instructions of how to run it! You can run the emulator from the datastick, and test out your favorite retro code - just remember, do not adjust your monitor - the code is meant to be in black and white Thanks to National Instruments. for continuing to support the LabVIEW community!
    2 points
  2. The likely reason why it's not working is that you're probably using 32-bit LabVIEW, but running on a 64-bit OS. Windows is not allowing you to call the osk.exe that it comes with since it's 64-bit. When you copied the osk.exe from Windows XP you copied the 32-bit version, and that's why it worked. If you were running LabVIEW 64-bit you wouldn't have an issue. You could try to use the Wow64DisableWow64FsRedirection function (http://msdn.microsof...v=vs.85%29.aspx) but I've never done this myself. Follow-up: Attached is a LV2009 VI that you can try. Note that the VI is configured to run in the UI thread. I have the 32-bit version of LV2009 and am running Win 7 64-bit and this VI launched the on-screen keyboard. EDIT: I made a wiring error on my previous upload. run osk.vi
    2 points
  3. Olivier, FYI: your second link point to a non-existent page. It appears you have an extra "s" at the end of "software" You can handle drag and drop by using the Windows API. As a quick way to get started I modified the example that comes with the Windows Message Queue library which you can download from NI. The primary reason for this is that it has a message loop. You can then tell Windows that you're going to accept drag and drop, and register for the WM_DROPFILES message. The DragQueryFile function will tell you how many files were in the drag, and you can then call it repeatedly to get each filename. Attached is the modified example (LV2009) to get you started. You will need to download the library separately from the NI site. All it does is display the dragged files to an array indicator. I also do not check to see where the drop actually occurred (i.e. to see if the user let go of the mouse on the tree control as opposed to somewhere else). If you need this I'll leave it to you to add it in. Windows Drag Drop Example.vi
    1 point
  4. Your experience sounds like something I read earlier this week.
    1 point
  5. Meaning it's 75 deg and sunny instead of 95 deg and sunny? Quick! Somebody call the wahhhmbulance.
    1 point
  6. You need to write a C wrapper function for that. LabVIEW strings are not the same as a char*, so creating an array of LabVIEW strings does something quite different than char**. Besides, char ** is rather ambiguous anyways. It could be an array of string pointers as your API expects it or it could be also a reference to a string pointer. Basically you need to write a C function that increases every LabVIEW handle in the array with one character annd fill in the terminating 0 char there, then create an array of pointers where you fill in the string pointer extracted from the LabVIEW handle. Something like this: typedef struct { int32 len; LStrHandle elm[];} **LStrArrHdl;yourtype LVfunctionWrapper(....., LStrArrHdl arr, ....){ int32 i ; char **ptr = malloc((*arr)->len * sizeof(*char)); if (!ptr) bailout; for (i = 0; i < (*arr)->len; i++) { int32 len = LStrLen(*((*arr)->elm[i])); LStrHandle h = (*arr)->elm[i]; err = DSSetHandleSize(h, len + 1); if (err) bailout; ptr[i] = LStrBuf(*h); *(ptr[i] + len) = 0; } retval = yourfunction(......, ptr, ......); free(ptr); return retval;}
    1 point
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.