From ef3a12230d1adc2084d0bc68ac57c00d84fa6275 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 6 Oct 2013 20:42:44 +0000 Subject: simple & effective core version calculation git-svn-id: http://svn.miranda-ng.org/main/trunk@6380 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/FacebookRM/src/main.cpp | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'protocols/FacebookRM/src/main.cpp') diff --git a/protocols/FacebookRM/src/main.cpp b/protocols/FacebookRM/src/main.cpp index f22ce7b0d0..f960c9475e 100644 --- a/protocols/FacebookRM/src/main.cpp +++ b/protocols/FacebookRM/src/main.cpp @@ -100,33 +100,24 @@ extern "C" int __declspec(dllexport) Load(void) pd.fnInit = protoInit; pd.fnUninit = protoUninit; CallService(MS_PROTO_REGISTERMODULE,0,reinterpret_cast(&pd)); - InitIcons(); InitContactMenus(); // Init native User-Agent - { - std::stringstream agent; -// DWORD mir_ver = (DWORD)CallService(MS_SYSTEM_GETVERSION, NULL, NULL); - agent << "MirandaNG/"; - agent << ((g_mirandaVersion >> 24) & 0xFF); - agent << "."; - agent << ((g_mirandaVersion >> 16) & 0xFF); - agent << "."; - agent << ((g_mirandaVersion >> 8) & 0xFF); - agent << "."; - agent << ((g_mirandaVersion ) & 0xFF); + WORD v[4]; + CallService(MS_SYSTEM_GETFILEVERSION, 0, (LPARAM)v); + std::stringstream agent; + agent << "MirandaNG/" << v[0] << "." << v[1] << "." << v[2] << "." << v[3] << "."; #ifdef _WIN64 agent << " Facebook Protocol RM x64/"; #else agent << " Facebook Protocol RM/"; #endif - agent << __VERSION_STRING; - g_strUserAgent = agent.str(); - } + agent << __VERSION_STRING; + g_strUserAgent = agent.str(); - return 0; + return 0; } ///////////////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3