LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I use a dll if I dont have a header file

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.Smiley Happy

 

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

_________________________________________________________________________________________________

That glass?

Thats glass is neither half full or half empty....
Its twice the size it needs to be
0 Kudos
Message 1 of 7
(3,699 Views)

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. 

0 Kudos
Message 2 of 7
(3,685 Views)

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?

_________________________________________________________________________________________________

That glass?

Thats glass is neither half full or half empty....
Its twice the size it needs to be
0 Kudos
Message 3 of 7
(3,678 Views)

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. 

Message 4 of 7
(3,667 Views)

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

_________________________________________________________________________________________________

That glass?

Thats glass is neither half full or half empty....
Its twice the size it needs to be
0 Kudos
Message 5 of 7
(3,661 Views)

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.

0 Kudos
Message 6 of 7
(417 Views)

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?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 7
(396 Views)