diff options
| author | George Hazan <ghazan@miranda.im> | 2021-12-26 20:31:39 +0300 |
|---|---|---|
| committer | George Hazan <ghazan@miranda.im> | 2021-12-26 20:31:39 +0300 |
| commit | cddcd7483a7c472598af098e759e5d309024f606 (patch) | |
| tree | b0a227d6e087c41958cc84d27bc323353248aae5 /include | |
| parent | 1039b2829a264280493ba0fa979214fe024dc70c (diff) | |
DWORD -> uint32_t
Diffstat (limited to 'include')
| -rw-r--r-- | include/m_chat.h | 8 | ||||
| -rw-r--r-- | include/m_chat_int.h | 6 | ||||
| -rw-r--r-- | include/m_clc.h | 4 | ||||
| -rw-r--r-- | include/m_clist.h | 8 | ||||
| -rw-r--r-- | include/m_clistint.h | 24 | ||||
| -rw-r--r-- | include/m_cluiframes.h | 2 | ||||
| -rw-r--r-- | include/m_core.h | 2 | ||||
| -rw-r--r-- | include/m_crypto.h | 6 | ||||
| -rw-r--r-- | include/m_database.h | 48 | ||||
| -rw-r--r-- | include/m_db_int.h | 2 | ||||
| -rw-r--r-- | include/m_fontservice.h | 8 | ||||
| -rw-r--r-- | include/m_genmenu.h | 2 | ||||
| -rw-r--r-- | include/m_gui.h | 90 | ||||
| -rw-r--r-- | include/m_help.h | 2 | ||||
| -rw-r--r-- | include/m_hotkeys.h | 2 | ||||
| -rw-r--r-- | include/m_imgsrvc.h | 4 | ||||
| -rw-r--r-- | include/m_import.h | 2 | ||||
| -rw-r--r-- | include/m_jabber.h | 4 | ||||
| -rw-r--r-- | include/m_message.h | 18 | ||||
| -rw-r--r-- | include/m_netlib.h | 25 | ||||
| -rw-r--r-- | include/m_options.h | 2 | ||||
| -rw-r--r-- | include/m_popup.h | 18 | ||||
| -rw-r--r-- | include/m_protocols.h | 2 | ||||
| -rw-r--r-- | include/m_protoint.h | 8 | ||||
| -rw-r--r-- | include/m_protosvc.h | 12 | ||||
| -rw-r--r-- | include/m_srmm_int.h | 34 | ||||
| -rw-r--r-- | include/m_system.h | 6 | ||||
| -rw-r--r-- | include/m_timezones.h | 22 | ||||
| -rw-r--r-- | include/m_utils.h | 4 | ||||
| -rw-r--r-- | include/newpluginapi.h | 12 |
30 files changed, 193 insertions, 194 deletions
diff --git a/include/m_chat.h b/include/m_chat.h index 06a16ebd84..efe95dbfad 100644 --- a/include/m_chat.h +++ b/include/m_chat.h @@ -367,10 +367,10 @@ struct GCEVENT MAllCStrings pszUserInfo; //
BOOL bIsMe; // Is this event from the Miranda user?
- DWORD dwFlags; // event flags: GCEF_*
+ uint32_t dwFlags; // event flags: GCEF_*
INT_PTR dwItemData; // User specified data.
- DWORD time; // Timestamp of the event
+ uint32_t time; // Timestamp of the event
};
EXTERN_C MIR_APP_DLL(int) Chat_Event(GCEVENT*);
@@ -442,7 +442,7 @@ EXTERN_C MIR_APP_DLL(int) Chat_Terminate(const char *szModule, const wchar_t *ws // The GC_INFO structure
struct GC_INFO
{
- DWORD Flags; // use a combination of the above flags
+ uint32_t Flags; // use a combination of the above flags
int iItem; // session type (GCW_*)
int iType; // session type (GCW_*)
LPCSTR pszModule; // the module name as registered in MS_GC_REGISTER
@@ -522,7 +522,7 @@ struct GCHOOK // contains info on a menuitem to be added
struct gc_item {
wchar_t *pszDesc; // Textual description of the menu item to add
- DWORD dwID; // when/if the user selects this menu item this
+ uint32_t dwID; // when/if the user selects this menu item this
// value will be returned via the above hook, GC_USER_LOGMENU
// or GC_USER_NICKLISTMENU. Must not be 0 and must be unique.
int uType; // What kind of menu item is it? Use MENU_* flags above
diff --git a/include/m_chat_int.h b/include/m_chat_int.h index a44aa5245b..e42b3da096 100644 --- a/include/m_chat_int.h +++ b/include/m_chat_int.h @@ -217,9 +217,9 @@ struct GlobalLogSettingsBase bool bShowContactStatus;
bool bContactStatusFirst;
bool bDoubleClick4Privat; // send a private message on dblclick in a nick list
- DWORD dwIconFlags;
- DWORD dwTrayIconFlags;
- DWORD dwPopupFlags;
+ uint32_t dwIconFlags;
+ uint32_t dwTrayIconFlags;
+ uint32_t dwPopupFlags;
int LogIconSize;
int LogTextIndent;
int LoggingLimit;
diff --git a/include/m_clc.h b/include/m_clc.h index dd4e697d70..a22c595827 100644 --- a/include/m_clc.h +++ b/include/m_clc.h @@ -152,7 +152,7 @@ typedef struct { int cbSize; const wchar_t *pszText; HANDLE hParentGroup; - DWORD flags; + uint32_t flags; HICON hIcon; //todo } CLCINFOITEM; #define CLCIIF_BELOWGROUPS 1 //put it between groups and contacts, default is at top @@ -199,7 +199,7 @@ typedef struct { HANDLE hItem; int action; int iColumn; //-1 if not on an extra column - DWORD flags; + uint32_t flags; POINT pt; } NMCLISTCONTROL; #endif diff --git a/include/m_clist.h b/include/m_clist.h index a5e61560e2..60a1d95961 100644 --- a/include/m_clist.h +++ b/include/m_clist.h @@ -225,7 +225,7 @@ EXTERN_C MIR_APP_DLL(HGENMENU) Menu_AddTrayMenuItem(TMO_MenuItem *pmi); struct CLISTEVENT
{
MCONTACT hContact; // handle to the contact to put the icon by
- DWORD flags; // ...of course
+ uint32_t flags; // ...of course
HICON hIcon; // icon to flash
MEVENT hDbEvent; // caller defined but should be unique for hContact
const char *moduleName; // for events with CLEF_PROTOCOLGLOBAL in flags
@@ -409,7 +409,7 @@ EXTERN_C MIR_APP_DLL(int) Clist_GroupRename(MGROUP hGroup, const wchar_t *ptszNe #define GROUPF_EXPANDED 0x04
#define GROUPF_HIDEOFFLINE 0x08
-EXTERN_C MIR_APP_DLL(wchar_t*) Clist_GroupGetName(MGROUP hGroup, DWORD *pdwFlags = nullptr);
+EXTERN_C MIR_APP_DLL(wchar_t*) Clist_GroupGetName(MGROUP hGroup, uint32_t *pdwFlags = nullptr);
/////////////////////////////////////////////////////////////////////////////////////////
// change the expanded state flag for a group internally
@@ -534,8 +534,8 @@ EXTERN_C MIR_APP_DLL(wchar_t*) Clist_GetContactDisplayName(MCONTACT hContact, in #define NIIF_ICON_MASK 0x0000000F
#define NIIF_NOSOUND 0x00000010
-EXTERN_C MIR_APP_DLL(int) Clist_TrayNotifyA(const char *szProto, const char *szInfoTitle, const char *szInfo, DWORD dwInfoFlags, UINT uTimeout);
-EXTERN_C MIR_APP_DLL(int) Clist_TrayNotifyW(const char *szProto, const wchar_t *wszInfoTitle, const wchar_t *wszInfo, DWORD dwInfoFlags, UINT uTimeout);
+EXTERN_C MIR_APP_DLL(int) Clist_TrayNotifyA(const char *szProto, const char *szInfoTitle, const char *szInfo, uint32_t dwInfoFlags, UINT uTimeout);
+EXTERN_C MIR_APP_DLL(int) Clist_TrayNotifyW(const char *szProto, const wchar_t *wszInfoTitle, const wchar_t *wszInfo, uint32_t dwInfoFlags, UINT uTimeout);
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/include/m_clistint.h b/include/m_clistint.h index a1c0ea5815..6b7403c6aa 100644 --- a/include/m_clistint.h +++ b/include/m_clistint.h @@ -147,12 +147,12 @@ struct ClcDataBase : public MZeroedObject int backgroundBmpUse, bkChanged;
int iHotTrack;
int gammaCorrection;
- DWORD greyoutFlags; //see m_clc.h
- DWORD offlineModes;
- DWORD exStyle;
+ uint32_t greyoutFlags; //see m_clc.h
+ uint32_t offlineModes;
+ uint32_t exStyle;
POINT ptInfoTip;
int infoTipTimeout;
- DWORD hInfoTipItem;
+ uint32_t hInfoTipItem;
HIMAGELIST himlExtraColumns;
int extraColumnsCount;
int extraColumnSpacing;
@@ -251,8 +251,8 @@ EXTERN_C MIR_APP_DLL(void) Clist_CalcEipPosition(ClcData *dat, ClcContact * EXTERN_C MIR_APP_DLL(void) Clist_ChangeContactIcon(MCONTACT hContact, int iIcon);
EXTERN_C MIR_APP_DLL(void) Clist_ClcOptionsChanged(void);
EXTERN_C MIR_APP_DLL(int) Clist_ClcStatusToPf2(int status);
-EXTERN_C MIR_APP_DLL(DWORD) Clist_ContactToHItem(ClcContact *contact);
-EXTERN_C MIR_APP_DLL(HANDLE) Clist_ContactToItemHandle(ClcContact *contact, DWORD *nmFlags);
+EXTERN_C MIR_APP_DLL(uint32_t) Clist_ContactToHItem(ClcContact *contact);
+EXTERN_C MIR_APP_DLL(HANDLE) Clist_ContactToItemHandle(ClcContact *contact, uint32_t *nmFlags);
EXTERN_C MIR_APP_DLL(void) Clist_DeleteFromContactList(HWND hwnd, ClcData *dat);
EXTERN_C MIR_APP_DLL(void) Clist_DeleteItemFromTree(HWND hwnd, MCONTACT hItem);
EXTERN_C MIR_APP_DLL(void) Clist_DoSelectionDefaultAction(HWND hwnd, ClcData *dat);
@@ -260,8 +260,8 @@ EXTERN_C MIR_APP_DLL(void) Clist_DrawMenuItem(DRAWITEMSTRUCT *dis, HICON hI EXTERN_C MIR_APP_DLL(void) Clist_EndRename(ClcData *dat, int save);
EXTERN_C MIR_APP_DLL(void) Clist_EnsureVisible(HWND hwnd, ClcData *dat, int iItem, int partialOk);
EXTERN_C MIR_APP_DLL(int) Clist_EventsProcessTrayDoubleClick(int index);
-EXTERN_C MIR_APP_DLL(bool) Clist_FindItem(HWND hwnd, ClcData *dat, DWORD dwItem, ClcContact **contact, ClcGroup **subgroup = 0, int *isVisible = 0);
-EXTERN_C MIR_APP_DLL(DWORD) Clist_GetDefaultExStyle(void);
+EXTERN_C MIR_APP_DLL(bool) Clist_FindItem(HWND hwnd, ClcData *dat, uint32_t dwItem, ClcContact **contact, ClcGroup **subgroup = 0, int *isVisible = 0);
+EXTERN_C MIR_APP_DLL(uint32_t) Clist_GetDefaultExStyle(void);
EXTERN_C MIR_APP_DLL(void) Clist_GetFontSetting(int i, LOGFONT *lf, COLORREF *colour);
EXTERN_C MIR_APP_DLL(int) Clist_GetGeneralizedStatus(char **szProto = nullptr);
EXTERN_C MIR_APP_DLL(wchar_t*) Clist_GetGroupCountsText(ClcData *dat, ClcContact *contact);
@@ -313,7 +313,7 @@ struct CLIST_INTERFACE LRESULT (CALLBACK *pfnContactListControlWndProc)(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
// clcidents.c
- ClcContact* (*pfnFindItem)(DWORD dwItem, ClcContact *contact);
+ ClcContact* (*pfnFindItem)(uint32_t dwItem, ClcContact *contact);
int (*pfnGetRowsPriorTo)(ClcGroup *group, ClcGroup *subgroup, int contactIndex);
int (*pfnGetRowByIndex)(ClcData *dat, int testindex, ClcContact **contact, ClcGroup **subgroup);
@@ -322,7 +322,7 @@ struct CLIST_INTERFACE /* clcitems.c */
ClcContact* (*pfnCreateClcContact)(void);
- ClcGroup* (*pfnAddGroup)(HWND hwnd, ClcData *dat, const wchar_t *szName, DWORD flags, int groupId, int calcTotalMembers);
+ ClcGroup* (*pfnAddGroup)(HWND hwnd, ClcData *dat, const wchar_t *szName, uint32_t flags, int groupId, int calcTotalMembers);
void (*pfnFreeContact)(ClcContact *contact);
@@ -342,7 +342,7 @@ struct CLIST_INTERFACE void (*pfnPaintClc)(HWND hwnd, ClcData *dat, HDC hdc, RECT * rcPaint);
/* clcutils.c */
- int (*pfnHitTest)(HWND hwnd, ClcData *dat, int testx, int testy, ClcContact **contact, ClcGroup **group, DWORD * flags);
+ int (*pfnHitTest)(HWND hwnd, ClcData *dat, int testx, int testy, ClcContact **contact, ClcGroup **group, uint32_t * flags);
void (*pfnScrollTo)(HWND hwnd, ClcData *dat, int desty, int noSmooth);
void (*pfnRecalcScrollBar)(HWND hwnd, ClcData *dat);
void (*pfnSetGroupExpand)(HWND hwnd, ClcData *dat, ClcGroup *group, int newState);
@@ -453,7 +453,7 @@ namespace Clist Tray1Click,
TrayAlwaysStatus;
- extern MIR_APP_EXPORT CMOption<DWORD>
+ extern MIR_APP_EXPORT CMOption<uint32_t>
OfflineModes;
};
diff --git a/include/m_cluiframes.h b/include/m_cluiframes.h index 2409e2d56b..b24defe64b 100644 --- a/include/m_cluiframes.h +++ b/include/m_cluiframes.h @@ -56,7 +56,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. struct CLISTFrame
{
- DWORD cbSize;
+ uint32_t cbSize;
HWND hWnd;
HICON hIcon;
int align; // al flags below
diff --git a/include/m_core.h b/include/m_core.h index 4a4b763c73..29ef0c6ca7 100644 --- a/include/m_core.h +++ b/include/m_core.h @@ -150,7 +150,7 @@ MIR_APP_DLL(INT_PTR) CallProtoService(const char *szModule, const char *szServi /////////////////////////////////////////////////////////////////////////////// // exceptions -typedef DWORD (MIR_CDECL *pfnExceptionFilter)(DWORD code, EXCEPTION_POINTERS *info); +typedef uint32_t (MIR_CDECL *pfnExceptionFilter)(uint32_t code, EXCEPTION_POINTERS *info); MIR_CORE_DLL(pfnExceptionFilter) GetExceptionFilter(void); MIR_CORE_DLL(pfnExceptionFilter) SetExceptionFilter(pfnExceptionFilter pMirandaExceptFilter); diff --git a/include/m_crypto.h b/include/m_crypto.h index 870bbce929..3bc977e1de 100644 --- a/include/m_crypto.h +++ b/include/m_crypto.h @@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. struct MICryptoEngine
{
- DWORD dwVersion;
+ uint32_t dwVersion;
STDMETHOD_(void, destroy)(void) PURE;
@@ -67,8 +67,8 @@ typedef MICryptoEngine* (MIR_CDECL *pfnCryptoProviderFactory)(void); struct CRYPTO_PROVIDER
{
- DWORD dwSize;
- DWORD dwFlags; // one of CPF_* constants
+ uint32_t dwSize;
+ uint32_t dwFlags; // one of CPF_* constants
HPLUGIN pPlugin;
char *pszName; // unique id
diff --git a/include/m_database.h b/include/m_database.h index a34aba57fa..1bbc27d279 100644 --- a/include/m_database.h +++ b/include/m_database.h @@ -147,7 +147,7 @@ struct DBVARIANT union { uint8_t bVal; char cVal; uint16_t wVal; short sVal; - DWORD dVal; long lVal; + uint32_t dVal; long lVal; struct { union { char *pszVal; @@ -173,12 +173,12 @@ struct DBVARIANT struct DBEVENTINFO { const char *szModule; // pointer to name of the module that 'owns' this event - DWORD timestamp; // seconds since 00:00, 01/01/1970. Gives us times until 2106 + uint32_t timestamp; // seconds since 00:00, 01/01/1970. Gives us times until 2106 // unless you use the standard C library which is // signed and can only do until 2038. In GMT. - DWORD flags; // combination of DBEF_* flags - uint16_t eventType; // module-defined event type field - int cbBlob; // size of pBlob in bytes + uint32_t flags; // combination of DBEF_* flags + uint16_t eventType; // module-defined event type field + int cbBlob; // size of pBlob in bytes uint8_t *pBlob; // pointer to buffer containing module-defined event data const char *szId; // server id @@ -339,7 +339,7 @@ EXTERN_C MIR_CORE_DLL(MEVENT) db_event_last(MCONTACT hContact); // Changes the flags for an event to mark it as read. // hDbEvent should have been returned by db_event_add/first/last/next/prev() -// Returns the entire flag DWORD for the event after the change, or -1 if hDbEvent is invalid. +// Returns the entire flag uint32_t for the event after the change, or -1 if hDbEvent is invalid. // This is the one database write operation that does not trigger an event. // Modules should not save flags states for any length of time. @@ -368,7 +368,7 @@ EXTERN_C MIR_CORE_DLL(INT_PTR) db_get(MCONTACT hContact, const char *szModule, EXTERN_C MIR_CORE_DLL(int) db_get_b(MCONTACT hContact, const char *szModule, const char *szSetting, int errorValue = 0); EXTERN_C MIR_CORE_DLL(int) db_get_w(MCONTACT hContact, const char *szModule, const char *szSetting, int errorValue = 0); -EXTERN_C MIR_CORE_DLL(DWORD) db_get_dw(MCONTACT hContact, const char *szModule, const char *szSetting, DWORD errorValue = 0); +EXTERN_C MIR_CORE_DLL(uint32_t) db_get_dw(MCONTACT hContact, const char *szModule, const char *szSetting, uint32_t errorValue = 0); EXTERN_C MIR_CORE_DLL(char*) db_get_sa(MCONTACT hContact, const char *szModule, const char *szSetting, const char *szValue = nullptr); EXTERN_C MIR_CORE_DLL(char*) db_get_utfa(MCONTACT hContact, const char *szModule, const char *szSetting, const char *szValue = nullptr); @@ -384,7 +384,7 @@ EXTERN_C MIR_CORE_DLL(int) db_get_wstatic(MCONTACT hContact, const char *sz EXTERN_C MIR_CORE_DLL(INT_PTR) db_set(MCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv); EXTERN_C MIR_CORE_DLL(INT_PTR) db_set_b(MCONTACT hContact, const char *szModule, const char *szSetting, uint8_t val); EXTERN_C MIR_CORE_DLL(INT_PTR) db_set_w(MCONTACT hContact, const char *szModule, const char *szSetting, uint16_t val); -EXTERN_C MIR_CORE_DLL(INT_PTR) db_set_dw(MCONTACT hContact, const char *szModule, const char *szSetting, DWORD val); +EXTERN_C MIR_CORE_DLL(INT_PTR) db_set_dw(MCONTACT hContact, const char *szModule, const char *szSetting, uint32_t val); EXTERN_C MIR_CORE_DLL(INT_PTR) db_set_s(MCONTACT hContact, const char *szModule, const char *szSetting, const char *val); EXTERN_C MIR_CORE_DLL(INT_PTR) db_set_ws(MCONTACT hContact, const char *szModule, const char *szSetting, const wchar_t *val); EXTERN_C MIR_CORE_DLL(INT_PTR) db_set_utf(MCONTACT hContact, const char *szModule, const char *szSetting, const char *val); @@ -472,13 +472,13 @@ struct DBCONTACTWRITESETTING struct DBEVENTTYPEDESCR { - LPSTR module; // event module name - DWORD flags; // flags, combination of the DETF_* - int eventType; // event id, unique for this module - LPSTR descr; // event type description (i.e. "File Transfer") - LPSTR textService; // service name for MS_DB_EVENT_GETTEXT (0.8+, default Module+'/GetEventText'+EvtID) - LPSTR iconService; // service name for MS_DB_EVENT_GETICON (0.8+, default Module+'/GetEventIcon'+EvtID) - HANDLE eventIcon; // icolib handle to eventicon (0.8+, default 'eventicon_'+Module+EvtID) + LPSTR module; // event module name + uint32_t flags; // flags, combination of the DETF_* + int eventType; // event id, unique for this module + LPSTR descr; // event type description (i.e. "File Transfer") + LPSTR textService; // service name for MS_DB_EVENT_GETTEXT (0.8+, default Module+'/GetEventText'+EvtID) + LPSTR iconService; // service name for MS_DB_EVENT_GETICON (0.8+, default Module+'/GetEventIcon'+EvtID) + HANDLE eventIcon; // icolib handle to eventicon (0.8+, default 'eventicon_'+Module+EvtID) }; // constants for default event behaviour @@ -499,7 +499,7 @@ EXTERN_C MIR_APP_DLL(DBEVENTTYPEDESCR*) DbEvent_GetType(const char *szModule, in __forceinline MCONTACT DbGetAuthEventContact(DBEVENTINFO *dbei) { - return (MCONTACT)(*(DWORD*)&dbei->pBlob[sizeof(DWORD)]); + return (MCONTACT)(*(uint32_t*)&dbei->pBlob[sizeof(uint32_t)]); } ///////////////////////////////////////////////////////////////////////////////////////// @@ -659,9 +659,9 @@ __inline uint16_t DBGetContactSettingRangedWord(MCONTACT hContact, const char *s return (wVal < minValue || wVal > maxValue) ? errorValue : wVal; } -__inline DWORD DBGetContactSettingRangedDword(MCONTACT hContact, const char *szModule, const char *szSetting, DWORD errorValue, DWORD minValue, DWORD maxValue) +__inline uint32_t DBGetContactSettingRangedDword(MCONTACT hContact, const char *szModule, const char *szSetting, uint32_t errorValue, uint32_t minValue, uint32_t maxValue) { - DWORD dwVal = db_get_dw(hContact, szModule, szSetting, errorValue); + uint32_t dwVal = db_get_dw(hContact, szModule, szSetting, errorValue); return (dwVal < minValue || dwVal > maxValue) ? errorValue : dwVal; } @@ -688,16 +688,16 @@ namespace DB ///////////////////////////////////////////////////////////////////////////////////////// // Helper to process the auth req body - // blob is: 0(DWORD), hContact(DWORD), nick(UTF8), firstName(UTF8), lastName(UTF8), email(UTF8), reason(UTF8) + // blob is: 0(uint32_t), hContact(uint32_t), nick(UTF8), firstName(UTF8), lastName(UTF8), email(UTF8), reason(UTF8) #pragma warning(disable : 4251) class MIR_APP_EXPORT AUTH_BLOB { MCONTACT m_hContact; - DWORD m_dwUin; + uint32_t m_dwUin; ptrA m_szNick, m_szFirstName, m_szLastName, m_szEmail, m_szReason; - DWORD m_size; + uint32_t m_size; uint8_t* makeBlob(); @@ -709,7 +709,7 @@ namespace DB __forceinline operator char*() { return (char*)makeBlob(); } __forceinline operator uint8_t*() { return makeBlob(); } - __forceinline DWORD size() const { return m_size; } + __forceinline uint32_t size() const { return m_size; } __forceinline MCONTACT get_contact() const { return m_hContact; } __forceinline const char* get_nick() const { return m_szNick; } @@ -718,8 +718,8 @@ namespace DB __forceinline const char* get_email() const { return m_szEmail; } __forceinline const char* get_reason() const { return m_szReason; } - __forceinline DWORD get_uin() const { return m_dwUin; } - __forceinline void set_uin(DWORD dwValue) { m_dwUin = dwValue; } + __forceinline uint32_t get_uin() const { return m_dwUin; } + __forceinline void set_uin(uint32_t dwValue) { m_dwUin = dwValue; } }; ///////////////////////////////////////////////////////////////////////////////////////// diff --git a/include/m_db_int.h b/include/m_db_int.h index 3a96f6906e..f7941fa1dc 100644 --- a/include/m_db_int.h +++ b/include/m_db_int.h @@ -41,7 +41,7 @@ struct DATABASELINK; struct DBCHeckCallback { - DWORD spaceProcessed, spaceUsed; + uint32_t spaceProcessed, spaceUsed; void (*pfnAddLogMessage)(int type, const wchar_t *ptszFormat, ...); }; diff --git a/include/m_fontservice.h b/include/m_fontservice.h index 3d4746dff9..05c4730dab 100644 --- a/include/m_fontservice.h +++ b/include/m_fontservice.h @@ -85,7 +85,7 @@ struct FontSettingsW struct FontID : public MBaseFontObject
{
FontSettings deffontsettings; // defaults, valid if flags & FIDF_DEFAULTVALID
- DWORD flags; // FIDF_* combination
+ uint32_t flags; // FIDF_* combination
int order; // controls the order in the font group in which the fonts are listed in the UI (if order fields are equal,
// they will be ordered alphabetically by name)
char backgroundGroup[64];
@@ -95,7 +95,7 @@ struct FontID : public MBaseFontObject struct FontIDW : public MBaseFontObjectW
{
FontSettingsW deffontsettings; // defaults, valid if flags & FIDF_DEFAULTVALID
- DWORD flags; // FIDF_* combination
+ uint32_t flags; // FIDF_* combination
int order; // controls the order in the font group in which the fonts are listed in the UI (if order fields are equal,
// they will be ordered alphabetically by name)
wchar_t backgroundGroup[64];
@@ -181,8 +181,8 @@ __forceinline COLORREF Colour_GetW(ColourIDW &p) struct FONTEFFECT
{
uint8_t effectIndex;
- DWORD baseColour; // ARGB
- DWORD secondaryColour; // ARGB
+ uint32_t baseColour; // ARGB
+ uint32_t secondaryColour; // ARGB
};
struct EffectID : public MBaseFontObject
diff --git a/include/m_genmenu.h b/include/m_genmenu.h index 9c7a444116..5bd1d3b84f 100644 --- a/include/m_genmenu.h +++ b/include/m_genmenu.h @@ -236,7 +236,7 @@ __forceinline int Menu_ConfigureObject(int hMenuObject, int iSetting, LPCSTR psz // returns TRUE if it processed the command, FALSE otherwise
#define MCI_OPT_UNIQUENAME 1 // a unique name to menuitem(used to store it in database when enabled OPT_USERDEFINEDITEMS)
-#define MCI_OPT_HOTKEY 2 // DWORD value = MAKELONG(VK_*, VK_SHIFT)
+#define MCI_OPT_HOTKEY 2 // uint32_t value = MAKELONG(VK_*, VK_SHIFT)
#define MCI_OPT_EXECPARAM 3 // INT_PTR or void*, associated with this item
#define MCI_OPT_UID 4 // TMenuItem::uid as string like "2E407C55-5E89-4E83-9B79-15A803E7EE90"
#define MCI_OPT_DISABLED 5 // Hidden by default
diff --git a/include/m_gui.h b/include/m_gui.h index 91f8ac95b3..f30f1247b4 100644 --- a/include/m_gui.h +++ b/include/m_gui.h @@ -80,7 +80,7 @@ struct CMDBTraits<2> template<> struct CMDBTraits<4> { - typedef DWORD DBType; + typedef uint32_t DBType; enum { DBTypeId = DBVT_DWORD }; static __forceinline DBType Get(const char *szModule, const char *szSetting, DBType value) { @@ -95,7 +95,7 @@ struct CMDBTraits<4> template<> struct CMDBTraits<8> { - typedef DWORD DBType; + typedef uint32_t DBType; enum { DBTypeId = DBVT_DWORD }; static __forceinline DBType Get(const char *szModule, const char *szSetting, DBType value) { @@ -254,8 +254,8 @@ public: __inline uint8_t GetDataType() const { return m_type; } - virtual DWORD LoadInt() = 0; - virtual void SaveInt(DWORD value) = 0; + virtual uint32_t LoadInt() = 0; + virtual void SaveInt(uint32_t value) = 0; virtual wchar_t* LoadText() = 0; virtual void SaveText(wchar_t *value) = 0; @@ -266,18 +266,18 @@ class MIR_CORE_EXPORT CDbLink : public CDataLink char *m_szModule; char *m_szSetting; - DWORD m_iDefault; + uint32_t m_iDefault; wchar_t *m_szDefault; DBVARIANT dbv; public: - CDbLink(const char *szModule, const char *szSetting, uint8_t type, DWORD iValue); + CDbLink(const char *szModule, const char *szSetting, uint8_t type, uint32_t iValue); CDbLink(const char *szModule, const char *szSetting, uint8_t type, wchar_t *szValue); ~CDbLink(); - DWORD LoadInt() override; - void SaveInt(DWORD value) override; + uint32_t LoadInt() override; + void SaveInt(uint32_t value) override; wchar_t* LoadText() override; void SaveText(wchar_t *value) override; @@ -294,8 +294,8 @@ public: CDataLink(CMDBTraits<sizeof(T)>::DBTypeId), m_option(&option) {} - __forceinline DWORD LoadInt() override { return (DWORD)(T)*m_option; } - __forceinline void SaveInt(DWORD value) override { *m_option = (T)value; } + __forceinline uint32_t LoadInt() override { return (uint32_t)(T)*m_option; } + __forceinline void SaveInt(uint32_t value) override { *m_option = (T)value; } __forceinline wchar_t* LoadText() override { return nullptr; } __forceinline void SaveText(wchar_t*) override {} @@ -313,8 +313,8 @@ public: CDataLink(DBVT_WCHAR), m_option(&option) {} - __forceinline DWORD LoadInt() override { return 0; } - __forceinline void SaveInt(DWORD) override { } + __forceinline uint32_t LoadInt() override { return 0; } + __forceinline void SaveInt(uint32_t) override { } __forceinline wchar_t* LoadText() override { return *m_option; } __forceinline void SaveText(wchar_t *value) override { *m_option = value; } @@ -403,7 +403,7 @@ protected: void RemoveTimer(UINT_PTR idEvent); // options support - void CreateLink(class CCtrlData& ctrl, const char *szSetting, uint8_t type, DWORD iValue); + void CreateLink(class CCtrlData& ctrl, const char *szSetting, uint8_t type, uint32_t iValue); void CreateLink(class CCtrlData& ctrl, const char *szSetting, wchar_t *szValue); template<class T> @@ -680,28 +680,28 @@ public: void EditLabel(HANDLE hItem); void EndEditLabel(bool save); void EnsureVisible(HANDLE hItem, bool partialOk); - void Expand(HANDLE hItem, DWORD flags); + void Expand(HANDLE hItem, uint32_t flags); HANDLE FindContact(MCONTACT hContact); HANDLE FindGroup(MGROUP hGroup); COLORREF GetBkColor() const; bool GetCheck(HANDLE hItem) const; int GetCount() const; HWND GetEditControl() const; - DWORD GetExStyle() const; - DWORD GetExpand(HANDLE hItem) const; + uint32_t GetExStyle() const; + uint32_t GetExpand(HANDLE hItem) const; int GetExtraColumns() const; uint8_t GetExtraImage(HANDLE hItem, int iColumn) const; HIMAGELIST GetExtraImageList() const; HFONT GetFont(int iFontId) const; bool GetHideOfflineRoot() const; int GetItemType(HANDLE hItem) const; - HANDLE GetNextItem(HANDLE hItem, DWORD flags) const; + HANDLE GetNextItem(HANDLE hItem, uint32_t flags) const; HANDLE GetSelection() const; - HANDLE HitTest(int x, int y, DWORD *hitTest) const; + HANDLE HitTest(int x, int y, uint32_t *hitTest) const; void SelectItem(HANDLE hItem); void SetBkColor(COLORREF clBack); void SetCheck(HANDLE hItem, bool check); - void SetExStyle(DWORD exStyle); + void SetExStyle(uint32_t exStyle); void SetExtraColumns(int iColumns); void SetExtraImage(HANDLE hItem, int iColumn, int iImage); void SetExtraImageList(HIMAGELIST hImgList); @@ -709,7 +709,7 @@ public: void SetItemText(HANDLE hItem, char *szText); void SetHideEmptyGroups(bool state); void SetHideOfflineRoot(bool state); - void SetOfflineModes(DWORD modes); + void SetOfflineModes(uint32_t modes); void SetUseGroups(bool state); struct TEventInfo @@ -746,7 +746,7 @@ public: CCtrlData(CDlgBase *dlg, int ctrlId); ~CCtrlData(); - void CreateDbLink(const char* szModuleName, const char* szSetting, uint8_t type, DWORD iValue); + void CreateDbLink(const char* szModuleName, const char* szSetting, uint8_t type, uint32_t iValue); void CreateDbLink(const char* szModuleName, const char* szSetting, wchar_t* szValue); void CreateDbLink(CDataLink *link) { m_dbLink = link; } @@ -756,8 +756,8 @@ protected: CDataLink *m_dbLink; __inline uint8_t GetDataType() { return m_dbLink ? m_dbLink->GetDataType() : DBVT_DELETED; } - __inline DWORD LoadInt() { return m_dbLink ? m_dbLink->LoadInt() : 0; } - __inline void SaveInt(DWORD value) { if (m_dbLink) m_dbLink->SaveInt(value); } + __inline uint32_t LoadInt() { return m_dbLink ? m_dbLink->LoadInt() : 0; } + __inline void SaveInt(uint32_t value) { if (m_dbLink) m_dbLink->SaveInt(value); } __inline const wchar_t *LoadText() { return m_dbLink ? m_dbLink->LoadText() : L""; } __inline void SaveText(wchar_t *value) { if (m_dbLink) m_dbLink->SaveText(value); } }; @@ -796,8 +796,8 @@ public: bool OnApply() override; void OnReset() override; - DWORD GetColor(); - void SetColor(DWORD dwValue); + uint32_t GetColor(); + void SetColor(uint32_t dwValue); }; ///////////////////////////////////////////////////////////////////////////////////////// @@ -1005,7 +1005,7 @@ public: void SetCurSel(int idx); // Classic LV interface - DWORD ApproximateViewRect(int cx, int cy, int iCount); + uint32_t ApproximateViewRect(int cx, int cy, int iCount); void Arrange(UINT code); void CancelEditLabel(); HIMAGELIST CreateDragImage(int iItem, POINT *lpptUpLeft); @@ -1025,7 +1025,7 @@ public: int GetColumnWidth(int iCol) const; int GetCountPerPage() const; HWND GetEditControl() const; - DWORD GetExtendedListViewStyle() const; + uint32_t GetExtendedListViewStyle() const; int GetFocusedGroup() const; int GetGroupCount() const; void GetGroupInfo(int iGroupId, LVGROUP *pgrp) const; @@ -1035,7 +1035,7 @@ public: HWND GetHeader() const; HCURSOR GetHotCursor() const; int GetHotItem() const; - DWORD GetHoverTime() const; + uint32_t GetHoverTime() const; HIMAGELIST GetImageList(int iImageList) const; BOOL GetInsertMark(LVINSERTMARK *plvim) const; COLORREF GetInsertMarkColor() const; @@ -1045,7 +1045,7 @@ public: int GetItemCount() const; void GetItemPosition(int i, POINT *ppt) const; void GetItemRect(int i, RECT *prc, int code) const; - DWORD GetItemSpacing(BOOL fSmall) const; + uint32_t GetItemSpacing(BOOL fSmall) const; UINT GetItemState(int i, UINT mask) const; void GetItemText(int iItem, int iSubItem, LPTSTR pszText, int cchTextMax) const; int GetNextItem(int iStart, UINT flags) const; @@ -1064,7 +1064,7 @@ public: HWND GetToolTips() const; int GetTopIndex() const; BOOL GetUnicodeFormat() const; - DWORD GetView() const; + uint32_t GetView() const; BOOL GetViewRect(RECT *prc) const; void GetWorkAreas(int nWorkAreas, RECT *lprc) const; BOOL HasGroup(int dwGroupId); @@ -1090,22 +1090,22 @@ public: BOOL SetColumn(int iCol, LVCOLUMN *pcol); BOOL SetColumnOrderArray(int iCount, int *lpiArray); BOOL SetColumnWidth(int iCol, int cx); - void SetExtendedListViewStyle(DWORD dwExStyle); - void SetExtendedListViewStyleEx(DWORD dwExMask, DWORD dwExStyle); + void SetExtendedListViewStyle(uint32_t dwExStyle); + void SetExtendedListViewStyleEx(uint32_t dwExMask, uint32_t dwExStyle); int SetGroupInfo(int iGroupId, LVGROUP *pgrp); void SetGroupMetrics(LVGROUPMETRICS *pGroupMetrics); void SetGroupState(UINT dwGroupId, UINT dwMask, UINT dwState); HCURSOR SetHotCursor(HCURSOR hCursor); int SetHotItem(int iIndex); - void SetHoverTime(DWORD dwHoverTime); - DWORD SetIconSpacing(int cx, int cy); + void SetHoverTime(uint32_t dwHoverTime); + uint32_t SetIconSpacing(int cx, int cy); HIMAGELIST SetImageList(HIMAGELIST himl, int iImageList); BOOL SetInfoTip(LVSETINFOTIP *plvSetInfoTip); BOOL SetInsertMark(LVINSERTMARK *plvim); COLORREF SetInsertMarkColor(COLORREF color); BOOL SetItem(const LVITEM *pitem); void SetItemCount(int cItems); - void SetItemCountEx(int cItems, DWORD dwFlags); + void SetItemCountEx(int cItems, uint32_t dwFlags); BOOL SetItemPosition(int i, int x, int y); void SetItemPosition32(int iItem, int x, int y); void SetItemState(int i, UINT state, UINT mask); @@ -1119,7 +1119,7 @@ public: BOOL SetTileViewInfo(LVTILEVIEWINFO *plvtvinfo); HWND SetToolTips(HWND ToolTip); BOOL SetUnicodeFormat(BOOL fUnicode); - int SetView(DWORD iView); + int SetView(uint32_t iView); void SetWorkAreas(int nWorkAreas, RECT *lprc); int SubItemHitTest(LVHITTESTINFO *pInfo) const; int SubItemHitTestEx(LVHITTESTINFO *plvhti); @@ -1212,9 +1212,9 @@ public: HWND EditLabel(HTREEITEM hItem); void EndEditLabelNow(BOOL cancel); void EnsureVisible(HTREEITEM hItem); - void Expand(HTREEITEM hItem, DWORD flag); + void Expand(HTREEITEM hItem, uint32_t flag); COLORREF GetBkColor() const; - DWORD GetCheckState(HTREEITEM hItem) const; + uint32_t GetCheckState(HTREEITEM hItem) const; HTREEITEM GetChild(HTREEITEM hItem) const; int GetCount() const; HTREEITEM GetDropHilight() const; @@ -1226,17 +1226,17 @@ public: bool GetItem(TVITEMEX *tvi) const; int GetItemHeight() const; void GetItemRect(HTREEITEM hItem, RECT *rcItem, BOOL fItemRect) const; - DWORD GetItemState(HTREEITEM hItem, DWORD stateMask) const; + uint32_t GetItemState(HTREEITEM hItem, uint32_t stateMask) const; HTREEITEM GetLastVisible() const; COLORREF GetLineColor() const; - HTREEITEM GetNextItem(HTREEITEM hItem, DWORD flag) const; + HTREEITEM GetNextItem(HTREEITEM hItem, uint32_t flag) const; HTREEITEM GetNextSibling(HTREEITEM hItem) const; HTREEITEM GetNextVisible(HTREEITEM hItem) const; HTREEITEM GetParent(HTREEITEM hItem) const; HTREEITEM GetPrevSibling(HTREEITEM hItem) const; HTREEITEM GetPrevVisible(HTREEITEM hItem) const; HTREEITEM GetRoot() const; - DWORD GetScrollTime() const; + uint32_t GetScrollTime() const; HTREEITEM GetSelection() const; COLORREF GetTextColor() const; HWND GetToolTips() const; @@ -1244,19 +1244,19 @@ public: unsigned GetVisibleCount() const; HTREEITEM HitTest(TVHITTESTINFO *hti) const; HTREEITEM InsertItem(TVINSERTSTRUCT *tvis); - void Select(HTREEITEM hItem, DWORD flag); + void Select(HTREEITEM hItem, uint32_t flag); void SelectDropTarget(HTREEITEM hItem); void SelectItem(HTREEITEM hItem); void SelectSetFirstVisible(HTREEITEM hItem); COLORREF SetBkColor(COLORREF clBack); - void SetCheckState(HTREEITEM hItem, DWORD state); + void SetCheckState(HTREEITEM hItem, uint32_t state); void SetImageList(HIMAGELIST hIml, int iImage); void SetIndent(int iIndent); void SetInsertMark(HTREEITEM hItem, BOOL fAfter); COLORREF SetInsertMarkColor(COLORREF clMark); void SetItem(TVITEMEX *tvi); void SetItemHeight(short cyItem); - void SetItemState(HTREEITEM hItem, DWORD state, DWORD stateMask); + void SetItemState(HTREEITEM hItem, uint32_t state, uint32_t stateMask); COLORREF SetLineColor(COLORREF clLine); void SetScrollTime(UINT uMaxScrollTime); COLORREF SetTextColor(COLORREF clText); @@ -1451,7 +1451,7 @@ class MIR_APP_EXPORT CProtoIntDlgBase : public CDlgBase public: CProtoIntDlgBase(PROTO_INTERFACE *proto, int idDialog); - void CreateLink(CCtrlData &ctrl, const char *szSetting, uint8_t type, DWORD iValue); + void CreateLink(CCtrlData &ctrl, const char *szSetting, uint8_t type, uint32_t iValue); void CreateLink(CCtrlData &ctrl, const char *szSetting, wchar_t *szValue); template<class T> diff --git a/include/m_help.h b/include/m_help.h index 893beced0f..e9e5326cf8 100644 --- a/include/m_help.h +++ b/include/m_help.h @@ -44,7 +44,7 @@ Returns 0 on success or nonzero on failure #define HCSF_AUTOTIP 0x02 // show automatic help tip on hover for this control
// only works for non-editable
#if !defined(HELP_NOHELPERFUNCTIONS)
-__inline static int Help_SetContextState(HWND hwndCtl,DWORD flags) {
+__inline static int Help_SetContextState(HWND hwndCtl, uint32_t flags) {
if(!ServiceExists(MS_HELP_SETCONTEXTSTATE)) return -1;
return CallService(MS_HELP_SETCONTEXTSTATE,(WPARAM)hwndCtl,flags);
}
diff --git a/include/m_hotkeys.h b/include/m_hotkeys.h index 382ee9738a..63392993c4 100644 --- a/include/m_hotkeys.h +++ b/include/m_hotkeys.h @@ -39,7 +39,7 @@ struct HOTKEYDESC MAllStrings szSection; // section name used to group sounds (NULL is acceptable)
const char *pszService; // Service to call when HotKey Pressed
uint16_t DefHotKey; // default hot key for action
- DWORD dwFlags; // one of HKD_* constants
+ uint32_t dwFlags; // one of HKD_* constants
LPARAM lParam; // lParam to pass to service
};
diff --git a/include/m_imgsrvc.h b/include/m_imgsrvc.h index 0d763c7b5a..57c6fd0983 100644 --- a/include/m_imgsrvc.h +++ b/include/m_imgsrvc.h @@ -73,11 +73,11 @@ EXTERN_C MIR_APP_DLL(HBITMAP) Image_LoadFromMem(const void *pBuf, size_t cbLen, struct IMGSRVC_INFO
{
- DWORD cbSize;
+ uint32_t cbSize;
const wchar_t *pwszName;
HBITMAP hbm;
FIBITMAP *dib;
- DWORD dwMask;
+ uint32_t dwMask;
FREE_IMAGE_FORMAT fif;
};
diff --git a/include/m_import.h b/include/m_import.h index f6fdafe115..efa4d1d4ac 100644 --- a/include/m_import.h +++ b/include/m_import.h @@ -51,7 +51,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. struct MImportOptions { const wchar_t *pwszFileName; - DWORD dwFlags; // IOPT_* flags combination + uint32_t dwFlags; // IOPT_* flags combination }; #define MS_IMPORT_RUN "Import/Run" diff --git a/include/m_jabber.h b/include/m_jabber.h index 736e9d5db4..7566907203 100644 --- a/include/m_jabber.h +++ b/include/m_jabber.h @@ -93,13 +93,13 @@ enum struct IJabberInterface
{
// Set of JIF_* flags.
- virtual DWORD STDMETHODCALLTYPE GetFlags() const = 0;
+ virtual uint32_t STDMETHODCALLTYPE GetFlags() const = 0;
// Returns version of IJabberInterface.
virtual int STDMETHODCALLTYPE GetVersion() const = 0;
// Returns Jabber plugin version.
- virtual DWORD STDMETHODCALLTYPE GetJabberVersion() const = 0;
+ virtual uint32_t STDMETHODCALLTYPE GetJabberVersion() const = 0;
// Returns contact handle for given JID, or NULL on error.
virtual MCONTACT STDMETHODCALLTYPE ContactFromJID(LPCSTR jid) = 0;
diff --git a/include/m_message.h b/include/m_message.h index aba28c5ea8..ef4e7d5cd4 100644 --- a/include/m_message.h +++ b/include/m_message.h @@ -150,7 +150,7 @@ struct MessageWindowPopupData struct StatusIconData
{
const char *szModule; // used in combo with the dwId below to create a unique identifier
- DWORD dwId; // uniquely defines a button inside a module
+ uint32_t dwId; // uniquely defines a button inside a module
HICON hIcon, hIconDisabled; // hIconDisabled is optional - if null, will use hIcon in the disabled state
int flags; // bitwize OR of MBF_* flags above
MAllCStrings szTooltip; // controlled by MBF_UNICODE
@@ -162,14 +162,14 @@ struct StatusIconData EXTERN_C MIR_APP_DLL(int) Srmm_AddIcon(StatusIconData *sid, HPLUGIN pPlugin);
// removes an icon
-EXTERN_C MIR_APP_DLL(void) Srmm_RemoveIcon(const char *szProto, DWORD iconId);
+EXTERN_C MIR_APP_DLL(void) Srmm_RemoveIcon(const char *szProto, uint32_t iconId);
// if hContact is null, icon is modified for all contacts
// if either hIcon or pwszTooltip is null, they will not be modified
-EXTERN_C MIR_APP_DLL(void) Srmm_ModifyIcon(MCONTACT hContact, const char *szModule, DWORD iconId, HICON hIcon, const wchar_t *pwszToolTip);
+EXTERN_C MIR_APP_DLL(void) Srmm_ModifyIcon(MCONTACT hContact, const char *szModule, uint32_t iconId, HICON hIcon, const wchar_t *pwszToolTip);
// if hContact is null, flags are modified for all contacts
-EXTERN_C MIR_APP_DLL(void) Srmm_SetIconFlags(MCONTACT hContact, const char *szModule, DWORD iconId, int flags);
+EXTERN_C MIR_APP_DLL(void) Srmm_SetIconFlags(MCONTACT hContact, const char *szModule, uint32_t iconId, int flags);
// idx is zero-based index of a visible icon
// returns (StatusIconData*)icon description filled for the required contact or NULL if there're no more icons
@@ -183,7 +183,7 @@ struct StatusIconClickData {
POINT clickLocation; // click location, in screen coordinates
const char *szModule;
- DWORD dwId;
+ uint32_t dwId;
int flags; // bitwize OR of MBCF_* flags above
};
@@ -232,9 +232,9 @@ struct BBButton const wchar_t *pwszText; // button's text, might be NULL
const wchar_t *pwszTooltip; // button's tooltip, might be NULL
- DWORD dwDefPos; // default order pos of button, counted from window edge (left or right)
+ uint32_t dwDefPos; // default order pos of button, counted from window edge (left or right)
// use value >100, because internal buttons using 10,20,30... 80, etc
- DWORD bbbFlags; // combine of BBBF_ flags above
+ uint32_t bbbFlags; // combine of BBBF_ flags above
HANDLE hIcon; // Handle to icolib registered icon
const char *pszHotkey; // name of the registered hotkey or NULL
};
@@ -293,10 +293,10 @@ struct CustomButtonClickData {
char *pszModule; // button owners name
POINT pt; // screen coordinates for menus
- DWORD dwButtonId; // registered button ID
+ uint32_t dwButtonId; // registered button ID
HWND hwndFrom; // button parents HWND
MCONTACT hContact;
- DWORD flags; // BBCF_ flags
+ uint32_t flags; // BBCF_ flags
};
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/include/m_netlib.h b/include/m_netlib.h index b322e1866c..ea7c026e8a 100644 --- a/include/m_netlib.h +++ b/include/m_netlib.h @@ -60,7 +60,7 @@ struct NETLIBUSER { char *szSettingsModule; // used for db settings and log MAllStrings szDescriptiveName; // used in options dialog, already translated - DWORD flags; + uint32_t flags; int minIncomingPorts; // only if NUF_INCOMING. Will be used for validation of user input. }; @@ -262,7 +262,7 @@ EXTERN_C MIR_APP_DLL(int) Netlib_CloseHandle(HANDLE h); /* pExtra was added during 0.3.4+, prior its just two args, since we use the cdecl convention it shouldnt matter */ -typedef void (*NETLIBNEWCONNECTIONPROC)(HNETLIBCONN hNewConnection, DWORD dwRemoteIP, void *pExtra); +typedef void (*NETLIBNEWCONNECTIONPROC)(HNETLIBCONN hNewConnection, uint32_t dwRemoteIP, void *pExtra); struct NETLIBBIND { @@ -270,9 +270,9 @@ struct NETLIBBIND // function to call when there's a new connection. Params are: the // new connection, IP of remote machine (host byte order) - DWORD dwInternalIP; // set on return, host byte order - DWORD dwExternalIP; // set on return, host byte order - uint16_t wPort, wExPort; // set on return, host byte order + uint32_t dwInternalIP; // set on return, host byte order + uint32_t dwExternalIP; // set on return, host byte order + uint16_t wPort, wExPort; // set on return, host byte order void *pExtra; // argument is sent to callback }; @@ -318,7 +318,7 @@ struct NETLIBOPENCONNECTION { const char *szHost; // can contain the string representation of an IP uint16_t wPort; // host byte order - DWORD flags; + uint32_t flags; unsigned int timeout; /* optional, called in the context of the thread that issued the attempt, if it returns 0 the connection attempt is stopped, the remaining timeout value can also be adjusted */ @@ -342,7 +342,7 @@ EXTERN_C MIR_APP_DLL(HNETLIBCONN) Netlib_OpenConnection(HNETLIBUSER nlu, const N struct NETLIBHTTPPROXYINFO { - DWORD flags; + uint32_t flags; int firstGetSequence, firstPostSequence; int combinePackets; char *szHttpPostUrl; @@ -464,10 +464,9 @@ struct NETLIBHTTPREQUEST { int cbSize; int requestType; // a REQUEST_ - DWORD flags; + uint32_t flags; char *szUrl; - NETLIBHTTPHEADER *headers; // If this is a POST request and headers - // doesn't contain a Content-Length it'll be added automatically + NETLIBHTTPHEADER *headers; // If this is a POST request and headers doesn't contain a Content-Length it'll be added automatically int headersCount; char *pData; // data to be sent in POST request. int dataLength; // must be 0 for REQUEST_GET/REQUEST_CONNECT @@ -659,7 +658,7 @@ EXTERN_C MIR_APP_DLL(int) Netlib_Recv(HNETLIBCONN hConn, char *buf, int len, int struct NETLIBSELECT { - DWORD dwTimeout; // in milliseconds, INFINITE is acceptable + uint32_t dwTimeout; // in milliseconds, INFINITE is acceptable HNETLIBCONN hReadConns[FD_SETSIZE + 1]; HNETLIBCONN hWriteConns[FD_SETSIZE + 1]; HNETLIBCONN hExceptConns[FD_SETSIZE + 1]; @@ -669,7 +668,7 @@ EXTERN_C MIR_APP_DLL(int) Netlib_Select(NETLIBSELECT *nls); struct NETLIBSELECTEX { - DWORD dwTimeout; // in milliseconds, INFINITE is acceptable + uint32_t dwTimeout; // in milliseconds, INFINITE is acceptable HNETLIBCONN hReadConns[FD_SETSIZE + 1]; HNETLIBCONN hWriteConns[FD_SETSIZE + 1]; HNETLIBCONN hExceptConns[FD_SETSIZE + 1]; @@ -720,7 +719,7 @@ EXTERN_C MIR_APP_DLL(HANDLE) Netlib_CreatePacketReceiver(HNETLIBCONN hConnection struct NETLIBPACKETRECVER { - DWORD dwTimeout; // fill before calling. In milliseconds. INFINITE is valid + uint32_t dwTimeout; // fill before calling. In milliseconds. INFINITE is valid int bytesUsed; // fill before calling. This many bytes are removed from the start of the buffer. Set to 0 on return int bytesAvailable; // equal to the return value, unless the return value is 0 int bufferSize; // same as parameter to MS_NETLIB_CREATEPACKETRECVER diff --git a/include/m_options.h b/include/m_options.h index cdc352193b..749c587ebe 100644 --- a/include/m_options.h +++ b/include/m_options.h @@ -64,7 +64,7 @@ struct OPTIONSDIALOGPAGE int position; // a position number, lower numbers are topmost
MAllStrings szTitle, szGroup, szTab; // [TRANSLATED-BY-CORE]
HPLUGIN pPlugin;
- DWORD flags;
+ uint32_t flags;
#ifdef _WINDOWS
DLGPROC pfnDlgProc;
diff --git a/include/m_popup.h b/include/m_popup.h index fa279b9e63..dae1b8df6a 100644 --- a/include/m_popup.h +++ b/include/m_popup.h @@ -47,7 +47,7 @@ struct POPUPACTION // (e.g. "Popup Plus/Dismiss Popup") and don't translate
// This is translates by popup. So no unicode.
char lpzTitle[MAX_ACTIONTITLE];
- DWORD flags; // set of PAF_* flags
+ uint32_t flags; // set of PAF_* flags
WPARAM wParam; // wParam for UM_POPUPACTION message
LPARAM lParam; // lParam for UM_POPUPACTION message
};
@@ -70,7 +70,7 @@ struct POPUPDATA2 {
// general
int cbSize;
- DWORD flags;
+ uint32_t flags;
// miranda bindings
MCONTACT lchContact;
@@ -88,7 +88,7 @@ struct POPUPDATA2 // time and timeout
int iSeconds;
- DWORD dwTimestamp;
+ uint32_t dwTimestamp;
#ifdef _WINDOWS
// plugin bindings
@@ -257,7 +257,7 @@ EXTERN_C MIR_APP_DLL(int) PURegisterActions(POPUPACTION *actions, int count); typedef struct
{
char lpzTitle[64];
- DWORD dwFlags;
+ uint32_t dwFlags;
union
{
struct
@@ -271,8 +271,8 @@ typedef struct };
struct
{
- DWORD dwCookie;
- void(*pfnCallback)(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam, DWORD cookie);
+ uint32_t dwCookie;
+ void(*pfnCallback)(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam, uint32_t cookie);
};
};
} POPUPNOTIFYACTION, *LPPOPUPNOTIFYACTION;
@@ -282,7 +282,7 @@ typedef struct typedef struct
{
int cbSize;
- DWORD dwFlags; // set of PNF_* flags
+ uint32_t dwFlags; // set of PNF_* flags
char lpzGroup[MAXMODULELABELLENGTH];
char lpzName[MAXMODULELABELLENGTH];
HANDLE lchIcoLib; // gotten from icolib
@@ -391,8 +391,8 @@ Returns: 0 if the popup was shown, -1 in case of failure. #define SM_NOTIFY 0x02 //Exclamation mark icon.
#define SM_ERROR 0x03 //Cross icon.
-EXTERN_C MIR_APP_DLL(int) PUShowMessage(const char *lpzText, DWORD kind);
-EXTERN_C MIR_APP_DLL(int) PUShowMessageW(const wchar_t *lpwzText, DWORD kind);
+EXTERN_C MIR_APP_DLL(int) PUShowMessage(const char *lpzText, uint32_t kind);
+EXTERN_C MIR_APP_DLL(int) PUShowMessageW(const wchar_t *lpwzText, uint32_t kind);
/////////////////////////////////////////////////////////////////////////////////////////
// Popup/Filter
diff --git a/include/m_protocols.h b/include/m_protocols.h index 3fc2049c7a..d5bea1279f 100644 --- a/include/m_protocols.h +++ b/include/m_protocols.h @@ -112,7 +112,7 @@ struct ACKDATA struct PROTOFILETRANSFERSTATUS
{
MCONTACT hContact;
- DWORD flags; // one of PFTS_* constants
+ uint32_t flags; // one of PFTS_* constants
MAllStringArray pszFiles;
int totalFiles;
int currentFileNumber;
diff --git a/include/m_protoint.h b/include/m_protoint.h index 4876656bd9..74490fe48f 100644 --- a/include/m_protoint.h +++ b/include/m_protoint.h @@ -119,9 +119,9 @@ public: __forceinline int getWord(MCONTACT hContact, const char *name, uint16_t defaultValue = 0) { return db_get_w(hContact, m_szModuleName, name, defaultValue); } - __forceinline DWORD getDword(const char *name, DWORD defaultValue = 0) { + __forceinline uint32_t getDword(const char *name, uint32_t defaultValue = 0) { return db_get_dw(0, m_szModuleName, name, defaultValue); } - __forceinline DWORD getDword(MCONTACT hContact, const char *name, DWORD defaultValue = 0) { + __forceinline uint32_t getDword(MCONTACT hContact, const char *name, uint32_t defaultValue = 0) { return db_get_dw(hContact, m_szModuleName, name, defaultValue); } __forceinline INT_PTR getString(const char *name, DBVARIANT *result) { @@ -170,8 +170,8 @@ public: __forceinline void setWord(const char *name, uint16_t value) { db_set_w(0, m_szModuleName, name, value); } __forceinline void setWord(MCONTACT hContact, const char *name, uint16_t value) { db_set_w(hContact, m_szModuleName, name, value); } - __forceinline void setDword(const char *name, DWORD value) { db_set_dw(0, m_szModuleName, name, value); } - __forceinline void setDword(MCONTACT hContact, const char *name, DWORD value) { db_set_dw(hContact, m_szModuleName, name, value); } + __forceinline void setDword(const char *name, uint32_t value) { db_set_dw(0, m_szModuleName, name, value); } + __forceinline void setDword(MCONTACT hContact, const char *name, uint32_t value) { db_set_dw(hContact, m_szModuleName, name, value); } __forceinline void setString(const char *name, const char* value) { db_set_s(0, m_szModuleName, name, value); } __forceinline void setString(MCONTACT hContact, const char *name, const char* value) { db_set_s(hContact, m_szModuleName, name, value); } diff --git a/include/m_protosvc.h b/include/m_protosvc.h index 09181e5e58..c37abadf44 100644 --- a/include/m_protosvc.h +++ b/include/m_protosvc.h @@ -274,7 +274,7 @@ static __inline unsigned long Proto_Status2Flag(int status) // Returns 0 on success, nonzero on failure
// Auth requests come in the form of an event added to the database for the NULL
// user. The form is:
-// DWORD protocolSpecific
+// uint32_t protocolSpecific
// ASCIIZ nick, firstName, lastName, e-mail, requestReason
// hDbEvent must be the handle of such an event
// One or more fields may be empty if the protocol doesn't support them
@@ -644,7 +644,7 @@ struct PROTOFILERESUME // resulting directory
// File transfers are marked by an EVENTTYPE_FILE added to the database. The
// format is:
-// DWORD hTransfer
+// uint32_t hTransfer
// ASCIIZ filename(s), description
#define PSS_FILEALLOW "/FileAllow"
@@ -735,8 +735,8 @@ struct PROTOFILERESUME struct PROTORECVEVENT
{
- DWORD flags; // combination of PREF_*
- DWORD timestamp; // unix time
+ uint32_t flags; // combination of PREF_*
+ uint32_t timestamp; // unix time
char* szMessage; // message body in utf8
LPARAM lParam; // extra space for the network level protocol module
const char* szMsgId; // server message id, optional, should be NULL otherwise
@@ -779,8 +779,8 @@ EXTERN_C MIR_APP_DLL(MEVENT) Proto_AuthRecv(const char *szProtoName, PROTORECVEV struct PROTORECVFILE
{
- DWORD dwFlags; // PRFF_*
- DWORD timestamp; // unix time
+ uint32_t dwFlags; // PRFF_*
+ uint32_t timestamp; // unix time
MAllCStrings descr; // file description
int fileCount; // number of files being transferred
MAllCStringArray files; // array of file names
diff --git a/include/m_srmm_int.h b/include/m_srmm_int.h index 9e29313d7a..29fbc0da80 100644 --- a/include/m_srmm_int.h +++ b/include/m_srmm_int.h @@ -44,27 +44,27 @@ struct CustomButtonData : public MZeroedObject ~CustomButtonData() {} - int m_dwPosition; // default order pos of button, counted from window edge (left or right) + int m_dwPosition; // default order pos of button, counted from window edge (left or right) - int m_dwButtonID; // id of button used while button creation and to store button info in DB - ptrA m_pszModuleName; // module name without spaces and underline symbols (e.g. "tabsrmm") + int m_dwButtonID; // id of button used while button creation and to store button info in DB + ptrA m_pszModuleName; // module name without spaces and underline symbols (e.g. "tabsrmm") - int m_dwButtonCID; // button's control id - int m_dwArrowCID; // only use with BBBF_ISARROWBUTTON flag + int m_dwButtonCID; // button's control id + int m_dwArrowCID; // only use with BBBF_ISARROWBUTTON flag - ptrW m_pwszText; // button's text - ptrW m_pwszTooltip; // button's tooltip + ptrW m_pwszText; // button's text + ptrW m_pwszTooltip; // button's tooltip - int m_iButtonWidth; // must be 22 for regular button and 33 for button with arrow - HANDLE m_hIcon; // Handle to icolib registred icon + int m_iButtonWidth; // must be 22 for regular button and 33 for button with arrow + HANDLE m_hIcon; // Handle to icolib registred icon - bool m_bIMButton, m_bChatButton; - bool m_bCanBeHidden, m_bCantBeHidden, m_bHidden, m_bSeparator, m_bDisabled, m_bPushButton; - bool m_bRSided; - uint8_t m_opFlags; - HPLUGIN m_pPlugin; - DWORD m_dwOrigPosition; - struct THotkeyItem *m_hotkey; + bool m_bIMButton, m_bChatButton; + bool m_bCanBeHidden, m_bCantBeHidden, m_bHidden, m_bSeparator, m_bDisabled, m_bPushButton; + bool m_bRSided; + uint8_t m_opFlags; + HPLUGIN m_pPlugin; + uint32_t m_dwOrigPosition; + struct THotkeyItem *m_hotkey; struct { bool bit1 : 1, bit2 : 1, bit3 : 1, bit4 : 1; @@ -213,7 +213,7 @@ protected: time_t m_iLastEnterTime; // user typing support; - DWORD m_nLastTyping = 0; + uint32_t m_nLastTyping = 0; uint8_t m_bShowTyping = 0; int m_nTypeSecs = 0, m_nTypeMode = 0; const USERINFO* m_pUserTyping = nullptr; diff --git a/include/m_system.h b/include/m_system.h index 753498b2df..b31bfe2616 100644 --- a/include/m_system.h +++ b/include/m_system.h @@ -72,10 +72,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // return nonzero to stop the exit cycle #define ME_SYSTEM_OKTOEXIT "Miranda/System/OkToExitEvent" -// gets the version number of Miranda encoded as a DWORD +// gets the version number of Miranda encoded as a uint32_t // returns the version number, encoded as one version per byte, therefore // version 1.2.3.10 is 0x0102030a -EXTERN_C MIR_APP_DLL(DWORD) Miranda_GetVersion(void); +EXTERN_C MIR_APP_DLL(uint32_t) Miranda_GetVersion(void); // gets the version number of Miranda encoded as four WORDs v0.92.2+ // returns the version number, encoded as one version per word, therefore @@ -124,7 +124,7 @@ EXTERN_C MIR_APP_DLL(void) Miranda_Close(void); EXTERN_C MIR_APP_DLL(void) Miranda_SetIdleCallback(void(MIR_CDECL *pfnCallback)(void)); // returns the last window tick where a monitored event was seen, currently WM_CHAR/WM_MOUSEMOVE -EXTERN_C MIR_APP_DLL(DWORD) Miranda_GetIdle(void); +EXTERN_C MIR_APP_DLL(uint32_t) Miranda_GetIdle(void); /////////////////////////////////////////////////////////////////////////////// diff --git a/include/m_timezones.h b/include/m_timezones.h index 920712a865..a6a6858e7a 100644 --- a/include/m_timezones.h +++ b/include/m_timezones.h @@ -41,21 +41,21 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. typedef INT_PTR mir_time; -EXTERN_C MIR_CORE_DLL(HANDLE) TimeZone_CreateByName(LPCTSTR tszName, DWORD dwFlags); -EXTERN_C MIR_CORE_DLL(HANDLE) TimeZone_CreateByContact(MCONTACT hContact, LPCSTR szModule, DWORD dwFlags); +EXTERN_C MIR_CORE_DLL(HANDLE) TimeZone_CreateByName(LPCTSTR tszName, uint32_t dwFlags); +EXTERN_C MIR_CORE_DLL(HANDLE) TimeZone_CreateByContact(MCONTACT hContact, LPCSTR szModule, uint32_t dwFlags); EXTERN_C MIR_CORE_DLL(void) TimeZone_StoreByContact(MCONTACT hContact, LPCSTR szModule, HANDLE hTZ); -EXTERN_C MIR_CORE_DLL(void) TimeZone_StoreListResult(MCONTACT hContact, LPCSTR szModule, HWND hWnd, DWORD dwFlags); +EXTERN_C MIR_CORE_DLL(void) TimeZone_StoreListResult(MCONTACT hContact, LPCSTR szModule, HWND hWnd, uint32_t dwFlags); -EXTERN_C MIR_CORE_DLL(int) TimeZone_PrintDateTime(HANDLE hTZ, LPCTSTR szFormat, LPTSTR szDest, size_t cbDest, DWORD dwFlags); -EXTERN_C MIR_CORE_DLL(int) TimeZone_PrintTimeStamp(HANDLE hTZ, mir_time ts, LPCTSTR szFormat, LPTSTR szDest, size_t cbDest, DWORD dwFlags); +EXTERN_C MIR_CORE_DLL(int) TimeZone_PrintDateTime(HANDLE hTZ, LPCTSTR szFormat, LPTSTR szDest, size_t cbDest, uint32_t dwFlags); +EXTERN_C MIR_CORE_DLL(int) TimeZone_PrintTimeStamp(HANDLE hTZ, mir_time ts, LPCTSTR szFormat, LPTSTR szDest, size_t cbDest, uint32_t dwFlags); -EXTERN_C MIR_CORE_DLL(int) TimeZone_PrepareList(MCONTACT hContact, LPCSTR szModule, HWND hWnd, DWORD dwFlags); -EXTERN_C MIR_CORE_DLL(int) TimeZone_SelectListItem(MCONTACT hContact, LPCSTR szModule, HWND hWnd, DWORD dwFlags); +EXTERN_C MIR_CORE_DLL(int) TimeZone_PrepareList(MCONTACT hContact, LPCSTR szModule, HWND hWnd, uint32_t dwFlags); +EXTERN_C MIR_CORE_DLL(int) TimeZone_SelectListItem(MCONTACT hContact, LPCSTR szModule, HWND hWnd, uint32_t dwFlags); #ifdef _MSC_VER EXTERN_C MIR_CORE_DLL(int) TimeZone_GetTimeZoneTime(HANDLE hTZ, SYSTEMTIME *st); -EXTERN_C MIR_CORE_DLL(int) TimeZone_GetSystemTime(HANDLE hTZ, mir_time src, SYSTEMTIME *dest, DWORD dwFlags); +EXTERN_C MIR_CORE_DLL(int) TimeZone_GetSystemTime(HANDLE hTZ, mir_time src, SYSTEMTIME *dest, uint32_t dwFlags); EXTERN_C MIR_CORE_DLL(LPTIME_ZONE_INFORMATION) TimeZone_GetInfo(HANDLE hTZ); #endif @@ -66,12 +66,12 @@ EXTERN_C MIR_CORE_DLL(LPCTSTR) TimeZone_GetDescription(LPCTSTR TZname); #ifdef __cplusplus -__forceinline int printDateTimeByContact (MCONTACT hContact, LPCTSTR szFormat, LPTSTR szDest, int cbDest, DWORD dwFlags) +__forceinline int printDateTimeByContact (MCONTACT hContact, LPCTSTR szFormat, LPTSTR szDest, int cbDest, uint32_t dwFlags) { return TimeZone_PrintDateTime(TimeZone_CreateByContact(hContact, nullptr, dwFlags), szFormat, szDest, cbDest, dwFlags); } -__forceinline int printTimeStampByContact(MCONTACT hContact, mir_time ts, LPCTSTR szFormat, LPTSTR szDest, int cbDest, DWORD dwFlags) +__forceinline int printTimeStampByContact(MCONTACT hContact, mir_time ts, LPCTSTR szFormat, LPTSTR szDest, int cbDest, uint32_t dwFlags) { return TimeZone_PrintTimeStamp(TimeZone_CreateByContact(hContact, nullptr, dwFlags), ts, szFormat, szDest, cbDest, dwFlags); } @@ -112,7 +112,7 @@ __forceinline mir_time timeStampToTimeZoneTimeStampByContact(MCONTACT hContact, // mixed up (like I did. Living at GMT makes things easier for me, but has certain // disadvantages :-)). -EXTERN_C MIR_CORE_DLL(DWORD) TimeZone_ToLocal(DWORD); +EXTERN_C MIR_CORE_DLL(uint32_t) TimeZone_ToLocal(uint32_t); ///////////////////////////////////////////////////////////////////////////////////////// // Converts a GMT timestamp into a customisable local time string diff --git a/include/m_utils.h b/include/m_utils.h index f6f06f9988..296fe185ab 100644 --- a/include/m_utils.h +++ b/include/m_utils.h @@ -176,13 +176,13 @@ EXTERN_C MIR_CORE_DLL(int) WindowList_BroadcastAsync(MWindowList hList, UINT mes /////////////////////////////////////////////////////////////////////////////////////////
// Use this in a SendMessage to set the color of the url when control is enabled
-// wParam = DWORD color
+// wParam = uint32_t color
// lParam = not used
#define HLK_SETENABLECOLOUR (WM_USER+101) // added in 0.3.1
/////////////////////////////////////////////////////////////////////////////////////////
// Use this in a SendMessage to set the color of the url when control is disabled
-// wParam = DWORD color
+// wParam = uint32_t color
// lParam = not used
#define HLK_SETDISABLECOLOUR (WM_USER+102) // added in 0.3.1
diff --git a/include/newpluginapi.h b/include/newpluginapi.h index 41b474cc8a..0579f6a7e5 100644 --- a/include/newpluginapi.h +++ b/include/newpluginapi.h @@ -101,7 +101,7 @@ struct PLUGININFOEX { int cbSize; char *shortName; - DWORD version; + uint32_t version; char *description; char *author; char *copyright; @@ -253,11 +253,11 @@ public: return db_get_w(hContact, m_szModuleName, name, defaultValue); } - __forceinline DWORD getDword(const char *name, int defaultValue = 0) + __forceinline uint32_t getDword(const char *name, int defaultValue = 0) { return db_get_dw(0, m_szModuleName, name, defaultValue); } - __forceinline DWORD getDword(MCONTACT hContact, const char *name, int defaultValue = 0) + __forceinline uint32_t getDword(MCONTACT hContact, const char *name, int defaultValue = 0) { return db_get_dw(hContact, m_szModuleName, name, defaultValue); } @@ -352,11 +352,11 @@ public: db_set_w(hContact, m_szModuleName, name, value); } - __forceinline void setDword(const char *name, DWORD value) + __forceinline void setDword(const char *name, uint32_t value) { db_set_dw(0, m_szModuleName, name, value); } - __forceinline void setDword(MCONTACT hContact, const char *name, DWORD value) + __forceinline void setDword(MCONTACT hContact, const char *name, uint32_t value) { db_set_dw(hContact, m_szModuleName, name, value); } @@ -396,7 +396,7 @@ extern struct CMPlugin g_plugin; ///////////////////////////////////////////////////////////////////////////////////////// // Basic class for plugins (not protocols) written in C++ -typedef BOOL(MIR_SYSCALL* const _pfnCrtInit)(HINSTANCE, DWORD, void*); +typedef BOOL(MIR_SYSCALL* const _pfnCrtInit)(HINSTANCE, uint32_t, void*); template<class T> class PLUGIN : public CMPluginBase { |
