/// <summary> /// Loads the native SORTERAPI methods. /// </summary> private void LoadMethods() { m_dlgApplyLoadOrder = (ApplyLoadOrderDelegate)Marshal.GetDelegateForFunctionPointer(GetProcAddress(m_ptrSorterApi, "loot_apply_load_order"), typeof(ApplyLoadOrderDelegate)); m_dlgCleanup = (CleanupDelegate)Marshal.GetDelegateForFunctionPointer(GetProcAddress(m_ptrSorterApi, "loot_cleanup"), typeof(CleanupDelegate)); m_dlgCreateDb = (CreateSorterDbDelegate)Marshal.GetDelegateForFunctionPointer(GetProcAddress(m_ptrSorterApi, "loot_create_db"), typeof(CreateSorterDbDelegate)); m_dlgDestroyDb = (DestroySorterDbDelegate)Marshal.GetDelegateForFunctionPointer(GetProcAddress(m_ptrSorterApi, "loot_destroy_db"), typeof(DestroySorterDbDelegate)); m_dlgEvalLists = (EvalConditionalsDelegate)Marshal.GetDelegateForFunctionPointer(GetProcAddress(m_ptrSorterApi, "loot_eval_lists"), typeof(EvalConditionalsDelegate)); m_dlgGetBuildId = (GetBuildIdDelegate)Marshal.GetDelegateForFunctionPointer(GetProcAddress(m_ptrSorterApi, "loot_get_build_id"), typeof(GetBuildIdDelegate)); m_dlgGetDirtyInfo = (GetDirtyInfoDelegate)Marshal.GetDelegateForFunctionPointer(GetProcAddress(m_ptrSorterApi, "loot_get_dirty_info"), typeof(GetDirtyInfoDelegate)); m_dlgGetErrorMessage = (GetLastErrorDetailsDelegate)Marshal.GetDelegateForFunctionPointer(GetProcAddress(m_ptrSorterApi, "loot_get_error_message"), typeof(GetLastErrorDetailsDelegate)); m_dlgGetMasterlistRevision = (GetMasterlistRevisionDelegate)Marshal.GetDelegateForFunctionPointer(GetProcAddress(m_ptrSorterApi, "loot_get_masterlist_revision"), typeof(GetMasterlistRevisionDelegate)); m_dlgLoadLists = (LoadDelegate)Marshal.GetDelegateForFunctionPointer(GetProcAddress(m_ptrSorterApi, "loot_load_lists"), typeof(LoadDelegate)); m_dlgSortPlugins = (SortPluginsDelegate)Marshal.GetDelegateForFunctionPointer(GetProcAddress(m_ptrSorterApi, "loot_sort_plugins"), typeof(SortPluginsDelegate)); m_dlgUpdateMasterlist = (UpdateMasterlistDelegate)Marshal.GetDelegateForFunctionPointer(GetProcAddress(m_ptrSorterApi, "loot_update_masterlist"), typeof(UpdateMasterlistDelegate)); }