public static void RegisterCallback(int index, IntPtr function)
        {
            switch (index)
            {
            case 11:
                connected = (IdeConnected)Marshal.GetDelegateForFunctionPointer(function, typeof(IdeConnected));
                break;

            case 12:
                getConnectionInfo = (IdeGetConnectionInfo)Marshal.GetDelegateForFunctionPointer(function, typeof(IdeGetConnectionInfo));
                break;

            case 40:
                sqlExecute = (SqlExecute)Marshal.GetDelegateForFunctionPointer(function, typeof(SqlExecute));
                break;

            case 42:
                sqlEof = (SqlEof)Marshal.GetDelegateForFunctionPointer(function, typeof(SqlEof));
                break;

            case 43:
                sqlNext = (SqlNext)Marshal.GetDelegateForFunctionPointer(function, typeof(SqlNext));
                break;

            case 44:
                sqlField = (SqlField)Marshal.GetDelegateForFunctionPointer(function, typeof(SqlField));
                break;

            case 48:
                sqlErrorMessage = (SqlErrorMessage)Marshal.GetDelegateForFunctionPointer(function, typeof(SqlErrorMessage));
                break;

            case 69:
                createPopupItem = (IdeCreatePopupItem)Marshal.GetDelegateForFunctionPointer(function, typeof(IdeCreatePopupItem));
                break;

            case 74:
                getPopupObject = (IdeGetPopupObject)Marshal.GetDelegateForFunctionPointer(function, typeof(IdeGetPopupObject));
                break;

            case 150:
                createToolButton = (IdeCreateToolButton)Marshal.GetDelegateForFunctionPointer(function, typeof(IdeCreateToolButton));
                break;
            }
        }
        public static void RegisterCallback(int index, IntPtr function)
        {
            switch (index)
            {
            case CallbackIndexes.SYS_VERSION:
                sysVersion = Marshal.GetDelegateForFunctionPointer <SysVersion>(function);
                break;

            case CallbackIndexes.IDE_CREATE_WINDOW:
                createWindowCallback = Marshal.GetDelegateForFunctionPointer <IdeCreateWindow>(function);
                break;

            case CallbackIndexes.IDE_SET_TEXT:
                setTextCallback = Marshal.GetDelegateForFunctionPointer <IdeSetText>(function);
                break;

            case CallbackIndexes.IDE_GET_CONNECTION_INFO:
                getConnectionInfo = Marshal.GetDelegateForFunctionPointer <IdeGetConnectionInfo>(function);
                break;

            case CallbackIndexes.IDE_GET_WINDOW_TYPE:
                getWindowType = Marshal.GetDelegateForFunctionPointer <IdeGetWindowType>(function);
                break;

            case CallbackIndexes.IDE_SET_STATUS_MESSAGE:
                setStatusMessage = Marshal.GetDelegateForFunctionPointer <IdeSetStatusMessage>(function);
                break;

            case CallbackIndexes.IDE_FILENAME:
                func_IdeFilename = Marshal.GetDelegateForFunctionPointer <IdeFilename>(function);
                break;

            case CallbackIndexes.IDE_GET_WINDOW_OBJECT:
                ideGetWindowObject = Marshal.GetDelegateForFunctionPointer <IdeGetWindowObject>(function);
                break;

            case CallbackIndexes.IDE_GET_CURSOR_X:
                ideGetCursorColumn = Marshal.GetDelegateForFunctionPointer <IdeGetCursorX>(function);
                break;

            case CallbackIndexes.IDE_GET_CURSOR_Y:
                ideGetCursorLine = Marshal.GetDelegateForFunctionPointer <IdeGetCursorY>(function);
                break;
            }
        }