Jump to content

the_dude

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by the_dude

  1. Ton,

    How about using the following process, for controlling any third-party executable running on cmd prompt using WinAPIs:

    1) Get the third party window handle by using GetWindowHandle API.

    2) Use AttachConsole() API from kernel32.dll - This would make the third party console controllable through LabVIEW

    3) Use GetConsoleScreenBufferInfo() from kernel32.dll, with which you can read the console information

    4) Use another function (can't remember the function name) which would write to the console

    5) Repeat Step 3 and read the output for the written command in step 4 (you might need to do some string parsing to get the desired output)

    6) Use FreeConsole() function from kernel32 again, to free up the console at the end of the application.

    This way, you don't need to redevelop the third party app in labview, rather you could re-use the cmd prompt with this method with labview and have control/read data on it.

    I am planning to make a small example of this and post it very soon.

    -FraggerFox!

    FraggerFox,

    I'm very interested in your solution. Did you ever make an example (I'm using LV 8.6)?

    Corey

×
×
  • Create New...

Important Information

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