summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-07 15:23:57 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-07 15:23:57 +0000
commit6475b110c06ebd29fda4e4d8104e9cb121c99eeb (patch)
tree75bd1886cdd0278c205eacb78e89e28ddceb5987 /protocols
parent094861f16a9627c04dc445294345af0bd5c59e6f (diff)
various 64-bit compilation issues
git-svn-id: http://svn.miranda-ng.org/main/trunk@356 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/MSN/msn_10.vcxproj2
-rw-r--r--protocols/Twitter/connection.cpp8
-rw-r--r--protocols/Twitter/proto.cpp2
-rw-r--r--protocols/Twitter/proto.h70
-rw-r--r--protocols/Twitter/theme.cpp8
-rw-r--r--protocols/Twitter/twitter.vcxproj1
-rw-r--r--protocols/Twitter/twitter.vcxproj.filters3
-rw-r--r--protocols/Twitter/ui.cpp26
8 files changed, 57 insertions, 63 deletions
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));