summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-27 20:41:50 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-27 20:41:50 +0000
commit3f26a39c43faef04ea316ecc98d8d195982bb303 (patch)
tree0a584ad4f25c678838428bc53a6d6104f1b47d08 /plugins
parent40814d047c86c10a10bf63ce6ba98afd22ce3a29 (diff)
final wipeout of all interfaces
git-svn-id: http://svn.miranda-ng.org/main/trunk@659 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Mir_core/Miranda32.libbin1984 -> 2204 bytes
-rw-r--r--plugins/Mir_core/Miranda64.libbin1984 -> 2186 bytes
-rw-r--r--plugins/Mir_core/langpack.cpp2
-rw-r--r--plugins/Mir_core/memory.cpp8
-rw-r--r--plugins/Mir_core/mir_core.def108
-rw-r--r--plugins/Mir_core/mir_core_10.vcxproj4
-rw-r--r--plugins/Mir_core/miranda.cpp41
7 files changed, 125 insertions, 38 deletions
diff --git a/plugins/Mir_core/Miranda32.lib b/plugins/Mir_core/Miranda32.lib
index 310b8f690e..966aff352a 100644
--- a/plugins/Mir_core/Miranda32.lib
+++ b/plugins/Mir_core/Miranda32.lib
Binary files differ
diff --git a/plugins/Mir_core/Miranda64.lib b/plugins/Mir_core/Miranda64.lib
index 5b367952fd..b3feb4c445 100644
--- a/plugins/Mir_core/Miranda64.lib
+++ b/plugins/Mir_core/Miranda64.lib
Binary files differ
diff --git a/plugins/Mir_core/langpack.cpp b/plugins/Mir_core/langpack.cpp
index 140efb823a..eb3b4619b5 100644
--- a/plugins/Mir_core/langpack.cpp
+++ b/plugins/Mir_core/langpack.cpp
@@ -579,7 +579,7 @@ MIR_CORE_DLL(void) LangPackDropUnusedItems(void)
/////////////////////////////////////////////////////////////////////////////////////////
-int LoadLangPackModule(void)
+MIR_CORE_DLL(int) LoadLangPackModule(void)
{
bModuleInitialized = TRUE;
diff --git a/plugins/Mir_core/memory.cpp b/plugins/Mir_core/memory.cpp
index 25b4d880c2..a14d9fd3ad 100644
--- a/plugins/Mir_core/memory.cpp
+++ b/plugins/Mir_core/memory.cpp
@@ -63,7 +63,7 @@ static int CheckBlock(void* blk)
/******************************************************************************/
-MIR_CORE_DLL(void*) mir_alloc(size_t size)
+MIR_C_CORE_DLL(void*) mir_alloc(size_t size)
{
if (size == 0)
return NULL;
@@ -85,7 +85,7 @@ MIR_CORE_DLL(void*) mir_alloc(size_t size)
/******************************************************************************/
-MIR_CORE_DLL(void*) mir_calloc(size_t size)
+MIR_C_CORE_DLL(void*) mir_calloc(size_t size)
{
void* p = mir_alloc(size);
if (p != NULL)
@@ -95,7 +95,7 @@ MIR_CORE_DLL(void*) mir_calloc(size_t size)
/******************************************************************************/
-MIR_CORE_DLL(void*) mir_realloc(void* ptr, size_t size)
+MIR_C_CORE_DLL(void*) mir_realloc(void* ptr, size_t size)
{
char* p;
@@ -123,7 +123,7 @@ MIR_CORE_DLL(void*) mir_realloc(void* ptr, size_t size)
/******************************************************************************/
-MIR_CORE_DLL(void) mir_free(void* ptr)
+MIR_C_CORE_DLL(void) mir_free(void* ptr)
{
char* p;
DWORD size;
diff --git a/plugins/Mir_core/mir_core.def b/plugins/Mir_core/mir_core.def
index 78e8323ff8..ac94078de8 100644
--- a/plugins/Mir_core/mir_core.def
+++ b/plugins/Mir_core/mir_core.def
@@ -1,5 +1,109 @@
LIBRARY mir_core
EXPORTS
- CallContactService @1
- CallProtoService @2
+CallContactService @1
+CallProtoService @2
+LangPackLookupUuid @3 NONAME
+LangPackMarkPluginLoaded @4 NONAME
+CallFunctionAsync @5
+CallHookSubscribers @6
+CallPluginEventHook @7
+CallService @8
+CallServiceSync @9
+CreateDirectoryTree @10
+CreateDirectoryTreeW @11
+CreateHookableEvent @12
+CreatePathToFile @13
+CreatePathToFileW @14
+CreateServiceFunction @15
+CreateServiceFunctionObj @16
+CreateServiceFunctionObjParam @17
+CreateServiceFunctionParam @18
+DestroyHookableEvent @19
+DestroyServiceFunction @20
+GetExceptionFilter @21
+GetInstByAddress @22
+HookEvent @23
+HookEventMessage @24
+HookEventObj @25
+HookEventObjParam @26
+HookEventParam @27
+KillModuleEventHooks @28
+KillModuleServices @29
+KillObjectEventHooks @30
+KillObjectServices @31
+KillObjectThreads @32
+LangPackDropUnusedItems @33
+LangPackGetDefaultCodePage @34
+LangPackGetDefaultLocale @35
+LangPackPcharToTchar @36
+List_Copy @37
+List_Create @38
+List_Destroy @39
+List_Find @40
+List_GetIndex @41
+List_IndexOf @42
+List_Insert @43
+List_InsertPtr @44
+List_ObjCopy @45
+List_Remove @46
+List_RemovePtr @47
+LoadLangPack @48
+LoadLangPackModule @49
+NotifyEventHooks @50
+PathToAbsolute @51
+PathToAbsoluteW @52
+PathToRelative @53
+PathToRelativeW @54
+RegisterModule @55
+ReloadLangpack @56
+ServiceExists @57
+SetExceptionFilter @58
+SetHookDefaultForHookableEvent @59
+Thread_Pop @60
+Thread_Push @61
+Thread_Wait @62
+TranslateA_LP @63
+TranslateDialog_LP @64
+TranslateMenu_LP @65
+TranslateW_LP @66
+Ucs2toUtf8Len @67
+UnhookEvent @68
+UnregisterModule @69
+Utf8Decode @70
+Utf8DecodeCP @71
+Utf8DecodeW @72
+Utf8Encode @73
+Utf8EncodeCP @74
+Utf8EncodeW @75
+forkthread @76
+forkthreadex @77
+ltrim @78
+ltrimp @79
+mir_a2u @80
+mir_a2u_cp @81
+mir_alloc @82
+mir_calloc @83
+mir_free @84
+mir_hash @85
+mir_md5_append @86
+mir_md5_finish @87
+mir_md5_hash @88
+mir_md5_init @89
+mir_realloc @90
+mir_sha1_append @91
+mir_sha1_finish @92
+mir_sha1_hash @93
+mir_sha1_init @94
+mir_strdup @95
+mir_strndup @96
+mir_u2a @97
+mir_u2a_cp @98
+mir_vsnprintf @99
+mir_vsntprintf @100
+mir_wstrdup @101
+rtrim @102
+wildcmp @103
+wrtrim @104
+mir_snprintf @105
+mir_sntprintf @106
diff --git a/plugins/Mir_core/mir_core_10.vcxproj b/plugins/Mir_core/mir_core_10.vcxproj
index 54c1b2bb2b..1e6d7de8d1 100644
--- a/plugins/Mir_core/mir_core_10.vcxproj
+++ b/plugins/Mir_core/mir_core_10.vcxproj
@@ -144,7 +144,7 @@
<ModuleDefinitionFile>mir_core.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <ImportLibrary>$(IntDir)$(TargetName)64.lib</ImportLibrary>
<SubSystem>Windows</SubSystem>
<AdditionalDependencies>miranda64.lib;ws2_32.lib;comctl32.lib;winmm.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>
@@ -208,7 +208,7 @@
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <ImportLibrary>$(IntDir)$(TargetName)64.lib</ImportLibrary>
<SubSystem>Windows</SubSystem>
<AdditionalDependencies>miranda64.lib;ws2_32.lib;comctl32.lib;winmm.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>
diff --git a/plugins/Mir_core/miranda.cpp b/plugins/Mir_core/miranda.cpp
index 7f48e05bb2..0ca0f4bd6c 100644
--- a/plugins/Mir_core/miranda.cpp
+++ b/plugins/Mir_core/miranda.cpp
@@ -65,7 +65,7 @@ struct THREAD_WAIT_ENTRY
HANDLE hThread;
HINSTANCE hOwner;
void* pObject;
- PVOID addr;
+ //PVOID addr;
};
static LIST<THREAD_WAIT_ENTRY> threads(10, NumericKeySortT);
@@ -197,6 +197,8 @@ static int MirandaWaitForMutex(HANDLE hEvent)
}
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
static void CALLBACK KillAllThreads(HWND, UINT, UINT_PTR, DWORD)
{
if ( MirandaWaitForMutex(hStackMutex)) {
@@ -252,7 +254,9 @@ MIR_CORE_DLL(void) KillObjectThreads(void* owner)
}
}
-MIR_CORE_DLL(void) UnwindThreadWait(void)
+/////////////////////////////////////////////////////////////////////////////////////////
+
+MIR_CORE_DLL(void) Thread_Wait(void)
{
// acquire the list and wake up any alertable threads
if ( MirandaWaitForMutex(hStackMutex)) {
@@ -274,29 +278,7 @@ MIR_CORE_DLL(void) UnwindThreadWait(void)
typedef LONG (WINAPI *pNtQIT)(HANDLE, LONG, PVOID, ULONG, PULONG);
#define ThreadQuerySetWin32StartAddress 9
-MIR_CORE_DLL(void*) GetCurrentThreadEntryPoint()
-{
- LONG ntStatus;
- HANDLE hDupHandle, hCurrentProcess;
- DWORD_PTR dwStartAddress;
-
- pNtQIT NtQueryInformationThread = (pNtQIT)GetProcAddress(GetModuleHandle(_T("ntdll.dll")), "NtQueryInformationThread");
- if (NtQueryInformationThread == NULL)
- return 0;
-
- hCurrentProcess = GetCurrentProcess();
- if ( !DuplicateHandle(hCurrentProcess, GetCurrentThread(), hCurrentProcess, &hDupHandle, THREAD_QUERY_INFORMATION, FALSE, 0)) {
- SetLastError(ERROR_ACCESS_DENIED);
- return NULL;
- }
- ntStatus = NtQueryInformationThread(hDupHandle, ThreadQuerySetWin32StartAddress, &dwStartAddress, sizeof(DWORD_PTR), NULL);
- CloseHandle(hDupHandle);
-
- if (ntStatus != ERROR_SUCCESS) return 0;
- return (void*)dwStartAddress;
-}
-
-MIR_CORE_DLL(INT_PTR) UnwindThreadPush(WPARAM wParam, LPARAM lParam)
+MIR_CORE_DLL(INT_PTR) Thread_Push(HINSTANCE hInst, void* pOwner)
{
ResetEvent(hThreadQueueEmpty); // thread list is not empty
if ( WaitForSingleObject(hStackMutex, INFINITE) == WAIT_OBJECT_0) {
@@ -304,9 +286,8 @@ MIR_CORE_DLL(INT_PTR) UnwindThreadPush(WPARAM wParam, LPARAM lParam)
DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), &p->hThread, 0, FALSE, DUPLICATE_SAME_ACCESS);
p->dwThreadId = GetCurrentThreadId();
- p->pObject = (void*)wParam;
- p->hOwner = GetInstByAddress((void*)lParam);
- p->addr = (void*)lParam;
+ p->pObject = pOwner;
+ p->hOwner = hInst;
threads.insert(p);
ReleaseMutex(hStackMutex);
@@ -314,7 +295,9 @@ MIR_CORE_DLL(INT_PTR) UnwindThreadPush(WPARAM wParam, LPARAM lParam)
return 0;
}
-MIR_CORE_DLL(INT_PTR) UnwindThreadPop(WPARAM, LPARAM)
+/////////////////////////////////////////////////////////////////////////////////////////
+
+MIR_CORE_DLL(INT_PTR) Thread_Pop()
{
if ( WaitForSingleObject(hStackMutex, INFINITE) == WAIT_OBJECT_0) {
DWORD dwThreadId = GetCurrentThreadId();