public static structs.CanIndexDirectoryResult.ResultEnum CanIndexDirectory(string dirPath) { structs.CanIndexDirectoryResult result = new structs.CanIndexDirectoryResult(); CanIndexDirectory(dirPath, out result); if (result.opStatus != 0 || result.resultCode == structs.CanIndexDirectoryResult.ResultEnum.Unknown) { throw new Exception("Couldn't check the specified directory. Call to the umanaged DLL failed"); } return(result.resultCode); }
private static extern void CanIndexDirectory([MarshalAs(UnmanagedType.LPWStr)] string dirPath, out structs.CanIndexDirectoryResult result);