From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

call dll issue

Solved!
Go to solution

hi ,

 

now I need to call a dll named SajetConnect.dll,  this dll will create log file and ini file automaticly when i call it .

 

Attached vi call this dll , there is no log file and ini file created, but the exe file what I build from this VI work well for it .

 

I also call thie dll using C# and it still work well.

 

So it seems some path setting issue happened from me , thanks for your help to have a look for my trouble ,thanks !!!!

 

 

attached list

Untitled 2.vi   VI

New Folder\123\Application.exe    create LOG SAJET.INI SajetConnect.ini  when you run this exe  to call dll

Sonic

Diffrent Strokes for Different Folks
0 Kudos
Message 1 of 4
(2,660 Views)
Solution
Accepted by topic author 菊花烧饼

Without seeing the DLL source code there is very little we can do but shooting in the blue. And I have no bullets to spare in this for the moment, except maybe that the DLL tries to create those files in the directory where the executable is located. This would be in the deveopment environment the directory where labview.exe is located. But since Windows Vista users do not have write access to that directory anymore. Some INI file functionality is virtualized in those Windows versions and redirected to some user specific shadow location, but only if your application uses Windows API INI file functions. Otherwise the write access will simply fail and unless you handle those errors somehow and pass them to the caller you won't see them.

Rolf Kalbermatter
My Blog
Message 2 of 4
(2,646 Views)

Thanks!

Actually, I find the ini file and Log file have been created in folder (C:\Program Files\National Instruments\LabVIEW 8.6).

it means that the dll will create the file in the folder where the *.exe call the all. 

Sonic

Diffrent Strokes for Different Folks
0 Kudos
Message 3 of 4
(2,610 Views)

@菊花烧饼 wrote:

Thanks!

Actually, I find the ini file and Log file have been created in folder (C:\Program Files\National Instruments\LabVIEW 8.6).

it means that the dll will create the file in the folder where the *.exe call the all. 



This will not work for normal users under Windows Vista and newer unless you explicitedly change the permission of that directory to allow write access for normal users.

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 4
(2,608 Views)