06-04-2010 08:47 AM
I'm not sure if I'm even trying the possible here as I have searched and not been able to find much at all. However I figured it was worth asking here.
I have access to several dll's used by a program, I need to open a file using the program (for some reason it is completely non responsive unless you open it "within" the program itself) and so decided to browse the .dll files included. Ive found a few functions which may carry out the function I need. Is there a way of figuring out the inputs/outputs if I don't have documentation or a header file?
This is the next stage in a huge project I am working on at the moment and I've been banging my head against the wall all day trying to figure this out.
Thanks in advance for any help
Rik
06-04-2010 09:20 AM
What is "the program" here? Is it a LabVIEW program? Is it some other executable? If so, how do the DLLs fit into this.
As for finding out the parameters for the functions in the DLL, you could try using DLL Export Viewer. I've used it in the past with mixed success.
06-04-2010 09:27 AM
The program in question is a called QVPak, its a piece of CMM control software.
Within my program I am trying to launch that software (that part works using the CMD function) and call a particular file for it to run (this part doesn't work from the CMD function). The program file wont even load from a doubleclick or using the shell32.dll
I figured if I was able to use the programs inbuilt loader (as in going to file open) via a dll then I may be able to get around this problem.
Does that make sense?
06-04-2010 09:42 AM
Yes, that makes sense. It also means that what you are trying to do is not likely to work. You have no way of knowing what the program does when opening the file, so guessing at using the DLLs is purely a shot in the dark without even knowing where the dark is. Even if you could find the function (assuming it's just one) that loads a file, how is the program supposed to use it now? That function has to be called from within the program. When you call it from LabVIEW you are not sitting inside the program's memory space, so it has no way of knowing about the file.
I would suggest, instead, to see if the program accepts command-line parameters. For example, does it accept a name of a file to open as part of launching it from the command line? If not, then you may need to resort to trying to control it via automation. If it has no built-in automation then you need to resort to using the OS to make pretend you're clicking buttons and typing text. This has come up many times before, and there have been numerous posts on this, so please do a search on controlling an external program from LabVIEW within this forum. You can call the Windows API functions to move the mouse to a specific location and click the button as well as typing text, or you can use third-part automation tools. One that I have used successfully is AutoIt. The search I indicated will yield other suggestions.
06-04-2010 09:49 AM
Thanks alot for your help, I suspected as much. Automation was my next choice so I will go down that route. The command prompt yields no results at all which is somewhat... annoying
Thanks again and maybe oneday I'll know enough about labview to return the favour!
Regards,
Rik
06-10-2024 09:50 AM
Hi RIK…
I m working with MITUTOYO QVPAK AND QVPAK SOFTWARE. My old script is not working with new machine QVPAK ACTIVE. I r need help with the script…PLEASE.
06-10-2024 11:36 AM
Hi Abhirami,
you should ask Mitutoyo instead of Ricky. (Ricky visited this forum 14 years ago…)
@Abhirami81my wrote:
My old script is not working with new machine QVPAK ACTIVE. I r need help with the script…
Which "script" are you talking about?