Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- a/TVTestSrc/instance_manager.c
- +++ b/TVTestSrc/instance_manager.c
- @@ -44,6 +44,8 @@ static INSTANCE *new_instance();
- static INSTANCE *find_instance(INSTANCE_LIST *list, void *instance);
- static void remove_from_list(INSTANCE_LIST *list, INSTANCE *elem);
- +static HINSTANCE m_hinst = NULL;
- +
- BOOL WINAPI DllMain(HINSTANCE inst, DWORD code, LPVOID reserved)
- {
- // AviSynth の LoadVFAPIPlugin はファイルを閉じる際に
- @@ -61,6 +63,7 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD code, LPVOID reserved)
- switch (code) {
- case DLL_PROCESS_ATTACH:
- initialize_instance_manager();
- + m_hinst = inst;
- break;
- case DLL_PROCESS_DETACH:
- teardown_instance_manager();
- @@ -70,6 +73,11 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD code, LPVOID reserved)
- return TRUE;
- }
- +HINSTANCE get_dll_handle()
- +{
- + return m_hinst;
- +}
- +
- void register_instance(void *instance, TEARDOWN_PROC teardown)
- {
- INSTANCE *p;
- diff --git a/TVTestSrc/plugin.cpp b/TVTestSrc/plugin.cpp
- index a909228..72242e6 100644
- --- a/TVTestSrc/plugin.cpp
- +++ b/TVTestSrc/plugin.cpp
- @@ -245,10 +245,10 @@ public:
- #undef _FILE_TYPE_
- return &table;
- }
- - static HINSTANCE m_hinst;
- + //static HINSTANCE m_hinst;
- };
- -HINSTANCE ForAviutl::m_hinst=NULL;
- +//HINSTANCE ForAviutl::m_hinst=NULL;
- //////////////////////////////////////////////////////////////////////////////
- @@ -269,9 +269,9 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
- }
- return TRUE;
- }
- -*/
- extern "C" HINSTANCE get_dll_handle()
- {
- return ForAviutl::m_hinst;
- }
- +*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement