diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-07 15:23:57 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-07 15:23:57 +0000 |
commit | 6475b110c06ebd29fda4e4d8104e9cb121c99eeb (patch) | |
tree | 75bd1886cdd0278c205eacb78e89e28ddceb5987 | |
parent | 094861f16a9627c04dc445294345af0bd5c59e6f (diff) |
various 64-bit compilation issues
git-svn-id: http://svn.miranda-ng.org/main/trunk@356 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | bin10/mir_full.sln | 4 | ||||
-rw-r--r-- | plugins/AssocMgr/dde.cpp | 4 | ||||
-rw-r--r-- | plugins/ExternalAPI/m_historyevents.h | 6 | ||||
-rw-r--r-- | plugins/NewAwaySysMod/NewAwaySys.vcxproj | 2 | ||||
-rw-r--r-- | plugins/NewAwaySysMod/NewAwaySys.vcxproj.filters | 2 | ||||
-rw-r--r-- | plugins/NewXstatusNotify/main.cpp | 5 | ||||
-rw-r--r-- | plugins/ProfileManager/pmanagerEx.c | 47 | ||||
-rw-r--r-- | plugins/Rate/commonheaders.h | 2 | ||||
-rw-r--r-- | plugins/Svc_crshdmp/utils.h | 2 | ||||
-rw-r--r-- | protocols/MSN/msn_10.vcxproj | 2 | ||||
-rw-r--r-- | protocols/Twitter/connection.cpp | 8 | ||||
-rw-r--r-- | protocols/Twitter/proto.cpp | 2 | ||||
-rw-r--r-- | protocols/Twitter/proto.h | 70 | ||||
-rw-r--r-- | protocols/Twitter/theme.cpp | 8 | ||||
-rw-r--r-- | protocols/Twitter/twitter.vcxproj | 1 | ||||
-rw-r--r-- | protocols/Twitter/twitter.vcxproj.filters | 3 | ||||
-rw-r--r-- | protocols/Twitter/ui.cpp | 26 |
17 files changed, 100 insertions, 94 deletions
diff --git a/bin10/mir_full.sln b/bin10/mir_full.sln index 52285bc8de..9cfe5b7a9d 100644 --- a/bin10/mir_full.sln +++ b/bin10/mir_full.sln @@ -1083,9 +1083,13 @@ Global {F2ABCBFB-FEB8-49DF-B166-C2FA5148ACE1}.Release|x64.ActiveCfg = Release|x64
{F2ABCBFB-FEB8-49DF-B166-C2FA5148ACE1}.Release|x64.Build.0 = Release|x64
{C619A811-8023-4441-B3D7-785388A09DF0}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C619A811-8023-4441-B3D7-785388A09DF0}.Debug|Win32.Build.0 = Debug|Win32
{C619A811-8023-4441-B3D7-785388A09DF0}.Debug|x64.ActiveCfg = Debug|x64
+ {C619A811-8023-4441-B3D7-785388A09DF0}.Debug|x64.Build.0 = Debug|x64
{C619A811-8023-4441-B3D7-785388A09DF0}.Release|Win32.ActiveCfg = Release|Win32
+ {C619A811-8023-4441-B3D7-785388A09DF0}.Release|Win32.Build.0 = Release|Win32
{C619A811-8023-4441-B3D7-785388A09DF0}.Release|x64.ActiveCfg = Release|x64
+ {C619A811-8023-4441-B3D7-785388A09DF0}.Release|x64.Build.0 = Release|x64
{E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Debug|Win32.ActiveCfg = Debug|Win32
{E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Debug|Win32.Build.0 = Debug|Win32
{E37561EB-B9C5-4215-9FF9-DB559916FBA2}.Debug|x64.ActiveCfg = Debug|x64
diff --git a/plugins/AssocMgr/dde.cpp b/plugins/AssocMgr/dde.cpp index 5b95499c5d..dc03e7e0cc 100644 --- a/plugins/AssocMgr/dde.cpp +++ b/plugins/AssocMgr/dde.cpp @@ -108,7 +108,7 @@ static LRESULT CALLBACK DdeMessageWindow(HWND hwnd,UINT msg,WPARAM wParam,LPARAM TCHAR *pszCommand;
DDEACK ack;
ZeroMemory(&ack,sizeof(ack));
- if(UnpackDDElParam(msg,lParam,NULL,(PUINT)&hCommand)) {
+ if(UnpackDDElParam(msg,lParam,NULL,(PUINT_PTR)&hCommand)) {
#if defined(_UNICODE)
/* ANSI execute command can't happen for shell */
if(IsWindowUnicode((HWND)wParam)) {
@@ -151,7 +151,7 @@ static LRESULT CALLBACK DdeMessageWindow(HWND hwnd,UINT msg,WPARAM wParam,LPARAM { ATOM hSzItem;
DDEACK ack;
ZeroMemory(&ack,sizeof(ack));
- if(UnpackDDElParam(msg,lParam,NULL,(PUINT)&hSzItem)) {
+ if(UnpackDDElParam(msg,lParam,NULL,(PUINT_PTR)&hSzItem)) {
lParam=ReuseDDElParam(lParam,msg,WM_DDE_ACK,*(PUINT)&ack,(UINT)hSzItem);
if (!PostMessage((HWND)wParam,WM_DDE_ACK,(WPARAM)hwnd,lParam)) {
if(hSzItem) GlobalDeleteAtom(hSzItem);
diff --git a/plugins/ExternalAPI/m_historyevents.h b/plugins/ExternalAPI/m_historyevents.h index aa44637861..71cf8fdcf1 100644 --- a/plugins/ExternalAPI/m_historyevents.h +++ b/plugins/ExternalAPI/m_historyevents.h @@ -209,7 +209,7 @@ Return: TRUE or FALSE -static int HistoryEvents_Register(char *module, char *name, char *description, int eventType, HICON defaultIcon,
+static INT_PTR HistoryEvents_Register(char *module, char *name, char *description, int eventType, HICON defaultIcon,
int supports, int flags, fGetHistoryEventText pfGetHistoryEventText)
{
HISTORY_EVENT_HANDLER heh = {0};
@@ -229,7 +229,7 @@ static int HistoryEvents_Register(char *module, char *name, char *description, i return CallService(MS_HISTORYEVENTS_REGISTER, (WPARAM) &heh, 0);
}
-static int HistoryEvents_RegisterWithTemplates(char *module, char *name, char *description, int eventType, HICON defaultIcon,
+static INT_PTR HistoryEvents_RegisterWithTemplates(char *module, char *name, char *description, int eventType, HICON defaultIcon,
int supports, int flags, fGetHistoryEventText pfGetHistoryEventText,
char **templates, int numTemplates)
{
@@ -252,7 +252,7 @@ static int HistoryEvents_RegisterWithTemplates(char *module, char *name, char *d return CallService(MS_HISTORYEVENTS_REGISTER, (WPARAM) &heh, 0);
}
-static int HistoryEvents_RegisterMessageStyle(char *module, char *name, char *description, int eventType, HICON defaultIcon,
+static INT_PTR HistoryEvents_RegisterMessageStyle(char *module, char *name, char *description, int eventType, HICON defaultIcon,
int flags, char **templates, int numTemplates)
{
HISTORY_EVENT_HANDLER heh = {0};
diff --git a/plugins/NewAwaySysMod/NewAwaySys.vcxproj b/plugins/NewAwaySysMod/NewAwaySys.vcxproj index 8c570fe213..173cd418d0 100644 --- a/plugins/NewAwaySysMod/NewAwaySys.vcxproj +++ b/plugins/NewAwaySysMod/NewAwaySys.vcxproj @@ -230,7 +230,7 @@ <None Include="nas_translation.txt" />
</ItemGroup>
<ItemGroup>
- <ResourceCompile Include="Resources.rc" />
+ <ResourceCompile Include="NewAwaySys.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
diff --git a/plugins/NewAwaySysMod/NewAwaySys.vcxproj.filters b/plugins/NewAwaySysMod/NewAwaySys.vcxproj.filters index 7f7405f683..bb85b875dd 100644 --- a/plugins/NewAwaySysMod/NewAwaySys.vcxproj.filters +++ b/plugins/NewAwaySysMod/NewAwaySys.vcxproj.filters @@ -180,7 +180,7 @@ </None>
</ItemGroup>
<ItemGroup>
- <ResourceCompile Include="Resources.rc">
+ <ResourceCompile Include="NewAwaySys.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
diff --git a/plugins/NewXstatusNotify/main.cpp b/plugins/NewXstatusNotify/main.cpp index 033d89a45b..232fad10f2 100644 --- a/plugins/NewXstatusNotify/main.cpp +++ b/plugins/NewXstatusNotify/main.cpp @@ -34,8 +34,8 @@ MM_INTERFACE mmi = {0}; UTF8_INTERFACE utfi = {0};
LIST_INTERFACE li = {0};
-LIST<DBEVENT> eventList( 10, 0 );
-LIST<XSTATUSCHANGE> xstatusList( 10, 0 );
+LIST<DBEVENT> eventList( 10 );
+LIST<XSTATUSCHANGE> xstatusList( 10 );
HANDLE hEnableDisableMenu, hOptionsInitialize, hModulesLoaded, hUserInfoInitialise;
HANDLE hContactSettingChanged, hHookContactStatusChanged, hContactStatusChanged;
@@ -329,7 +329,6 @@ WCHAR *mir_dupToUnicodeEx(char *ptr, UINT CodePage) tmp = (WCHAR *) mir_alloc(size * sizeof(WCHAR));
MultiByteToWideChar(CodePage, 0, ptr, -1, tmp, size * sizeof(WCHAR));
-
return tmp;
}
diff --git a/plugins/ProfileManager/pmanagerEx.c b/plugins/ProfileManager/pmanagerEx.c index f564d00849..8bc9fec652 100644 --- a/plugins/ProfileManager/pmanagerEx.c +++ b/plugins/ProfileManager/pmanagerEx.c @@ -8,14 +8,16 @@ There is no warranty. */
#define MIRANDA_VER 0x0A00
+#include <tchar.h>
#include <windows.h>
+
#include <newpluginapi.h>
#include <m_clist.h>
#include <m_skin.h>
#include <m_langpack.h>
-#include <tchar.h>
-#include "resource.h"
+#include <win2k.h>
+#include "resource.h"
HINSTANCE hInst;
PLUGINLINK *pluginLink;
@@ -24,8 +26,6 @@ TCHAR lmn[MAX_PATH]; TCHAR* pathn;
int hLangpack;
-#define SIZEOF(x) (sizeof(x)/sizeof(*x))
-
PLUGININFOEX pluginInfo={
sizeof(PLUGININFOEX),
"Miranda IM Profile Changer",
@@ -44,37 +44,42 @@ PLUGININFOEX pluginInfo={ };
+__declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
+{
+ return &pluginInfo;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+
BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
{
hInst=hinstDLL;
return TRUE;
}
-static int ChangePM(WPARAM wParam,LPARAM lParam)
-{
- GetModuleFileName(GetModuleHandle(NULL), fn, SIZEOF(fn));
- ShellExecute(0, "open", fn, "/FORCESHOW", "", 1);
- CallService("CloseAction", 0, 0);
- return 0;
-}
+///////////////////////////////////////////////////////////////////////////////
-static int LoadPM(WPARAM wParam,LPARAM lParam)
+static const MUUID interfaces[] = {MIID_TESTPLUGIN, MIID_LAST};
+__declspec(dllexport) const MUUID* MirandaPluginInterfaces(void)
{
- GetModuleFileName(GetModuleHandle(NULL), fn, SIZEOF(fn));
- ShellExecute(0, "open", fn, "/FORCESHOW", "", 1);
- return 0;
+ return interfaces;
}
+///////////////////////////////////////////////////////////////////////////////
-__declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
+static INT_PTR ChangePM(WPARAM wParam,LPARAM lParam)
{
- return &pluginInfo;
+ GetModuleFileName(GetModuleHandle(NULL), fn, SIZEOF(fn));
+ ShellExecute(0, "open", fn, "/FORCESHOW", "", 1);
+ CallService("CloseAction", 0, 0);
+ return 0;
}
-static const MUUID interfaces[] = {MIID_TESTPLUGIN, MIID_LAST};
-__declspec(dllexport) const MUUID* MirandaPluginInterfaces(void)
+static INT_PTR LoadPM(WPARAM wParam,LPARAM lParam)
{
- return interfaces;
+ GetModuleFileName(GetModuleHandle(NULL), fn, SIZEOF(fn));
+ ShellExecute(0, "open", fn, "/FORCESHOW", "", 1);
+ return 0;
}
int __declspec(dllexport) Load(PLUGINLINK *link)
@@ -107,6 +112,8 @@ int __declspec(dllexport) Load(PLUGINLINK *link) return 0;
}
+///////////////////////////////////////////////////////////////////////////////
+
int __declspec(dllexport) Unload(void)
{
return 0;
diff --git a/plugins/Rate/commonheaders.h b/plugins/Rate/commonheaders.h index 34aeb65dff..56abcd36f4 100644 --- a/plugins/Rate/commonheaders.h +++ b/plugins/Rate/commonheaders.h @@ -27,7 +27,7 @@ #ifndef COMMHEADERS_H
#define COMMHEADERS_H
-//#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+#define _CRT_SECURE_NO_WARNINGS
//needed by m_utils.h
#include <stdio.h>
diff --git a/plugins/Svc_crshdmp/utils.h b/plugins/Svc_crshdmp/utils.h index 06770ae9b5..b63e9f893a 100644 --- a/plugins/Svc_crshdmp/utils.h +++ b/plugins/Svc_crshdmp/utils.h @@ -15,6 +15,8 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+
+#define _CRT_SECURE_NO_WARNINGS
#define MIRANDA_VER 0x0A00
#include <m_stdhdr.h>
diff --git a/protocols/MSN/msn_10.vcxproj b/protocols/MSN/msn_10.vcxproj index cd21927aad..457f30ae75 100644 --- a/protocols/MSN/msn_10.vcxproj +++ b/protocols/MSN/msn_10.vcxproj @@ -215,7 +215,7 @@ <PrecompiledHeader>NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="msn.cpp">
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="msn_auth.cpp" />
<ClCompile Include="msn_chat.cpp" />
diff --git a/protocols/Twitter/connection.cpp b/protocols/Twitter/connection.cpp index b32ceb5cea..c303bc297e 100644 --- a/protocols/Twitter/connection.cpp +++ b/protocols/Twitter/connection.cpp @@ -104,21 +104,21 @@ bool TwitterProto::NegotiateConnection() wstring oauthAccessTokenSecret;
string screenName;
- int dbTOK = DBGetContactSettingWString(0,m_szModuleName,TWITTER_KEY_OAUTH_TOK,&dbv);
+ INT_PTR dbTOK = DBGetContactSettingWString(0,m_szModuleName,TWITTER_KEY_OAUTH_TOK,&dbv);
if (!dbTOK) {
oauthToken = dbv.pwszVal;
DBFreeVariant(&dbv);
//WLOG("**NegotiateConnection - we have an oauthToken already in the db - %s", oauthToken);
}
- int dbTOKSec = DBGetContactSettingWString(0,m_szModuleName,TWITTER_KEY_OAUTH_TOK_SECRET,&dbv);
+ INT_PTR dbTOKSec = DBGetContactSettingWString(0,m_szModuleName,TWITTER_KEY_OAUTH_TOK_SECRET,&dbv);
if (!dbTOKSec) {
oauthTokenSecret = dbv.pwszVal;
DBFreeVariant(&dbv);
//WLOG("**NegotiateConnection - we have an oauthTokenSecret already in the db - %s", oauthTokenSecret);
}
- int dbName = DBGetContactSettingString(0,m_szModuleName,TWITTER_KEY_NICK,&dbv);
+ INT_PTR dbName = DBGetContactSettingString(0,m_szModuleName,TWITTER_KEY_NICK,&dbv);
if (!dbName) {
screenName = dbv.pszVal;
DBFreeVariant(&dbv);
@@ -591,7 +591,7 @@ void TwitterProto::UpdateStatuses(bool pre_read, bool popups, bool tweetToMsg) DBEVENTINFO dbei = {sizeof(dbei)};
dbei.pBlob = (BYTE*)(i->status.text.c_str());
- dbei.cbBlob = i->status.text.size()+1;
+ dbei.cbBlob = (int)i->status.text.size()+1;
dbei.eventType = TWITTER_DB_EVENT_TYPE_TWEET;
dbei.flags = DBEF_UTF;
dbei.flags = DBEF_READ; // i had commented this line out.. can't remember why :( might need to do it again, uncommented for mrQQ for testing
diff --git a/protocols/Twitter/proto.cpp b/protocols/Twitter/proto.cpp index 530017c491..420193fb81 100644 --- a/protocols/Twitter/proto.cpp +++ b/protocols/Twitter/proto.cpp @@ -110,7 +110,7 @@ TwitterProto::~TwitterProto() // *************************
-DWORD TwitterProto::GetCaps(int type,HANDLE hContact)
+DWORD_PTR TwitterProto::GetCaps(int type,HANDLE hContact)
{
switch(type)
{
diff --git a/protocols/Twitter/proto.h b/protocols/Twitter/proto.h index d4f60536f8..f39570d676 100644 --- a/protocols/Twitter/proto.h +++ b/protocols/Twitter/proto.h @@ -47,52 +47,52 @@ public: //PROTO_INTERFACE
- virtual HANDLE __cdecl AddToList(int,PROTOSEARCHRESULT *);
- virtual HANDLE __cdecl AddToListByEvent(int,int,HANDLE);
+ virtual HANDLE __cdecl AddToList(int,PROTOSEARCHRESULT *);
+ virtual HANDLE __cdecl AddToListByEvent(int,int,HANDLE);
- virtual int __cdecl Authorize(HANDLE);
- virtual int __cdecl AuthDeny(HANDLE,const TCHAR *);
- virtual int __cdecl AuthRecv(HANDLE,PROTORECVEVENT *);
- virtual int __cdecl AuthRequest(HANDLE,const TCHAR *);
+ virtual int __cdecl Authorize(HANDLE);
+ virtual int __cdecl AuthDeny(HANDLE,const TCHAR *);
+ virtual int __cdecl AuthRecv(HANDLE,PROTORECVEVENT *);
+ virtual int __cdecl AuthRequest(HANDLE,const TCHAR *);
- virtual HANDLE __cdecl ChangeInfo(int,void *);
+ virtual HANDLE __cdecl ChangeInfo(int,void *);
- virtual HANDLE __cdecl FileAllow(HANDLE,HANDLE,const TCHAR *);
- virtual int __cdecl FileCancel(HANDLE,HANDLE);
- virtual int __cdecl FileDeny(HANDLE,HANDLE,const TCHAR *);
- virtual int __cdecl FileResume(HANDLE,int *,const TCHAR **);
+ virtual HANDLE __cdecl FileAllow(HANDLE,HANDLE,const TCHAR *);
+ virtual int __cdecl FileCancel(HANDLE,HANDLE);
+ virtual int __cdecl FileDeny(HANDLE,HANDLE,const TCHAR *);
+ virtual int __cdecl FileResume(HANDLE,int *,const TCHAR **);
- virtual DWORD __cdecl GetCaps(int,HANDLE = 0);
- virtual HICON __cdecl GetIcon(int);
- virtual int __cdecl GetInfo(HANDLE,int);
+ virtual DWORD_PTR __cdecl GetCaps(int,HANDLE = 0);
+ virtual HICON __cdecl GetIcon(int);
+ virtual int __cdecl GetInfo(HANDLE,int);
- virtual HANDLE __cdecl SearchBasic(const TCHAR *);
- virtual HANDLE __cdecl SearchByEmail(const TCHAR *);
- virtual HANDLE __cdecl SearchByName(const TCHAR *,const TCHAR *,const TCHAR *);
- virtual HWND __cdecl SearchAdvanced(HWND);
- virtual HWND __cdecl CreateExtendedSearchUI(HWND);
+ virtual HANDLE __cdecl SearchBasic(const TCHAR *);
+ virtual HANDLE __cdecl SearchByEmail(const TCHAR *);
+ virtual HANDLE __cdecl SearchByName(const TCHAR *,const TCHAR *,const TCHAR *);
+ virtual HWND __cdecl SearchAdvanced(HWND);
+ virtual HWND __cdecl CreateExtendedSearchUI(HWND);
- virtual int __cdecl RecvContacts(HANDLE,PROTORECVEVENT *);
- virtual int __cdecl RecvFile(HANDLE,PROTORECVFILET *);
- virtual int __cdecl RecvMsg(HANDLE,PROTORECVEVENT *);
- virtual int __cdecl RecvUrl(HANDLE,PROTORECVEVENT *);
+ virtual int __cdecl RecvContacts(HANDLE,PROTORECVEVENT *);
+ virtual int __cdecl RecvFile(HANDLE,PROTORECVFILET *);
+ virtual int __cdecl RecvMsg(HANDLE,PROTORECVEVENT *);
+ virtual int __cdecl RecvUrl(HANDLE,PROTORECVEVENT *);
- virtual int __cdecl SendContacts(HANDLE,int,int,HANDLE *);
- virtual HANDLE __cdecl SendFile(HANDLE,const TCHAR *,TCHAR **);
- virtual int __cdecl SendMsg(HANDLE,int,const char *);
- virtual int __cdecl SendUrl(HANDLE,int,const char *);
+ virtual int __cdecl SendContacts(HANDLE,int,int,HANDLE *);
+ virtual HANDLE __cdecl SendFile(HANDLE,const TCHAR *,TCHAR **);
+ virtual int __cdecl SendMsg(HANDLE,int,const char *);
+ virtual int __cdecl SendUrl(HANDLE,int,const char *);
- virtual int __cdecl SetApparentMode(HANDLE,int);
- virtual int __cdecl SetStatus(int);
+ virtual int __cdecl SetApparentMode(HANDLE,int);
+ virtual int __cdecl SetStatus(int);
- virtual HANDLE __cdecl GetAwayMsg(HANDLE);
- virtual int __cdecl RecvAwayMsg(HANDLE,int,PROTORECVEVENT *);
- virtual int __cdecl SendAwayMsg(HANDLE,HANDLE,const char *);
- virtual int __cdecl SetAwayMsg(int,const TCHAR *);
+ virtual HANDLE __cdecl GetAwayMsg(HANDLE);
+ virtual int __cdecl RecvAwayMsg(HANDLE,int,PROTORECVEVENT *);
+ virtual int __cdecl SendAwayMsg(HANDLE,HANDLE,const char *);
+ virtual int __cdecl SetAwayMsg(int,const TCHAR *);
- virtual int __cdecl UserIsTyping(HANDLE,int);
+ virtual int __cdecl UserIsTyping(HANDLE,int);
- virtual int __cdecl OnEvent(PROTOEVENTTYPE,WPARAM,LPARAM);
+ virtual int __cdecl OnEvent(PROTOEVENTTYPE,WPARAM,LPARAM);
void UpdateSettings();
diff --git a/protocols/Twitter/theme.cpp b/protocols/Twitter/theme.cpp index 1da3724bb2..5afb3b7e36 100644 --- a/protocols/Twitter/theme.cpp +++ b/protocols/Twitter/theme.cpp @@ -116,7 +116,7 @@ static TwitterProto * GetInstanceByHContact(HANDLE hContact) }
template<int (__cdecl TwitterProto::*Fcn)(WPARAM,LPARAM)>
-int GlobalService(WPARAM wParam,LPARAM lParam)
+INT_PTR GlobalService(WPARAM wParam,LPARAM lParam)
{
TwitterProto *proto = GetInstanceByHContact(reinterpret_cast<HANDLE>(wParam));
return proto ? (proto->*Fcn)(wParam,lParam) : 0;
@@ -142,10 +142,8 @@ void InitContactMenus() mi.icolibItem = GetIconHandle("reply");
mi.pszName = LPGEN("Reply...");
mi.pszService = "Twitter/ReplyToTweet";
- g_hMenuEvts[1] = CreateServiceFunction(mi.pszService,
- GlobalService<&TwitterProto::ReplyToTweet>);
- g_hMenuItems[0] = reinterpret_cast<HANDLE>(
- CallService(MS_CLIST_ADDCONTACTMENUITEM,0,(LPARAM)&mi) );
+ g_hMenuEvts[1] = CreateServiceFunction(mi.pszService, GlobalService<&TwitterProto::ReplyToTweet>);
+ g_hMenuItems[0] = reinterpret_cast<HANDLE>(CallService(MS_CLIST_ADDCONTACTMENUITEM,0,(LPARAM)&mi) );
mi.position=-2000006000;
mi.icolibItem = GetIconHandle("homepage");
diff --git a/protocols/Twitter/twitter.vcxproj b/protocols/Twitter/twitter.vcxproj index c08bd8a30e..012be3f798 100644 --- a/protocols/Twitter/twitter.vcxproj +++ b/protocols/Twitter/twitter.vcxproj @@ -193,7 +193,6 @@ <ClInclude Include="Base64Coder.h" />
<ClInclude Include="common.h" />
<ClInclude Include="http.h" />
- <ClInclude Include="oauth.h" />
<ClInclude Include="proto.h" />
<ClInclude Include="resource.h" />
<ClInclude Include="stdafx.h" />
diff --git a/protocols/Twitter/twitter.vcxproj.filters b/protocols/Twitter/twitter.vcxproj.filters index 71adbd234a..d43977df12 100644 --- a/protocols/Twitter/twitter.vcxproj.filters +++ b/protocols/Twitter/twitter.vcxproj.filters @@ -107,9 +107,6 @@ <ClInclude Include="Base64Coder.h">
<Filter>Header Files</Filter>
</ClInclude>
- <ClInclude Include="oauth.h">
- <Filter>Header Files</Filter>
- </ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="icons\twitter.ico">
diff --git a/protocols/Twitter/ui.cpp b/protocols/Twitter/ui.cpp index ab2dbfdca7..b5920bbefe 100644 --- a/protocols/Twitter/ui.cpp +++ b/protocols/Twitter/ui.cpp @@ -38,7 +38,7 @@ INT_PTR CALLBACK first_run_dialog(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPa TranslateDialogDefault(hwndDlg);
proto = reinterpret_cast<TwitterProto*>(lParam);
- SetWindowLong(hwndDlg,GWL_USERDATA,lParam);
+ SetWindowLong(hwndDlg,GWLP_USERDATA,lParam);
DBVARIANT dbv;
@@ -90,7 +90,7 @@ INT_PTR CALLBACK first_run_dialog(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPa return true;
}
- if(GetWindowLong(hwndDlg,GWL_USERDATA)) // Window is done initializing
+ if(GetWindowLong(hwndDlg,GWLP_USERDATA)) // Window is done initializing
{
switch(HIWORD(wParam))
{
@@ -105,7 +105,7 @@ INT_PTR CALLBACK first_run_dialog(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPa case WM_NOTIFY: // might be able to get rid of this bit?
if(reinterpret_cast<NMHDR*>(lParam)->code == PSN_APPLY)
{
- proto = reinterpret_cast<TwitterProto*>(GetWindowLong(hwndDlg,GWL_USERDATA));
+ proto = reinterpret_cast<TwitterProto*>(GetWindowLong(hwndDlg,GWLP_USERDATA));
char str[128];
TCHAR tstr[128];
@@ -144,7 +144,7 @@ INT_PTR CALLBACK tweet_proc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lParam) TranslateDialogDefault(hwndDlg);
proto = reinterpret_cast<TwitterProto*>(lParam);
- SetWindowLong(hwndDlg,GWL_USERDATA,lParam);
+ SetWindowLong(hwndDlg,GWLP_USERDATA,lParam);
SendDlgItemMessage(hwndDlg,IDC_TWEETMSG,EM_LIMITTEXT,140,0);
SetDlgItemText(hwndDlg,IDC_CHARACTERS,_T("140"));
@@ -158,7 +158,7 @@ INT_PTR CALLBACK tweet_proc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lParam) if(LOWORD(wParam) == IDOK)
{
TCHAR msg[141];
- proto = reinterpret_cast<TwitterProto*>(GetWindowLong(hwndDlg,GWL_USERDATA));
+ proto = reinterpret_cast<TwitterProto*>(GetWindowLong(hwndDlg,GWLP_USERDATA));
GetDlgItemText(hwndDlg,IDC_TWEETMSG,msg,SIZEOF(msg));
ShowWindow(hwndDlg,SW_HIDE);
@@ -262,11 +262,11 @@ INT_PTR CALLBACK options_proc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lParam) // Do this last so that any events propagated by pre-filling the form don't
// instigate a PSM_CHANGED message
- SetWindowLong(hwndDlg,GWL_USERDATA,lParam);
+ SetWindowLong(hwndDlg,GWLP_USERDATA,lParam);
break;
case WM_COMMAND:
- if(GetWindowLong(hwndDlg,GWL_USERDATA)) // Window is done initializing
+ if(GetWindowLong(hwndDlg,GWLP_USERDATA)) // Window is done initializing
{
switch(HIWORD(wParam))
{
@@ -289,7 +289,7 @@ INT_PTR CALLBACK options_proc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lParam) case WM_NOTIFY:
if(reinterpret_cast<NMHDR*>(lParam)->code == PSN_APPLY)
{
- proto = reinterpret_cast<TwitterProto*>(GetWindowLong(hwndDlg,GWL_USERDATA));
+ proto = reinterpret_cast<TwitterProto*>(GetWindowLong(hwndDlg,GWLP_USERDATA));
char str[128];
GetDlgItemTextA(hwndDlg,IDC_UN,str,sizeof(str));
@@ -480,7 +480,7 @@ INT_PTR CALLBACK popup_options_proc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM l }
SendDlgItemMessage(hwndDlg,IDC_TIMEOUT_SPIN,UDM_SETRANGE32,1,INT_MAX);
- SetWindowLong(hwndDlg,GWL_USERDATA,lParam);
+ SetWindowLong(hwndDlg,GWLP_USERDATA,lParam);
return true;
case WM_COMMAND:
@@ -520,14 +520,14 @@ INT_PTR CALLBACK popup_options_proc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM l }
case EN_CHANGE:
- if(GetWindowLong(hwndDlg,GWL_USERDATA)) // Window is done initializing
+ if(GetWindowLong(hwndDlg,GWLP_USERDATA)) // Window is done initializing
SendMessage(GetParent(hwndDlg),PSM_CHANGED,0,0);
}
break;
case WM_NOTIFY:
if(reinterpret_cast<NMHDR*>(lParam)->code == PSN_APPLY)
{
- proto = reinterpret_cast<TwitterProto*>(GetWindowLong(hwndDlg,GWL_USERDATA));
+ proto = reinterpret_cast<TwitterProto*>(GetWindowLong(hwndDlg,GWLP_USERDATA));
DBWriteContactSettingByte(0,proto->ModuleName(),TWITTER_KEY_POPUP_SHOW,
IsDlgButtonChecked(hwndDlg,IDC_SHOWPOPUPS));
@@ -562,13 +562,13 @@ INT_PTR CALLBACK pin_proc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lParam) case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- SetWindowLong(hwndDlg,GWL_USERDATA,lParam);
+ SetWindowLong(hwndDlg,GWLP_USERDATA,lParam);
return true;
case WM_COMMAND:
if(LOWORD(wParam) == IDOK)
{
- proto = reinterpret_cast<TwitterProto*>(GetWindowLong(hwndDlg,GWL_USERDATA));
+ proto = reinterpret_cast<TwitterProto*>(GetWindowLong(hwndDlg,GWLP_USERDATA));
char str[128];
GetDlgItemTextA(hwndDlg,IDC_PIN,str,sizeof(str));
|