using System; using System.Text; using System.Data; using System.Collections.Generic; using LavishVMAPI; using LavishScriptAPI; using System.Runtime.InteropServices; // GetRowSize div 4 (# cols) namespace ISXWoW { public class WoWDB { #region Delegates private delegate bool GetTableName(int nTable, char [] buf, int buflen); #endregion #region Stubs private static WoWDB.GetTableName getTableName = Stubs.GetTableName; internal class Stubs { static public bool GetTableName(int nTable, char [] buf, int buflen) { IntPtr Address = LavishVM.GetAPI("ISXWoW.WoWDB", "GetTableName", 1); WoWDB.getTableName = (WoWDB.GetTableName)Marshal.GetDelegateForFunctionPointer(Address, typeof(WoWDB.GetTableName)); return false; } } #endregion #region Constructors public WoWDB() { } #endregion Constructors #region Public Methods public string TableName(int index) { char [] buff; int size = 255; buff = new char[255]; if (getTableName(index,buff,size)) { return new string(buff); } return ""; } #endregion } }