AutoBackups/Everything-SDK/example/dll.test.c

58 lines
2.3 KiB
C
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.


// Everything IPC test
// this tests the lib and the dll.
#include <stdio.h>
#include "..\include\Everything.h"
int main(int argc,char **argv)
{
printf("SDK test\n");
Everything_SetSearchW(L"sonic tails");
Everything_SetRequestFlags(EVERYTHING_REQUEST_FILE_NAME|EVERYTHING_REQUEST_PATH|EVERYTHING_REQUEST_SIZE);
Everything_SetSort(EVERYTHING_SORT_SIZE_DESCENDING);
printf("Execute Query\n");
Everything_QueryW(TRUE);
printf("Result List Request Flags %08x\n",Everything_GetResultListRequestFlags());
{
DWORD i;
for(i=0;i<Everything_GetNumResults();i++)
{
LARGE_INTEGER size;
const wchar_t *filename;
const wchar_t *path;
Everything_GetResultSize(i,&size);
filename = Everything_GetResultFileNameW(i);
path = Everything_GetResultPathW(i);
printf("Name: %S\n",filename);
printf("Path: %S\n",path);
printf("Size: %I64u\n",size.QuadPart);
}
}
/*
// ANSI test
Everything_SetSearchA("hello");
Everything_QueryA(TRUE);
{
DWORD i;
for(i=0;i<Everything_GetNumResults();i++)
{
printf("%s\n",Everything_GetResultFileNameA(i));
}
}
*/
return 0;
}