from ctypes import *
from ctypes.wintypes import *
superSearch=windll.LoadLibrary(r"Everything64.dll")
superSearch.Everything_SetSearchW(c_wchar_p("*.mp3"))
superSearch.Everything_SetSort(13)//sort by DATE_MODIFIED_ASCENDING
superSearch.Everything_QueryW(1)
strBuff=create_unicode_buffer(255)
num=superSearch.Everything_GetNumResults()
for i in range(num):
superSearch.Everything_GetResultFullPathNameW(i,byref(strBuff),len(strBuff))
print(strBuff.value)
I have try to invoke Everything_GetResultListSort() after Everything_QueryW(1). But it always 1. And I wanna see what's errcode by calling Everything_GetLastError(). But it always 0 looks nothing wrong here.
here some comment on Everything offical website
It is possible the sort is not supported,, in which case after you have received your results you should call *Everything_GetResultListSort to determine the sorting actually used.
How do you import Everything_SetSort ?
Maybe it is trying to take a 64bit integer for the first parameter, when it should be only taking a 32bit integer.
void wrote:How do you import Everything_SetSort ?
Maybe it is trying to take a 64bit integer for the first parameter, when it should be only taking a 32bit integer.
Thank you for your reply.
I have figure it out.
But I don't know if it is my fault actural.
I read C source code, it looks like that I should calling SetRequestFlags function before Query as same as SetSort
It work now.
Thank you again.