ファイル
AUE2-ProxyEdit/src/Plugin.cpp
T

63 行
1.9 KiB
C++

#include <windows.h>
#include "HostContext.h"
#include "Log.h"
#include "MediaDecoder.h"
#include "ExportGuard.h"
#include "Notifier.h"
#include "ProxyBuilder.h"
#include "ProxyInput.h"
#include "ScanController.h"
#include "SettingsDialog.h"
#include "StatusPanel.h"
#include "Settings.h"
using namespace pe;
COMMON_PLUGIN_TABLE common_plugin_table = {
L"プロキシ編集",
L"プロキシ編集 version 1.0.0",
};
EXTERN_C __declspec(dllexport) COMMON_PLUGIN_TABLE* GetCommonPluginTable(void) {
return &common_plugin_table;
}
EXTERN_C __declspec(dllexport) DWORD RequiredVersion() { return 2010000; }
EXTERN_C __declspec(dllexport) void InitializeLogger(LOG_HANDLE* handle) { SetLogHandle(handle); }
EXTERN_C __declspec(dllexport) void InitializeConfig(CONFIG_HANDLE* handle) { SetConfigHandle(handle); }
EXTERN_C __declspec(dllexport) void InitializeCache(CACHE_HANDLE* handle) { SetCacheHandle(handle); }
EXTERN_C __declspec(dllexport) bool InitializePlugin(DWORD) { return true; }
EXTERN_C __declspec(dllexport) void RegisterPlugin(HOST_APP_TABLE* host) {
SetEditHandle(host->create_edit_handle());
SetHostWindow(Edit()->get_host_app_window());
LoadSettings();
StartMediaFoundation();
host->register_input_plugin(ProxyInputTable());
RegisterScanMenus(host);
RegisterSettingsMenu(host);
RegisterStatusPanel(host);
StartScanController();
StartBuilder();
StartNotifier();
StartExportGuard();
}
EXTERN_C __declspec(dllexport) void UninitializePlugin() {
StopExportGuard();
StopNotifier();
DestroyStatusPanel();
StopScanController();
StopBuilder();
ShutdownProxyInput();
StopMediaFoundation();
}
BOOL APIENTRY DllMain(HMODULE module, DWORD reason, LPVOID) {
if (reason == DLL_PROCESS_ATTACH) {
DisableThreadLibraryCalls(module);
SetModuleInstance((HINSTANCE)module);
}
return TRUE;
}