public static SearchInfo CreateSearchInfo(string searchTerms, SearchInfoFlags flags) { var info = new SearchInfo { hVolume = IntPtr.Zero //the docs say that hVolume should be 0 , lpSearchTerms = searchTerms , nFlags = flags , nSearchWindow = 0 }; info.iSize = Marshal.SizeOf(info); return(info); }
public static SearchInfo CreateSearchInfo(string searchTerms, SearchInfoFlags flags) { var info = new SearchInfo { hVolume = IntPtr.Zero //the docs say that hVolume should be 0 , lpSearchTerms = searchTerms , nFlags = flags , nSearchWindow = 0 }; info.iSize = Marshal.SizeOf(info); return info; }