LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change of File date and time without reading and new save

Hi,
 
has anyone adaptet the dll call of 'SetFileTime' or is there another way to manipulate this value with LabVIEW?
 
Public Declare Function SetFileTime Lib "kernel32" Alias "SetFileTime" (ByVal hFile As Long, lpCreationTime As FILETIME, lpLastAccessTime As FILETIME, lpLastWriteTime As FILETIME) As Long
Regards,
Sunny
0 Kudos
Message 1 of 10
(4,802 Views)
George Zou
0 Kudos
Message 2 of 10
(4,791 Views)
Hi all,

with a little help from my friends, i find out how to run the SetFileTime and GetFileTime function from the kernel32.dll.
The "G Toolbox" is a commercial product and wasn't a choice also the OpenG Toolkit they change there license away from LGPL.
You can find the VIs one the German LabVIEW Forum: www.labviewforum.de in this post (article no. #13; file: "kernel32.dll_Set_und_GetfileTime.zip").
You have to delete or replace the errorfunction because in my firm we use a variant for the error handling.

regards

Oliver Frank
0 Kudos
Message 3 of 10
(4,636 Views)

Hi Oliver. I saw your SetFileTime.vi on the German LV site. I was writing my own but have encountered some errors. Your vi is in 8.0 and I have LV2010-2012 but they are not installed. I use LV6.1 and don't want to install LV2012 because I want to keep my machines "clean" as I will be soon doing an installation test of my own LV app. I wondered if you could send me a couple png's of the BD and of the Call Library Node configuration please. That would help me a lot.

0 Kudos
Message 4 of 10
(4,160 Views)

Oliver has not logged onto the Forum for almost five years.

 

Lynn

0 Kudos
Message 5 of 10
(4,156 Views)
You can simply post the 8.0 VI to the down conversion board.
0 Kudos
Message 6 of 10
(4,154 Views)

Thanks guys, I'll try that.

0 Kudos
Message 7 of 10
(4,139 Views)

Here are updated versions in LV6.1. You can set the Creation, Access or Modification Date with a cluster or LV seconds (U32) in UTC or local time.

Download All
0 Kudos
Message 8 of 10
(4,119 Views)

I changed the Generic acces rights from GENERIC_ALL TO GENERIC READ | GENERIC WRITE because I was getting errors over a network. Here are the final versions.

Download All
0 Kudos
Message 9 of 10
(4,113 Views)

@Oliver Frank wrote:

The "G Toolbox" is a commercial product and wasn't a choice also the OpenG Toolkit they change there license away from LGPL.
 

What could the issue be from changing from LGPL to BSD? If anything BSD is much more permissible. It "only" lacks the requirment to seperate the VIs out of a build executable when you want to distribute said executable. Smiley Very Happy

 

Rolf Kalbermatter
My Blog
0 Kudos
Message 10 of 10
(4,104 Views)