EveryThing32.cs 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Runtime.InteropServices;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace GeekDesk.Plugins.EveryThing
  8. {
  9. public class EveryThing32
  10. {
  11. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll", CharSet = CharSet.Unicode)]
  12. public static extern UInt32 Everything_SetSearchW(string lpSearchString);
  13. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  14. public static extern void Everything_SetMatchPath(bool bEnable);
  15. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  16. public static extern void Everything_SetMatchCase(bool bEnable);
  17. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  18. public static extern void Everything_SetMatchWholeWord(bool bEnable);
  19. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  20. public static extern void Everything_SetRegex(bool bEnable);
  21. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  22. public static extern void Everything_SetMax(UInt32 dwMax);
  23. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  24. public static extern void Everything_SetOffset(UInt32 dwOffset);
  25. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  26. public static extern bool Everything_GetMatchPath();
  27. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  28. public static extern bool Everything_GetMatchCase();
  29. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  30. public static extern bool Everything_GetMatchWholeWord();
  31. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  32. public static extern bool Everything_GetRegex();
  33. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  34. public static extern UInt32 Everything_GetMax();
  35. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  36. public static extern UInt32 Everything_GetOffset();
  37. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  38. public static extern IntPtr Everything_GetSearchW();
  39. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  40. public static extern UInt32 Everything_GetLastError();
  41. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  42. public static extern bool Everything_QueryW(bool bWait);
  43. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  44. public static extern void Everything_SortResultsByPath();
  45. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  46. public static extern UInt32 Everything_GetNumFileResults();
  47. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  48. public static extern UInt32 Everything_GetNumFolderResults();
  49. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  50. public static extern UInt32 Everything_GetNumResults();
  51. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  52. public static extern UInt32 Everything_GetTotFileResults();
  53. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  54. public static extern UInt32 Everything_GetTotFolderResults();
  55. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  56. public static extern UInt32 Everything_GetTotResults();
  57. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  58. public static extern bool Everything_IsVolumeResult(UInt32 nIndex);
  59. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  60. public static extern bool Everything_IsFolderResult(UInt32 nIndex);
  61. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  62. public static extern bool Everything_IsFileResult(UInt32 nIndex);
  63. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll", CharSet = CharSet.Unicode)]
  64. public static extern void Everything_GetResultFullPathName(UInt32 nIndex, StringBuilder lpString, UInt32 nMaxCount);
  65. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  66. public static extern void Everything_Reset();
  67. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll", CharSet = CharSet.Unicode)]
  68. public static extern IntPtr Everything_GetResultFileName(UInt32 nIndex);
  69. // Everything 1.4
  70. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  71. public static extern void Everything_SetSort(UInt32 dwSortType);
  72. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  73. public static extern UInt32 Everything_GetSort();
  74. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  75. public static extern UInt32 Everything_GetResultListSort();
  76. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  77. public static extern void Everything_SetRequestFlags(UInt32 dwRequestFlags);
  78. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  79. public static extern UInt32 Everything_GetRequestFlags();
  80. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  81. public static extern UInt32 Everything_GetResultListRequestFlags();
  82. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll", CharSet = CharSet.Unicode)]
  83. public static extern IntPtr Everything_GetResultExtension(UInt32 nIndex);
  84. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  85. public static extern bool Everything_GetResultSize(UInt32 nIndex, out long lpFileSize);
  86. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  87. public static extern bool Everything_GetResultDateCreated(UInt32 nIndex, out long lpFileTime);
  88. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  89. public static extern bool Everything_GetResultDateModified(UInt32 nIndex, out long lpFileTime);
  90. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  91. public static extern bool Everything_GetResultDateAccessed(UInt32 nIndex, out long lpFileTime);
  92. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  93. public static extern UInt32 Everything_GetResultAttributes(UInt32 nIndex);
  94. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll", CharSet = CharSet.Unicode)]
  95. public static extern IntPtr Everything_GetResultFileListFileName(UInt32 nIndex);
  96. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  97. public static extern UInt32 Everything_GetResultRunCount(UInt32 nIndex);
  98. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  99. public static extern bool Everything_GetResultDateRun(UInt32 nIndex, out long lpFileTime);
  100. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  101. public static extern bool Everything_GetResultDateRecentlyChanged(UInt32 nIndex, out long lpFileTime);
  102. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll", CharSet = CharSet.Unicode)]
  103. public static extern IntPtr Everything_GetResultHighlightedFileName(UInt32 nIndex);
  104. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll", CharSet = CharSet.Unicode)]
  105. public static extern IntPtr Everything_GetResultHighlightedPath(UInt32 nIndex);
  106. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll", CharSet = CharSet.Unicode)]
  107. public static extern IntPtr Everything_GetResultHighlightedFullPathAndFileName(UInt32 nIndex);
  108. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  109. public static extern UInt32 Everything_GetRunCountFromFileName(string lpFileName);
  110. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  111. public static extern bool Everything_SetRunCountFromFileName(string lpFileName, UInt32 dwRunCount);
  112. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  113. public static extern UInt32 Everything_IncRunCountFromFileName(string lpFileName);
  114. [DllImport(@"lib\Plugins\EveryThing\lib\Everything32.dll")]
  115. public static extern bool Everything_Exit();
  116. }
  117. }