diff options
author | watcherhd <watcherhd@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb> | 2011-11-08 09:33:52 +0000 |
---|---|---|
committer | watcherhd <watcherhd@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb> | 2011-11-08 09:33:52 +0000 |
commit | 2c065ffb5eb4cb66040d1193e087d3363ed4644b (patch) | |
tree | 5169221b1d2fe2c223a4810d4bab8e006a4fa98a | |
parent | 33c9866e41e806de9bc8dec4c0f38298bd84ae8e (diff) |
gtalkext - crash fix, version bump
git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@171 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb
-rw-r--r-- | gtalkext/GTalkExt.sln | 37 | ||||
-rw-r--r-- | gtalkext/GTalkExt.vcxproj | 4 | ||||
-rw-r--r-- | gtalkext/inbox.cpp | 54 | ||||
-rw-r--r-- | gtalkext/resources.h | 6 |
4 files changed, 64 insertions, 37 deletions
diff --git a/gtalkext/GTalkExt.sln b/gtalkext/GTalkExt.sln new file mode 100644 index 0000000..9e7a697 --- /dev/null +++ b/gtalkext/GTalkExt.sln @@ -0,0 +1,37 @@ +Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual C++ Express 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GTalkExt", "GTalkExt.vcxproj", "{2A737817-2443-48FF-A2E8-CA8D69E450F3}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug Unicode|Win32 = Debug Unicode|Win32
+ Debug Unicode|x64 = Debug Unicode|x64
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Release Unicode|Win32 = Release Unicode|Win32
+ Release Unicode|x64 = Release Unicode|x64
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {2A737817-2443-48FF-A2E8-CA8D69E450F3}.Debug Unicode|Win32.ActiveCfg = Debug Unicode|Win32
+ {2A737817-2443-48FF-A2E8-CA8D69E450F3}.Debug Unicode|Win32.Build.0 = Debug Unicode|Win32
+ {2A737817-2443-48FF-A2E8-CA8D69E450F3}.Debug Unicode|x64.ActiveCfg = Debug Unicode|x64
+ {2A737817-2443-48FF-A2E8-CA8D69E450F3}.Debug Unicode|x64.Build.0 = Debug Unicode|x64
+ {2A737817-2443-48FF-A2E8-CA8D69E450F3}.Debug|Win32.ActiveCfg = Debug|Win32
+ {2A737817-2443-48FF-A2E8-CA8D69E450F3}.Debug|Win32.Build.0 = Debug|Win32
+ {2A737817-2443-48FF-A2E8-CA8D69E450F3}.Debug|x64.ActiveCfg = Debug|x64
+ {2A737817-2443-48FF-A2E8-CA8D69E450F3}.Debug|x64.Build.0 = Debug|x64
+ {2A737817-2443-48FF-A2E8-CA8D69E450F3}.Release Unicode|Win32.ActiveCfg = Release Unicode|Win32
+ {2A737817-2443-48FF-A2E8-CA8D69E450F3}.Release Unicode|Win32.Build.0 = Release Unicode|Win32
+ {2A737817-2443-48FF-A2E8-CA8D69E450F3}.Release Unicode|x64.ActiveCfg = Release Unicode|x64
+ {2A737817-2443-48FF-A2E8-CA8D69E450F3}.Release Unicode|x64.Build.0 = Release Unicode|x64
+ {2A737817-2443-48FF-A2E8-CA8D69E450F3}.Release|Win32.ActiveCfg = Release|Win32
+ {2A737817-2443-48FF-A2E8-CA8D69E450F3}.Release|Win32.Build.0 = Release|Win32
+ {2A737817-2443-48FF-A2E8-CA8D69E450F3}.Release|x64.ActiveCfg = Release|x64
+ {2A737817-2443-48FF-A2E8-CA8D69E450F3}.Release|x64.Build.0 = Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/gtalkext/GTalkExt.vcxproj b/gtalkext/GTalkExt.vcxproj index 411912d..a7cc367 100644 --- a/gtalkext/GTalkExt.vcxproj +++ b/gtalkext/GTalkExt.vcxproj @@ -199,7 +199,7 @@ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;GTALKEXT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
@@ -272,7 +272,7 @@ <ClCompile>
<Optimization>Full</Optimization>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;GTALKEXT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
diff --git a/gtalkext/inbox.cpp b/gtalkext/inbox.cpp index 449cdde..9317fbc 100644 --- a/gtalkext/inbox.cpp +++ b/gtalkext/inbox.cpp @@ -210,38 +210,28 @@ struct OPEN_URL_HEADER { HANDLE FindNetUserHandle(LPCSTR acc)
{
- IJabberInterface *ji = getJabberApi(acc);
- if (!ji) return NULL;
-
- PBYTE m_psProto = *(PBYTE*)((PBYTE)ji + sizeof(*ji)); // see CJabberInterface in jabber_proto.h
-
- PHANDLE pResult = (PHANDLE)(m_psProto + // see CJabberProto in jabber_proto.h
- sizeof(PVOID) + // skip vtable ptr
- sizeof(PVOID) + // skip m_ThreadInfo
- SIZE_OF_JABBER_OPTIONS); // skip m_options
-
- //for (int i=0; i < 100; i++) {
- // __try {
- // if (GetNetlibHandleType(*pResult) == NLH_USER)
- // MessageBox(0, L"1", L"1", 0);
- // }
- // __except (EXCEPTION_EXECUTE_HANDLER){
- // AllocConsole();
- // }
- // pResult++;
- //}
-
- if (GetNetlibHandleType(*pResult) != NLH_USER)
- pResult += 4;
-
- if (GetNetlibHandleType(*pResult) != NLH_USER)
- pResult += 4;
-
- if (GetNetlibHandleType(*pResult) != NLH_USER)
- pResult += 4;
-
- assert(GetNetlibHandleType(*pResult) == NLH_USER);
- return *pResult;
+ IJabberInterface *ji = getJabberApi(acc);
+ if (!ji) return NULL;
+
+ PBYTE m_psProto = *(PBYTE*)((PBYTE)ji + sizeof(*ji)); // see CJabberInterface in jabber_proto.h
+
+ PHANDLE pResult = (PHANDLE)(m_psProto + // see CJabberProto in jabber_proto.h
+ sizeof(PVOID) + // skip vtable ptr
+ sizeof(PVOID) + // skip m_ThreadInfo
+ SIZE_OF_JABBER_OPTIONS); // skip m_options
+
+ for (int i=0; i < 100; i++) {
+ __try {
+ if (GetNetlibHandleType(*pResult) == NLH_USER)
+ break;
+ }
+ __except (EXCEPTION_EXECUTE_HANDLER){
+ }
+ pResult++;
+ }
+
+ assert(GetNetlibHandleType(*pResult) == NLH_USER);
+ return *pResult;
}
unsigned __stdcall OpenUrlThread(OPEN_URL_HEADER* data)
diff --git a/gtalkext/resources.h b/gtalkext/resources.h index c53c40c..d72e34d 100644 --- a/gtalkext/resources.h +++ b/gtalkext/resources.h @@ -59,9 +59,9 @@ #define IDI_POPUP 3001
#define IDI_PSEUDOAVA 3002
-#define PLUGIN_VERSION_STRING "0.0.0.19 BETA"
-#define PLUGIN_FILE_VERSION 0, 0, 0, 19
-#define PLUGIN_VERSION_DWORD PLUGIN_MAKE_VERSION(0, 0, 0, 19)
+#define PLUGIN_VERSION_STRING "0.0.0.20 BETA"
+#define PLUGIN_FILE_VERSION 0, 0, 0, 20
+#define PLUGIN_VERSION_DWORD PLUGIN_MAKE_VERSION(0, 0, 0, 20)
#define PLUGIN_DESCRIPTION "GTalk extensions for Jabber protocol"
#define COPYRIGHT_STRING "2010, 11 bems"
|