public bool IsCabinetFile(out CabinetInfo cabinfo) { if (_disposed) { throw new ObjectDisposedException("CabExtract"); } MemoryStream stream = new MemoryStream(_inputData); GCHandle gch = GCHandle.Alloc(stream); try { CabinetInfo info = new CabinetInfo(); bool ret = FdiIsCabinet(FdiContext, (IntPtr)gch, info); cabinfo = info; return(ret); } finally { stream.Close(); gch.Free(); } }
public static bool IsCabinetFile(byte[] inputData, out CabinetInfo cabinfo) { using (CabExtract decomp = new CabExtract(inputData)) return(decomp.IsCabinetFile(out cabinfo)); }
private static extern bool FdiIsCabinet( IntPtr hfdi, IntPtr hf, [MarshalAs(UnmanagedType.LPStruct)] CabinetInfo cabInfo);