diff options
Diffstat (limited to 'plugins/UserInfoEx/src')
35 files changed, 110 insertions, 110 deletions
diff --git a/plugins/UserInfoEx/src/Flags/svc_flags.cpp b/plugins/UserInfoEx/src/Flags/svc_flags.cpp index 8b694f83a0..e7054db2cc 100644 --- a/plugins/UserInfoEx/src/Flags/svc_flags.cpp +++ b/plugins/UserInfoEx/src/Flags/svc_flags.cpp @@ -205,7 +205,7 @@ void SvcFlagsLoadModule() HookEvent(ME_SKIN_ICONSCHANGED, OnStatusIconsChanged);
// get local langID for descIcon (try to use user local Flag as icon)
- DWORD langid = 0;
+ uint32_t langid = 0;
if (!CallService(MS_UTILS_GETCOUNTRYBYNUMBER, langid, 0))
langid = 1;
diff --git a/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp b/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp index 8dbf01f9ec..6695e60fe9 100644 --- a/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp +++ b/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp @@ -185,7 +185,7 @@ FIBITMAP *LoadResource(UINT ID, LPTSTR lpType) FIBITMAP *dib = nullptr;
if (lpType) {
HRSRC hResInfo = FindResource(g_plugin.getInst(), MAKEINTRESOURCE(ID), lpType);
- DWORD ResSize = SizeofResource(g_plugin.getInst(), hResInfo);
+ uint32_t ResSize = SizeofResource(g_plugin.getInst(), hResInfo);
HGLOBAL hRes = LoadResource(g_plugin.getInst(), hResInfo);
uint8_t *buffer = (uint8_t *)LockResource(hRes);
if (buffer) {
diff --git a/plugins/UserInfoEx/src/classMAnnivDate.cpp b/plugins/UserInfoEx/src/classMAnnivDate.cpp index cd3e87ab53..be8f50995f 100644 --- a/plugins/UserInfoEx/src/classMAnnivDate.cpp +++ b/plugins/UserInfoEx/src/classMAnnivDate.cpp @@ -146,13 +146,13 @@ uint8_t MAnnivDate::IsEqual(const SYSTEMTIME &st) const /**
* name: DateStamp
* class: MAnnivDate
- * desc: return the current date encoded as an DWORD
+ * desc: return the current date encoded as an uint32_t
* param: nothing
- * return: DWORD encoded date
+ * return: uint32_t encoded date
**/
-DWORD MAnnivDate::DateStamp() const
+uint32_t MAnnivDate::DateStamp() const
{
- DWORD dwStamp;
+ uint32_t dwStamp;
if (!IsValid()) return 0;
@@ -169,7 +169,7 @@ DWORD MAnnivDate::DateStamp() const * param: dwStamp - the dword encoded date
* return: nothing
**/
-void MAnnivDate::DateStamp(const DWORD dwStamp)
+void MAnnivDate::DateStamp(const uint32_t dwStamp)
{
Day((const uint16_t)((dwStamp & 0xFF000000) >> 24));
Month((const uint16_t)((dwStamp & 0x00FF0000) >> 16));
@@ -411,7 +411,7 @@ int MAnnivDate::DBDeleteDate(MCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, /**
* name: DBGetDateStamp
* class: MAnnivDate
- * desc: Read a datestamp from database. A datestamp is an DWORD of the form <ddmmyyyy>.
+ * desc: Read a datestamp from database. A datestamp is an uint32_t of the form <ddmmyyyy>.
* param: hContact - handle to a contact to read the datestamp from
* pszModule - module to read the datestamp from
* pszSetting - key used to identify the datestamp
@@ -434,7 +434,7 @@ int MAnnivDate::DBGetDateStamp(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSe /**
* name: DBWriteDateStamp
* class: MAnnivDate
- * desc: Write a datestamp to database. A datestamp is an DWORD of the form <ddmmyyyy>.
+ * desc: Write a datestamp to database. A datestamp is an uint32_t of the form <ddmmyyyy>.
* param: hContact - handle to a contact to write the datestamp to
* pszModule - module to write the datestamp to
* pszSetting - key used to save the datestamp
@@ -445,7 +445,7 @@ int MAnnivDate::DBWriteDateStamp(MCONTACT hContact, LPCSTR pszModule, LPCSTR psz if (hContact == INVALID_CONTACT_ID || pszModule == nullptr || *pszModule == 0 || pszSetting == nullptr || *pszSetting == 0)
return 1;
- DWORD dwStamp = DateStamp();
+ uint32_t dwStamp = DateStamp();
return (dwStamp == 0) ? 1 : db_set_dw(hContact, pszModule, pszSetting, dwStamp);
}
diff --git a/plugins/UserInfoEx/src/classMAnnivDate.h b/plugins/UserInfoEx/src/classMAnnivDate.h index b11713e235..bb4cce0dee 100644 --- a/plugins/UserInfoEx/src/classMAnnivDate.h +++ b/plugins/UserInfoEx/src/classMAnnivDate.h @@ -69,8 +69,8 @@ public: __inline uint16_t Id() const { return _wID; };
__inline void Id(uint16_t wId) { if (_wID == ANID_NONE) _wID = wId; };
- DWORD DateStamp() const;
- void DateStamp(const DWORD dwStamp);
+ uint32_t DateStamp() const;
+ void DateStamp(const uint32_t dwStamp);
// basic checks
__inline uint8_t IsValid() const;
diff --git a/plugins/UserInfoEx/src/classMTime.cpp b/plugins/UserInfoEx/src/classMTime.cpp index e78d76192f..82394ad08a 100644 --- a/plugins/UserInfoEx/src/classMTime.cpp +++ b/plugins/UserInfoEx/src/classMTime.cpp @@ -56,7 +56,7 @@ MTime::MTime(LARGE_INTEGER &li, bool bIsLocal) Set(li, bIsLocal);
}
-MTime::MTime(DWORD dwStamp)
+MTime::MTime(uint32_t dwStamp)
{
ZeroDate();
FromStampAsUTC(dwStamp);
@@ -93,7 +93,7 @@ uint8_t MTime::IsLeapYear() const return (!(((_SysTime.wYear) % 4 != 0) || (((_SysTime.wYear) % 100 == 0) && ((_SysTime.wYear) % 400 != 0))));
}
-LONG MTime::Compare(const DWORD dwTimeStamp) const
+LONG MTime::Compare(const uint32_t dwTimeStamp) const
{
return (LONG)(TimeStamp() - dwTimeStamp);
}
@@ -266,7 +266,7 @@ FILETIME MTime::FileTime() const return ftFileTime;
}
-DWORD MTime::TimeStamp() const
+uint32_t MTime::TimeStamp() const
{
LARGE_INTEGER li;
@@ -284,7 +284,7 @@ DWORD MTime::TimeStamp() const if (li.QuadPart < 0)
return 0;
- return (DWORD)li.QuadPart;
+ return (uint32_t)li.QuadPart;
}
uint16_t MTime::DaysInMonth(const uint16_t &wMonth) const
@@ -392,14 +392,14 @@ uint16_t MTime::DateFormatLong(LPTSTR ptszTimeFormat, uint16_t cchTimeFormat) * set class value
*********************************************/
-void MTime::FromStampAsUTC(const DWORD dwTimeStamp)
+void MTime::FromStampAsUTC(const uint32_t dwTimeStamp)
{
LARGE_INTEGER li;
li.QuadPart = (dwTimeStamp + 11644473600i64) * 10000000i64;
Set(li, FALSE);
}
-void MTime::FromStampAsLocal(const DWORD dwTimeStamp)
+void MTime::FromStampAsLocal(const uint32_t dwTimeStamp)
{
FromStampAsUTC(dwTimeStamp);
UTCToLocal();
@@ -463,7 +463,7 @@ int MTime::DBGetStamp (MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting) return 1;
}
- DWORD dwTimeStamp = db_get_dw(hContact, pszModule, pszSetting, 0);
+ uint32_t dwTimeStamp = db_get_dw(hContact, pszModule, pszSetting, 0);
if (dwTimeStamp == 0) {
ZeroDate();
return 1;
diff --git a/plugins/UserInfoEx/src/classMTime.h b/plugins/UserInfoEx/src/classMTime.h index eaf5508130..508de1c34a 100644 --- a/plugins/UserInfoEx/src/classMTime.h +++ b/plugins/UserInfoEx/src/classMTime.h @@ -33,7 +33,7 @@ public: MTime(SYSTEMTIME &st, bool bIsLocal);
MTime(FILETIME &ft, bool bIsLocal);
MTime(LARGE_INTEGER &li, bool bIsLocal);
- MTime(DWORD dwStamp);
+ MTime(uint32_t dwStamp);
MTime(const MTime& mtime);
// checks
@@ -45,12 +45,12 @@ public: LONG Compare(SYSTEMTIME st) const;
LONG Compare(const FILETIME &ft) const;
LONG Compare(const MTime &mt) const;
- LONG Compare(const DWORD dwTimeStamp) const;
+ LONG Compare(const uint32_t dwTimeStamp) const;
// get value from class
LARGE_INTEGER LargeInt() const;
FILETIME FileTime() const;
- DWORD TimeStamp() const;
+ uint32_t TimeStamp() const;
SYSTEMTIME SystemTime() const { return _SysTime; }
uint16_t DaysInMonth(const uint16_t &wMonth) const;
@@ -81,8 +81,8 @@ public: // set value to class
void ZeroDate();
- void FromStampAsUTC(const DWORD dwTimeStamp);
- void FromStampAsLocal(const DWORD dwTimeStamp);
+ void FromStampAsUTC(const uint32_t dwTimeStamp);
+ void FromStampAsLocal(const uint32_t dwTimeStamp);
void Set(const FILETIME &ftFileTime, bool bIsLocal);
void Set(LARGE_INTEGER liFileTime, bool bIsLocal);
void Set(const SYSTEMTIME &st, bool bIsLocal);
@@ -105,7 +105,7 @@ public: int DBWriteStamp(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
// operatoren
- void operator=(DWORD& dwTimeStamp) { FromStampAsUTC(dwTimeStamp); };
+ void operator=(uint32_t& dwTimeStamp) { FromStampAsUTC(dwTimeStamp); };
void operator=(FILETIME &ftFileTime) { Set(ftFileTime, FALSE); };
void operator=(LARGE_INTEGER &liFileTime) { Set(liFileTime, FALSE); };
void operator=(SYSTEMTIME &st) { Set(st, FALSE); };
diff --git a/plugins/UserInfoEx/src/classPsTreeItem.cpp b/plugins/UserInfoEx/src/classPsTreeItem.cpp index 4a25156767..12d3ceef79 100644 --- a/plugins/UserInfoEx/src/classPsTreeItem.cpp +++ b/plugins/UserInfoEx/src/classPsTreeItem.cpp @@ -177,7 +177,7 @@ int CPsTreeItem::Name(LPTSTR ptszTitle, const uint8_t bIsUnicode) if (_pszName)
{
// convert disallowed characters
- for (DWORD i = 0; _pszName[i] != 0; i++)
+ for (uint32_t i = 0; _pszName[i] != 0; i++)
{
switch (_pszName[i])
{
@@ -467,7 +467,7 @@ int CPsTreeItem::Create(CPsHdr* pPsh, OPTIONSDIALOGPAGE *odp) * dwFlags - tells what to save
* return: handle to new (moved) treeitem if successful or NULL otherwise
**/
-uint16_t CPsTreeItem::DBSaveItemState(LPCSTR pszGroup, int iItemPosition, UINT iState, DWORD dwFlags)
+uint16_t CPsTreeItem::DBSaveItemState(LPCSTR pszGroup, int iItemPosition, UINT iState, uint32_t dwFlags)
{
uint16_t numErrors = 0;
diff --git a/plugins/UserInfoEx/src/ctrl_base.h b/plugins/UserInfoEx/src/ctrl_base.h index 5cdab6cdb1..d98ffb1be2 100644 --- a/plugins/UserInfoEx/src/ctrl_base.h +++ b/plugins/UserInfoEx/src/ctrl_base.h @@ -74,7 +74,7 @@ union CCtrlFlags class CBaseCtrl
{
public:
- DWORD _cbSize;
+ uint32_t _cbSize;
friend class CCtrlList;
diff --git a/plugins/UserInfoEx/src/ctrl_button.cpp b/plugins/UserInfoEx/src/ctrl_button.cpp index cffd91bd88..2962b7fd76 100644 --- a/plugins/UserInfoEx/src/ctrl_button.cpp +++ b/plugins/UserInfoEx/src/ctrl_button.cpp @@ -35,7 +35,7 @@ typedef struct TMBCtrl{ HBITMAP hBitmap;
HFONT hFont; // font
- DWORD dwStyle;
+ uint32_t dwStyle;
uint8_t bFocus;
int stateId; // button state
diff --git a/plugins/UserInfoEx/src/ctrl_combo.cpp b/plugins/UserInfoEx/src/ctrl_combo.cpp index e2d7bdeaf1..81d82220f0 100644 --- a/plugins/UserInfoEx/src/ctrl_combo.cpp +++ b/plugins/UserInfoEx/src/ctrl_combo.cpp @@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * @param hDlg - HWND of the owning propertysheet page
* @param idCtrl - the ID of the control to associate with this class's instance
* @param pszSetting - the database setting to be handled by this class
- * @param bDBDataType - datatype of of the associated database setting (uint16_t, DWORD, ...)
+ * @param bDBDataType - datatype of of the associated database setting (uint16_t, uint32_t, ...)
* @param pList - pointer to a LPIDSTRLIST list, which holds the items to insert into the combobox.
* @param nListCount - number of items in the list
*
@@ -45,7 +45,7 @@ CBaseCtrl* CCombo::CreateObj(HWND hDlg, uint16_t idCtrl, LPCSTR pszSetting, uint * @param hDlg - HWND of the owning propertysheet page
* @param idCtrl - the ID of the control to associate with this class's instance
* @param pszSetting - the database setting to be handled by this class
- * @param bDBDataType - datatype of of the associated database setting (uint16_t, DWORD, ...)
+ * @param bDBDataType - datatype of of the associated database setting (uint16_t, uint32_t, ...)
* @param pList - pointer to a LPIDSTRLIST list, which holds the items to insert into the combobox.
* @param nListCount - number of items in the list
*
diff --git a/plugins/UserInfoEx/src/ctrl_contact.cpp b/plugins/UserInfoEx/src/ctrl_contact.cpp index df0651487d..66c153a110 100644 --- a/plugins/UserInfoEx/src/ctrl_contact.cpp +++ b/plugins/UserInfoEx/src/ctrl_contact.cpp @@ -34,7 +34,7 @@ typedef struct TCbExItem {
uint16_t wMask;
uint16_t wFlags;
- DWORD dwID;
+ uint32_t dwID;
wchar_t szCat[MAX_CAT];
LPTSTR pszVal;
int iIcon;
diff --git a/plugins/UserInfoEx/src/ctrl_contact.h b/plugins/UserInfoEx/src/ctrl_contact.h index 1313428b6a..f934fe5054 100644 --- a/plugins/UserInfoEx/src/ctrl_contact.h +++ b/plugins/UserInfoEx/src/ctrl_contact.h @@ -59,7 +59,7 @@ struct CBEXITEM uint16_t wMask; // determines which element of this structure is valid
uint16_t wFlags; // standard control flags
int iItem; // position of the item in the data array
- DWORD dwID; // unique number for each setting read from db to identify it, new entries have dwID = 0
+ uint32_t dwID; // unique number for each setting read from db to identify it, new entries have dwID = 0
LPTSTR pszCat; // pointer to a descriptive category string to set or retrieve for the data entry
uint16_t ccCat;
LPTSTR pszVal;
diff --git a/plugins/UserInfoEx/src/ctrl_edit.cpp b/plugins/UserInfoEx/src/ctrl_edit.cpp index 12537bbfcd..fb3b5d9e83 100644 --- a/plugins/UserInfoEx/src/ctrl_edit.cpp +++ b/plugins/UserInfoEx/src/ctrl_edit.cpp @@ -168,7 +168,7 @@ void CEditCtrl::OnApply(MCONTACT hContact, LPCSTR pszProto) const char* pszModule = hContact ? _pszModule : pszProto; if (_Flags.B.hasCustom || !hContact) { - DWORD cch = GetWindowTextLength(_hwnd); + uint32_t cch = GetWindowTextLength(_hwnd); if (cch > 0) { LPTSTR val = (LPTSTR)mir_alloc((cch + 1) * sizeof(wchar_t)); @@ -187,7 +187,7 @@ void CEditCtrl::OnApply(MCONTACT hContact, LPCSTR pszProto) break; case DBVT_DWORD: - dbv.dVal = (DWORD)wcstol(val, nullptr, 10); + dbv.dVal = (uint32_t)wcstol(val, nullptr, 10); break; case DBVT_WCHAR: @@ -235,7 +235,7 @@ void CEditCtrl::OnApply(MCONTACT hContact, LPCSTR pszProto) void CEditCtrl::OnChangedByUser(uint16_t wChangedMsg) { if ((wChangedMsg == EN_UPDATE) || (wChangedMsg == EN_CHANGE)) { - DWORD cch = GetWindowTextLength(_hwnd); + uint32_t cch = GetWindowTextLength(_hwnd); _Flags.B.hasChanged = mir_wstrlen(_pszValue) != cch; _Flags.B.hasCustom = (cch > 0); diff --git a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp index de64451ba9..25b15c6206 100644 --- a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp +++ b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp @@ -704,7 +704,7 @@ class CAnnivList {
MAnnivDate ad;
int i = 0;
- DWORD age = 0;
+ uint32_t age = 0;
int wDaysBefore = g_plugin.getWord(SET_REMIND_OFFSET, DEFVAL_REMIND_OFFSET);
int numMale = 0;
int numFemale = 0;
diff --git a/plugins/UserInfoEx/src/dlg_propsheet.h b/plugins/UserInfoEx/src/dlg_propsheet.h index dec1525be7..d8aea78665 100644 --- a/plugins/UserInfoEx/src/dlg_propsheet.h +++ b/plugins/UserInfoEx/src/dlg_propsheet.h @@ -37,7 +37,7 @@ class CPsTreeItem HINSTANCE _hInst; // instance handle of the owning plugin dll
DLGPROC _pfnDlgProc; // dialog procedure for the property page
HWND _hWnd; // window handle for the property page if shown jet
- DWORD _dwFlags; // some flags
+ uint32_t _dwFlags; // some flags
int _iPosition; // initiating position if custom (used for sorting)
LPARAM _initParam;
MCONTACT _hContact; // contact the page is accociated with (may be a meta subcontact if details dialog is shown for a meta contact)
@@ -82,10 +82,10 @@ public: __inline int Parent() const { return _iParent; };
__inline void Parent(const int iParent) { _iParent = iParent; };
- __inline DWORD Flags() const { return _dwFlags; };
- __inline void Flags(DWORD dwFlags) { _dwFlags = dwFlags; };
- __inline void AddFlags(DWORD dwFlags) { _dwFlags |= dwFlags; };
- __inline void RemoveFlags(DWORD dwFlags) { _dwFlags &= ~dwFlags; };
+ __inline uint32_t Flags() const { return _dwFlags; };
+ __inline void Flags(uint32_t dwFlags) { _dwFlags = dwFlags; };
+ __inline void AddFlags(uint32_t dwFlags) { _dwFlags |= dwFlags; };
+ __inline void RemoveFlags(uint32_t dwFlags) { _dwFlags &= ~dwFlags; };
uint8_t HasName(const LPCSTR pszName) const;
@@ -96,7 +96,7 @@ public: LPSTR ParentItemName();
HWND CreateWnd(LPPS pPs);
- uint16_t DBSaveItemState(LPCSTR pszGroup, int iItemPosition, UINT iState, DWORD dwFlags);
+ uint16_t DBSaveItemState(LPCSTR pszGroup, int iItemPosition, UINT iState, uint32_t dwFlags);
// notification handlers
void OnInfoChanged();
@@ -139,7 +139,7 @@ class CPsTree HWND _hWndTree = nullptr;
HIMAGELIST _hImages = nullptr;
int _curItem = -1;
- DWORD _dwFlags = 0;
+ uint32_t _dwFlags = 0;
HWND _hLabelEdit = nullptr;
HTREEITEM _hDragItem = nullptr;
bool _isDragging = false;
@@ -156,10 +156,10 @@ public: __inline bool IsDragging() const { return _isDragging; }
__inline HTREEITEM DragItem() const { return _hDragItem; }
- __inline DWORD Flags() const { return _dwFlags; }
- __inline void Flags(DWORD dwFlags) { _dwFlags = dwFlags; }
- __inline void AddFlags(DWORD dwFlags) { _dwFlags |= dwFlags; }
- __inline void RemoveFlags(DWORD dwFlags) { _dwFlags &= ~dwFlags; }
+ __inline uint32_t Flags() const { return _dwFlags; }
+ __inline void Flags(uint32_t dwFlags) { _dwFlags = dwFlags; }
+ __inline void AddFlags(uint32_t dwFlags) { _dwFlags |= dwFlags; }
+ __inline void RemoveFlags(uint32_t dwFlags) { _dwFlags &= ~dwFlags; }
__inline int NumItems() const { return _pages.getCount(); }
__inline HWND Window() const { return _hWndTree; }
@@ -224,7 +224,7 @@ struct CPsHdr LPCSTR _pszPrefix = 0; // name prefix for treeitem settings
CPsTreeItem** _pPages = 0; // the pages
uint16_t _numPages = 0; // number of pages
- DWORD _dwFlags = 0; // some option flags
+ uint32_t _dwFlags = 0; // some option flags
HIMAGELIST _hImages = 0; // the imagelist with all tree item icons
LIST<wchar_t> _ignore; // list of skipped items when adding metasubcontacts pages
int _nSubContact = 0; // index of a current subcontact
@@ -258,7 +258,7 @@ struct TPropSheet RECT rcDisplay;
uint8_t updateAnimFrame;
CHAR szUpdating[64];
- DWORD dwFlags;
+ uint32_t dwFlags;
TAckInfo *infosUpdated;
int nSubContacts;
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp index 429b4225ff..50903e7681 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp +++ b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp @@ -319,7 +319,7 @@ void CExImContactBase::toIni(FILE *file, int modCount) uint8_t CExImContactBase::compareUID(DBVARIANT *dbv) { - DWORD hash = 0; + uint32_t hash = 0; switch (dbv->type) { case DBVT_BYTE: if (dbv->bVal == _dbvUID.bVal) { diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactBase.h b/plugins/UserInfoEx/src/ex_import/classExImContactBase.h index 741182c913..ad173a1402 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactBase.h +++ b/plugins/UserInfoEx/src/ex_import/classExImContactBase.h @@ -33,7 +33,7 @@ protected: LPSTR _pszProto;
LPSTR _pszProtoOld;
LPSTR _pszUIDKey;
- DWORD _dbvUIDHash;
+ uint32_t _dbvUIDHash;
DBVARIANT _dbvUID;
MCONTACT _hContact;
uint8_t _isNewContact; // is this contact a new one?
@@ -55,8 +55,8 @@ public: __inline void uidk(LPCSTR val) { _pszUIDKey = val ? mir_strdup(val) : nullptr; }
__inline void uid(uint8_t val) { _dbvUID.type = DBVT_BYTE; _dbvUID.bVal = val; }
__inline void uid(uint16_t val) { _dbvUID.type = DBVT_WORD; _dbvUID.wVal = val; }
- __inline void uid(DWORD val) { _dbvUID.type = DBVT_DWORD; _dbvUID.dVal = val; }
- __inline void uidn(uint8_t *val, DWORD len) { _dbvUID.type = DBVT_BLOB; _dbvUID.pbVal = val; _dbvUID.cpbVal = (uint16_t)len; }
+ __inline void uid(uint32_t val) { _dbvUID.type = DBVT_DWORD; _dbvUID.dVal = val; }
+ __inline void uidn(uint8_t *val, uint32_t len) { _dbvUID.type = DBVT_BLOB; _dbvUID.pbVal = val; _dbvUID.cpbVal = (uint16_t)len; }
__inline void uida(LPCSTR val)
{
_dbvUID.type = (_dbvUID.pszVal = mir_utf8decodeA(val)) ? DBVT_ASCIIZ : DBVT_DELETED;
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp index 7b31b83f26..6827856ce7 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp +++ b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp @@ -67,7 +67,7 @@ uint8_t CExImContactXML::IsContactInfo(LPCSTR pszKey) {
// This is a sorted list of all hashvalues of the contact information.
// This is the same as the szCiKey[] array below but sorted
- const DWORD dwCiHash[] = {
+ const uint32_t dwCiHash[] = {
0x6576F145,0x65780A70,0x6719120C,0x6776F145,0x67780A70,0x6EDB33D7,0x6F0466B5,
0x739B6915,0x73B11E48,0x760D8AD5,0x786A70D0,0x8813C350,0x88641AF8,0x8ED5652D,
0x96D64541,0x97768A14,0x9B786F9C,0x9B7889F9,0x9C26E6ED,0xA6675748,0xA813C350,
@@ -83,7 +83,7 @@ uint8_t CExImContactXML::IsContactInfo(LPCSTR pszKey) if (pszKey && *pszKey) {
char buf[MAXSETTING];
// convert to hash and make bsearch as it is much faster then working with strings
- const DWORD dwHash = mir_hashstr(_strlwr(mir_strncpy(buf, pszKey, _countof(buf))));
+ const uint32_t dwHash = mir_hashstr(_strlwr(mir_strncpy(buf, pszKey, _countof(buf))));
return bsearch(&dwHash, dwCiHash, _countof(dwCiHash), sizeof(dwCiHash[0]), (int(*)(const void *, const void *))SortProc) != nullptr;
}
return FALSE;
@@ -444,7 +444,7 @@ uint8_t CExImContactXML::ExportEvents() * return: nothing
**/
-void CExImContactXML::CountKeys(DWORD &numSettings, DWORD &numEvents)
+void CExImContactXML::CountKeys(uint32_t &numSettings, uint32_t &numEvents)
{
numSettings = numEvents = 0;
@@ -531,7 +531,7 @@ int CExImContactXML::LoadXmlElement(const TiXmlElement *xContact) uid((uint16_t)atoi(pUID));
break;
case 'd':
- uid((DWORD)_atoi64(pUID));
+ uid((uint32_t)_atoi64(pUID));
break;
case 's':
// utf8 -> asci
@@ -545,7 +545,7 @@ int CExImContactXML::LoadXmlElement(const TiXmlElement *xContact) {
uint8_t *pbVal = (uint8_t*)mir_base64_decode(pUID, &valLen);
if (pbVal != nullptr)
- uidn(pbVal, (DWORD)valLen);
+ uidn(pbVal, (uint32_t)valLen);
}
break;
default:
@@ -576,7 +576,7 @@ int CExImContactXML::ImportContact() _hEvent = NULL;
// count settings and events and init progress dialog
- DWORD numSettings, numEvents;
+ uint32_t numSettings, numEvents;
CountKeys(numSettings, numEvents);
_pXmlFile->_progress.SetSettingsCount(numSettings + numEvents);
_pXmlFile->_numSettingsTodo += numSettings;
@@ -854,7 +854,7 @@ int CExImContactXML::ImportSetting(LPCSTR pszModule, const TiXmlElement *xmlEntr break;
case 'd': //'d' dVal and lVal are valid
dbv.type = DBVT_DWORD;
- dbv.dVal = (DWORD)_atoi64(value + 1);
+ dbv.dVal = (uint32_t)_atoi64(value + 1);
break;
case 's': //'s' pszVal is valid
dbv.type = DBVT_ASCIIZ;
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactXML.h b/plugins/UserInfoEx/src/ex_import/classExImContactXML.h index cd2343f967..f1a5e8793d 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactXML.h +++ b/plugins/UserInfoEx/src/ex_import/classExImContactXML.h @@ -67,7 +67,7 @@ class CExImContactXML : public CExImContactBase int ImportContact();
int ImportNormalContact();
int ImportMetaSubContact(CExImContactXML *pMetaContact);
- void CountKeys(DWORD &numSettings, DWORD &numEvents);
+ void CountKeys(uint32_t &numSettings, uint32_t &numEvents);
// private exporting methods
int ExportModule(LPCSTR pszModule);
diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp index 29d48a95b5..c0a1310f87 100644 --- a/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp +++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp @@ -49,15 +49,15 @@ static void InitAlteredPlacesBar() result = RegCreateKey(HKEY_CURRENT_USER, HKEY_WINPOL_PLACESBAR, &hkPlacesBar);
// install the places bar
if (SUCCEEDED(result)) {
- DWORD dwFolderID;
+ uint32_t dwFolderID;
LPSTR p;
CHAR szMirandaPath[MAX_PATH];
CHAR szProfilePath[MAX_PATH];
// default places: Desktop, My Documents, My Computer
- dwFolderID = 0; RegSetValueEx(hkPlacesBar, L"Place0", 0, REG_DWORD, (uint8_t*)&dwFolderID, sizeof(DWORD));
- dwFolderID = 5; RegSetValueEx(hkPlacesBar, L"Place1", 0, REG_DWORD, (uint8_t*)&dwFolderID, sizeof(DWORD));
- dwFolderID = 17; RegSetValueEx(hkPlacesBar, L"Place2", 0, REG_DWORD, (uint8_t*)&dwFolderID, sizeof(DWORD));
+ dwFolderID = 0; RegSetValueEx(hkPlacesBar, L"Place0", 0, REG_DWORD, (uint8_t*)&dwFolderID, sizeof(uint32_t));
+ dwFolderID = 5; RegSetValueEx(hkPlacesBar, L"Place1", 0, REG_DWORD, (uint8_t*)&dwFolderID, sizeof(uint32_t));
+ dwFolderID = 17; RegSetValueEx(hkPlacesBar, L"Place2", 0, REG_DWORD, (uint8_t*)&dwFolderID, sizeof(uint32_t));
// Miranda's installation path
GetModuleFileNameA(GetModuleHandleA("mir_app.mir"), szMirandaPath, _countof(szMirandaPath));
@@ -68,7 +68,7 @@ static void InitAlteredPlacesBar() // Miranda's profile path
if (!Profile_GetPathA(_countof(szProfilePath), szProfilePath)) {
// only add if different from profile path
- RegSetValueExA(hkPlacesBar, "Place4", 0, REG_SZ, (uint8_t*)szProfilePath, (DWORD)mir_strlen(szProfilePath) + 1);
+ RegSetValueExA(hkPlacesBar, "Place4", 0, REG_SZ, (uint8_t*)szProfilePath, (uint32_t)mir_strlen(szProfilePath) + 1);
}
RegCloseKey(hkPlacesBar);
@@ -278,7 +278,7 @@ int DlgExIm_OpenFileName(HWND hWndParent, const wchar_t *pszTitle, const wchar_t InitOpenFileNameStruct(&ofn, hWndParent, pszTitle, pszFilter, szInitialDir, pszFile);
ofn.Flags |= OFN_PATHMUSTEXIST;
if (!GetOpenFileNameW(&ofn)) {
- DWORD dwError = CommDlgExtendedError();
+ uint32_t dwError = CommDlgExtendedError();
if (dwError) MsgErr(ofn.hwndOwner, LPGENW("The OpenFileDialog returned an error: %d!"), dwError);
return -1;
}
@@ -304,7 +304,7 @@ int DlgExIm_SaveFileName(HWND hWndParent, const wchar_t *pszTitle, const wchar_t ofn.Flags |= OFN_OVERWRITEPROMPT;
if (!GetSaveFileNameW(&ofn)) {
- DWORD dwError = CommDlgExtendedError();
+ uint32_t dwError = CommDlgExtendedError();
if (dwError)
MsgErr(ofn.hwndOwner, LPGENW("The SaveFileDialog returned an error: %d!"), dwError);
return -1;
diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp index f70df32bb6..f16f5048e5 100644 --- a/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp +++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp @@ -114,7 +114,7 @@ CProgress::~CProgress() * return: nothing
**/
-void CProgress::SetContactCount(DWORD numContacts)
+void CProgress::SetContactCount(uint32_t numContacts)
{
if (_hDlg) {
HWND hProgress = GetDlgItem(_hDlg, IDC_PROGRESS2);
@@ -131,7 +131,7 @@ void CProgress::SetContactCount(DWORD numContacts) * return: nothing
**/
-void CProgress::SetSettingsCount(DWORD numSettings)
+void CProgress::SetSettingsCount(uint32_t numSettings)
{
if (_hDlg) {
HWND hProgress = GetDlgItem(_hDlg, IDC_PROGRESS);
diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.h b/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.h index c6d72d2cb8..408df14ad6 100644 --- a/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.h +++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.h @@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. class CProgress
{
HWND _hDlg;
- DWORD _dwStartTime;
+ uint32_t _dwStartTime;
uint8_t Update();
@@ -37,8 +37,8 @@ public: void Hide();
- void SetContactCount(DWORD numContacts);
- void SetSettingsCount(DWORD numSettings);
+ void SetContactCount(uint32_t numContacts);
+ void SetSettingsCount(uint32_t numSettings);
uint8_t UpdateContact(LPCTSTR pszFormat, ...);
uint8_t UpdateSetting(LPCTSTR pszFormat, ...);
diff --git a/plugins/UserInfoEx/src/ex_import/mir_rfcCodecs.h b/plugins/UserInfoEx/src/ex_import/mir_rfcCodecs.h index 8c131bc17b..562a6037d7 100644 --- a/plugins/UserInfoEx/src/ex_import/mir_rfcCodecs.h +++ b/plugins/UserInfoEx/src/ex_import/mir_rfcCodecs.h @@ -49,7 +49,7 @@ inline INT_PTR QPDecodeGetRequiredLength(INT_PTR nSrcLen) return nSrcLen;
}
-inline BOOL QPEncode(uint8_t *pbSrcData, INT_PTR nSrcLen, LPSTR szDest, INT_PTR *pnDestLen, uint8_t *bEncoded, DWORD dwFlags = 0)
+inline BOOL QPEncode(uint8_t *pbSrcData, INT_PTR nSrcLen, LPSTR szDest, INT_PTR *pnDestLen, uint8_t *bEncoded, uint32_t dwFlags = 0)
{
//The hexadecimal character set
static const CHAR s_chHexChars[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
@@ -111,7 +111,7 @@ inline BOOL QPEncode(uint8_t *pbSrcData, INT_PTR nSrcLen, LPSTR szDest, INT_PTR return TRUE;
}
-inline BOOL QPDecode(uint8_t *pbSrcData, INT_PTR nSrcLen, LPSTR szDest, INT_PTR *pnDestLen, DWORD dwFlags = 0)
+inline BOOL QPDecode(uint8_t *pbSrcData, INT_PTR nSrcLen, LPSTR szDest, INT_PTR *pnDestLen, uint32_t dwFlags = 0)
{
if (!pbSrcData || !szDest || !pnDestLen) {
return FALSE;
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp index 854c2ad622..d86e3f3d5c 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp @@ -175,7 +175,7 @@ int SvcExImINI_Export(lpExImParam ExImContact, const wchar_t *pszFileName) * importing stuff ***********************************************************************************************************/ -LPSTR strnrchr(LPSTR string, int ch, DWORD len) +LPSTR strnrchr(LPSTR string, int ch, uint32_t len) { LPSTR start = (LPSTR)string; string += len; /* find end of string */ @@ -195,9 +195,9 @@ LPSTR strnrchr(LPSTR string, int ch, DWORD len) * return: pointer to the buffer on success or NULL on error **/ -static DWORD ImportreadLine(FILE *file, LPSTR &str) +static uint32_t ImportreadLine(FILE *file, LPSTR &str) { - DWORD l = 0; + uint32_t l = 0; bool bComment = false; str[0] = 0; @@ -329,7 +329,7 @@ int ImportSetting(MCONTACT hContact, LPCSTR pszModule, LPSTR &strLine) if (size_t brk = strspn(value, "0123456789-")) *(value + brk) = 0; dbv.type = DBVT_DWORD; - dbv.dVal = (DWORD)_atoi64(value); + dbv.dVal = (uint32_t)_atoi64(value); break; case 's': @@ -403,7 +403,7 @@ int SvcExImINI_Import(MCONTACT hContact, const wchar_t *pszFileName) } MCONTACT hNewContact = INVALID_CONTACT_ID; - DWORD end, numLines = 0; + uint32_t end, numLines = 0; CHAR szModule[MAXSETTING] = { 0 }; int numContactsInFile = 0; // number of contacts in the inifile int numContactsAdded = 0; // number of contacts, that were added to the database diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp index 9a48a5e3fe..f7cba427a6 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp @@ -285,7 +285,7 @@ size_t CLineBuffer::operator + (const LONG lVal) * return: length of the string, added
**/
-size_t CLineBuffer::operator + (const DWORD dVal)
+size_t CLineBuffer::operator + (const uint32_t dVal)
{
size_t cbLength = 10;
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h index 1cbb11ac3c..2a21d3f9ba 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h @@ -44,7 +44,7 @@ public: size_t operator + (const SHORT sVal);
size_t operator + (const uint16_t wVal);
size_t operator + (const LONG lVal);
- size_t operator + (const DWORD dVal);
+ size_t operator + (const uint32_t dVal);
size_t GetLength();
LPCSTR GetBuffer();
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp index d5a9b3b9e9..1d008719ad 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp @@ -91,7 +91,7 @@ int CFileXml::Export(lpExImParam ExImContact, const wchar_t *pszFileName) {
DB::CEnumList Modules;
- DWORD result = (DWORD)DialogBox(g_plugin.getInst(), MAKEINTRESOURCE(IDD_EXPORT_DATAHISTORY), nullptr, DlgProc_DataHistory);
+ uint32_t result = (uint32_t)DialogBox(g_plugin.getInst(), MAKEINTRESOURCE(IDD_EXPORT_DATAHISTORY), nullptr, DlgProc_DataHistory);
if (LOWORD(result) != IDOK)
return 0;
@@ -284,9 +284,9 @@ int CFileXml::ImportContacts(const TiXmlElement *xmlParent) * return: nothing
**/
-DWORD CFileXml::CountContacts(const TiXmlElement *xmlParent)
+uint32_t CFileXml::CountContacts(const TiXmlElement *xmlParent)
{
- DWORD dwCount = 0;
+ uint32_t dwCount = 0;
// count contacts in file for progress bar
for (auto *xContact : TiXmlEnum(xmlParent))
if (!mir_strcmpi(xContact->Name(), XKEY_CONTACT) || !mir_strcmpi(xContact->Name(), XKEY_OWNER))
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.h b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.h index 0152fcac9b..e0508eb82f 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.h +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.h @@ -29,13 +29,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. class CFileXml {
friend class CExImContactXML;
- DWORD _numContactsTodo;
- DWORD _numContactsDone;
- DWORD _numSettingsTodo;
- DWORD _numSettingsDone;
- DWORD _numEventsTodo;
- DWORD _numEventsDone;
- DWORD _numEventsDuplicated;
+ uint32_t _numContactsTodo;
+ uint32_t _numContactsDone;
+ uint32_t _numSettingsTodo;
+ uint32_t _numSettingsDone;
+ uint32_t _numEventsTodo;
+ uint32_t _numEventsDone;
+ uint32_t _numEventsDuplicated;
MCONTACT _hContactToWorkOn; // contact to ex/import (NULL=owner|INVALID_HANDLE_VALUE=all|HADNLE=one user)
@@ -46,7 +46,7 @@ class CFileXml { int ImportOwner(const TiXmlElement* xmlContact);
int ImportContacts(const TiXmlElement* xmlParent);
- DWORD CountContacts(const TiXmlElement* xmlParent);
+ uint32_t CountContacts(const TiXmlElement* xmlParent);
/*
int ExportOwner(FILE *xmlfile, uint8_t bExportEvents);
diff --git a/plugins/UserInfoEx/src/mir_contactqueue.h b/plugins/UserInfoEx/src/mir_contactqueue.h index f40553ede6..66aee2efda 100644 --- a/plugins/UserInfoEx/src/mir_contactqueue.h +++ b/plugins/UserInfoEx/src/mir_contactqueue.h @@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. **/
struct CQueueItem
{
- DWORD check_time;
+ uint32_t check_time;
MCONTACT hContact;
PVOID param;
};
diff --git a/plugins/UserInfoEx/src/mir_db.cpp b/plugins/UserInfoEx/src/mir_db.cpp index 83867be920..f10a850566 100644 --- a/plugins/UserInfoEx/src/mir_db.cpp +++ b/plugins/UserInfoEx/src/mir_db.cpp @@ -31,7 +31,7 @@ namespace Contact { /**
* This function trys to guess, when an ICQ contact was added to database.
**/
-DWORD WhenAdded(DWORD dwUIN, LPCSTR)
+uint32_t WhenAdded(uint32_t dwUIN, LPCSTR)
{
DBEVENTINFO dbei = {};
DB::ECPTR pCursor(DB::Events(0));
@@ -40,8 +40,8 @@ DWORD WhenAdded(DWORD dwUIN, LPCSTR) if (!DB::Event::GetInfo(edbe, &dbei) && dbei.eventType == EVENTTYPE_ADDED) {
if (!DB::Event::GetInfoWithData(edbe, &dbei)) {
// extract UIN and compare with given one
- DWORD dwEvtUIN;
- memcpy(&dwEvtUIN, dbei.pBlob, sizeof(DWORD));
+ uint32_t dwEvtUIN;
+ memcpy(&dwEvtUIN, dbei.pBlob, sizeof(uint32_t));
MIR_FREE(dbei.pBlob);
if (dwEvtUIN == dwUIN)
return dbei.timestamp;
@@ -421,7 +421,7 @@ uint8_t ConvertString(DBVARIANT* dbv, const uint8_t destType) /**
* This function completely converts a DBVARIANT to the destination string type.
-* It includes uint8_t, uint16_t, DWORD and all string types
+* It includes uint8_t, uint16_t, uint32_t and all string types
* @param dbv - pointer to DBVARIANT structure which is to manipulate
* @param destType - one of (DBVT_ASCIIZ, DBVT_UTF8 or DBVT_WCHAR)
*
@@ -533,7 +533,7 @@ bool GetInfoWithData(MEVENT hEvent, DBEVENTINFO *dbei) {
if (!dbei->cbBlob) {
INT_PTR size = db_event_getBlobSize(hEvent);
- dbei->cbBlob = (size != -1) ? (DWORD)size : 0;
+ dbei->cbBlob = (size != -1) ? (uint32_t)size : 0;
}
if (dbei->cbBlob) {
dbei->pBlob = (uint8_t*) mir_alloc(dbei->cbBlob);
@@ -558,7 +558,7 @@ bool GetInfoWithData(MEVENT hEvent, DBEVENTINFO *dbei) * @retval timestamp
**/
-DWORD TimeOf(MEVENT hEvent)
+uint32_t TimeOf(MEVENT hEvent)
{
DBEVENTINFO dbei;
if (!GetInfo(hEvent, &dbei))
diff --git a/plugins/UserInfoEx/src/mir_db.h b/plugins/UserInfoEx/src/mir_db.h index 61f8c86fba..6ede82c18f 100644 --- a/plugins/UserInfoEx/src/mir_db.h +++ b/plugins/UserInfoEx/src/mir_db.h @@ -29,7 +29,7 @@ namespace DB { **/
namespace Contact {
- DWORD WhenAdded(DWORD dwUIN, LPCSTR szBaseProto);
+ uint32_t WhenAdded(uint32_t dwUIN, LPCSTR szBaseProto);
} /* namespace Contact */
namespace Module {
@@ -101,7 +101,7 @@ namespace Event { HANDLE FindLast(MCONTACT hContact);
bool GetInfo(MEVENT hEvent, DBEVENTINFO *dbei);
bool GetInfoWithData(MEVENT hEvent, DBEVENTINFO *dbei);
- DWORD GetTime(MEVENT hEvent);
+ uint32_t GetTime(MEVENT hEvent);
bool Exists(MCONTACT hContact, MEVENT& hDbExistingEvent, DBEVENTINFO *dbei);
} /* namespace Events */
diff --git a/plugins/UserInfoEx/src/psp_options.cpp b/plugins/UserInfoEx/src/psp_options.cpp index 46bd0f9d64..d4cb66ed4d 100644 --- a/plugins/UserInfoEx/src/psp_options.cpp +++ b/plugins/UserInfoEx/src/psp_options.cpp @@ -144,7 +144,7 @@ static uint8_t DBWriteCheckBtn(HWND hDlg, const int idCtrl, LPCSTR pszSetting) }
/**
- * This function reads a DWORD from database and interprets it as an color value
+ * This function reads a uint32_t from database and interprets it as an color value
* to set to the color control.
*
* @param hWnd - the dialog's window handle
@@ -154,13 +154,13 @@ static uint8_t DBWriteCheckBtn(HWND hDlg, const int idCtrl, LPCSTR pszSetting) *
* @return nothing
**/
-static void DBGetColor(HWND hDlg, const int idCtrl, LPCSTR pszSetting, DWORD bDefault)
+static void DBGetColor(HWND hDlg, const int idCtrl, LPCSTR pszSetting, uint32_t bDefault)
{
SendDlgItemMessage(hDlg, idCtrl, CPM_SETCOLOUR, 0, g_plugin.getDword(pszSetting, bDefault));
}
/**
- * This function writes a DWORD to database according to the value
+ * This function writes a uint32_t to database according to the value
* of the color control identified by 'idCtrl'.
*
* @param hWnd - the dialog's window handle
@@ -171,7 +171,7 @@ static void DBGetColor(HWND hDlg, const int idCtrl, LPCSTR pszSetting, DWORD bDe **/
static void DBWriteColor(HWND hDlg, const int idCtrl, LPCSTR pszSetting)
{
- g_plugin.setDword(pszSetting, (DWORD)SendDlgItemMessage(hDlg, idCtrl, CPM_GETCOLOUR, 0, 0));
+ g_plugin.setDword(pszSetting, (uint32_t)SendDlgItemMessage(hDlg, idCtrl, CPM_GETCOLOUR, 0, 0));
}
/**
diff --git a/plugins/UserInfoEx/src/psp_origin.cpp b/plugins/UserInfoEx/src/psp_origin.cpp index 2d8d48faa5..c10d4c0fc0 100644 --- a/plugins/UserInfoEx/src/psp_origin.cpp +++ b/plugins/UserInfoEx/src/psp_origin.cpp @@ -79,7 +79,7 @@ INT_PTR CALLBACK PSPProcOrigin(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPara MTime mt;
if (mt.DBGetStamp(hContact, USERINFO, SET_CONTACT_ADDEDTIME) && strstr(pszProto, "ICQ")) {
- DWORD dwStamp;
+ uint32_t dwStamp;
dwStamp = DB::Contact::WhenAdded(db_get_dw(hContact, pszProto, "UIN", 0), pszProto);
if (dwStamp > 0)
diff --git a/plugins/UserInfoEx/src/psp_profile.cpp b/plugins/UserInfoEx/src/psp_profile.cpp index db61cce98b..9101d41d13 100644 --- a/plugins/UserInfoEx/src/psp_profile.cpp +++ b/plugins/UserInfoEx/src/psp_profile.cpp @@ -523,7 +523,7 @@ static int ProfileList_AddItemlistFromDB( continue;
break;
case DBVT_DWORD:
- if (dbvCat.dVal != (DWORD)idList[j].nID)
+ if (dbvCat.dVal != (uint32_t)idList[j].nID)
continue;
break;
case DBVT_ASCIIZ:
diff --git a/plugins/UserInfoEx/src/svc_refreshci.cpp b/plugins/UserInfoEx/src/svc_refreshci.cpp index 4f36b7dede..68a0fffce2 100644 --- a/plugins/UserInfoEx/src/svc_refreshci.cpp +++ b/plugins/UserInfoEx/src/svc_refreshci.cpp @@ -721,7 +721,7 @@ static INT_PTR RefreshService(WPARAM, LPARAM) static int OnContactAdded(WPARAM hContact, LPARAM)
{
- DWORD dwStmp = db_get_dw(hContact, USERINFO, SET_CONTACT_ADDEDTIME, 0);
+ uint32_t dwStmp = db_get_dw(hContact, USERINFO, SET_CONTACT_ADDEDTIME, 0);
if (!dwStmp) {
MTime mt;
mt.GetLocalTime();
|