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 CREATE_WINDOW_CALLBACK:
                createWindowCallback = Marshal.GetDelegateForFunctionPointer <IdeCreateWindow>(function);
                break;

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

            case GET_TEXT_CALLBACK:
                getTextCallback = Marshal.GetDelegateForFunctionPointer <IdeGetText>(function);
                break;

            case FILE_NAME_CALLBACK:
                fileNameCallback = Marshal.GetDelegateForFunctionPointer <IdeFileName>(function);
                break;

            case SAVE_FILE_CALLBACK:
                saveFileCallback = Marshal.GetDelegateForFunctionPointer <IdeSaveFile>(function);
                break;

            case SET_FILE_NAME_CALLBACK:
                setFilenameCallback = Marshal.GetDelegateForFunctionPointer <IdeSetFilename>(function);
                break;

            case GET_FILE_DATA_CALLBACK:
                getFileDataCallback = Marshal.GetDelegateForFunctionPointer <IdeGetFileData>(function);
                break;

            case SHOW_HTML_CALLBACK:
                showHtmlCallback = Marshal.GetDelegateForFunctionPointer <IdeShowHTML>(function);
                break;

            case GET_PREF_STRING_CALLBACK:
                getPrefAsStringCallback = Marshal.GetDelegateForFunctionPointer <IdeGetPrefAsString>(function);
                break;

            case SET_PREF_STRING_CALLBACK:
                setPrefAsStringCallback = Marshal.GetDelegateForFunctionPointer <IdeSetPrefAsString>(function);
                break;

            case SET_PREF_BOOL_CALLBACK:
                setPrefAsBoolCallback = Marshal.GetDelegateForFunctionPointer <IdeSetPrefAsBool>(function);
                break;

            case GET_PREF_BOOL_CALLBACK:
                getPrefAsBoolCallback = Marshal.GetDelegateForFunctionPointer <IdeGetPrefAsBool>(function);
                break;

            case PLUGIN_SETTING_CALLBACK:
                plugInSettingCallback = Marshal.GetDelegateForFunctionPointer <IdePlugInSetting>(function);
                break;

            case CREATE_POPUP_ITEM_CALLBACK:
                createPopupItemCallback = Marshal.GetDelegateForFunctionPointer <IdeCreatePopupItem>(function);
                break;

            case GET_POPUP_OBJECT_CALLBACK:
                getPopupObjectCallback = Marshal.GetDelegateForFunctionPointer <IdeGetPopupObject>(function);
                break;

            case GET_OBJECT_SOURCE_CALLBACK:
                getObjectSourceCallback = Marshal.GetDelegateForFunctionPointer <IdeGetObjectSource>(function);
                break;

            case GET_WINDOW_OBJECT_CALLBACK:
                getWindowObjectCallback = Marshal.GetDelegateForFunctionPointer <IdeGetWindowObject>(function);
                break;
            }
        }