LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use comdlg.dll in labview

Solved!
Go to solution

I want to call OPENFILENAMEA function in comdlg

https://docs.microsoft.com/en-us/windows/win32/api/commdlg/ns-commdlg-openfilenamea
in this link you can find data structure of this function.

Anyone please suggest me to configure it in dll call. I tried with cluster and discrete values i can't do it.

Here i attached my code and dll.

Download All
0 Kudos
Message 1 of 13
(4,041 Views)
Solution
Accepted by naveen_k

From 16 years ago:

How-to-open-multiple-files-in-LabVIEW 

 

It would need adjustments for LabVIEW 64 bit...

0 Kudos
Message 2 of 13
(4,013 Views)

Thank you sir. It works in 32 bit.

I have no idea what need to change for 64 bit.

can you guide me ?, please

0 Kudos
Message 3 of 13
(4,008 Views)

You would have to go through all the VIs and make anything that contains a handle (hinst..., hwnd....,) or a pointer (lp....) to be pointer sized integers. That can't be done for numerics inside clusters so you would have to create two seperate clusters, one for 32-bit where these entities are 32-bit integers and one for 64-bit where these entitities are 64-bit.

Rolf Kalbermatter
My Blog
Message 4 of 13
(3,990 Views)

@naveen_k wrote:

Thank you sir. It works in 32 bit.

I have no idea what need to change for 64 bit.

can you guide me ?, please


In short, change all 32 bit integers that are pointers to pointer sized integers.

 

There's not really a deterministic way to tell if handles are pointers or not. But allocated memory certainly is...

 

If you only use 32 bit LabVIEW, you won't need to implement the 64 bit version (until you switch of course).

0 Kudos
Message 5 of 13
(3,984 Views)

I changed all 32 bit integers to I64 (signed 64 bit integer). and dll entries as Signed pointer sized interger.
Still it is not working in 64 bit.

Please help me to overcome this.

0 Kudos
Message 6 of 13
(3,978 Views)

First you should of course show what you have done when asking for help!! We do not have a crystal ball to see what your VI looks like on your computer.

 

Second, expecting this scream for help already I reworked the VI to work for both 32-bit and 64-bit and also cleaned it up considerably. Still needs some more testing but this is what it will look like.

Get Multi Selet Files.png

 

Rolf Kalbermatter
My Blog
Message 7 of 13
(3,975 Views)

Sorry Sir. Here I attached LLB which i modified

0 Kudos
Message 8 of 13
(3,972 Views)
Solution
Accepted by naveen_k

So I created the VI and did some prelimenary tests which seem to indicate that it works. This should work for both 32-bit and 64-bit LabVIEW. The attached ZIP file contains VIs that will work for LabVIEW 2009 and higher. Lower versions do not support 64-bit code options so this version can not be backsaved to an earlier version without significant modifications.

Get Multi Selet Files.png

Rolf Kalbermatter
My Blog
0 Kudos
Message 9 of 13
(3,933 Views)

How to calculate IstructSize. It seems 7C (124 bytes). but it accepts 88 (136 bytes).

 

Can you explain this please?

 

0 Kudos
Message 10 of 13
(3,762 Views)