VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "FileHeader"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Dim st As IMAGE_FILE_HEADER, fOwner As NtHeader

Friend Property Get Struct() As IMAGE_FILE_HEADER
Struct = st
End Property
Friend Property Let Struct(n As IMAGE_FILE_HEADER)
Dim hdr As IMAGE_NT_HEADERS
hdr = Owner.Struct
hdr.FileHeader = n
st = n
Owner.Struct = hdr
End Property
Friend Sub SetOwner(cOwner As NtHeader)
Set fOwner = cOwner
End Sub
Friend Property Get Owner() As NtHeader
Set Owner = fOwner
End Property
'***********************************************************************
'**********Common Routines For Memory Mapping**************************
Property Get Length() As Long
Length = Len(st)
End Property
Property Get Pointer() As Long
Pointer = VarPtr(st)
End Property
Function Fill(ByVal hMem As Long) As Boolean
On Error Resume Next
If IsBadCodePtr(hMem) Then Exit Function
CopyMemory ByVal Pointer, ByVal hMem, Length
End Function
'***************End Of Common Routine**************************************
'**************************************************************************

Property Get Characteristics() As Long
Characteristics = st.Characteristics
End Property
Property Get Machine() As Long
Machine = st.Machine
End Property
Property Get NumberOfSections() As Long
NumberOfSections = st.NumberOfSections
End Property
Property Get PointerToSymbolTable() As Long
PointerToSymbolTable = st.PointerToSymbolTable
End Property
Property Get SizeOfOptionalHeader() As Long
SizeOfOptionalHeader = st.SizeOfOptionalHeader
End Property
Property Get TimeDateStamp() As Long
TimeDateStamp = st.TimeDateStamp
End Property


