NMS Posted September 22 Posted September 22 The problem is when the constant $FLTAR_NOLINK is used in the function it errors out with code 9 - No files/folders found. The comparison is between 3.3.16.1 and 3.3.18.0 In File.au3 the following lines were changed from If $iHide_Link Then Local $tFile_Data = DllStructCreate("struct;align 4;dword FileAttributes;uint64 CreationTime;uint64 LastAccessTime;uint64 LastWriteTime;" & _ "dword FileSizeHigh;dword FileSizeLow;dword Reserved0;dword Reserved1;wchar FileName[260];wchar AlternateFileName[14];endstruct") Local $hDLL = DllOpen('kernel32.dll'), $aDLL_Ret EndIf to If $iHide_Link Then ;~ Local $tagWIN32_FIND_DATAW = "struct;align 4;dword FileAttributes;uint64 CreationTime;uint64 LastAccessTime;uint64 LastWriteTime;" & _ ;~ "dword FileSizeHigh;dword FileSizeLow;dword Reserved0;dword Reserved1;wchar FileName[260];wchar AlternateFileName[14];endstruct" Local $tFile_Data = DllStructCreate($tagWIN32_FIND_DATA) Local $hDLL = DllOpen('kernel32.dll'), $aDLL_Ret EndIf I haven't tested with junction folders as this isn't a big deal for me since I don't use them so I just omit that constant now in this function.
Factfinder Posted October 1 Posted October 1 (edited) Indeed. I have reported it as a bug. It affects the function if $FLTAR_NOLINK is used. It returns nothing. The new version has this line: Local $tFile_Data = DllStructCreate($tagWIN32_FIND_DATA) This is $tagWIN32_FIND_DATA: Global Const $tagWIN32_FIND_DATA = "dword dwFileAttributes;dword ftCreationTime[2];dword ftLastAccessTime[2];dword ftLastWriteTime[2];dword nFileSizeHigh;dword nFileSizeLow;dword dwReserved0;dword dwReserved1;wchar cFileName[260];wchar cAlternateFileName[14]" The old tag variable name was "FileName", the tagWIN32_FIND_DATA has "cFileName", but in the function, "FileName" is not changed. This line: $sName = DllStructGetData($tFile_Data, "FileName") Should become: $sName = DllStructGetData($tFile_Data, "cFileName") Also the old tag variable was "FileAttributes", the new tag has "dwFileAttributes", but it is not changed. This line: $sName = DllStructGetData($tFile_Data, "FileAttributes") Should become: $sName = DllStructGetData($tFile_Data, "dwFileAttributes") Edited October 1 by Factfinder
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now