protected override void ProcessPath(PscxPathInfo pscxPath) { PortableExecutableInfo info = null; string filePath = pscxPath.ProviderPath; try { info = new PortableExecutableInfo(filePath); } catch (PipelineStoppedException) { throw; } catch(Exception exc) { WriteError(new ErrorRecord(exc, "InvalidPEImage", ErrorCategory.InvalidData, filePath)); } if(info != null) { ProcessImage(info); } }
protected override void ProcessImage(PortableExecutableInfo info) { PEDataDirectory corHeader = info.PEHeader.GetDataDirectory(DataDirectory.CorHeader); WriteVerbose("Processing " + info.Path); WriteObject(corHeader.VirtualAddress != 0 && corHeader.Size != 0); }
protected abstract void ProcessImage(PortableExecutableInfo info);
protected override void ProcessImage(PortableExecutableInfo info) { WriteObject(info.PEHeader); }