I'm coding a csharp program which needs to read values from a dll coded in delphi. I've got it working for the most part but am still having an issue with certain values.

The example code given to me for using the dll in delphi (there's no example code for csharp) is as follows:

Code:
type
  TStockRec = packed record
    ItemNo: String[15];
    Description: String[40];
    ItemType: Char;
    InStock: String[210];         //21 x 10
    SalesOrders: String[210];     //21 x 10
    PurchaseOrders: String[210];  //21 x 10
    UnitCost: String[18];
    LastPurchasePrice: String[18];
    SellingPrice: String[108];    //6 x 18
    ItemTaxCode: String[4];
    ItemTax: String[18];
    MinimumMargin: String[18];
    VariableDescription: Char;
  end;
The String[x] variables I can receive no problem, but the Char ones with my current code give me blank values and with some of the fiddling I've tried changing data types I land up with errors.

Here is the code I'm currently using:

Code:
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi, Pack=1)]
		
   		public struct TStockRec
		{
			[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 17)]
			public string ItemNo;
		    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 41)]
		    public string Description;
		    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1)]
		    public string ItemType;
		    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 211)]
		    public string InStock;
		    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 211)]
		    public string SalesOrders;
		    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 211)]
		    public string PurchaseOrders;
		    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 19)]
		    public string UnitCost;
		    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 19)]
		    public string LastPurchasePrice;
		    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 109)]
		    public string SellingPrice;
		    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 5)]
		    public string ItemTaxCode;
		    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 19)]
		    public string ItemTax;
		    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 19)]
		    public string MinimumMargin;
		    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1)]
		    public string VariableDescription;
		    [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 1)]
		    public string Active;
		}

                [DllImport("Cust.dll")]
		public static extern bool GetStockFirst(ref TStockRec StockRec,ref bool eof);
Inside my function:

Code:
bool success;
TStockRec myData = new TStockRec();
success = GetStockFirst(ref myData,ref eof);
Can anyone suggest how I can get the Char fields (ItemType and Active) to pass the data I need?