summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx/src/ex_import
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-10 08:04:30 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-10 08:04:30 +0000
commitddba4ede6b451d0cfcd0d32b5180fbd0689966bf (patch)
tree5d74f37a7013d13b92c182628d6b68a58e148ae4 /plugins/UserInfoEx/src/ex_import
parentc39340bf493a1745a41317bbf937fc7eb6cbb26a (diff)
- HANDLE hContact => HCONTACT
- GCF_* prefix was added to chat constants to avoid name conflicts git-svn-id: http://svn.miranda-ng.org/main/trunk@8078 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/UserInfoEx/src/ex_import')
-rw-r--r--plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp46
-rw-r--r--plugins/UserInfoEx/src/ex_import/classExImContactBase.h20
-rw-r--r--plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp14
-rw-r--r--plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp2
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp20
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImINI.h2
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp24
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h10
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp4
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImXML.h6
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp8
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImport.h2
12 files changed, 75 insertions, 83 deletions
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp
index 0906dacaae..efb32e0efc 100644
--- a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp
+++ b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp
@@ -30,17 +30,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**/
CExImContactBase::CExImContactBase()
{
- _pszNick = NULL;
- _pszDisp = NULL;
- _pszGroup = NULL;
- _pszProto = NULL;
- _pszProtoOld = NULL;
- _pszAMPro = NULL;
- _pszUIDKey = NULL;
- _dbvUIDHash = NULL;
+ _pszNick = NULL;
+ _pszDisp = NULL;
+ _pszGroup = NULL;
+ _pszProto = NULL;
+ _pszProtoOld = NULL;
+ _pszAMPro = NULL;
+ _pszUIDKey = NULL;
+ _dbvUIDHash = NULL;
ZeroMemory(&_dbvUID, sizeof(DBVARIANT));
- _hContact = INVALID_HANDLE_VALUE;
- _isNewContact = FALSE;
+ _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ _isNewContact = FALSE;
}
/**
@@ -69,7 +69,7 @@ CExImContactBase::~CExImContactBase()
* param: hContact - handle to contact whose information to read
* return: TRUE if successful or FALSE otherwise
**/
-BYTE CExImContactBase::fromDB(HANDLE hContact)
+BYTE CExImContactBase::fromDB(HCONTACT hContact)
{
BYTE ret = FALSE;
BYTE isChatRoom = FALSE;
@@ -224,15 +224,14 @@ BYTE CExImContactBase::fromIni(LPSTR& row)
* param: hMetaContact - a meta contact to add this contact to
* return: handle of the contact if successful
**/
-HANDLE CExImContactBase::toDB()
+HCONTACT CExImContactBase::toDB()
{
// create new contact if none exists
if (_hContact == INVALID_HANDLE_VALUE && _pszProto && _pszUIDKey && _dbvUID.type != DBVT_DELETED) {
PROTOACCOUNT* pszAccount = 0;
if (NULL == (pszAccount = ProtoGetAccount( _pszProto ))) {
//account does not exist
- _hContact = INVALID_HANDLE_VALUE;
- return INVALID_HANDLE_VALUE;
+ return _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
}
if (!IsAccountEnabled(pszAccount)) {
;
@@ -240,20 +239,17 @@ HANDLE CExImContactBase::toDB()
// create new contact
_hContact = DB::Contact::Add();
if (!_hContact) {
- _hContact = INVALID_HANDLE_VALUE;
- return INVALID_HANDLE_VALUE;
+ return _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
}
// Add the protocol to the new contact
if (CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)_hContact, (LPARAM)_pszProto)) {
DB::Contact::Delete(_hContact);
- _hContact = INVALID_HANDLE_VALUE;
- return INVALID_HANDLE_VALUE;
+ return _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
}
// write uid to protocol module
if (db_set(_hContact, _pszProto, _pszUIDKey, &_dbvUID)) {
DB::Contact::Delete(_hContact);
- _hContact = INVALID_HANDLE_VALUE;
- return INVALID_HANDLE_VALUE;
+ return _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
}
// write nick and display name
if (_pszNick) db_set_utf(_hContact, _pszProto, SET_CONTACT_NICK, _pszNick);
@@ -477,7 +473,7 @@ BYTE CExImContactBase::isMeta() const
return DB::Module::IsMeta(_pszProto);
}
-BYTE CExImContactBase::isHandle(HANDLE hContact)
+BYTE CExImContactBase::isHandle(HCONTACT hContact)
{
LPCSTR pszProto;
DBVARIANT dbv;
@@ -527,10 +523,7 @@ BYTE CExImContactBase::isHandle(HANDLE hContact)
**/
HANDLE CExImContactBase::findHandle()
{
- HANDLE hContact;
-
- for (hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact))
- {
+ for (HCONTACT hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact)) {
if (isHandle(hContact)) {
_hContact = hContact;
_isNewContact = FALSE;
@@ -538,6 +531,5 @@ HANDLE CExImContactBase::findHandle()
}
}
_isNewContact = TRUE;
- _hContact = INVALID_HANDLE_VALUE;
- return INVALID_HANDLE_VALUE;
+ return _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
}
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactBase.h b/plugins/UserInfoEx/src/ex_import/classExImContactBase.h
index 377b341c3e..c9bb3fee24 100644
--- a/plugins/UserInfoEx/src/ex_import/classExImContactBase.h
+++ b/plugins/UserInfoEx/src/ex_import/classExImContactBase.h
@@ -36,7 +36,7 @@ protected:
LPSTR _pszUIDKey;
DWORD _dbvUIDHash;
DBVARIANT _dbvUID;
- HANDLE _hContact;
+ HCONTACT _hContact;
BYTE _isNewContact; // is this contact a new one?
HANDLE findHandle();
@@ -52,7 +52,7 @@ public:
// __inline LPCSTR ampro() const { return mir_strcmp(_pszAMPro,"")? _pszAMPro : NULL; }
// __inline LPCSTR uidk() const { return mir_strcmp(_pszUIDKey,"")? _pszUIDKey : NULL; }
__inline DBVARIANT& uid() { return _dbvUID; }
- __inline HANDLE handle() const { return _hContact; }
+ __inline HCONTACT handle() const { return _hContact; }
__inline void disp(LPCSTR val) { _pszDisp = val ? mir_strdup(val): NULL; }
__inline void group(LPCSTR val) { _pszGroup = val ? mir_strdup(val): NULL; }
@@ -77,16 +77,16 @@ public:
mir_free(temp);
}
- BYTE isHandle(HANDLE hContact);
- BYTE isMeta() const;
+ BYTE isHandle(HCONTACT hContact);
+ BYTE isMeta() const;
- LPSTR uid2String(BYTE bPrependType);
+ LPSTR uid2String(BYTE bPrependType);
- BYTE fromDB(HANDLE hContact);
- BYTE fromIni(LPSTR& row);
+ BYTE fromDB(HCONTACT hContact);
+ BYTE fromIni(LPSTR& row);
- HANDLE toDB();
- void toIni(FILE* file, int modCount);
+ HCONTACT toDB();
+ void toIni(FILE* file, int modCount);
- BYTE operator = (HANDLE hContact) { return fromDB(hContact); }
+ BYTE operator = (HCONTACT hContact) { return fromDB(hContact); }
};
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp
index a292f6d803..8aa92d5285 100644
--- a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp
+++ b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp
@@ -219,7 +219,7 @@ int CExImContactXML::Export(FILE *xmlfile, DB::CEnumList* pModules)
const int cnt = DB::MetaContact::SubCount(_hContact);
const int def = DB::MetaContact::SubDefNum(_hContact);
- HANDLE hSubContact = DB::MetaContact::Sub(_hContact, def);
+ HCONTACT hSubContact = DB::MetaContact::Sub(_hContact, def);
// export default subcontact
if (hSubContact && vContact.fromDB(hSubContact))
@@ -488,7 +488,7 @@ int CExImContactXML::LoadXmlElemnt(TiXmlElement *xContact)
// delete last contact
db_free(&_dbvUID);
- _hContact = INVALID_HANDLE_VALUE;
+ _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
_xmlNode = xContact;
MIR_FREE(_pszAMPro); ampro(xContact->Attribute("ampro"));
@@ -511,7 +511,7 @@ int CExImContactXML::LoadXmlElemnt(TiXmlElement *xContact)
if (vSub = xSub) {
// identify metacontact by the first valid subcontact in xmlfile
if (_hContact == INVALID_HANDLE_VALUE && vSub.handle() != INVALID_HANDLE_VALUE) {
- HANDLE hMeta = (HANDLE)CallService(MS_MC_GETMETACONTACT, (WPARAM)vSub.handle(), NULL);
+ HCONTACT hMeta = (HCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)vSub.handle(), NULL);
if (hMeta != NULL) {
_hContact = hMeta;
break;
@@ -610,7 +610,7 @@ int CExImContactXML::ImportContact()
LPGENT("You aborted import of a new contact.\nSome information may be missing for this contact.\n\nDo you want to delete the incomplete contact?"));
if (result == IDYES) {
DB::Contact::Delete(_hContact);
- _hContact = INVALID_HANDLE_VALUE;
+ _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
}
}
return ERROR_ABORTED;
@@ -674,9 +674,9 @@ int CExImContactXML::Import(BYTE keepMetaSubContact)
return result;
// convert default subcontact to metacontact
- _hContact = (HANDLE)CallService(MS_MC_CONVERTTOMETA, (WPARAM)vContact.handle(), NULL);
+ _hContact = (HCONTACT)CallService(MS_MC_CONVERTTOMETA, (WPARAM)vContact.handle(), NULL);
if (_hContact == NULL) {
- _hContact = INVALID_HANDLE_VALUE;
+ _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
return ERROR_CONVERT_METACONTACT;
}
@@ -753,7 +753,7 @@ int CExImContactXML::ImportMetaSubContact(CExImContactXML * pMetaContact)
MIR_FREE(ptszMetaNick);
if (result == IDYES) {
DB::Contact::Delete(_hContact);
- _hContact = INVALID_HANDLE_VALUE;
+ _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
}
}
return ERROR_ADDTO_METACONTACT;
diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp
index d170c6d993..1c552187e2 100644
--- a/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp
+++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp
@@ -292,7 +292,7 @@ INT_PTR CALLBACK SelectModulesToExport_DlgProc(HWND hDlg, UINT uMsg, WPARAM wPar
// module must exist in at least one contact
if (pDat->ExImContact->Typ != EXIM_CONTACT) // TRUE = All Contacts
{
- HANDLE hContact;
+ HCONTACT hContact;
for (hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact))
{
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp
index 1949ae96f0..3ddfbe0f93 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp
@@ -37,7 +37,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* file - file to write the settings to
* return nothing
**/
-static void ExportModule(HANDLE hContact, LPCSTR pszModule, FILE* file)
+static void ExportModule(HCONTACT hContact, LPCSTR pszModule, FILE* file)
{
DB::CEnumList Settings;
@@ -126,7 +126,7 @@ static void ExportModule(HANDLE hContact, LPCSTR pszModule, FILE* file)
* pModules - module to export, NULL to export all modules of a contact
* file - ini file to write the contact to
**/
-static BYTE ExportContact(HANDLE hContact, DB::CEnumList* pModules, FILE* file)
+static BYTE ExportContact(HCONTACT hContact, DB::CEnumList* pModules, FILE* file)
{
CExImContactBase vcc;
@@ -167,7 +167,7 @@ int SvcExImINI_Export(lpExImParam ExImContact, LPCSTR pszFileName)
errno_t err;
DB::CEnumList Modules;
SYSTEMTIME now;
- HANDLE hContact;
+ HCONTACT hContact;
if (!DlgExImModules_SelectModulesToExport(ExImContact, &Modules, NULL))
{
@@ -298,7 +298,7 @@ static DWORD ImportreadLine(FILE* file, LPSTR &str)
* cchBuf - character count of the buffer
* return: handle to the contact that matches the information or NULL if no match
**/
-static HANDLE ImportFindContact(HANDLE hContact, LPSTR &strBuf, BYTE bCanCreate)
+static HCONTACT ImportFindContact(HCONTACT hContact, LPSTR &strBuf, BYTE bCanCreate)
{
CExImContactBase vcc;
@@ -322,7 +322,7 @@ static HANDLE ImportFindContact(HANDLE hContact, LPSTR &strBuf, BYTE bCanCreate)
* strLine - string with the setting and its value to write to db
* return: 0 if writing was ok, 1 otherwise
**/
-int ImportSetting(HANDLE hContact, LPCSTR pszModule, LPSTR &strLine)
+int ImportSetting(HCONTACT hContact, LPCSTR pszModule, LPSTR &strLine)
{
DBVARIANT dbv;
LPSTR end, value;
@@ -433,10 +433,10 @@ int ImportSetting(HANDLE hContact, LPCSTR pszModule, LPSTR &strLine)
* strLine - string with the setting and its value to write to db
* return: 0 if writing was ok, 1 otherwise
**/
-int SvcExImINI_Import(HANDLE hContact, LPCSTR pszFileName)
+int SvcExImINI_Import(HCONTACT hContact, LPCSTR pszFileName)
{
FILE *file;
- HANDLE hNewContact = INVALID_HANDLE_VALUE;
+ HCONTACT hNewContact = (HCONTACT)INVALID_HANDLE_VALUE;
DWORD end,
numLines = 0;
CHAR szModule[MAXSETTING] = {0};
@@ -471,7 +471,7 @@ int SvcExImINI_Import(HANDLE hContact, LPCSTR pszFileName)
strBuf = mir_strnerase(strBuf, 0, 1);
numContactsInFile++;
- if ((hNewContact = ImportFindContact(hContact, strBuf, FALSE)) != INVALID_HANDLE_VALUE)
+ if ((hNewContact = ImportFindContact(hContact, strBuf, FALSE)) != (HCONTACT)INVALID_HANDLE_VALUE)
numContactsAdded++;
continue;
}
@@ -484,13 +484,13 @@ int SvcExImINI_Import(HANDLE hContact, LPCSTR pszFileName)
*szModule = 0;
numContactsInFile++;
- if ((hNewContact = ImportFindContact(hContact, strBuf, TRUE)) != INVALID_HANDLE_VALUE)
+ if ((hNewContact = ImportFindContact(hContact, strBuf, TRUE)) != (HCONTACT)INVALID_HANDLE_VALUE)
numContactsAdded++;
continue;
}
// read modules and settings only for valid contacts
- if (hNewContact != INVALID_HANDLE_VALUE) {
+ if (hNewContact != (HCONTACT)INVALID_HANDLE_VALUE) {
// found a module line
if (strBuf[0] == '[' && (end = (strchr(strBuf, ']') - strBuf)) > 0) {
mir_strncpy(szModule, &strBuf[1], end);
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.h b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.h
index 6961b1b6f7..9d737fcdb8 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.h
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.h
@@ -25,6 +25,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#pragma once
int SvcExImINI_Export(lpExImParam ExImContact, LPCSTR pszFileName);
- int SvcExImINI_Import(HANDLE hContact, LPCSTR pszFileName);
+ int SvcExImINI_Import(HCONTACT hContact, LPCSTR pszFileName);
#endif /* _SVC_EXIMINI_H_ */
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp
index e3b6f45f2c..824c4c0fd1 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp
@@ -557,7 +557,7 @@ size_t CLineBuffer::GetTokenNext(const CHAR delim, CLineBuffer * pBuf)
*
* return: 0 if successful, 1 otherwise
**/
-int CLineBuffer::DBWriteTokenFirst(HANDLE hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim)
+int CLineBuffer::DBWriteTokenFirst(HCONTACT hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim)
{
PBYTE here;
int iRet = 1;
@@ -594,7 +594,7 @@ int CLineBuffer::DBWriteTokenFirst(HANDLE hContact, const CHAR* pszModule, const
*
* return: 0 if successful, 1 otherwise
**/
-int CLineBuffer::DBWriteTokenNext(HANDLE hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim)
+int CLineBuffer::DBWriteTokenNext(HCONTACT hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim)
{
PBYTE here;
int iRet = 1;
@@ -628,7 +628,7 @@ int CLineBuffer::DBWriteTokenNext(HANDLE hContact, const CHAR* pszModule, const
*
* return: 0 if successful, 1 otherwise
**/
-int CLineBuffer::DBWriteSettingString(HANDLE hContact, const CHAR* pszModule, const CHAR* pszSetting)
+int CLineBuffer::DBWriteSettingString(HCONTACT hContact, const CHAR* pszModule, const CHAR* pszSetting)
{
if (_pVal && _cbUsed > 0)
return db_set_s(hContact, pszModule, pszSetting, (LPSTR)_pVal);
@@ -649,11 +649,11 @@ int CLineBuffer::DBWriteSettingString(HANDLE hContact, const CHAR* pszModule, co
**/
CVCardFileVCF::CVCardFileVCF()
{
- _pFile = NULL;
- _hContact = INVALID_HANDLE_VALUE;
- _pszBaseProto = NULL;
- _hasUtf8 = 0;
- _useUtf8 = FALSE;
+ _pFile = NULL;
+ _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ _pszBaseProto = NULL;
+ _hasUtf8 = 0;
+ _useUtf8 = FALSE;
}
/**
@@ -850,7 +850,7 @@ void CVCardFileVCF::writeLineEncoded(const CHAR *szSet, size_t *cbRew)
* pszMode - the mode the file should be opened with
* return TRUE or FALSE
**/
-BYTE CVCardFileVCF::Open(HANDLE hContact, LPCSTR pszFileName, LPCSTR pszMode)
+BYTE CVCardFileVCF::Open(HCONTACT hContact, LPCSTR pszFileName, LPCSTR pszMode)
{
if (!(_pFile = fopen(pszFileName, pszMode)))
return FALSE;
@@ -873,9 +873,9 @@ void CVCardFileVCF::Close(void)
{
if (_pFile)
fclose(_pFile);
- _pFile = NULL;
- _hContact = INVALID_HANDLE_VALUE;
- _pszBaseProto = NULL;
+ _pFile = NULL;
+ _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ _pszBaseProto = NULL;
}
/**
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h
index 3fbab056e7..2507d83b61 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h
@@ -59,9 +59,9 @@ public:
size_t GetTokenFirst(const CHAR delim, CLineBuffer * pBuf);
size_t GetTokenNext(const CHAR delim, CLineBuffer * pBuf);
- int DBWriteTokenFirst(HANDLE hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim);
- int DBWriteTokenNext(HANDLE hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim);
- int DBWriteSettingString(HANDLE hContact, const CHAR* pszModule, const CHAR* pszSetting);
+ int DBWriteTokenFirst(HCONTACT hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim);
+ int DBWriteTokenNext(HCONTACT hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim);
+ int DBWriteSettingString(HCONTACT hContact, const CHAR* pszModule, const CHAR* pszSetting);
};
class CVCardFileVCF
@@ -69,7 +69,7 @@ class CVCardFileVCF
private:
CLineBuffer _clVal;
FILE *_pFile;
- HANDLE _hContact;
+ HCONTACT _hContact;
const CHAR *_pszBaseProto;
WORD _cbRew;
BYTE _useUtf8;
@@ -87,7 +87,7 @@ private:
public:
CVCardFileVCF();
- BYTE Open(HANDLE hContact, LPCSTR pszFileName, LPCSTR pszMode);
+ BYTE Open(HCONTACT hContact, LPCSTR pszFileName, LPCSTR pszMode);
void Close(void);
BYTE Export(BYTE bExportUtf);
BYTE Import();
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp
index 61d46dcef8..c4664b0975 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp
@@ -93,7 +93,7 @@ int CFileXml::Export(lpExImParam ExImContact, LPCSTR pszFileName)
LONG cbHeader;
SYSTEMTIME now;
DWORD result;
- HANDLE hContact;
+ HCONTACT hContact;
result = (DWORD)DialogBox(ghInst,
MAKEINTRESOURCE(IDD_EXPORT_DATAHISTORY),
@@ -346,7 +346,7 @@ DWORD CFileXml::CountContacts(TiXmlElement* xmlParent)
* pszFileName - full qualified path to the xml file which is to import
* return: ERROR_OK on success or one other element of ImportError to tell the type of failure
**/
-int CFileXml::Import(HANDLE hContact, LPCSTR pszFileName)
+int CFileXml::Import(HCONTACT hContact, LPCSTR pszFileName)
{
TiXmlDocument doc;
TiXmlElement *xmlCard = NULL;
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.h b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.h
index 3ec0ca998a..382fdb6dde 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.h
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.h
@@ -50,13 +50,13 @@ class CFileXml {
/*
int ExportOwner(FILE *xmlfile, BYTE bExportEvents);
- int ExportContact(FILE *xmlfile, HANDLE hContact, BYTE bExportEvents, LPENUMLIST pModules);
- int ExportSubContact(TiXmlElement *xContact, HANDLE hContact, BYTE bExportEvents);
+ int ExportContact(FILE *xmlfile, HCONTACT hContact, BYTE bExportEvents, LPENUMLIST pModules);
+ int ExportSubContact(TiXmlElement *xContact, HCONTACT hContact, BYTE bExportEvents);
*/
public:
CFileXml();
- int Import(HANDLE hContact, LPCSTR pszFileName);
+ int Import(HCONTACT hContact, LPCSTR pszFileName);
int Export(lpExImParam ExImContact, LPCSTR pszFileName);
};
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp
index f331f1f3e3..0632d96f32 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp
@@ -211,7 +211,7 @@ INT_PTR svcExIm_MainExport_Service(WPARAM wParam, LPARAM lParam)
{
ExImParam ExIm;
ZeroMemory(&ExIm, sizeof(ExIm));
- ExIm.hContact = INVALID_HANDLE_VALUE;
+ ExIm.hContact = (HCONTACT)INVALID_HANDLE_VALUE;
ExIm.Typ = EXIM_ALL;
return SvcExImport_Export(&ExIm, (HWND)lParam);
}
@@ -220,7 +220,7 @@ INT_PTR svcExIm_MainImport_Service(WPARAM wParam, LPARAM lParam)
{
ExImParam ExIm;
ZeroMemory(&ExIm, sizeof(ExIm));
- ExIm.hContact = INVALID_HANDLE_VALUE;
+ ExIm.hContact = (HCONTACT)INVALID_HANDLE_VALUE;
ExIm.Typ = EXIM_ALL;
return SvcExImport_Import(&ExIm, (HWND)lParam);
}
@@ -233,7 +233,7 @@ INT_PTR svcExIm_ContactExport_Service(WPARAM wParam, LPARAM lParam)
{
ExImParam ExIm;
ZeroMemory(&ExIm, sizeof(ExIm));
- ExIm.hContact = (HANDLE)wParam;
+ ExIm.hContact = (HCONTACT)wParam;
ExIm.Typ = EXIM_CONTACT;
return SvcExImport_Export(&ExIm, (HWND)lParam);
}
@@ -242,7 +242,7 @@ INT_PTR svcExIm_ContactImport_Service(WPARAM wParam, LPARAM lParam)
{
ExImParam ExIm;
ZeroMemory(&ExIm, sizeof(ExIm));
- ExIm.hContact = (HANDLE)wParam;
+ ExIm.hContact = (HCONTACT)wParam;
ExIm.Typ = EXIM_CONTACT;
return SvcExImport_Import(&ExIm, (HWND)lParam);
}
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImport.h b/plugins/UserInfoEx/src/ex_import/svc_ExImport.h
index 16c64c25e3..484c266535 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImport.h
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImport.h
@@ -26,7 +26,7 @@ typedef struct
{
BYTE Typ;
union {
- HANDLE hContact;
+ HCONTACT hContact;
LPSTR pszName;
LPTSTR ptszName;
};