Dear Dario,
Let's me explain : Stock Exchange send data file (binary file) to the Broker company, this file has information for all stocks (stock symbol, stock name, price, volume, ceiling, floor, percent change,...). If some stock has information changed, they send this file again to the Broker company. So every 5-10 seconds, I need read this file again to get values for all stocks, because i don't know which stock modified.

Exactly I need to read from file :
- Get values for all stocks : stock symbol, stock name, stock type (bond or common stock) ceiling price, floor price, open price, split (means stock has divident or not), benifit (means stock has action coporation), prior Close price, last price, last volume, last values, percent change, highest price, lowest price, Best 1 bid, Best 1 bid volume, Best 2 bid, Best 2 bid volume, Best 3 bid, Best 3 bid volume, Best 1 Offer, Best 1 Offer volume, Best 2 Offer, Best 2 Offer volume, Best 3 Offer, Best 3 Offer volume.

for each stock read, I want to get values for all fields :
-------
last price, last volume, last values, percent change, highest price, lowest price, Best 1 bid, Best 1 bid volume, Best 2 bid, Best 2 bid volume, Best 3 bid, Best 3 bid volume, Best 1 Offer, Best 1 Offer volume, Best 2 Offer, Best 2 Offer volume, Best 3 Offer, Best 3 Offer volume

Here struct binary file, it has contain 504 stocks :
--------
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct Struct_Security
{
//221: SECURITY.DAT
//Ma CK dang so (2 bytes)
public short StockNo;

//Ma CK dang chuoi (8 bytes)
[MarshalAs(UnmanagedType.ByValTStr, SizeConst =8)]
public string StockSymbol;

//Loai CK (S:Co phieu, D:Trai phieu, U:Chung chi quy) (1 byte)
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1)]
public string StockType;

//Gia tran (4 bytes)
public int Ceiling;
//Gia san (4 bytes)
public int Floor;

//
public double BigLotValue;


//Ten day du cua CK
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 25)]
public string SecurityName;

[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1)]
public string SectorNo;

[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1)]
//
public string Designated;

[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1)]
//CK bi ngung GD (Null: GD binh thuong, S: Bi ngung GD)
public string Suspension;

[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1)]
public string Delist;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1)]
public string HaltResumeFlag;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1)]
public string Split;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1)]
public string Benefit;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1)]
public string Meeting;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1)]
public string Notice;

[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1)]
public string ClientIDRequired;
public short CouponRate;

[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 6)]
public string IssueDate;

[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 6)]
public string MatureDate;

public int AvrPrice;

public short ParValue;

[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1)]
public string SDCFlag;

public int PriorClosePrice;

[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 6)]
public string PriorCloseDate;

public int ProjectOpen;

public int OpenPrice;
public int Last;
public int LastVol;
public double LastVal;
public int Highest;
public int Lowest;

public double Totalshares;
public double TotalValue;
public short AccumulateDeal;
public short BigDeal;
public int BigVol;
public double BigVal;
public short OddDeal;
public int OddVol;
public double OddVal;

//Single
public int Best1Bid;
public int Best1BidVolume;
//Single
public int Best2Bid;
public int Best2BidVolume;
//Single
public int Best3Bid;
public int Best3BidVolume;

//Single
public int Best1Offer;
public int Best1OfferVolume;
//Single
public int Best2Offer;
public int Best2OfferVolume;
//Single
public int Best3Offer;
public int Best3OfferVolume;

public short BoardLost;

public static System.Collections.ArrayList ReaderBlock2Array(BinaryReader br)
{
System.Collections.ArrayList arr = new System.Collections.ArrayList();

br.BaseStream.Position = 0;
while (br.BaseStream.Position < br.BaseStream.Length)
{
byte[] buff = br.ReadBytes(TSSize.Size);
GCHandle handle = GCHandle.Alloc(buff, GCHandleType.Pinned);
Struct_Security s = (Struct_Security)Marshal.PtrToStructure(handle.Add rOfPinnedObject(), typeof(Struct_Security));

handle.Free();
arr.Add(s);
}

return arr;
}
}

internal sealed class TSSize
{
public static int _size;

static TSSize()
{
_size = Marshal.SizeOf(typeof(Struct_Security));

}

public static int Size
{
get
{
return _size;
}
}
}


Can u help me?