summaryrefslogtreecommitdiff
path: root/plugins/Dbx_mmap_SA
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2012-05-15 10:38:20 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2012-05-15 10:38:20 +0000
commit48540940b6c28bb4378abfeb500ec45a625b37b6 (patch)
tree2ef294c0763e802f91d868bdef4229b6868527de /plugins/Dbx_mmap_SA
parent5c350913f011e119127baeb32a6aedeb4f0d33bc (diff)
initial commit
git-svn-id: http://svn.miranda-ng.org/main/trunk@2 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dbx_mmap_SA')
-rw-r--r--plugins/Dbx_mmap_SA/Cryptors/Athena/How to build Athena.txt11
-rw-r--r--plugins/Dbx_mmap_SA/Cryptors/Athena/UAthena.pas176
-rw-r--r--plugins/Dbx_mmap_SA/Cryptors/Athena/athena.cfg38
-rw-r--r--plugins/Dbx_mmap_SA/Cryptors/Athena/athena.dof136
-rw-r--r--plugins/Dbx_mmap_SA/Cryptors/Athena/athena.dpr112
-rw-r--r--plugins/Dbx_mmap_SA/Cryptors/Athena/athena.rc28
-rw-r--r--plugins/Dbx_mmap_SA/Cryptors/Athena/athena.resbin0 -> 916 bytes
-rw-r--r--plugins/Dbx_mmap_SA/Cryptors/Athena/make.bat13
-rw-r--r--plugins/Dbx_mmap_SA/Cryptors/Athena/md5_mod256_unit.pas64
-rw-r--r--plugins/Dbx_mmap_SA/Cryptors/Athena/md5_unit.pas212
-rw-r--r--plugins/Dbx_mmap_SA/Cryptors/RC4/cryptor.c133
-rw-r--r--plugins/Dbx_mmap_SA/Cryptors/RC4/rc4.sln20
-rw-r--r--plugins/Dbx_mmap_SA/Cryptors/RC4/rc4.vcproj187
-rw-r--r--plugins/Dbx_mmap_SA/Cryptors/RC4/rc4_10.sln31
-rw-r--r--plugins/Dbx_mmap_SA/Cryptors/RC4/rc4_10.vcxproj265
-rw-r--r--plugins/Dbx_mmap_SA/Cryptors/RC4/rc4_10.vcxproj.filters22
-rw-r--r--plugins/Dbx_mmap_SA/Db_autobackups/backup.c230
-rw-r--r--plugins/Dbx_mmap_SA/Db_autobackups/db_autobackups.rc182
-rw-r--r--plugins/Dbx_mmap_SA/Db_autobackups/db_autobackups.vcproj267
-rw-r--r--plugins/Dbx_mmap_SA/Db_autobackups/db_autobackups_10.vcxproj352
-rw-r--r--plugins/Dbx_mmap_SA/Db_autobackups/db_autobackups_10.vcxproj.filters55
-rw-r--r--plugins/Dbx_mmap_SA/Db_autobackups/db_autobackups_8.vcproj389
-rw-r--r--plugins/Dbx_mmap_SA/Db_autobackups/db_autobackups_9.vcproj703
-rw-r--r--plugins/Dbx_mmap_SA/Db_autobackups/headers.h53
-rw-r--r--plugins/Dbx_mmap_SA/Db_autobackups/icos/backup.icobin0 -> 2550 bytes
-rw-r--r--plugins/Dbx_mmap_SA/Db_autobackups/main.c262
-rw-r--r--plugins/Dbx_mmap_SA/Db_autobackups/options.c360
-rw-r--r--plugins/Dbx_mmap_SA/Db_autobackups/options.h37
-rw-r--r--plugins/Dbx_mmap_SA/Db_autobackups/resource.h35
-rw-r--r--plugins/Dbx_mmap_SA/Db_autobackups/resource.rc2
-rw-r--r--plugins/Dbx_mmap_SA/Db_autobackups/version.h16
-rw-r--r--plugins/Dbx_mmap_SA/Db_autobackups/version.rc39
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/Version.h9
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/Version.rc38
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/aggressive.cpp59
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/cleaning.cpp63
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/contactchain.cpp105
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/database.h179
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/dbtool.dep16
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/dbtool.dsp295
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/dbtool.dsw29
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/dbtool.exe.manifest31
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/dbtool.h129
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/dbtool.mak528
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/dbtool.vcproj1380
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/dbtool_10.vcxproj569
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/dbtool_10.vcxproj.filters124
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/dbtool_8.vcproj1399
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/dbtool_9.sln26
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/dbtool_9.vcproj1363
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/disk.cpp112
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/encryption.cpp304
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/eventchain.cpp363
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/fileaccess.cpp69
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/finaltasks.cpp78
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/finished.cpp82
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/initialchecks.cpp98
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/langpack.cpp392
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/langpack_dbtool.txt157
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/main.cpp32
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/modulechain.cpp148
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/openerror.cpp55
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/progress.cpp213
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/res/dbtool.bmpbin0 -> 66872 bytes
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/res/dbtool.icobin0 -> 9062 bytes
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/res/delete.icobin0 -> 2550 bytes
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/res/profileg.icobin0 -> 2550 bytes
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/res/profiler.icobin0 -> 2550 bytes
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/res/profiley.icobin0 -> 2550 bytes
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/resource.h58
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/resource.rc368
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/selectdb.cpp303
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/settingschain.cpp72
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/user.cpp71
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/utf.cpp445
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/welcome.cpp61
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/wizard.cpp138
-rw-r--r--plugins/Dbx_mmap_SA/Dbtool/worker.cpp76
-rw-r--r--plugins/Dbx_mmap_SA/Import_SA/ICQserver.c73
-rw-r--r--plugins/Dbx_mmap_SA/Import_SA/ICQserver.h62
-rw-r--r--plugins/Dbx_mmap_SA/Import_SA/Version.rc38
-rw-r--r--plugins/Dbx_mmap_SA/Import_SA/docs/import-ICQ_Db_Specs.txt1004
-rw-r--r--plugins/Dbx_mmap_SA/Import_SA/docs/import-license.txt340
-rw-r--r--plugins/Dbx_mmap_SA/Import_SA/docs/import-readme.txt128
-rw-r--r--plugins/Dbx_mmap_SA/Import_SA/docs/import-translation.txt55
-rw-r--r--plugins/Dbx_mmap_SA/Import_SA/encryption.c315
-rw-r--r--plugins/Dbx_mmap_SA/Import_SA/import.dep110
-rw-r--r--plugins/Dbx_mmap_SA/Import_SA/import.dsp238
-rw-r--r--plugins/Dbx_mmap_SA/Import_SA/import.dsw29
-rw-r--r--plugins/Dbx_mmap_SA/Import_SA/import.h118
-rw-r--r--plugins/Dbx_mmap_SA/Import_SA/import.mak516
-rw-r--r--plugins/Dbx_mmap_SA/Import_SA/import_sa.vcproj616
-rw-r--r--plugins/Dbx_mmap_SA/Import_SA/import_sa_10.vcxproj642
-rw-r--r--plugins/Dbx_mmap_SA/Import_SA/import_sa_10.vcxproj.filters91
-rw-r--r--plugins/Dbx_mmap_SA/Import_SA/import_sa_8.vcproj552
-rw-r--r--plugins/Dbx_mmap_SA/Import_SA/import_sa_9.vcproj998
-rw-r--r--plugins/Dbx_mmap_SA/Import_SA/main.c553
-rw-r--r--plugins/Dbx_mmap_SA/Import_SA/mirabilis.c1492
-rw-r--r--plugins/Dbx_mmap_SA/Import_SA/mirabilis.h200
-rw-r--r--plugins/Dbx_mmap_SA/Import_SA/miranda.c1502
-rw-r--r--plugins/Dbx_mmap_SA/Import_SA/mirandadb0700.h148
-rw-r--r--plugins/Dbx_mmap_SA/Import_SA/mirandahistory.c208
-rw-r--r--plugins/Dbx_mmap_SA/Import_SA/progress.c103
-rw-r--r--plugins/Dbx_mmap_SA/Import_SA/res/import.icobin0 -> 9574 bytes
-rw-r--r--plugins/Dbx_mmap_SA/Import_SA/res/pass.icobin0 -> 8550 bytes
-rw-r--r--plugins/Dbx_mmap_SA/Import_SA/resource.h68
-rw-r--r--plugins/Dbx_mmap_SA/Import_SA/resource.rc322
-rw-r--r--plugins/Dbx_mmap_SA/Import_SA/version.h22
-rw-r--r--plugins/Dbx_mmap_SA/Import_SA/wizard.c215
-rw-r--r--plugins/Dbx_mmap_SA/commonheaders.c1
-rw-r--r--plugins/Dbx_mmap_SA/commonheaders.h127
-rw-r--r--plugins/Dbx_mmap_SA/database.c224
-rw-r--r--plugins/Dbx_mmap_SA/database.h229
-rw-r--r--plugins/Dbx_mmap_SA/db3x_mmap.dep23
-rw-r--r--plugins/Dbx_mmap_SA/db3x_mmap.mak555
-rw-r--r--plugins/Dbx_mmap_SA/db3x_mmap.rc275
-rw-r--r--plugins/Dbx_mmap_SA/db3x_mmap_8.sln26
-rw-r--r--plugins/Dbx_mmap_SA/db3x_mmap_8.vcproj579
-rw-r--r--plugins/Dbx_mmap_SA/db3x_mmap_sa.dsp158
-rw-r--r--plugins/Dbx_mmap_SA/db3x_mmap_sa.dsw33
-rw-r--r--plugins/Dbx_mmap_SA/db3x_mmap_sa.vcproj611
-rw-r--r--plugins/Dbx_mmap_SA/db3x_mmap_sa_10.sln92
-rw-r--r--plugins/Dbx_mmap_SA/db3x_mmap_sa_10.vcxproj540
-rw-r--r--plugins/Dbx_mmap_SA/db3x_mmap_sa_10.vcxproj.filters91
-rw-r--r--plugins/Dbx_mmap_SA/db3x_mmap_sa_8.vcproj755
-rw-r--r--plugins/Dbx_mmap_SA/db3x_mmap_sa_9.sln38
-rw-r--r--plugins/Dbx_mmap_SA/db3x_mmap_sa_9.vcproj961
-rw-r--r--plugins/Dbx_mmap_SA/dbcache.c206
-rw-r--r--plugins/Dbx_mmap_SA/dbcontacts.c299
-rw-r--r--plugins/Dbx_mmap_SA/dbevents.c499
-rw-r--r--plugins/Dbx_mmap_SA/dbheaders.c75
-rw-r--r--plugins/Dbx_mmap_SA/dbmodulechain.c192
-rw-r--r--plugins/Dbx_mmap_SA/dbpreset.c299
-rw-r--r--plugins/Dbx_mmap_SA/dbsettings.c1170
-rw-r--r--plugins/Dbx_mmap_SA/dialogs.c620
-rw-r--r--plugins/Dbx_mmap_SA/encrypt.c66
-rw-r--r--plugins/Dbx_mmap_SA/encryption.h23
-rw-r--r--plugins/Dbx_mmap_SA/icos/backup.icobin0 -> 2550 bytes
-rw-r--r--plugins/Dbx_mmap_SA/icos/logo.icobin0 -> 8550 bytes
-rw-r--r--plugins/Dbx_mmap_SA/icos/pass.icobin0 -> 2550 bytes
-rw-r--r--plugins/Dbx_mmap_SA/icos/restart.icobin0 -> 2550 bytes
-rw-r--r--plugins/Dbx_mmap_SA/init.c221
-rw-r--r--plugins/Dbx_mmap_SA/options.h38
-rw-r--r--plugins/Dbx_mmap_SA/resource.h54
-rw-r--r--plugins/Dbx_mmap_SA/resource.rc2
-rw-r--r--plugins/Dbx_mmap_SA/security.c424
-rw-r--r--plugins/Dbx_mmap_SA/version.h8
-rw-r--r--plugins/Dbx_mmap_SA/version.rc39
148 files changed, 34778 insertions, 0 deletions
diff --git a/plugins/Dbx_mmap_SA/Cryptors/Athena/How to build Athena.txt b/plugins/Dbx_mmap_SA/Cryptors/Athena/How to build Athena.txt
new file mode 100644
index 0000000000..deae9e767c
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Cryptors/Athena/How to build Athena.txt
@@ -0,0 +1,11 @@
+1. Obtain sources from http://delphi-miranda-plugins.googlecode.com/svn/trunk with your favorite SVN client.
+
+2. Copy Athena folder to the root directory of the abovementioned sources.
+
+3. Open Command prompt, navigate to Athena folder.
+
+4. Type: "make" (without quotes) - to build 32-bit version with Delphi 5,
+ "make fpc" - to build Free Pascal 32-bit version,
+ "make fpc64" - to build Free Pascal 64-bit version,
+ "make xe2" - to build Delphi XE2 32-bit version,
+ "make xe64" - to build Delphi XE2 64-bit version. \ No newline at end of file
diff --git a/plugins/Dbx_mmap_SA/Cryptors/Athena/UAthena.pas b/plugins/Dbx_mmap_SA/Cryptors/Athena/UAthena.pas
new file mode 100644
index 0000000000..15a9674e0c
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Cryptors/Athena/UAthena.pas
@@ -0,0 +1,176 @@
+unit UAthena;
+{
+ Athena: cryptor module for Miranda SecuredMMAP Database driver
+ Copyright 2007-2008 Klyde
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+}
+
+
+interface
+uses
+ md5_unit, windows;
+Type
+ Arr = array of byte;
+ PArr = ^Arr;
+
+ Function MD5_Mod(const s: AnsiString; block_count: byte): AnsiString;
+ Procedure MakeKey(key: PArr; len: word; const pwd: AnsiString);
+ Procedure EncryptData(key: PArr; data: PByte; size: LongWord);
+ Procedure DecryptData(key: PArr; data: PByte; size: LongWord);
+
+implementation
+//==============================================================================
+Function str_back(const s: AnsiString): AnsiString;
+Var
+ i: integer;
+Begin
+ result := '';
+ for i := Length(s) downto 1 do result := result + s[i];
+end;
+//==============================================================================
+Function MD5_Mod(const s: AnsiString; block_count: byte): AnsiString;
+Var
+ s1, s2, sb : AnsiString;
+ k : word;
+Begin
+ sb := str_back(s);
+ s2 := '';
+ For k := 1 to block_count do
+ Begin
+ s1 := md5(s + sb);
+ s2 := str_back(s2 + md5(s1+sb+s2));
+ End;
+ result := s2;
+end;
+//==============================================================================
+Procedure MakeKey(key: PArr; len: word; const pwd: AnsiString);
+Var
+ s : AnsiString;
+ i : word;
+ dummy: integer;
+Begin
+ if len > 64 then Len := ((Len div 16) + 1)*16 else Len := 64;
+ SetLength(key^, Len);
+ s := MD5_mod(pwd, len div 16);
+ for i := 1 to length(s) div 2 do
+ begin
+ val('$' + copy(s, i*2 - 1, 2),key^[i-1],dummy);
+ end;
+end;
+//==============================================================================
+Procedure GetNENum(key: arr; var n1, n2: LongWord);
+Var
+ i: LongWord;
+Begin
+ n1 := 0;
+ n2 := 0;
+ for i := 0 to Length(key) - 1 do
+ Begin
+ n1 := n1 + key[i] + (i + 1)*(n1+1);
+ n2 := n2 + key[i] - (i + 1)*(n2+1);
+ end;
+ n1 := n1*2 + 1;
+ n2 := n2*2 + 3;
+end;
+
+//==============================================================================
+Procedure SimGamm(key: PArr; data: PByte; size: LongWord);
+Var
+ kg : Arr;
+ i, n1, n2 : LongWord;
+ lk, k1, k2 : word;
+Begin
+ lk := Length(key^);
+ SetLength(kg, lk);
+ for i := 0 to lk - 1 do kg[i] := key^[i];
+ GetNENum(kg, n1, n2);
+ For i := 1 to size - 1 do
+ Begin
+ if (i mod lk) = 0 then GetNENum(kg, n1, n2);
+ k1 := (i+n1+7)*n2 mod lk;
+ k2 := (i+n2+3)*n1 mod lk;
+
+ PByte(uint_ptr(data)+i)^ := PByte(uint_ptr(data)+i)^ xor kg[k1] xor kg[k2];
+
+ kg[k1] := kg[k1]*k1 + kg[k2] + i*k2;
+ kg[k2] := kg[k2]*k2 + kg[k1] + i*k1;
+ end;
+end;
+//==============================================================================
+Procedure Left(key: PArr; data: PByte; size: LongWord);
+Var
+ k : Arr;
+ i, n1, n2 : LongWord;
+ lk, k1, k2 : word;
+
+Begin
+ lk := Length(key^);
+
+ SetLength(k, lk);
+ for i := 0 to lk - 1 do k[i] := key^[i];
+ GetNENum(k, n1, n2);
+ //---------------------------------------------------------------------------
+ k1 := (n2 + lk)*n1 mod lk;
+ k2 := (n1 + lk)*n2 mod lk;
+ data^ := data^ xor k[k1] xor k[k2];
+
+ //---------------------------------------------------------------------------
+ For i := 1 to size - 1 do
+ Begin
+ k1 := (i+n1)*n2 mod lk;
+ k2 := (i+n2)*n1 mod lk;
+
+ PByte(uint_ptr(data)+i)^ := PByte(uint_ptr(data)+i)^ xor ((PByte(uint_ptr(data)+i-1)^ xor k[k1]) xor k[k2]);
+ end;
+end;
+//==============================================================================
+Procedure Right(key: PArr; data: PByte; size: LongWord);
+Var
+ k : Arr;
+ i, n1, n2 : LongWord;
+ lk, k1, k2 : word;
+Begin
+ lk := Length(key^);
+ SetLength(k, lk);
+ for i := 0 to lk - 1 do k[i] := key^[i];
+ GetNENum(k, n1, n2);
+ //---------------------------------------------------------------------------
+ For i := size - 1 downto 1 do
+ Begin
+ k1 := (i+n1)*n2 mod lk;
+ k2 := (i+n2)*n1 mod lk;
+ PByte(uint_ptr(data) + i)^ := PByte(uint_ptr(data)+i)^ xor ((PByte(uint_ptr(data) + i - 1)^ xor k[k1]) xor k[k2]);
+ end;
+ //---------------------------------------------------------------------------
+ k1 := (n2 + lk)*n1 mod lk;
+ k2 := (n1 + lk)*n2 mod lk;
+ data^ := data^ xor k[k1] xor k[k2];
+end;
+//==============================================================================
+Procedure EncryptData(key: PArr; data: PByte; size: LongWord);
+Begin
+ Left(key, data, size);
+ SimGamm(key, data, size);
+end;
+//==============================================================================
+Procedure DecryptData(key: PArr; data: PByte; size: LongWord);
+Begin
+ SimGamm(key, data, size);
+ Right(key, data, size);
+end;
+//==============================================================================
+end.
+
diff --git a/plugins/Dbx_mmap_SA/Cryptors/Athena/athena.cfg b/plugins/Dbx_mmap_SA/Cryptors/Athena/athena.cfg
new file mode 100644
index 0000000000..273efb4bc2
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Cryptors/Athena/athena.cfg
@@ -0,0 +1,38 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-LE"d:\program files\borland\delphi7\Projects\Bpl"
+-LN"d:\program files\borland\delphi7\Projects\Bpl"
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/plugins/Dbx_mmap_SA/Cryptors/Athena/athena.dof b/plugins/Dbx_mmap_SA/Cryptors/Athena/athena.dof
new file mode 100644
index 0000000000..d43219d29e
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Cryptors/Athena/athena.dof
@@ -0,0 +1,136 @@
+[FileVersion]
+Version=7.0
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=1
+SymbolLibrary=1
+SymbolPlatform=1
+UnitLibrary=1
+UnitPlatform=1
+UnitDeprecated=1
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=
+[Directories]
+OutputDir=
+UnitOutputDir=
+PackageDLLOutputDir=
+PackageDCPOutputDir=
+SearchPath=
+Packages=
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+[Parameters]
+RunParams=
+HostApplication=
+Launcher=
+UseLauncher=0
+DebugCWD=
+[Language]
+ActiveLang=
+ProjectLang=
+RootDir=
+[Version Info]
+IncludeVerInfo=0
+AutoIncBuild=0
+MajorVer=1
+MinorVer=0
+Release=0
+Build=0
+Debug=0
+PreRelease=0
+Special=0
+Private=0
+DLL=0
+Locale=1049
+CodePage=1251
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=
diff --git a/plugins/Dbx_mmap_SA/Cryptors/Athena/athena.dpr b/plugins/Dbx_mmap_SA/Cryptors/Athena/athena.dpr
new file mode 100644
index 0000000000..4824b9b01f
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Cryptors/Athena/athena.dpr
@@ -0,0 +1,112 @@
+library athena;
+
+{
+ Athena: cryptor module for Miranda SecuredMMAP Database driver
+ Copyright 2007-2008 Klyde
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+}
+
+uses
+ UAthena,
+ WIndows;
+
+{$R *.res}
+
+type
+ TGenerateKey = function(key: PAnsiChar): PArr; stdcall;
+ TFreeKey = procedure(key: PArr); stdcall;
+ TEncryptMem = procedure(data: PByte; size: LongWord; key: PArr); stdcall;
+
+ PCryptorInfo = ^TCryptorInfo;
+ TCryptorInfo = record
+ GenerateKey: TGenerateKey;
+ FreeKey: TFreeKey;
+
+ EncryptMem: TEncryptMem;
+ DecryptMem: TEncryptMem;
+
+ Name: PAnsiChar;
+ Info: PAnsiChar;
+ Author: PAnsiChar;
+ Site: PAnsiChar;
+ Email: PAnsiChar;
+
+ version: dword;
+
+ uid: word;
+ end;
+
+var
+ Info: TCryptorInfo;
+
+
+function PLUGIN_MAKE_VERSION(a,b,c,d: Cardinal): integer;
+begin
+ Result := (a shl 24) or (b shl 16) or (c shl 8) or d;
+end;
+
+function GenerateKey(pwd: PAnsiChar): PArr; stdcall;
+var
+ a: PArr;
+begin
+
+ new(a);
+ MakeKey(a, 512, pwd);
+ result := a;
+
+end;
+
+procedure FreeKey(key: PArr); stdcall;
+begin
+ FreeMem(key);
+end;
+
+procedure EncryptMem(data: PByte; size: LongWord; key: PArr); stdcall;
+begin
+ if size <= 0 then exit;
+ EncryptData(key, data, size);
+end;
+
+procedure DecryptMem(data: PByte; size: LongWord; key: PArr); stdcall;
+begin
+ if size <= 0 then exit;
+ DecryptData(key, data, size);
+end;
+
+function GetCryptor: PCryptorInfo; stdcall;
+begin
+ Info.Name := 'Athena';
+ Info.Author := 'Klyde';
+ Info.Site := 'http://cityopen.ru/forum/journal.php?user=151';
+ Info.Email := 'xxxmara@mail.ru';
+ Info.Info := 'Secure alghoritm developed in russian universities';
+
+ Info.version := PLUGIN_MAKE_VERSION(0,0,3,0);
+
+ Info.UID := $FEA8;
+
+ Info.GenerateKey := GenerateKey;
+ Info.FreeKey := FreeKey;
+ Info.EncryptMem := EncryptMem;
+ Info.DecryptMem := DecryptMem;
+
+ result := @Info;
+end;
+
+exports GetCryptor;
+
+begin
+end.
diff --git a/plugins/Dbx_mmap_SA/Cryptors/Athena/athena.rc b/plugins/Dbx_mmap_SA/Cryptors/Athena/athena.rc
new file mode 100644
index 0000000000..bc035ab02a
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Cryptors/Athena/athena.rc
@@ -0,0 +1,28 @@
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 0,0,3,0
+ PRODUCTVERSION 0,0,3,0
+ FILEFLAGSMASK $3F
+ FILEOS 4
+ FILETYPE 2
+ FILESUBTYPE 0
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "000004b0"
+ BEGIN
+ VALUE "CompanyName",""
+ VALUE "Comments", "Secure alghoritm developed in russian universities"0
+ VALUE "FileDescription", "Secure alghoritm developed in russian universities"0
+ VALUE "FileVersion", "0, 0, 3, 0 "0
+ VALUE "InternalName", "Athena"0
+ VALUE "OriginalFilename", "Athena.dll"0
+ VALUE "ProductName", "Athena"0
+ VALUE "ProductVersion", "0, 0, 3, 0 "0
+ VALUE "SpecialBuild", ".04.2010 "0
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation",0,1200
+ END
+END \ No newline at end of file
diff --git a/plugins/Dbx_mmap_SA/Cryptors/Athena/athena.res b/plugins/Dbx_mmap_SA/Cryptors/Athena/athena.res
new file mode 100644
index 0000000000..908733f3de
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Cryptors/Athena/athena.res
Binary files differ
diff --git a/plugins/Dbx_mmap_SA/Cryptors/Athena/make.bat b/plugins/Dbx_mmap_SA/Cryptors/Athena/make.bat
new file mode 100644
index 0000000000..bccf7a792a
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Cryptors/Athena/make.bat
@@ -0,0 +1,13 @@
+@echo off
+..\delphi\brcc32.exe athena.rc -foathena.res
+if /i '%1' == 'fpc' (
+ ..\FPC\bin\fpc.exe athena.dpr %2 %3 %4 %5 %6 %7 %8 %9
+) else if /i '%1' == 'fpc64' (
+ ..\FPC\bin64\ppcrossx64.exe athena.dpr %2 %3 %4 %5 %6 %7 %8 %9
+) else if /i '%1' == 'xe2' (
+ ..\XE2\BIN\dcc32.exe athena.dpr %2 %3 %4 %5 %6 %7 %8 %9
+) else if /i '%1' == 'xe64' (
+ ..\XE2\BIN\dcc64.exe athena.dpr %2 %3 %4 %5 %6 %7 %8 %9
+) else (
+ ..\delphi\dcc32 athena.dpr %1 %2 %3 %4 %5 %6 %7 %8 %9
+) \ No newline at end of file
diff --git a/plugins/Dbx_mmap_SA/Cryptors/Athena/md5_mod256_unit.pas b/plugins/Dbx_mmap_SA/Cryptors/Athena/md5_mod256_unit.pas
new file mode 100644
index 0000000000..53b2d996da
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Cryptors/Athena/md5_mod256_unit.pas
@@ -0,0 +1,64 @@
+unit md5_mod256_unit;
+interface
+
+Uses
+ MD5_Unit, sysutils, classes, windows;
+Const
+ MSize = 256;
+Type
+ tiAr = array [0..255] of integer;
+
+Function MD5_Mod(s: String): String;
+Function MD5_Matrix(s: string): tArr;
+Function str_back(s: String): String;
+
+implementation
+//==============================================================================
+Function str_back(s: String): String;
+Var
+ i: integer;
+Begin
+ result := '';
+ for i := Length(s) downto 1 do result := result + s[i];
+end;
+//==============================================================================
+Function MD5_Mod_back(s: String): String;
+Var
+ s1, s2 : String;
+ k : word;
+Begin
+ s1 := str_back(s)+s;
+ s2 := md5(str_back(s)+str_back(md5(s))+
+ str_back(md5(s+s))+
+ str_back(md5(s+s+s))+
+ str_back(md5(s+s+s+s))+
+ str_back(md5(s+s+s+'asddsa'+s)));
+ For k:=1 to trunc(sqrt(MSize))-1 do
+ Begin
+ s1 := md5(s1 + s2 + md5(s1+s1+s2+s) + md5(s2+s2+s1+s) + s);
+ s2 := str_back(s2 + str_back(md5(s1+s2+md5(s))));
+ End;
+ result:=s2;
+end;
+//==============================================================================
+Function MD5_Mod(s: String): String;
+Var
+ s1, s2 : String;
+ k : word;
+Begin
+ s1 := s + AnsiUpperCase(s) + AnsiLowerCase(s);
+ s2 := md5(s+md5(s)+md5(s+s)+md5(s+AnsiUpperCase(s)+s)+md5(s+AnsiLowerCase(s+s)+s)+md5(s+s+str_back(s+s+'qweewq')));
+ For k:=1 to trunc(sqrt(MSize))-1 do
+ Begin
+ s1 := md5(s1 + str_back(s2) + md5(s1+s1+s2+s) + str_back(md5(s2+s2+s1+s)) + s);
+ s2 := str_back(s2 + md5(s1+AnsiUpperCase(s2+md5(s))));
+ End;
+ result:=s2;
+end;
+//==============================================================================
+
+//==============================================================================
+end.
+
+
+
diff --git a/plugins/Dbx_mmap_SA/Cryptors/Athena/md5_unit.pas b/plugins/Dbx_mmap_SA/Cryptors/Athena/md5_unit.pas
new file mode 100644
index 0000000000..f9a130b729
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Cryptors/Athena/md5_unit.pas
@@ -0,0 +1,212 @@
+unit md5_unit;
+
+interface
+
+uses Windows;
+Type
+ TMD5 = Array [0..15] of byte;
+
+function MD5(const s: AnsiString): AnsiString;
+function MD5_arr(const s: AnsiString): TMD5;
+
+implementation
+//==============================================================================
+const
+ HexDigitChr : array [0..15] of AnsiChar = ('0','1','2','3','4','5','6','7',
+ '8','9','A','B','C','D','E','F');
+
+function Int2Hex(Value:dword;Digits:integer=0):AnsiString;
+var
+ i:cardinal;
+ buf:array [0..31] of AnsiChar;
+begin
+ if Digits<=0 then
+ begin
+ Digits:=0;
+ i:=Value;
+ repeat
+ i:=i shr 4;
+ inc(Digits);
+ until i=0;
+ end;
+
+ buf[Digits]:=#0;
+ repeat
+ Dec(Digits);
+ buf[Digits]:=AnsiChar(HexDigitChr[Value and $F]);
+ Value:=Value shr 4;
+ until Digits=0;
+ result:=buf;
+end;
+//==============================================================================
+function MD5_arr(const s: AnsiString): TMD5;
+var
+ a : TMD5;
+ LenHi, LenLo: longword;
+ Index: DWord;
+ HashBuffer : array[0..63] of byte;
+ CurrentHash : array[0..3] of DWord;
+
+ procedure Burn;
+ begin
+ LenHi:= 0; LenLo:= 0;
+ Index:= 0;
+ FillChar(HashBuffer,Sizeof(HashBuffer),0);
+ FillChar(CurrentHash,Sizeof(CurrentHash),0);
+ end;
+
+ procedure Init;
+ begin
+ Burn;
+ CurrentHash[0]:= $67452301;
+ CurrentHash[1]:= $efcdab89;
+ CurrentHash[2]:= $98badcfe;
+ CurrentHash[3]:= $10325476;
+ end;
+
+ function LRot32(a, b: longword): longword;
+ begin
+ Result:= (a shl b) or (a shr (32-b));
+ end;
+
+ procedure Compress;
+ var
+ Data : array[0..15] of dword;
+ A, B, C, D: dword;
+ begin
+ Move(HashBuffer,Data,Sizeof(Data));
+ A:= CurrentHash[0];
+ B:= CurrentHash[1];
+ C:= CurrentHash[2];
+ D:= CurrentHash[3];
+
+ A:= B + LRot32(A + (D xor (B and (C xor D))) + Data[ 0] + $d76aa478,7);
+ D:= A + LRot32(D + (C xor (A and (B xor C))) + Data[ 1] + $e8c7b756,12);
+ C:= D + LRot32(C + (B xor (D and (A xor B))) + Data[ 2] + $242070db,17);
+ B:= C + LRot32(B + (A xor (C and (D xor A))) + Data[ 3] + $c1bdceee,22);
+ A:= B + LRot32(A + (D xor (B and (C xor D))) + Data[ 4] + $f57c0faf,7);
+ D:= A + LRot32(D + (C xor (A and (B xor C))) + Data[ 5] + $4787c62a,12);
+ C:= D + LRot32(C + (B xor (D and (A xor B))) + Data[ 6] + $a8304613,17);
+ B:= C + LRot32(B + (A xor (C and (D xor A))) + Data[ 7] + $fd469501,22);
+ A:= B + LRot32(A + (D xor (B and (C xor D))) + Data[ 8] + $698098d8,7);
+ D:= A + LRot32(D + (C xor (A and (B xor C))) + Data[ 9] + $8b44f7af,12);
+ C:= D + LRot32(C + (B xor (D and (A xor B))) + Data[10] + $ffff5bb1,17);
+ B:= C + LRot32(B + (A xor (C and (D xor A))) + Data[11] + $895cd7be,22);
+ A:= B + LRot32(A + (D xor (B and (C xor D))) + Data[12] + $6b901122,7);
+ D:= A + LRot32(D + (C xor (A and (B xor C))) + Data[13] + $fd987193,12);
+ C:= D + LRot32(C + (B xor (D and (A xor B))) + Data[14] + $a679438e,17);
+ B:= C + LRot32(B + (A xor (C and (D xor A))) + Data[15] + $49b40821,22);
+
+ A:= B + LRot32(A + (C xor (D and (B xor C))) + Data[ 1] + $f61e2562,5);
+ D:= A + LRot32(D + (B xor (C and (A xor B))) + Data[ 6] + $c040b340,9);
+ C:= D + LRot32(C + (A xor (B and (D xor A))) + Data[11] + $265e5a51,14);
+ B:= C + LRot32(B + (D xor (A and (C xor D))) + Data[ 0] + $e9b6c7aa,20);
+ A:= B + LRot32(A + (C xor (D and (B xor C))) + Data[ 5] + $d62f105d,5);
+ D:= A + LRot32(D + (B xor (C and (A xor B))) + Data[10] + $02441453,9);
+ C:= D + LRot32(C + (A xor (B and (D xor A))) + Data[15] + $d8a1e681,14);
+ B:= C + LRot32(B + (D xor (A and (C xor D))) + Data[ 4] + $e7d3fbc8,20);
+ A:= B + LRot32(A + (C xor (D and (B xor C))) + Data[ 9] + $21e1cde6,5);
+ D:= A + LRot32(D + (B xor (C and (A xor B))) + Data[14] + $c33707d6,9);
+ C:= D + LRot32(C + (A xor (B and (D xor A))) + Data[ 3] + $f4d50d87,14);
+ B:= C + LRot32(B + (D xor (A and (C xor D))) + Data[ 8] + $455a14ed,20);
+ A:= B + LRot32(A + (C xor (D and (B xor C))) + Data[13] + $a9e3e905,5);
+ D:= A + LRot32(D + (B xor (C and (A xor B))) + Data[ 2] + $fcefa3f8,9);
+ C:= D + LRot32(C + (A xor (B and (D xor A))) + Data[ 7] + $676f02d9,14);
+ B:= C + LRot32(B + (D xor (A and (C xor D))) + Data[12] + $8d2a4c8a,20);
+
+ A:= B + LRot32(A + (B xor C xor D) + Data[ 5] + $fffa3942,4);
+ D:= A + LRot32(D + (A xor B xor C) + Data[ 8] + $8771f681,11);
+ C:= D + LRot32(C + (D xor A xor B) + Data[11] + $6d9d6122,16);
+ B:= C + LRot32(B + (C xor D xor A) + Data[14] + $fde5380c,23);
+ A:= B + LRot32(A + (B xor C xor D) + Data[ 1] + $a4beea44,4);
+ D:= A + LRot32(D + (A xor B xor C) + Data[ 4] + $4bdecfa9,11);
+ C:= D + LRot32(C + (D xor A xor B) + Data[ 7] + $f6bb4b60,16);
+ B:= C + LRot32(B + (C xor D xor A) + Data[10] + $bebfbc70,23);
+ A:= B + LRot32(A + (B xor C xor D) + Data[13] + $289b7ec6,4);
+ D:= A + LRot32(D + (A xor B xor C) + Data[ 0] + $eaa127fa,11);
+ C:= D + LRot32(C + (D xor A xor B) + Data[ 3] + $d4ef3085,16);
+ B:= C + LRot32(B + (C xor D xor A) + Data[ 6] + $04881d05,23);
+ A:= B + LRot32(A + (B xor C xor D) + Data[ 9] + $d9d4d039,4);
+ D:= A + LRot32(D + (A xor B xor C) + Data[12] + $e6db99e5,11);
+ C:= D + LRot32(C + (D xor A xor B) + Data[15] + $1fa27cf8,16);
+ B:= C + LRot32(B + (C xor D xor A) + Data[ 2] + $c4ac5665,23);
+
+ A:= B + LRot32(A + (C xor (B or (not D))) + Data[ 0] + $f4292244,6);
+ D:= A + LRot32(D + (B xor (A or (not C))) + Data[ 7] + $432aff97,10);
+ C:= D + LRot32(C + (A xor (D or (not B))) + Data[14] + $ab9423a7,15);
+ B:= C + LRot32(B + (D xor (C or (not A))) + Data[ 5] + $fc93a039,21);
+ A:= B + LRot32(A + (C xor (B or (not D))) + Data[12] + $655b59c3,6);
+ D:= A + LRot32(D + (B xor (A or (not C))) + Data[ 3] + $8f0ccc92,10);
+ C:= D + LRot32(C + (A xor (D or (not B))) + Data[10] + $ffeff47d,15);
+ B:= C + LRot32(B + (D xor (C or (not A))) + Data[ 1] + $85845dd1,21);
+ A:= B + LRot32(A + (C xor (B or (not D))) + Data[ 8] + $6fa87e4f,6);
+ D:= A + LRot32(D + (B xor (A or (not C))) + Data[15] + $fe2ce6e0,10);
+ C:= D + LRot32(C + (A xor (D or (not B))) + Data[ 6] + $a3014314,15);
+ B:= C + LRot32(B + (D xor (C or (not A))) + Data[13] + $4e0811a1,21);
+ A:= B + LRot32(A + (C xor (B or (not D))) + Data[ 4] + $f7537e82,6);
+ D:= A + LRot32(D + (B xor (A or (not C))) + Data[11] + $bd3af235,10);
+ C:= D + LRot32(C + (A xor (D or (not B))) + Data[ 2] + $2ad7d2bb,15);
+ B:= C + LRot32(B + (D xor (C or (not A))) + Data[ 9] + $eb86d391,21);
+
+ Inc(CurrentHash[0],A);
+ Inc(CurrentHash[1],B);
+ Inc(CurrentHash[2],C);
+ Inc(CurrentHash[3],D);
+ Index:= 0;
+ FillChar(HashBuffer,Sizeof(HashBuffer),0);
+ end;
+
+procedure Update(const Buffer; Size: longword);
+var
+ PBuf: ^byte;
+begin
+ Inc(LenHi,Size shr 29);
+ Inc(LenLo,Size*8);
+ if LenLo < (Size*8) then Inc(LenHi);
+ PBuf:= @Buffer;
+ while Size> 0 do
+ begin
+ if (Sizeof(HashBuffer)-Index)<= DWord(Size) then
+ begin
+ Move(PBuf^,HashBuffer[Index],Sizeof(HashBuffer)-Index);
+ Dec(Size,Sizeof(HashBuffer)-Index);
+ Inc(PBuf,Sizeof(HashBuffer)-Index);
+ Compress;
+ end else
+ begin
+ Move(PBuf^,HashBuffer[Index],Size);
+ Inc(Index,Size);
+ Size:= 0;
+ end;
+ end;
+end;
+
+procedure Final(var Digest);
+begin
+ HashBuffer[Index] := $80;
+ if Index >= 56 then Compress;
+ PDWord(@HashBuffer[56])^ := LenLo;
+ PDWord(@HashBuffer[60])^ := LenHi;
+ Compress;
+ Move(CurrentHash, Digest, Sizeof(CurrentHash));
+ Burn;
+end;
+
+begin
+ Init;
+ Update(s[1], Length(s));
+ Final(a);
+ result := a;
+end;
+//==============================================================================
+function MD5(const s: AnsiString): AnsiString;
+var
+ a : TMD5;
+ i : integer;
+begin
+ a := MD5_arr(s);
+ result := '';
+ for i := 0 to 15 do result := result + Int2Hex(a[i], 2);
+end;
+
+end.
diff --git a/plugins/Dbx_mmap_SA/Cryptors/RC4/cryptor.c b/plugins/Dbx_mmap_SA/Cryptors/RC4/cryptor.c
new file mode 100644
index 0000000000..1f5f61705f
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Cryptors/RC4/cryptor.c
@@ -0,0 +1,133 @@
+#include <windows.h>
+
+#define buf_size 1024
+
+typedef struct{
+ void* (__stdcall *GenerateKey)(char* key);
+ void (__stdcall *FreeKey)(void* key);
+ void (__stdcall *EncryptMem)(BYTE* data, int size, void* key);
+ void (__stdcall *DecryptMem)(BYTE* data, int size, void* key);
+
+ char* Name;
+ char* Info;
+ char* Author;
+ char* Site;
+ char* Email;
+
+ DWORD Version;
+
+ WORD uid;
+} Cryptor;
+
+typedef struct rc4_key
+{
+ BYTE state[256];
+ BYTE x;
+ BYTE y;
+} rc4_key;
+
+#define swap_byte(x,y) t = *(x); *(x) = *(y); *(y) = t
+
+void prepare_key(BYTE *key_data_ptr, size_t key_data_len, rc4_key *key)
+{
+ int i = 0;
+ BYTE t = 0;
+ BYTE index1 = 0;
+ BYTE index2 = 0;
+ BYTE* state = 0;
+ unsigned long counter = 0;
+
+ state = &key->state[0];
+ for(counter = 0; counter < 256; counter++)
+ state[counter] = (BYTE)counter;
+ key->x = 0;
+ key->y = 0;
+ index1 = 0;
+ index2 = 0;
+ for(counter = 0; counter < 256; counter++)
+ {
+ index2 = (key_data_ptr[index1] + state[counter] + index2) % 256;
+ swap_byte(&state[counter], &state[index2]);
+ index1 = (index1 + 1) % key_data_len;
+ }
+}
+
+void rc4(BYTE *buffer_ptr, int buffer_len, rc4_key *key)
+{
+ BYTE t = 0;
+ BYTE x = 0;
+ BYTE y = 0;
+ BYTE* state = 0;
+ BYTE xorIndex = 0;
+ DWORD counter = 0;
+ BYTE old_state[256];
+
+ x = key->x;
+ y = key->y;
+ state = &key->state[0];
+ memcpy(old_state, key->state, 256);
+ for(counter = 0; counter < (DWORD)buffer_len; counter++)
+ {
+ x = (x + 1) % 256;
+ y = (state[x] + y) % 256;
+ swap_byte(&state[x], &state[y]);
+ xorIndex = (state[x] + state[y]) % 256;
+ buffer_ptr[counter] ^= state[xorIndex];
+ }
+ memcpy(key->state, old_state, 256);
+ //key->x = x;
+ //key->y = y;
+}
+
+
+void zero_fill(BYTE * pBuf, size_t bufSize)
+{
+ size_t i;
+ for(i = 0; i < bufSize; i++)
+ pBuf[i] = 0;
+}
+
+void* __stdcall GenerateKey(char* pwd)
+{
+ rc4_key* key;
+ key = (rc4_key*)malloc(sizeof(rc4_key));
+ zero_fill((BYTE*)key, sizeof(key));
+ prepare_key(pwd, strlen(pwd), key);
+ return key;
+}
+
+void __stdcall FreeKey(void* key)
+{
+ free(key);
+}
+
+void __stdcall EncryptMem(BYTE* data, int size, void* key)
+{
+ rc4(data, size, key);
+}
+
+void __stdcall DecryptMem(BYTE* data, int size, void* key)
+{
+ rc4(data, size, key);
+}
+
+Cryptor cryptor =
+ {
+ GenerateKey,
+ FreeKey,
+ EncryptMem,
+ DecryptMem,
+ "RC4",
+ "Old, very easy to crack stream cipher",
+ "Unknown",
+ "http://ru.wikipedia.org/wiki/RC4",
+ "nomail",
+ 0x00000100,
+ 0xDEAD
+ };
+
+
+__declspec(dllexport) Cryptor* GetCryptor()
+{
+ return &cryptor;
+} \ No newline at end of file
diff --git a/plugins/Dbx_mmap_SA/Cryptors/RC4/rc4.sln b/plugins/Dbx_mmap_SA/Cryptors/RC4/rc4.sln
new file mode 100644
index 0000000000..2fefb6288d
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Cryptors/RC4/rc4.sln
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rc4", "rc4.vcproj", "{E38B4212-53BC-49A7-B821-9A99DB4774C6}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {E38B4212-53BC-49A7-B821-9A99DB4774C6}.Debug|Win32.ActiveCfg = Debug|Win32
+ {E38B4212-53BC-49A7-B821-9A99DB4774C6}.Debug|Win32.Build.0 = Debug|Win32
+ {E38B4212-53BC-49A7-B821-9A99DB4774C6}.Release|Win32.ActiveCfg = Release|Win32
+ {E38B4212-53BC-49A7-B821-9A99DB4774C6}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/plugins/Dbx_mmap_SA/Cryptors/RC4/rc4.vcproj b/plugins/Dbx_mmap_SA/Cryptors/RC4/rc4.vcproj
new file mode 100644
index 0000000000..c7255890fd
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Cryptors/RC4/rc4.vcproj
@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="windows-1251"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="rc4"
+ ProjectGUID="{E38B4212-53BC-49A7-B821-9A99DB4774C6}"
+ RootNamespace="rc4"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins/cryptors/"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ CharacterSet="1">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;RC4_EXPORTS"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)$(ProjectName).dll"
+ LinkIncremental="2"
+ GenerateDebugInformation="TRUE"
+ SubSystem="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins/cryptors/"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ CharacterSet="2"
+ WholeProgramOptimization="TRUE">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="TRUE"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;RC4_EXPORTS"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="TRUE"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)$(ProjectName).dll"
+ LinkIncremental="1"
+ GenerateDebugInformation="TRUE"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release Unicode|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins/cryptors/"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ CharacterSet="2"
+ WholeProgramOptimization="TRUE">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ EnableIntrinsicFunctions="TRUE"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;RC4_EXPORTS"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="TRUE"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="vc7to6.lib eh7.lib"
+ OutputFile="$(OutDir)$(ProjectName).dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib"
+ IgnoreAllDefaultLibraries="TRUE"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(OutDir)$(ProjectName).pdb"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ <File
+ RelativePath=".\cryptor.c">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/plugins/Dbx_mmap_SA/Cryptors/RC4/rc4_10.sln b/plugins/Dbx_mmap_SA/Cryptors/RC4/rc4_10.sln
new file mode 100644
index 0000000000..abace9bb0c
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Cryptors/RC4/rc4_10.sln
@@ -0,0 +1,31 @@
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rc4", "rc4_10.vcxproj", "{E38B4212-53BC-49A7-B821-9A99DB4774C6}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Release Unicode|Win32 = Release Unicode|Win32
+ Release Unicode|x64 = Release Unicode|x64
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {E38B4212-53BC-49A7-B821-9A99DB4774C6}.Debug|Win32.ActiveCfg = Debug|Win32
+ {E38B4212-53BC-49A7-B821-9A99DB4774C6}.Debug|Win32.Build.0 = Debug|Win32
+ {E38B4212-53BC-49A7-B821-9A99DB4774C6}.Debug|x64.ActiveCfg = Debug|x64
+ {E38B4212-53BC-49A7-B821-9A99DB4774C6}.Debug|x64.Build.0 = Debug|x64
+ {E38B4212-53BC-49A7-B821-9A99DB4774C6}.Release Unicode|Win32.ActiveCfg = Release Unicode|Win32
+ {E38B4212-53BC-49A7-B821-9A99DB4774C6}.Release Unicode|Win32.Build.0 = Release Unicode|Win32
+ {E38B4212-53BC-49A7-B821-9A99DB4774C6}.Release Unicode|x64.ActiveCfg = Release Unicode|x64
+ {E38B4212-53BC-49A7-B821-9A99DB4774C6}.Release Unicode|x64.Build.0 = Release Unicode|x64
+ {E38B4212-53BC-49A7-B821-9A99DB4774C6}.Release|Win32.ActiveCfg = Release|Win32
+ {E38B4212-53BC-49A7-B821-9A99DB4774C6}.Release|Win32.Build.0 = Release|Win32
+ {E38B4212-53BC-49A7-B821-9A99DB4774C6}.Release|x64.ActiveCfg = Release|x64
+ {E38B4212-53BC-49A7-B821-9A99DB4774C6}.Release|x64.Build.0 = Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/plugins/Dbx_mmap_SA/Cryptors/RC4/rc4_10.vcxproj b/plugins/Dbx_mmap_SA/Cryptors/RC4/rc4_10.vcxproj
new file mode 100644
index 0000000000..278470a7fa
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Cryptors/RC4/rc4_10.vcxproj
@@ -0,0 +1,265 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release Unicode|Win32">
+ <Configuration>Release Unicode</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release Unicode|x64">
+ <Configuration>Release Unicode</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{E38B4212-53BC-49A7-B821-9A99DB4774C6}</ProjectGuid>
+ <RootNamespace>rc4</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ <ProjectName>rc4</ProjectName>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)/Plugins/cryptors\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64/Plugins/cryptors\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)/Plugins/cryptors\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64/Plugins/cryptors\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">$(SolutionDir)$(Configuration)/Plugins/cryptors\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">$(SolutionDir)$(Configuration)64/Plugins/cryptors\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">$(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;RC4_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ <AdditionalDependencies>
+ </AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;RC4_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <AdditionalDependencies>
+ </AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;RC4_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ <AdditionalDependencies>
+ </AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;RC4_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <AdditionalDependencies>
+ </AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;RC4_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>
+ </AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
+ <AdditionalLibraryDirectories>../../../../lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;RC4_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>
+ </AdditionalDependencies>
+ <OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
+ <AdditionalLibraryDirectories>../../../../lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="cryptor.c" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/plugins/Dbx_mmap_SA/Cryptors/RC4/rc4_10.vcxproj.filters b/plugins/Dbx_mmap_SA/Cryptors/RC4/rc4_10.vcxproj.filters
new file mode 100644
index 0000000000..43730c5940
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Cryptors/RC4/rc4_10.vcxproj.filters
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="cryptor.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/plugins/Dbx_mmap_SA/Db_autobackups/backup.c b/plugins/Dbx_mmap_SA/Db_autobackups/backup.c
new file mode 100644
index 0000000000..377a1fe539
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Db_autobackups/backup.c
@@ -0,0 +1,230 @@
+#include "headers.h"
+#include <commctrl.h>
+
+TCHAR dbname[MAX_PATH];
+
+static UINT_PTR timer_id;
+
+INT_PTR CALLBACK DlgProcProgress(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ switch(msg) {
+ case WM_INITDIALOG:
+ {
+ HWND prog = GetDlgItem(hwndDlg, IDC_PROGRESS);
+ TranslateDialogDefault( hwndDlg );
+ SendMessage(prog, PBM_SETPOS, 0, 0);
+ }
+ break;
+ case WM_COMMAND:
+ if ( HIWORD( wParam ) == BN_CLICKED && LOWORD( wParam ) == IDCANCEL ) {
+ // in the progress dialog, use the user data to indicate that the user has pressed cancel
+ SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)1);
+ return TRUE;
+ }
+ break;
+ }
+ return FALSE;
+}
+
+INT_PTR DBSaveAs(WPARAM wParam, LPARAM lParam)
+{
+ HWND progress_dialog = 0;
+ TCHAR fname_buff[MAX_PATH], szFilter[128];
+ int i;
+ OPENFILENAME ofn = {0};
+ CallService(MS_DB_GETPROFILENAMET,MAX_PATH,(LPARAM)fname_buff);
+
+ i = mir_sntprintf(szFilter, 64, _T("%s (*.dat)"), TranslateT("Miranda Databases")) + 1;
+ _tcscpy(szFilter + i, _T("*.dat"));
+ i += 6;
+ i += mir_sntprintf(szFilter + i, 48, _T("%s (*.*)"), TranslateT("All Files")) + 1;
+ _tcscpy(szFilter + i, _T("*"));
+ szFilter[i + 2] = 0;
+
+ ofn.lStructSize = sizeof(ofn);
+ ofn.lpstrFile = fname_buff;
+ ofn.nMaxFile = MAX_PATH;
+ ofn.Flags = OFN_NOREADONLYRETURN | OFN_OVERWRITEPROMPT;
+ ofn.lpstrFilter = szFilter;
+ ofn.nFilterIndex = 1;
+ ofn.lpstrDefExt = _T("dat");
+
+ if (GetSaveFileName(&ofn))
+ Backup(fname_buff);
+
+ return 0;
+}
+
+struct FileNameFound_Tag
+{
+ TCHAR Name[MAX_PATH];
+ FILETIME CreationTime;
+}FileNameFound;
+
+int RotateBackups(HWND progress_dialog, DWORD start_time)
+{
+ TCHAR backupfilename1[MAX_PATH] = {0}, backupfilename2[MAX_PATH] = {0}, backupfolderTmp[MAX_PATH] = {0};
+ TCHAR* backupfolder;
+ unsigned int i = 0;
+ HWND prog = GetDlgItem(progress_dialog, IDC_PROGRESS);
+ MSG msg;
+
+ WIN32_FIND_DATA FindFileData;
+ HANDLE hFind;
+
+ backupfolder = Utils_ReplaceVarsT(options.folder);
+
+ mir_sntprintf(backupfolderTmp, SIZEOF(backupfolderTmp), _T("%s\\*"), backupfolder);
+ hFind = FindFirstFile(backupfolderTmp, &FindFileData);
+ if (hFind == INVALID_HANDLE_VALUE)
+ return 0;
+ _tcscpy(FileNameFound.Name, _T(""));
+ while (FindNextFile(hFind, &FindFileData))
+ {
+ if (FindFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
+ continue;
+ else if (_tcsicmp(&FindFileData.cFileName[_tcslen(FindFileData.cFileName)-4], _T(".bak")) == 0)
+ {
+ if (_tcsicmp(FileNameFound.Name, _T("")) == 0)
+ {
+ _tcscpy(FileNameFound.Name, FindFileData.cFileName);
+ FileNameFound.CreationTime = FindFileData.ftCreationTime;
+ }
+ else if ((FindFileData.ftCreationTime.dwHighDateTime < FileNameFound.CreationTime.dwHighDateTime) || (FindFileData.ftCreationTime.dwHighDateTime == FileNameFound.CreationTime.dwHighDateTime && FindFileData.ftCreationTime.dwLowDateTime < FileNameFound.CreationTime.dwLowDateTime))
+ {
+ _tcscpy(FileNameFound.Name, FindFileData.cFileName);
+ FileNameFound.CreationTime = FindFileData.ftCreationTime;
+ }
+ i++;
+ while(PeekMessage(&msg, progress_dialog, 0, 0, PM_REMOVE) != 0)
+ {
+ if(!IsDialogMessage(progress_dialog, &msg))
+ {
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+ }
+ }
+
+ SendMessage(prog, PBM_SETPOS, (WPARAM)(int)(100 * (options.num_backups - i) / options.num_backups), 0);
+ UpdateWindow(progress_dialog);
+ }
+ }
+
+ FindClose(hFind);
+ if (i >= options.num_backups)
+ {
+ mir_sntprintf(backupfilename1, MAX_PATH, _T("%s\\%s"), backupfolder, FileNameFound.Name);
+ DeleteFile(backupfilename1);
+ }
+ mir_free(backupfolder);
+ return 0;
+}
+
+int Backup(TCHAR* backup_filename)
+{
+ TCHAR source_file[MAX_PATH] = {0}, dest_file[MAX_PATH] = {0};
+ TCHAR* backupfolder,* pathtmp,* puText;
+ HWND progress_dialog;
+ DWORD start_time = GetTickCount();
+ int i;
+ size_t dest_file_len;
+
+ CallService(MS_DB_GETPROFILENAMET, MAX_PATH, (LPARAM)dbname);
+
+ if (backup_filename == NULL)
+ {
+ int err = 0;
+
+ SYSTEMTIME st;
+ TCHAR buffer[MAX_COMPUTERNAME_LENGTH+1];
+ DWORD size = sizeof(buffer);
+
+ backupfolder = Utils_ReplaceVarsT(options.folder);
+ // ensure the backup folder exists (either create it or return non-zero signifying error)
+ err = CreateDirectoryTree(backupfolder);
+ if(err != ERROR_ALREADY_EXISTS && err != 0) {
+ return 1;
+ }
+
+ GetLocalTime(&st);
+ GetComputerName(buffer, &size);
+ mir_sntprintf(dest_file, MAX_PATH, _T("%s\\%s_%02d.%02d.%02d@%02d-%02d-%02d_%s.bak"), backupfolder, dbname, st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute, st.wSecond, buffer);
+ mir_free(backupfolder);
+ }
+ else
+ lstrcpyn(dest_file, backup_filename, MAX_PATH);
+
+ if(!options.disable_popups)
+ ShowPopup(dbname, TranslateT("Backup in Progress"));
+
+ if(!options.disable_progress) {
+ progress_dialog = CreateDialog(hInst, MAKEINTRESOURCE(IDD_COPYPROGRESS), 0, (DLGPROC)DlgProcProgress);
+ SetDlgItemText(progress_dialog, IDC_PROGRESSMESSAGE, TranslateT("Rotating backup files..."));
+ }
+
+ RotateBackups(progress_dialog, start_time);
+
+ SetDlgItemText(progress_dialog, 0xDAED, TranslateT("Copying database file..."));
+ SendMessage(progress_dialog, PBM_SETPOS, (WPARAM)(int)(0), 0);
+ UpdateWindow(progress_dialog);
+
+ mir_sntprintf(source_file, MAX_PATH, _T("%s\\%s"), profilePath, dbname);
+ pathtmp = Utils_ReplaceVarsT(source_file);
+ if (CopyFile(pathtmp, dest_file, 0))
+ {
+ SendMessage(progress_dialog, PBM_SETPOS, (WPARAM)(int)(100), 0);
+ UpdateWindow(progress_dialog);
+ DBWriteContactSettingDword(0, "AutoBackups", "LastBackupTimestamp", (DWORD)time(0));
+ if(!options.disable_popups)
+ {
+ dest_file_len = lstrlen(dest_file);
+ if(dest_file_len > 50)
+ {
+ puText = mir_alloc(sizeof(TCHAR) * (dest_file_len + 2));
+ for(i = (int)dest_file_len - 1; dest_file[i] != _T('\\'); i--);
+
+ lstrcpyn(puText, dest_file, i + 2);
+ lstrcat(puText, _T("\n"));
+ lstrcat(puText, dest_file + i + 1);
+ }
+ else
+ puText = mir_tstrdup(dest_file);
+
+ ShowPopup(puText, TranslateT("Database backuped"));
+ mir_free(puText);
+ }
+ }
+ else
+ DeleteFile(dest_file);
+ mir_free(pathtmp);
+
+ DestroyWindow(progress_dialog);
+ return 0;
+}
+
+VOID CALLBACK TimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) {
+ time_t t = time(0), diff = t - (time_t)DBGetContactSettingDword(0, "AutoBackups", "LastBackupTimestamp", (DWORD)t);
+ if(diff > (time_t)(options.period * (options.period_type == PT_MINUTES ? 60 : (options.period_type == PT_HOURS ? 60 * 60 : 60 * 60 * 24 ) )))
+ Backup(NULL);
+}
+
+int SetBackupTimer(void)
+{
+ if(options.backup_types & BT_PERIODIC)
+ {
+ if(timer_id == 0)
+ timer_id = SetTimer(0, 0, 1000 * 60, TimerProc);
+ }
+ else if(timer_id != 0)
+ {
+ KillTimer(0, timer_id);
+ timer_id = 0;
+ }
+ return 0;
+}
+
+INT_PTR ABService(WPARAM wParam, LPARAM lParam)
+{
+ Backup((TCHAR*)wParam);
+ return 0;
+}
diff --git a/plugins/Dbx_mmap_SA/Db_autobackups/db_autobackups.rc b/plugins/Dbx_mmap_SA/Db_autobackups/db_autobackups.rc
new file mode 100644
index 0000000000..714f4a3505
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Db_autobackups/db_autobackups.rc
@@ -0,0 +1,182 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include <winres.h>
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// Russian resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
+#ifdef _WIN32
+LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
+#pragma code_page(1251)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_COPYPROGRESS DIALOGEX 0, 0, 186, 58
+STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER |
+ WS_POPUP | WS_VISIBLE | WS_CAPTION
+CAPTION "Backup progress"
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+ CONTROL "",IDC_PROGRESS,"msctls_progress32",WS_BORDER,7,24,172,9
+ CTEXT "",IDC_PROGRESSMESSAGE,31,7,114,13
+ PUSHBUTTON "Cancel",IDCANCEL,58,39,67,12
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO
+BEGIN
+ IDD_COPYPROGRESS, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 179
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 51
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_ICON1 ICON "icos\\backup.ico"
+#endif // Russian resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_OPTIONS DIALOGEX 0, 0, 271, 193
+STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+ GROUPBOX "Automatic Backups",IDC_STATIC,6,7,258,179,WS_GROUP
+ RTEXT "Number of backups to keep:",IDC_STATIC,13,94,132,8
+ EDITTEXT IDC_ED_NUMBACKUPS,164,90,30,12,ES_NUMBER,WS_EX_RIGHT
+ CONTROL "",SPIN_NUMBACKUPS,"msctls_updown32",UDS_SETBUDDYINT |
+ UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,182,90,10,
+ 12
+ PUSHBUTTON "Backup NOW",IDC_BUT_NOW,173,19,75,14
+ CONTROL "Disabled",IDC_RAD_DISABLED,"Button",BS_AUTOCHECKBOX |
+ WS_TABSTOP,17,19,128,10
+ CONTROL "When Miranda starts",IDC_RAD_START,"Button",
+ BS_AUTOCHECKBOX | WS_TABSTOP,17,35,156,10
+ CONTROL "When Miranda exits",IDC_RAD_EXIT,"Button",
+ BS_AUTOCHECKBOX | WS_TABSTOP,17,51,156,10
+ CONTROL "Every:",IDC_RAD_PERIODIC,"Button",BS_AUTOCHECKBOX |
+ WS_TABSTOP,17,67,43,10
+ COMBOBOX IDC_PT,148,67,46,30,CBS_DROPDOWNLIST | WS_TABSTOP
+ EDITTEXT IDC_ED_PERIOD,106,67,30,12,ES_NUMBER,WS_EX_RIGHT
+ CONTROL "",SPIN_PERIOD,"msctls_updown32",UDS_SETBUDDYINT |
+ UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,126,67,10,
+ 12
+ LTEXT "Backup to folder:",IDC_STATIC,18,120,124,11
+ EDITTEXT IDC_ED_FOLDER,26,133,168,13,ES_AUTOHSCROLL
+ PUSHBUTTON "Browse...",IDC_BUT_BROWSE,199,132,49,14
+ CONTROL "Go to the ""Customize -> Folders"" to change settings",
+ IDC_LNK_FOLDERS,"Hyperlink",NOT WS_VISIBLE | WS_TABSTOP,
+ 18,129,231,21
+ CONTROL "Disable progress bar",IDC_CHK_NOPROG,"Button",
+ BS_AUTOCHECKBOX | WS_TABSTOP,17,152,182,11
+ CONTROL "Disable Popups",IDC_CHK_NOPOPUP,"Button",
+ BS_AUTOCHECKBOX | WS_TABSTOP,17,168,182,11
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO
+BEGIN
+ IDD_OPTIONS, DIALOG
+ BEGIN
+ LEFTMARGIN, 6
+ RIGHTMARGIN, 264
+ VERTGUIDE, 17
+ VERTGUIDE, 193
+ VERTGUIDE, 248
+ TOPMARGIN, 38
+ BOTTOMMARGIN, 186
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include <winres.h>\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/plugins/Dbx_mmap_SA/Db_autobackups/db_autobackups.vcproj b/plugins/Dbx_mmap_SA/Db_autobackups/db_autobackups.vcproj
new file mode 100644
index 0000000000..87763d1019
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Db_autobackups/db_autobackups.vcproj
@@ -0,0 +1,267 @@
+<?xml version="1.0" encoding="windows-1251"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="db_autobackups"
+ ProjectGUID="{751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}"
+ RootNamespace="db_autobackups"
+ Keyword="Win32Proj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)\Plugins\"
+ IntermediateDirectory="$(ConfigurationName)\Obj\"
+ ConfigurationType="2"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DB_AUTOBACKUPS_EXPORTS"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)/$(ProjectName).dll"
+ LinkIncremental="2"
+ GenerateDebugInformation="TRUE"
+ SubSystem="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)\Plugins\"
+ IntermediateDirectory="$(ConfigurationName)\Obj\"
+ ConfigurationType="2"
+ CharacterSet="2"
+ WholeProgramOptimization="TRUE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DB_AUTOBACKUPS_EXPORTS"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="0"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="1"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="vc7to6.lib"
+ OutputFile="$(OutDir)/$(ProjectName).dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../lib"
+ IgnoreAllDefaultLibraries="TRUE"
+ GenerateDebugInformation="TRUE"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Debug Unicode|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)\Plugins\"
+ IntermediateDirectory="$(ConfigurationName)\Obj\"
+ ConfigurationType="2"
+ CharacterSet="1">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DB_AUTOBACKUPS_EXPORTS"
+ MinimalRebuild="TRUE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="4"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)/$(ProjectName).dll"
+ LinkIncremental="2"
+ GenerateDebugInformation="TRUE"
+ SubSystem="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release Unicode|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)\Plugins\"
+ IntermediateDirectory="$(ConfigurationName)\Obj\"
+ ConfigurationType="2"
+ CharacterSet="1"
+ WholeProgramOptimization="TRUE">
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DB_AUTOBACKUPS_EXPORTS"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="0"
+ Detect64BitPortabilityProblems="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="1"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="vc7to6.lib"
+ OutputFile="$(OutDir)/$(ProjectName).dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../lib"
+ IgnoreAllDefaultLibraries="TRUE"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ <File
+ RelativePath=".\backup.c">
+ </File>
+ <File
+ RelativePath=".\main.c">
+ </File>
+ <File
+ RelativePath=".\options.c">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ <File
+ RelativePath=".\headers.h">
+ </File>
+ <File
+ RelativePath=".\options.h">
+ </File>
+ <File
+ RelativePath=".\resource.h">
+ </File>
+ <File
+ RelativePath=".\version.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+ <File
+ RelativePath=".\icos\backup.ico">
+ </File>
+ <File
+ RelativePath=".\db_autobackups.rc">
+ </File>
+ <File
+ RelativePath=".\version.rc">
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/plugins/Dbx_mmap_SA/Db_autobackups/db_autobackups_10.vcxproj b/plugins/Dbx_mmap_SA/Db_autobackups/db_autobackups_10.vcxproj
new file mode 100644
index 0000000000..477a587439
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Db_autobackups/db_autobackups_10.vcxproj
@@ -0,0 +1,352 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug Unicode|Win32">
+ <Configuration>Debug Unicode</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug Unicode|x64">
+ <Configuration>Debug Unicode</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release Unicode|Win32">
+ <Configuration>Release Unicode</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release Unicode|x64">
+ <Configuration>Release Unicode</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectName>db_autobackups</ProjectName>
+ <ProjectGuid>{751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}</ProjectGuid>
+ <RootNamespace>db_autobackups</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64/Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\Plugins\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64/Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">$(SolutionDir)$(Configuration)\Plugins\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">$(SolutionDir)$(Configuration)64/Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">$(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">true</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">$(SolutionDir)$(Configuration)\Plugins\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">$(SolutionDir)$(Configuration)64/Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">$(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">false</LinkIncremental>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;DB_AUTOBACKUPS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;DB_AUTOBACKUPS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>../../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;DB_AUTOBACKUPS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <Optimization>Full</Optimization>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>../../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;DB_AUTOBACKUPS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;DB_AUTOBACKUPS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;DB_AUTOBACKUPS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>../../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;DB_AUTOBACKUPS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <Optimization>Full</Optimization>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <TargetMachine>MachineX86</TargetMachine>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>../../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;DB_AUTOBACKUPS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="backup.c" />
+ <ClCompile Include="options.c" />
+ <ClCompile Include="main.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="headers.h" />
+ <ClInclude Include="options.h" />
+ <ClInclude Include="resource.h" />
+ <ClInclude Include="version.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="icos\backup.ico" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="db_autobackups.rc" />
+ <ResourceCompile Include="version.rc">
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">_WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">_WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/plugins/Dbx_mmap_SA/Db_autobackups/db_autobackups_10.vcxproj.filters b/plugins/Dbx_mmap_SA/Db_autobackups/db_autobackups_10.vcxproj.filters
new file mode 100644
index 0000000000..964916d73a
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Db_autobackups/db_autobackups_10.vcxproj.filters
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="backup.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="options.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="main.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="headers.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="options.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="resource.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="version.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="icos\backup.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="db_autobackups.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ <ResourceCompile Include="version.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/plugins/Dbx_mmap_SA/Db_autobackups/db_autobackups_8.vcproj b/plugins/Dbx_mmap_SA/Db_autobackups/db_autobackups_8.vcproj
new file mode 100644
index 0000000000..e465a25605
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Db_autobackups/db_autobackups_8.vcproj
@@ -0,0 +1,389 @@
+<?xml version="1.0" encoding="windows-1251"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="db_autobackups"
+ ProjectGUID="{751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}"
+ RootNamespace="db_autobackups"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DB_AUTOBACKUPS_EXPORTS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)/Release Unicode/Plugins"
+ IntermediateDirectory="$(SolutionDir)/Release Unicode/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DB_AUTOBACKUPS_EXPORTS"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="0"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug Unicode|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DB_AUTOBACKUPS_EXPORTS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release Unicode|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DB_AUTOBACKUPS_EXPORTS"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="0"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\backup.c"
+ >
+ </File>
+ <File
+ RelativePath=".\options.c"
+ >
+ </File>
+ <File
+ RelativePath=".\main.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\headers.h"
+ >
+ </File>
+ <File
+ RelativePath=".\options.h"
+ >
+ </File>
+ <File
+ RelativePath=".\resource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\version.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ <File
+ RelativePath=".\icos\backup.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\db_autobackups.rc"
+ >
+ </File>
+ <File
+ RelativePath=".\version.rc"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/plugins/Dbx_mmap_SA/Db_autobackups/db_autobackups_9.vcproj b/plugins/Dbx_mmap_SA/Db_autobackups/db_autobackups_9.vcproj
new file mode 100644
index 0000000000..01e3ac2f8e
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Db_autobackups/db_autobackups_9.vcproj
@@ -0,0 +1,703 @@
+<?xml version="1.0" encoding="windows-1251"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="db_autobackups"
+ ProjectGUID="{751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}"
+ RootNamespace="db_autobackups"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)\Plugins"
+ IntermediateDirectory="$(ConfigurationName)\Obj"
+ ConfigurationType="2"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DB_AUTOBACKUPS_EXPORTS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName) $(PlatformName)\Plugins"
+ IntermediateDirectory="$(ConfigurationName) $(PlatformName)\Obj"
+ ConfigurationType="2"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DB_AUTOBACKUPS_EXPORTS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)\Plugins"
+ IntermediateDirectory="$(ConfigurationName)\Obj"
+ ConfigurationType="2"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DB_AUTOBACKUPS_EXPORTS"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="0"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName) $(PlatformName)\Plugins"
+ IntermediateDirectory="$(ConfigurationName) $(PlatformName)\Obj"
+ ConfigurationType="2"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DB_AUTOBACKUPS_EXPORTS"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="0"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug Unicode|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)\Plugins"
+ IntermediateDirectory="$(ConfigurationName)\Obj"
+ ConfigurationType="2"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DB_AUTOBACKUPS_EXPORTS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug Unicode|x64"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName) $(PlatformName)\Plugins"
+ IntermediateDirectory="$(ConfigurationName) $(PlatformName)\Obj"
+ ConfigurationType="2"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DB_AUTOBACKUPS_EXPORTS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release Unicode|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)\Plugins"
+ IntermediateDirectory="$(ConfigurationName)\Obj"
+ ConfigurationType="2"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DB_AUTOBACKUPS_EXPORTS"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="0"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release Unicode|x64"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName) $(PlatformName)\Plugins"
+ IntermediateDirectory="$(ConfigurationName) $(PlatformName)\Obj"
+ ConfigurationType="2"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DB_AUTOBACKUPS_EXPORTS"
+ RuntimeLibrary="0"
+ UsePrecompiledHeader="0"
+ WarningLevel="0"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\backup.c"
+ >
+ </File>
+ <File
+ RelativePath=".\main.c"
+ >
+ </File>
+ <File
+ RelativePath=".\options.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\headers.h"
+ >
+ </File>
+ <File
+ RelativePath=".\options.h"
+ >
+ </File>
+ <File
+ RelativePath=".\resource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\version.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ <File
+ RelativePath=".\icos\backup.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\db_autobackups.rc"
+ >
+ </File>
+ <File
+ RelativePath=".\version.rc"
+ >
+ <FileConfiguration
+ Name="Debug Unicode|x64"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_WIN64"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|x64"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_WIN64"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/plugins/Dbx_mmap_SA/Db_autobackups/headers.h b/plugins/Dbx_mmap_SA/Db_autobackups/headers.h
new file mode 100644
index 0000000000..5b79b896fd
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Db_autobackups/headers.h
@@ -0,0 +1,53 @@
+#ifndef _HEADERS_H
+#define _HEADERS_H
+
+#define _CRT_SECURE_NO_DEPRECATE
+#define MIRANDA_VER 0x0900
+#define MIRANDA_CUSTOM_LP
+
+#include <m_stdhdr.h>
+#include <windows.h>
+#include <newpluginapi.h>
+#include <win2k.h>
+#include <time.h>
+#include <commctrl.h>
+#include <m_clist.h>
+#include <m_plugins.h>
+#include <m_system.h>
+#include <m_database.h>
+#include <m_langpack.h>
+#include <m_utils.h>
+#include <m_options.h>
+#include <m_popup.h>
+#include <m_icolib.h>
+#include "m_folders.h"
+
+#include "options.h"
+#include "resource.h"
+
+#define MS_AB_BACKUP "AB/Backup"
+#define MS_AB_BACKUPTRGR "AB/Backuptrg"
+#define MS_AB_SAVEAS "AB/SaveAs"
+
+#ifdef _UNICODE
+ #define SUB_DIR L"\\AutoBackups"
+ #define DIR L"%miranda_userdata%"
+#else
+ #define SUB_DIR "\\AutoBackups"
+ #define DIR "%miranda_userdata%"
+#endif
+
+void ShowPopup(TCHAR* text, TCHAR* header);
+INT_PTR DBSaveAs(WPARAM wParam, LPARAM lParam);
+INT_PTR ABService(WPARAM wParam, LPARAM lParam);
+int CreateDirectoryTree(TCHAR *szDir);
+int Backup(TCHAR* backup_filename);
+int SetBackupTimer(void);
+int OptionsInit(WPARAM wParam, LPARAM lParam);
+int LoadOptions(void);
+HWND CreateToolTip(HWND hwndParent, LPTSTR ptszText, LPTSTR ptszTitle);
+
+extern HINSTANCE hInst;
+TCHAR* profilePath;
+
+#endif
diff --git a/plugins/Dbx_mmap_SA/Db_autobackups/icos/backup.ico b/plugins/Dbx_mmap_SA/Db_autobackups/icos/backup.ico
new file mode 100644
index 0000000000..2bd78218d8
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Db_autobackups/icos/backup.ico
Binary files differ
diff --git a/plugins/Dbx_mmap_SA/Db_autobackups/main.c b/plugins/Dbx_mmap_SA/Db_autobackups/main.c
new file mode 100644
index 0000000000..7390bd9dc7
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Db_autobackups/main.c
@@ -0,0 +1,262 @@
+#include "headers.h"
+#include "version.h"
+#include "m_trigger.h"
+
+struct MM_INTERFACE mmi;
+HINSTANCE hInst;
+PLUGINLINK *pluginLink;
+int hLangpack;
+
+HANDLE hFolder;
+HANDLE hHooks[4];
+HANDLE hServices[3];
+
+PLUGININFOEX pluginInfo={
+ sizeof(PLUGININFOEX),
+ __PLUGIN_NAME,
+ __VERSION_DWORD,
+ __PLUGIN_DESC,
+ "chaos.persei, sje, Kildor, Billy_Bons",
+ "chaos.persei@gmail.com",
+ __COPYRIGHTS,
+ "http://mods.mirandaim.ru/",
+ UNICODE_AWARE,
+ 0, //doesn't replace anything built-in
+ // Generate your own unique id for your plugin.
+ // Do not use this UUID!
+ // Use uuidgen.exe to generate the uuuid
+ // {81C220A6-0226-4ad6-BFCA-217B17A16053}
+ { 0x81c220a6, 0x226, 0x4ad6, { 0xbf, 0xca, 0x21, 0x7b, 0x17, 0xa1, 0x60, 0x53 } }
+};
+
+#define MIID_DB_AUTOBACKUPS { 0x81c220a6, 0x226, 0x4ad6, { 0xbf, 0xca, 0x21, 0x7b, 0x17, 0xa1, 0x60, 0x53 } }
+
+struct
+{
+ TCHAR* szDescr;
+ char* szName;
+ int defIconID;
+}
+static const iconList[] = {
+ { _T("Backup Profile"), "backup", IDI_ICON1 },
+ { _T("Save Profile As..."), "saveas", IDI_ICON1 }
+};
+
+INT_PTR BackupServiceTrgr(WPARAM wParam, LPARAM lParam)
+{
+ if(wParam & ACT_PERFORM) {
+ return Backup(NULL);
+ }
+ return 0;
+}
+
+static int FoldersGetBackupPath(WPARAM wParam, LPARAM lParam)
+{
+ FoldersGetCustomPathT(hFolder, options.folder, MAX_PATH, DIR SUB_DIR);
+ return 0;
+}
+
+static int FoldersInit(void)
+{
+ hFolder = (HANDLE) FoldersRegisterCustomPathT("Database Backups", "Backup Folder", DIR SUB_DIR);
+ hHooks[0] = HookEvent(ME_FOLDERS_PATH_CHANGED, FoldersGetBackupPath);
+ FoldersGetBackupPath(0, 0);
+ return 0;
+}
+
+static void IcoLibInit(void)
+{
+ int i;
+ SKINICONDESC sid = {0};
+ TCHAR tszFile[MAX_PATH];
+ GetModuleFileName(hInst, tszFile, MAX_PATH);
+
+ sid.cbSize = sizeof(SKINICONDESC);
+ sid.ptszDefaultFile = tszFile;
+ sid.ptszSection = _T("Database/Database Backups");
+ sid.flags = SIDF_ALL_TCHAR;
+
+ for ( i = 0; i < SIZEOF(iconList); i++ ) {
+ sid.pszName = iconList[i].szName;
+ sid.ptszDescription = iconList[i].szDescr;
+ sid.iDefaultIndex = -iconList[i].defIconID;
+ CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
+ }
+}
+
+static void MenuInit(void)
+{
+ CLISTMENUITEM menu = {0};
+ menu.cbSize = sizeof(menu);
+ menu.flags = CMIF_TCHAR;
+ menu.hIcon=(HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"backup");
+ menu.ptszPopupName = LPGENT("Database");
+
+ menu.ptszName = LPGENT("Backup Profile");
+ menu.pszService = MS_AB_BACKUP;
+ menu.position = 500100000;
+ CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&menu);
+
+ menu.hIcon=(HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"saveas");
+ menu.ptszName = LPGENT("Save Profile As...");
+ menu.pszService = MS_AB_SAVEAS;
+ menu.position = 500100001;
+ CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&menu);
+}
+
+static void TriggerActionInit(void)
+{
+ ACTIONREGISTER ar = {0};
+ ar.cbSize = sizeof(ACTIONREGISTER);
+ ar.pszName = "Backup Database";
+ ar.pszService = MS_AB_BACKUPTRGR;
+
+ CallService(MS_TRIGGER_REGISTERACTION, 0, (LPARAM)&ar);
+}
+
+static int ModulesLoad(WPARAM wParam, LPARAM lParam)
+{
+ profilePath = Utils_ReplaceVarsT(_T("%miranda_userdata%"));
+
+ IcoLibInit();
+ if(ServiceExists(MS_FOLDERS_REGISTER_PATH))
+ FoldersInit();
+ LoadOptions();
+ MenuInit();
+
+ // register trigger action for triggerplugin
+ if(ServiceExists(MS_TRIGGER_REGISTERACTION))
+ TriggerActionInit();
+
+ hHooks[1] = HookEvent(ME_OPT_INITIALISE, OptionsInit);
+ if(options.backup_types & BT_START)
+ Backup(NULL);
+ return 0;
+}
+
+// can't do this on unload, since other plugins will be have already been unloaded, but their hooks
+// for setting changed event not cleared. the backup on exit function will write to the db, calling those hooks.
+int PreShutdown(WPARAM wParam, LPARAM lParam) {
+ if(options.backup_types & BT_EXIT)
+ {
+ options.disable_popups = 1; // Don't try to show popups on exit
+ Backup(NULL);
+ }
+ return 0;
+}
+
+void SysInit()
+{
+ mir_getMMI( &mmi );
+ mir_getLP( &pluginInfo );
+ OleInitialize(0);
+
+ hServices[0] = CreateServiceFunction(MS_AB_BACKUP, ABService);
+ hServices[1] = CreateServiceFunction(MS_AB_BACKUPTRGR, BackupServiceTrgr);
+ hServices[2] = CreateServiceFunction(MS_AB_SAVEAS, DBSaveAs);
+
+ hHooks[2] = HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdown);
+ hHooks[3] = HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoad);
+}
+
+BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
+{
+ hInst=hinstDLL;
+ return TRUE;
+}
+
+__declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
+{
+ if ( mirandaVersion < PLUGIN_MAKE_VERSION(0,8,1,0)) {
+ MessageBox( NULL, _T("The ") _T(__PLUGIN_NAME_BASE) _T(" plugin cannot be loaded. It requires Miranda IM 0.8.1 or later."), _T(__PLUGIN_NAME_BASE), MB_OK|MB_ICONWARNING|MB_SETFOREGROUND|MB_TOPMOST );
+ return NULL;
+ }
+ return &pluginInfo;
+}
+
+static const MUUID interfaces[] = {MIID_DB_AUTOBACKUPS, MIID_LAST};
+__declspec(dllexport) const MUUID* MirandaPluginInterfaces(void)
+{
+ return interfaces;
+}
+
+int __declspec(dllexport) Load(PLUGINLINK *link)
+{
+ pluginLink=link;
+ SysInit();
+ return 0;
+}
+
+int __declspec(dllexport) Unload(void)
+{
+ int i;
+
+ OleUninitialize();
+
+ for (i=0; i<SIZEOF(hHooks); ++i)
+ {
+ if (hHooks[i])
+ UnhookEvent(hHooks[i]);
+ }
+ for (i=0; i<SIZEOF(hServices); ++i)
+ {
+ if (hServices[i])
+ DestroyServiceFunction(hServices[i]);
+ }
+
+ return 0;
+}
+
+void ShowPopup(TCHAR* text, TCHAR* header)
+{
+ POPUPDATAT ppd = {0};
+
+ lstrcpy(ppd.lptzText, text);
+ lstrcpy(ppd.lptzContactName, header);
+ ppd.lchIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"backup");
+
+ PUAddPopUpT(&ppd);
+}
+
+int CreateDirectoryTree(TCHAR *szDir)
+{
+ TCHAR *pszLastBackslash, szTestDir[ MAX_PATH ];
+
+ lstrcpyn( szTestDir, szDir, SIZEOF( szTestDir ));
+ pszLastBackslash = _tcsrchr( szTestDir, '\\' );
+ if ( pszLastBackslash == NULL )
+ return 0;
+
+ *pszLastBackslash = '\0';
+ CreateDirectoryTree( szTestDir );
+ *pszLastBackslash = '\\';
+ return ( CreateDirectory( szTestDir, NULL ) == 0 ) ? GetLastError() : 0;
+}
+
+HWND CreateToolTip(HWND hwndParent, LPTSTR ptszText, LPTSTR ptszTitle)
+{
+ TOOLINFO ti = { 0 };
+ HWND hwndTT;
+ hwndTT = CreateWindowEx(WS_EX_TOPMOST,
+ TOOLTIPS_CLASS, NULL,
+ WS_POPUP | TTS_NOPREFIX,
+ CW_USEDEFAULT, CW_USEDEFAULT,
+ CW_USEDEFAULT, CW_USEDEFAULT,
+ hwndParent, NULL, hInst, NULL);
+
+ SetWindowPos(hwndTT, HWND_TOPMOST, 0, 0, 0, 0,
+ SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);
+
+ ti.cbSize = sizeof(TOOLINFO);
+ ti.uFlags = TTF_SUBCLASS | TTF_CENTERTIP;
+ ti.hwnd = hwndParent;
+ ti.hinst = hInst;
+ ti.lpszText = ptszText;
+ GetClientRect (hwndParent, &ti.rect);
+ ti.rect.left -= 80;
+
+ SendMessage(hwndTT, TTM_ADDTOOL, 0, (LPARAM) (LPTOOLINFO) &ti);
+ SendMessage(hwndTT, TTM_SETTITLE, 1, (LPARAM)ptszTitle);
+ SendMessage(hwndTT, TTM_SETMAXTIPWIDTH, 0, (LPARAM)700);
+ return hwndTT;
+}
diff --git a/plugins/Dbx_mmap_SA/Db_autobackups/options.c b/plugins/Dbx_mmap_SA/Db_autobackups/options.c
new file mode 100644
index 0000000000..51baa1b687
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Db_autobackups/options.c
@@ -0,0 +1,360 @@
+#include "headers.h"
+#include <shlobj.h>
+
+Options options;
+static HWND hPathTip;
+
+int LoadOptions(void) {
+ DBVARIANT dbv;
+ TCHAR* tmp;
+
+ options.backup_types = (BackupType)DBGetContactSettingByte(0, "AutoBackups", "BackupType", (BYTE)(BT_PERIODIC));
+ options.period = (unsigned int)DBGetContactSettingWord(0, "AutoBackups", "Period", 1);
+ options.period_type = (PeriodType)DBGetContactSettingByte(0, "AutoBackups", "PeriodType", (BYTE)PT_DAYS);
+
+ if(!ServiceExists(MS_FOLDERS_GET_PATH)) {
+
+ if(!DBGetContactSettingTString(0, "AutoBackups", "Folder", &dbv)) {
+ tmp = Utils_ReplaceVarsT(dbv.ptszVal);
+
+ if(_tcslen(tmp) >= 2 && tmp[1] == ':')
+ _tcsncpy(options.folder, dbv.ptszVal, MAX_PATH-1);
+ else
+ mir_sntprintf(options.folder, MAX_PATH, _T("%s\\%s"), profilePath, dbv.ptszVal);
+
+ DBFreeVariant(&dbv);
+ mir_free(tmp);
+ } else
+ mir_sntprintf(options.folder, MAX_PATH, _T("%s%s"), DIR, SUB_DIR);
+ }
+ options.num_backups = (unsigned int)DBGetContactSettingWord(0, "AutoBackups", "NumBackups", 3);
+
+ options.disable_progress = (BOOL)DBGetContactSettingByte(0, "AutoBackups", "NoProgress", 0);
+ options.disable_popups = (BOOL)DBGetContactSettingByte(0, "AutoBackups", "NoPopups", 0);
+
+ SetBackupTimer();
+ return 0;
+}
+
+int SaveOptions(void) {
+ TCHAR prof_dir[MAX_PATH];
+ TCHAR* buf,* tmp;
+ size_t prof_len, opt_len;
+
+ DBWriteContactSettingByte(0, "AutoBackups", "BackupType", (BYTE)options.backup_types);
+ if (options.period < 1) options.period = 1;
+ DBWriteContactSettingWord(0, "AutoBackups", "Period", (WORD)options.period);
+ DBWriteContactSettingByte(0, "AutoBackups", "PeriodType", (BYTE)options.period_type);
+
+ mir_sntprintf(prof_dir, MAX_PATH, _T("%s\\"), profilePath);
+ prof_len = _tcslen(prof_dir);
+ opt_len = _tcslen(options.folder);
+
+ if(opt_len > prof_len && _tcsncmp(options.folder, prof_dir, prof_len) == 0) {
+ DBWriteContactSettingTString(0, "AutoBackups", "Folder", (options.folder + prof_len));
+ } else
+ DBWriteContactSettingTString(0, "AutoBackups", "Folder", options.folder);
+
+ tmp = Utils_ReplaceVarsT(options.folder);
+ if(_tcslen(tmp) < 2 || tmp[1] != ':')
+ {
+ buf = mir_tstrdup(options.folder);
+ mir_sntprintf(options.folder, MAX_PATH, _T("%s\\%s"), profilePath, buf);
+ mir_free(buf);
+ }
+ mir_free(tmp);
+ DBWriteContactSettingWord(0, "AutoBackups", "NumBackups", (WORD)options.num_backups);
+ DBWriteContactSettingByte(0, "AutoBackups", "NoProgress", (BYTE)options.disable_progress);
+ DBWriteContactSettingByte(0, "AutoBackups", "NoPopups", (BYTE)options.disable_popups);
+
+ SetBackupTimer();
+ return 0;
+}
+
+Options new_options;
+
+int SetDlgState(HWND hwndDlg) {
+ TCHAR buff[10];
+
+ if(new_options.backup_types == BT_DISABLED) {
+ CheckDlgButton(hwndDlg, IDC_RAD_DISABLED, BST_CHECKED);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_RAD_DISABLED), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_ED_NUMBACKUPS), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_ED_FOLDER), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_BUT_BROWSE), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_LNK_FOLDERS), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CHK_NOPROG), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CHK_NOPOPUP), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_ED_PERIOD), FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_PT), FALSE);
+
+ CheckDlgButton(hwndDlg, IDC_RAD_START, BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_RAD_EXIT, BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_RAD_PERIODIC, BST_UNCHECKED);
+ } else {
+ EnableWindow(GetDlgItem(hwndDlg, IDC_RAD_DISABLED), TRUE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_ED_NUMBACKUPS), TRUE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_ED_FOLDER), TRUE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_BUT_BROWSE), TRUE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_LNK_FOLDERS), TRUE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CHK_NOPROG), TRUE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CHK_NOPOPUP), TRUE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_ED_PERIOD), new_options.backup_types & BT_PERIODIC);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_PT), new_options.backup_types & BT_PERIODIC);
+
+ CheckDlgButton(hwndDlg, IDC_RAD_DISABLED, BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_RAD_START, new_options.backup_types & BT_START ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_RAD_EXIT, new_options.backup_types & BT_EXIT ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_RAD_PERIODIC, new_options.backup_types & BT_PERIODIC ? BST_CHECKED : BST_UNCHECKED);
+ }
+
+ SendDlgItemMessage(hwndDlg, SPIN_PERIOD, UDM_SETRANGE32, (WPARAM)1, (LPARAM)60);
+ SetDlgItemText(hwndDlg, IDC_ED_PERIOD, _itot(new_options.period, buff, 10));
+
+ SendDlgItemMessage(hwndDlg, SPIN_NUMBACKUPS, UDM_SETRANGE32, (WPARAM)1, (LPARAM)100);
+ SetDlgItemText(hwndDlg, IDC_ED_NUMBACKUPS, _itot(new_options.num_backups, buff, 10));
+
+ SetDlgItemText(hwndDlg, IDC_ED_FOLDER, new_options.folder);
+
+ CheckDlgButton(hwndDlg, IDC_CHK_NOPROG, new_options.disable_progress ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_CHK_NOPOPUP, new_options.disable_popups ? BST_CHECKED : BST_UNCHECKED);
+ if (!ServiceExists(MS_POPUP_ADDPOPUP))
+ ShowWindow(GetDlgItem(hwndDlg, IDC_CHK_NOPOPUP), SW_HIDE);
+
+ return 0;
+}
+
+int CALLBACK BrowseProc(HWND hwnd,UINT uMsg, LPARAM lParam, LPARAM lpData )
+{
+ TCHAR* folder;
+ switch(uMsg)
+ {
+ case BFFM_INITIALIZED:
+ folder = Utils_ReplaceVarsT(options.folder);
+ SendMessage(hwnd, BFFM_SETSELECTION, TRUE, (LPARAM)folder);
+ mir_free(folder);
+ break;
+ }
+ return 0;
+}
+
+INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ TCHAR buff[10];
+ TCHAR folder_buff[MAX_PATH] = {0}, backupfolder[MAX_PATH] = {0};
+ TCHAR tszTooltipText[1024];
+ TCHAR* tmp;
+ BROWSEINFO bi;
+ LPCITEMIDLIST pidl;
+ OPENOPTIONSDIALOG ood = {0};
+
+ switch ( msg ) {
+ case WM_INITDIALOG:
+ TranslateDialogDefault( hwndDlg );
+ memcpy(&new_options, &options, sizeof(Options));
+
+ if (ServiceExists(MS_FOLDERS_GET_PATH))
+ {
+ ShowWindow(GetDlgItem(hwndDlg, IDC_ED_FOLDER), SW_HIDE);
+ ShowWindow(GetDlgItem(hwndDlg, IDC_BUT_BROWSE), SW_HIDE);
+ ShowWindow(GetDlgItem(hwndDlg, IDC_LNK_FOLDERS), SW_SHOW);
+ }
+ else
+ {
+ mir_sntprintf(tszTooltipText, SIZEOF(tszTooltipText), _T("%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s\n%s - %s"),
+ _T("%miranda_path%"), TranslateT("path to root miranda folder"),
+ _T("%miranda_profile%"), TranslateT("path to current miranda profile"),
+ _T("%miranda_profilename%"), TranslateT("name of current miranda profile (filename, without extension)"),
+ _T("%miranda_userdata%"), TranslateT("will return parsed string %miranda_profile%\\Profiles\\%miranda_profilename%"),
+ _T("%appdata%"), TranslateT("same as environment variable %APPDATA% for currently logged-on Windows user"),
+ _T("%username%"), TranslateT("username for currently logged-on Windows user"),
+ _T("%mydocuments%"), TranslateT("\"My Documents\" folder for currently logged-on Windows user"),
+ _T("%desktop%"), TranslateT("\"Desktop\" folder for currently logged-on Windows user"),
+ _T("%xxxxxxx%"), TranslateT("any environment variable defined in current Windows session (like %systemroot%, %allusersprofile%, etc.)")
+ );
+ hPathTip = CreateToolTip(GetDlgItem(hwndDlg, IDC_ED_FOLDER), tszTooltipText, TranslateT("Variables"));
+ }
+
+ SetDlgState(hwndDlg);
+
+ SendMessage(GetDlgItem(hwndDlg, IDC_PT), CB_ADDSTRING, 0, (LPARAM) TranslateT("Days"));
+ SendMessage(GetDlgItem(hwndDlg, IDC_PT), CB_ADDSTRING, 0, (LPARAM) TranslateT("Hours"));
+ SendMessage(GetDlgItem(hwndDlg, IDC_PT), CB_ADDSTRING, 0, (LPARAM) TranslateT("Minutes"));
+ switch(new_options.period_type){
+ case PT_DAYS: SendDlgItemMessage(hwndDlg, IDC_PT, CB_SETCURSEL, 0, 0); break;
+ case PT_HOURS: SendDlgItemMessage(hwndDlg, IDC_PT, CB_SETCURSEL, 1, 0); break;
+ case PT_MINUTES: SendDlgItemMessage(hwndDlg, IDC_PT, CB_SETCURSEL, 2, 0); break;
+ }
+ if (hPathTip)
+ SetTimer(hwndDlg, 0, 3000, NULL);
+ return TRUE;
+ case WM_COMMAND:
+ if ( HIWORD( wParam ) == EN_CHANGE && ( HWND )lParam == GetFocus()) {
+ switch( LOWORD( wParam )) {
+ case IDC_ED_PERIOD:
+ case IDC_ED_FOLDER:
+ case IDC_ED_NUMBACKUPS:
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ }
+ }
+ if ( HIWORD( wParam ) == CBN_SELCHANGE) {
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ }
+ if ( HIWORD( wParam ) == BN_CLICKED ) {
+ switch( LOWORD( wParam )) {
+ case IDC_RAD_DISABLED:
+ if(IsDlgButtonChecked(hwndDlg, IDC_RAD_DISABLED)) {
+ new_options.backup_types = BT_DISABLED;
+ }
+ SetDlgState(hwndDlg);
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ break;
+ case IDC_RAD_START:
+ if(IsDlgButtonChecked(hwndDlg, IDC_RAD_START))
+ new_options.backup_types |= BT_START;
+ else
+ new_options.backup_types &= ~BT_START;
+ SetDlgState(hwndDlg);
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ break;
+ case IDC_RAD_EXIT:
+ if(IsDlgButtonChecked(hwndDlg, IDC_RAD_EXIT))
+ new_options.backup_types |= BT_EXIT;
+ else
+ new_options.backup_types &= ~BT_EXIT;
+ SetDlgState(hwndDlg);
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ break;
+ case IDC_RAD_PERIODIC:
+ if(IsDlgButtonChecked(hwndDlg, IDC_RAD_PERIODIC))
+ new_options.backup_types |= BT_PERIODIC;
+ else
+ new_options.backup_types &= ~BT_PERIODIC;
+ SetDlgState(hwndDlg);
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ break;
+
+ case IDC_BUT_BROWSE:
+ bi.hwndOwner = hwndDlg;
+ bi.pidlRoot = 0;
+ bi.pszDisplayName = folder_buff;
+ bi.lpszTitle = TranslateT("Select Backup Folder");
+ bi.ulFlags = BIF_NEWDIALOGSTYLE;
+ bi.lpfn = BrowseProc;
+ bi.lParam = 0;
+ bi.iImage = 0;
+
+ if((pidl = SHBrowseForFolder(&bi)) != 0) {
+ SHGetPathFromIDList(pidl, folder_buff);
+
+ SetDlgItemText(hwndDlg, IDC_ED_FOLDER, folder_buff);
+
+ SendMessage( GetParent( hwndDlg ), PSM_CHANGED, 0, 0 );
+
+ CoTaskMemFree((void *)pidl);
+ }
+ break;
+ case IDC_BUT_NOW:
+ Backup(NULL);
+ break;
+ case IDC_CHK_NOPROG:
+ new_options.disable_progress = IsDlgButtonChecked(hwndDlg, IDC_CHK_NOPROG);
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ break;
+ case IDC_CHK_NOPOPUP:
+ new_options.disable_popups = IsDlgButtonChecked(hwndDlg, IDC_CHK_NOPOPUP);
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ break;
+ case IDC_LNK_FOLDERS:
+ ood.cbSize = sizeof(ood);
+ ood.pszGroup = "Customize";
+ ood.pszPage = "Folders";
+ CallService( MS_OPT_OPENOPTIONS, 0, (LPARAM)&ood );
+ break;
+ }
+ }
+
+ break;
+
+ case WM_TIMER:
+ if(IsWindow(hPathTip))
+ KillTimer(hPathTip, 4); // It will prevent tooltip autoclosing
+ break;
+
+ case WM_NOTIFY:
+ if (((LPNMHDR)lParam)->code == PSN_APPLY ) {
+ GetDlgItemText(hwndDlg, IDC_ED_PERIOD, buff, sizeof(buff));
+ new_options.period = _ttoi(buff);
+ GetDlgItemText(hwndDlg, IDC_ED_NUMBACKUPS, buff, sizeof(buff));
+ new_options.num_backups = _ttoi(buff);
+
+ switch(SendDlgItemMessage(hwndDlg, IDC_PT, CB_GETCURSEL, 0, 0)) {
+ case 0: new_options.period_type = PT_DAYS; break;
+ case 1: new_options.period_type = PT_HOURS; break;
+ case 2: new_options.period_type = PT_MINUTES; break;
+ }
+
+ GetDlgItemText(hwndDlg, IDC_ED_FOLDER, folder_buff, MAX_PATH);
+ {
+ BOOL folder_ok = TRUE;
+ int err = 0;
+ tmp = Utils_ReplaceVarsT(folder_buff);
+
+ if(_tcslen(tmp) >= 2 && tmp[1] == ':')
+ _tcsncpy(backupfolder, tmp, MAX_PATH-1);
+ else
+ mir_sntprintf(backupfolder, MAX_PATH, _T("%s\\%s"), profilePath, tmp);
+ mir_free(tmp);
+
+ err = CreateDirectoryTree(backupfolder);
+ if(err != ERROR_ALREADY_EXISTS && err != 0) {
+ TCHAR msg_buff[512];
+ FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, 0, err, 0, msg_buff, 512, 0);
+ MessageBox(0, msg_buff, TranslateT("Error Creating Backup Folder"), MB_OK | MB_ICONERROR);
+ folder_ok = FALSE;
+ }
+
+ if(folder_ok) {
+ _tcsncpy(new_options.folder, folder_buff, MAX_PATH-1);
+ memcpy(&options, &new_options, sizeof(Options));
+ SaveOptions();
+ } else {
+ memcpy(&new_options, &options, sizeof(Options));
+ SetDlgState(hwndDlg);
+ }
+ }
+ return TRUE;
+
+ }
+ break;
+
+ case WM_DESTROY:
+ if (hPathTip)
+ {
+ KillTimer(hwndDlg, 0);
+ DestroyWindow(hPathTip);
+ hPathTip = 0;
+ }
+ return FALSE;
+ }
+
+ return FALSE;
+}
+
+int OptionsInit(WPARAM wParam, LPARAM lParam)
+{
+ OPTIONSDIALOGPAGE odp;
+
+ ZeroMemory(&odp, sizeof(odp));
+ odp.cbSize = sizeof(odp);
+ odp.position = -790000000;
+ odp.hInstance = hInst;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
+ odp.ptszTitle = LPGENT("Database AutoBackups");
+ odp.ptszGroup = LPGENT("Services");
+ odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.pfnDlgProc = DlgProcOptions;
+ CallService( MS_OPT_ADDPAGE, wParam,( LPARAM )&odp );
+
+ return 0;
+}
diff --git a/plugins/Dbx_mmap_SA/Db_autobackups/options.h b/plugins/Dbx_mmap_SA/Db_autobackups/options.h
new file mode 100644
index 0000000000..240fc9566e
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Db_autobackups/options.h
@@ -0,0 +1,37 @@
+/*
+
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2000-2003 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+typedef enum { BT_DISABLED = 0, BT_START = 1, BT_EXIT = 2, BT_PERIODIC = 4} BackupType;
+typedef enum { PT_DAYS, PT_HOURS, PT_MINUTES} PeriodType;
+
+typedef struct Options_tag {
+ int backup_types;
+ unsigned int period;
+ PeriodType period_type;
+ TCHAR folder[MAX_PATH];
+ unsigned int num_backups;
+ BOOL disable_progress;
+ BOOL disable_popups;
+} Options;
+
+extern Options options; \ No newline at end of file
diff --git a/plugins/Dbx_mmap_SA/Db_autobackups/resource.h b/plugins/Dbx_mmap_SA/Db_autobackups/resource.h
new file mode 100644
index 0000000000..fe3f28621c
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Db_autobackups/resource.h
@@ -0,0 +1,35 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by db_autobackups.rc
+//
+#define IDD_OPTIONS 101
+#define IDI_ICON1 270
+#define IDD_COPYPROGRESS 271
+#define SPIN_PERIOD 1369
+#define SPIN_NUMBACKUPS 1370
+#define IDC_PT 1371
+#define IDC_ED_PERIOD 1658
+#define IDC_RAD_DISABLED 1660
+#define IDC_RAD_START 1663
+#define IDC_RAD_EXIT 1664
+#define IDC_RAD_PERIODIC 1665
+#define IDC_ED_NUMBACKUPS 1666
+#define IDC_ED_FOLDER 1667
+#define IDC_BUT_BROWSE 1668
+#define IDC_LNK_FOLDERS 1669
+#define IDC_CHK_NOPROG 1670
+#define IDC_BUT_NOW 1671
+#define IDC_CHK_NOPOPUP 1672
+#define IDC_PROGRESSMESSAGE 0xDAED
+#define IDC_PROGRESS 0xDEAD
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 272
+#define _APS_NEXT_COMMAND_VALUE 40018
+#define _APS_NEXT_CONTROL_VALUE 1673
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/plugins/Dbx_mmap_SA/Db_autobackups/resource.rc b/plugins/Dbx_mmap_SA/Db_autobackups/resource.rc
new file mode 100644
index 0000000000..42f5b0b55b
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Db_autobackups/resource.rc
@@ -0,0 +1,2 @@
+#include "db_autobackups.rc"
+#include "version.rc"
diff --git a/plugins/Dbx_mmap_SA/Db_autobackups/version.h b/plugins/Dbx_mmap_SA/Db_autobackups/version.h
new file mode 100644
index 0000000000..37c48ddca2
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Db_autobackups/version.h
@@ -0,0 +1,16 @@
+#define __FILEVERSION_STRING 0,0,0,8
+#define __VERSION_STRING "0.0.0.8"
+#define __VERSION_DWORD 0x00000008
+
+#define __PLUGIN_NAME_BASE "DB Autobackuper"
+#define __PLUGIN_DESC __PLUGIN_NAME_BASE " plugin."
+#define __COPYRIGHTS "© 2005-2011 chaos.persei, sje, Kildor, Billy_Bons, Vasilich"
+
+#if defined (_WIN64)
+#define __PLUGIN_NAME __PLUGIN_NAME_BASE " (x64)"
+#elif (UNICODE)
+#define __PLUGIN_NAME __PLUGIN_NAME_BASE " (Unicode)"
+#else
+#define __PLUGIN_NAME __PLUGIN_NAME_BASE
+#endif
+
diff --git a/plugins/Dbx_mmap_SA/Db_autobackups/version.rc b/plugins/Dbx_mmap_SA/Db_autobackups/version.rc
new file mode 100644
index 0000000000..cd4434c66d
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Db_autobackups/version.rc
@@ -0,0 +1,39 @@
+
+#include <windows.h>
+#include "version.h"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION __FILEVERSION_STRING
+ PRODUCTVERSION __FILEVERSION_STRING
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "041904b0"
+ BEGIN
+ VALUE "FileDescription", __PLUGIN_DESC
+ VALUE "FileVersion", __VERSION_STRING
+ VALUE "LegalCopyright", __COPYRIGHTS
+ VALUE "OriginalFilename", "db_autobackups.dll"
+ VALUE "ProductName", __PLUGIN_NAME
+ VALUE "ProductVersion", __VERSION_STRING
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x419, 1200
+ END
+END
diff --git a/plugins/Dbx_mmap_SA/Dbtool/Version.h b/plugins/Dbx_mmap_SA/Dbtool/Version.h
new file mode 100644
index 0000000000..ab415d1049
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/Version.h
@@ -0,0 +1,9 @@
+#include "../../include/m_version.h"
+
+#define __FILEVERSION_STRING MIRANDA_VERSION_FILEVERSION
+#define __VERSION_STRING MIRANDA_VERSION_STRING
+#define __VERSION_DWORD MIRANDA_VERSION_DWORD
+#define __INTERNAL_NAME "dbtool"
+#define __FILENAME "dbtool.exe"
+#define __DESCRIPTION "Miranda IM Database Tool"
+#define __COPYRIGHT "© 2000-2011 Miranda IM project"
diff --git a/plugins/Dbx_mmap_SA/Dbtool/Version.rc b/plugins/Dbx_mmap_SA/Dbtool/Version.rc
new file mode 100644
index 0000000000..678989d4ac
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/Version.rc
@@ -0,0 +1,38 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "afxres.h"
+#include "version.h"
+
+#ifdef _WIN32
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+#endif //_WIN32
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION __FILEVERSION_STRING
+ PRODUCTVERSION __FILEVERSION_STRING
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x0L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "000004b0"
+ BEGIN
+ VALUE "FileDescription", __DESCRIPTION
+ VALUE "InternalName", __INTERNAL_NAME
+ VALUE "LegalCopyright", __COPYRIGHT
+ VALUE "OriginalFilename", __FILENAME
+ VALUE "ProductName", __DESCRIPTION
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0, 1200
+ END
+END
diff --git a/plugins/Dbx_mmap_SA/Dbtool/aggressive.cpp b/plugins/Dbx_mmap_SA/Dbtool/aggressive.cpp
new file mode 100644
index 0000000000..26312ea5b0
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/aggressive.cpp
@@ -0,0 +1,59 @@
+/*
+Miranda Database Tool
+Copyright (C) 2001-2005 Richard Hughes
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+#define BLOCKSIZE 65536
+
+extern DWORD sourceFileSize;
+extern DWORD spaceProcessed;
+extern DWORD sp;
+static DWORD ofsCurrent;
+
+int WorkAggressive(int firstTime)
+{
+ int blockBytes,i;
+ BYTE *buf;
+
+ if(firstTime) {
+ if(!opts.bAggressive) return ERROR_NO_MORE_ITEMS;
+ AddToStatus(STATUS_MESSAGE,TranslateT("Performing aggressive pass"));
+ ofsCurrent=0;
+ spaceProcessed=0;
+ sp=0;
+ }
+ blockBytes=min(BLOCKSIZE+3,(int)(sourceFileSize-ofsCurrent));
+ if(blockBytes<=0) return ERROR_NO_MORE_ITEMS;
+ buf = opts.pFile+ofsCurrent;
+ blockBytes-=3;
+ for(i=0;i<blockBytes;i++) {
+ if(buf[i]) {
+ if((*(PDWORD)&buf[i]&0x00FFFFFF)!=0xDECADE)
+ AddToStatus(STATUS_WARNING,TranslateT("Aggressive: random junk at %08X: skipping"),ofsCurrent+i);
+ else {
+ //TODO: give user the option of placing manually
+ AddToStatus(STATUS_ERROR,TranslateT("Aggressive: unlinked data at %08X: can't automatically place"),ofsCurrent+i);
+ }
+ for(;i<blockBytes;i++)
+ if(buf[i]==0) {i--; break;}
+ }
+ }
+ ofsCurrent+=BLOCKSIZE;
+ spaceProcessed=ofsCurrent;
+ return ERROR_SUCCESS;
+}
diff --git a/plugins/Dbx_mmap_SA/Dbtool/cleaning.cpp b/plugins/Dbx_mmap_SA/Dbtool/cleaning.cpp
new file mode 100644
index 0000000000..efbbde1640
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/cleaning.cpp
@@ -0,0 +1,63 @@
+/*
+Miranda Database Tool
+Copyright (C) 2001-2005 Richard Hughes
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+INT_PTR CALLBACK CleaningDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam)
+{
+ INT_PTR bReturn;
+
+ if(DoMyControlProcessing(hdlg,message,wParam,lParam,&bReturn)) return bReturn;
+ switch(message) {
+ case WM_INITDIALOG:
+ CheckDlgButton(hdlg,IDC_ERASEHISTORY,opts.bEraseHistory);
+ EnableWindow(GetDlgItem(hdlg,IDC_ERASEHISTORY),!opts.bAggressive);
+ CheckDlgButton(hdlg,IDC_MARKREAD,opts.bMarkRead);
+ CheckDlgButton(hdlg,IDC_CONVERTUTF,opts.bConvertUtf);
+ TranslateDialog(hdlg);
+ return TRUE;
+ case WZN_PAGECHANGING:
+ opts.bEraseHistory=IsDlgButtonChecked(hdlg,IDC_ERASEHISTORY)&&!opts.bAggressive;
+ opts.bMarkRead=IsDlgButtonChecked(hdlg,IDC_MARKREAD);
+ opts.bConvertUtf=IsDlgButtonChecked(hdlg,IDC_CONVERTUTF);
+ break;
+ case WM_COMMAND:
+ switch(LOWORD(wParam)) {
+ case IDC_BACK:
+ if(opts.bCheckOnly)
+ SendMessage(GetParent(hdlg),WZM_GOTOPAGE,IDD_SELECTDB,(LPARAM)SelectDbDlgProc);
+ else
+ SendMessage(GetParent(hdlg),WZM_GOTOPAGE,IDD_FILEACCESS,(LPARAM)FileAccessDlgProc);
+ break;
+ case IDOK:
+ if (!opts.hFile) {
+ opts.hFile = CreateFile( opts.filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL );
+ if ( opts.hFile == INVALID_HANDLE_VALUE ) {
+ opts.hFile = NULL;
+ opts.error = GetLastError();
+ SendMessage( GetParent(hdlg), WZM_GOTOPAGE, IDD_OPENERROR, ( LPARAM )OpenErrorDlgProc );
+ break;
+ }
+ }
+ SendMessage(GetParent(hdlg),WZM_GOTOPAGE,IDD_PROGRESS,(LPARAM)ProgressDlgProc);
+ break;
+ }
+ break;
+ }
+ return FALSE;
+}
diff --git a/plugins/Dbx_mmap_SA/Dbtool/contactchain.cpp b/plugins/Dbx_mmap_SA/Dbtool/contactchain.cpp
new file mode 100644
index 0000000000..dd6d50556b
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/contactchain.cpp
@@ -0,0 +1,105 @@
+/*
+Miranda Database Tool
+Copyright (C) 2001-2005 Richard Hughes
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+int WorkSettingsChain(DWORD ofsContact,DBContact *dbc,int firstTime);
+int WorkEventChain(DWORD ofsContact,DBContact *dbc,int firstTime);
+
+static DWORD ofsThisContact,ofsDestPrevContact;
+static DWORD contactCount;
+static DWORD ofsDestThis,ofsNextContact;
+static int phase;
+static DBContact dbc;
+
+static void FinishUp(void)
+{
+ if(contactCount!=dbhdr.contactCount)
+ AddToStatus(STATUS_WARNING,TranslateT("Contact count marked wrongly: correcting"));
+ dbhdr.contactCount=contactCount;
+}
+
+int WorkContactChain(int firstTime)
+{
+ int first=0;
+
+ if(firstTime) {
+ AddToStatus(STATUS_MESSAGE,TranslateT("Processing contact chain"));
+ ofsDestPrevContact=0;
+ ofsThisContact=dbhdr.ofsFirstContact;
+ contactCount=0;
+ dbhdr.ofsFirstContact=0;
+ phase=0;
+ }
+
+ switch(phase) {
+ int ret;
+ case 0:
+ if(ofsThisContact==0) {
+ FinishUp();
+ return ERROR_NO_MORE_ITEMS;
+ }
+ if(!SignatureValid(ofsThisContact,DBCONTACT_SIGNATURE)) {
+ AddToStatus(STATUS_ERROR,TranslateT("Contact chain corrupted, further entries ignored"));
+ FinishUp();
+ return ERROR_NO_MORE_ITEMS;
+ }
+ if(ReadSegment(ofsThisContact,&dbc,sizeof(dbc))!=ERROR_SUCCESS) {
+ FinishUp();
+ return ERROR_NO_MORE_ITEMS;
+ }
+ ofsNextContact=dbc.ofsNext;
+ dbc.ofsNext=0;
+ if (!opts.bCheckOnly) {
+ if((ofsDestThis=WriteSegment(WSOFS_END,&dbc,sizeof(dbc)))==WS_ERROR)
+ return ERROR_HANDLE_DISK_FULL;
+ if(ofsDestPrevContact)
+ WriteSegment(ofsDestPrevContact+offsetof(DBContact,ofsNext),&ofsDestThis,sizeof(DWORD));
+ else
+ dbhdr.ofsFirstContact=ofsDestThis;
+ } else
+ ofsDestThis = ofsThisContact; // needed in event chain worker
+ contactCount++;
+ phase++; first=1;
+ //fall thru
+ case 1:
+ ret=WorkSettingsChain(ofsDestThis,&dbc,first);
+ if(ret==ERROR_NO_MORE_ITEMS) {
+ phase++; first=1;
+ }
+ else if(ret) return ret;
+ else break;
+ //fall thru
+ case 2:
+ ret=WorkEventChain(ofsDestThis,&dbc,first);
+ if(ret==ERROR_NO_MORE_ITEMS) {
+ phase++; first=1;
+ }
+ else if(ret) return ret;
+ else break;
+ //fall thru
+ case 3:
+ if(WriteSegment(ofsDestThis,&dbc,sizeof(DBContact))==WS_ERROR)
+ return ERROR_HANDLE_DISK_FULL;
+ ofsDestPrevContact=ofsDestThis;
+ ofsThisContact=ofsNextContact;
+ phase=0;
+ break;
+ }
+ return ERROR_SUCCESS;
+}
diff --git a/plugins/Dbx_mmap_SA/Dbtool/database.h b/plugins/Dbx_mmap_SA/Dbtool/database.h
new file mode 100644
index 0000000000..aa73d16362
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/database.h
@@ -0,0 +1,179 @@
+/*
+
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2000-2005 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+//all offsets are relative to the start of the file
+//offsets are 0 if there is nothing in the chain or this is the last in the
+//chain
+
+/* tree diagram
+
+DBHeader
+ |-->end of file (plain offset)
+ |-->first contact (DBContact)
+ | |-->next contact (DBContact)
+ | | \--> ...
+ | |-->first settings (DBContactSettings)
+ | | |-->next settings (DBContactSettings)
+ | | | \--> ...
+ | | \-->module name (DBModuleName)
+ | \-->first/last/firstunread event
+ |-->user contact (DBContact)
+ | |-->next contact=NULL
+ | |-->first settings as above
+ | \-->first/last/firstunread event as above
+ \-->first module name (DBModuleName)
+ \-->next module name (DBModuleName)
+ \--> ...
+*/
+
+#define DB_RESIZE_GRANULARITY 16384
+#define DB_THIS_VERSION 0x00000700u
+#define DB_SETTINGS_RESIZE_GRANULARITY 128
+
+#include <pshpack1.h>
+struct DBHeader {
+ BYTE signature[16]; // 'Miranda ICQ DB',0,26
+
+ WORD checkWord;
+ WORD cryptorUID;
+ DWORD ofsFileEnd; //offset of the end of the database - place to write
+ //new structures
+ DWORD slackSpace; //a counter of the number of bytes that have been
+ //wasted so far due to deleting structures and/or
+ //re-making them at the end. We should compact when
+ //this gets above a threshold
+ DWORD contactCount; //number of contacts in the chain,excluding the user
+ DWORD ofsFirstContact; //offset to first struct DBContact in the chain
+ DWORD ofsUser; //offset to struct DBContact representing the user
+ DWORD ofsFirstModuleName; //offset to first struct DBModuleName in the chain
+};
+
+#define DBCONTACT_SIGNATURE 0x43DECADEu
+struct DBContact {
+ DWORD signature;
+ DWORD ofsNext; //offset to the next contact in the chain. zero if
+ //this is the 'user' contact or the last contact
+ //in the chain
+ DWORD ofsFirstSettings; //offset to the first DBContactSettings in the
+ //chain for this contact.
+ DWORD eventCount; //number of events in the chain for this contact
+ DWORD ofsFirstEvent,ofsLastEvent; //offsets to the first and last DBEvent in
+ //the chain for this contact
+ DWORD ofsFirstUnreadEvent; //offset to the first (chronological) unread event
+ //in the chain, 0 if all are read
+ DWORD timestampFirstUnread; //timestamp of the event at ofsFirstUnreadEvent
+};
+
+#define DBMODULENAME_SIGNATURE 0x4DDECADEu
+struct DBModuleName {
+ DWORD signature;
+ DWORD ofsNext; //offset to the next module name in the chain
+ BYTE cbName; //number of characters in this module name
+ char name[1]; //name, no nul terminator
+};
+
+#define DBCONTACTSETTINGS_SIGNATURE 0x53DECADEu
+struct DBContactSettings {
+ DWORD signature;
+ DWORD ofsNext; //offset to the next contactsettings in the chain
+ DWORD ofsModuleName; //offset to the DBModuleName of the owner of these
+ //settings
+ DWORD cbBlob; //size of the blob in bytes. May be larger than the
+ //actual size for reducing the number of moves
+ //required using granularity in resizing
+ BYTE blob[1]; //the blob. a back-to-back sequence of DBSetting
+ //structs, the last has cbName=0
+};
+
+/* not a valid structure, content is figured out on the fly
+struct DBSetting {
+ BYTE cbName; //number of bytes in the name of this setting
+ //this =0 marks the end
+ char szName[...]; //setting name, excluding nul
+ BYTE dataType; //type of data. see m_database.h, db/contact/getsetting
+ union { //a load of types of data, length is defined by dataType
+ BYTE bVal; WORD wVal; DWORD dVal;
+ struct {
+ WORD cbString;
+ char szVal[...]; //excludes nul terminator
+ };
+ struct {
+ WORD cbBlob;
+ BYTE blobVal[...];
+ };
+ };
+};
+*/
+
+#define DBEVENT_SIGNATURE 0x45DECADEu
+struct DBEvent {
+ DWORD signature;
+ DWORD ofsPrev,ofsNext; //offset to the previous and next events in the
+ //chain. Chain is sorted chronologically
+ DWORD ofsModuleName; //offset to a DBModuleName struct of the name of
+ //the owner of this event
+ DWORD timestamp; //seconds since 00:00:00 01/01/1970
+ DWORD flags; //see m_database.h, db/event/add
+ WORD eventType; //module-defined event type
+ DWORD cbBlob; //number of bytes in the blob
+ BYTE blob[1]; //the blob. module-defined formatting
+};
+#include <poppack.h>
+
+//databasecorruption: called if any signatures are broken. very very fatal
+void DatabaseCorruption(const char *szPart);
+PBYTE DBRead(DWORD ofs,int bytesRequired,int *bytesAvail); //any preview result could be invalidated by the next call
+void DBWrite(DWORD ofs,PVOID pData,int count);
+void DBFlush(int setting);
+void DBMoveChunk(DWORD ofsDest,DWORD ofsSource,int bytes);
+DWORD CreateNewSpace(int bytes);
+void DeleteSpace(DWORD ofs,int bytes);
+void GetProfileDirectory(char *szPath,int cbPath);
+int GetDefaultProfilePath(char *szPath,int cbPath,int *specified);
+int ShouldShowProfileManager(void);
+
+#ifdef _DEBUG
+#define MAXCACHEDREADSIZE 512
+#else
+#define MAXCACHEDREADSIZE 2048 //technically 4096 would work, but I'm not going to push it
+#endif
+
+#ifdef _DEBUG
+//#define DBLOGGING
+#endif
+#ifdef DBLOGGING
+void DBLog(const char *file,int line,const char *fmt,...);
+#define logg() DBLog(__FILE__,__LINE__,"")
+#define log0(s) DBLog(__FILE__,__LINE__,s)
+#define log1(s,a) DBLog(__FILE__,__LINE__,s,a)
+#define log2(s,a,b) DBLog(__FILE__,__LINE__,s,a,b)
+#define log3(s,a,b,c) DBLog(__FILE__,__LINE__,s,a,b,c)
+#define log4(s,a,b,c,d) DBLog(__FILE__,__LINE__,s,a,b,c,d)
+#else
+#define logg()
+#define log0(s)
+#define log1(s,a)
+#define log2(s,a,b)
+#define log3(s,a,b,c)
+#define log4(s,a,b,c,d)
+#endif \ No newline at end of file
diff --git a/plugins/Dbx_mmap_SA/Dbtool/dbtool.dep b/plugins/Dbx_mmap_SA/Dbtool/dbtool.dep
new file mode 100644
index 0000000000..a35b8ff0aa
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/dbtool.dep
@@ -0,0 +1,16 @@
+# Microsoft Developer Studio Generated Dependency File, included by dbtool.mak
+
+.\main.cpp : \
+ "..\..\miranda\include\m_database.h"\
+ ".\database.h"\
+ ".\dbtool.h"\
+
+
+.\resource.rc : \
+ ".\res\dbthdr.emf"\
+ ".\res\dbtool.emf"\
+ ".\res\dbtool.ico"\
+ ".\res\profileg.ico"\
+ ".\res\profiler.ico"\
+ ".\res\profiley.ico"\
+
diff --git a/plugins/Dbx_mmap_SA/Dbtool/dbtool.dsp b/plugins/Dbx_mmap_SA/Dbtool/dbtool.dsp
new file mode 100644
index 0000000000..d53d0d9970
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/dbtool.dsp
@@ -0,0 +1,295 @@
+# Microsoft Developer Studio Project File - Name="dbtool" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Application" 0x0101
+
+CFG=dbtool - Win32 Debug Unicode
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "dbtool.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "dbtool.mak" CFG="dbtool - Win32 Debug Unicode"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "dbtool - Win32 Release" (based on "Win32 (x86) Application")
+!MESSAGE "dbtool - Win32 Debug" (based on "Win32 (x86) Application")
+!MESSAGE "dbtool - Win32 Debug Unicode" (based on "Win32 (x86) Application")
+!MESSAGE "dbtool - Win32 Release Unicode" (based on "Win32 (x86) Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "dbtool - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "DATABASE_INDEPENDANT" /Yu"dbtool.h" /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x809 /d "NDEBUG"
+# ADD RSC /l 0x809 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /map /machine:I386 /out:"../../miranda/bin/release/dbtool.exe"
+# SUBTRACT LINK32 /pdb:none
+
+!ELSEIF "$(CFG)" == "dbtool - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 1
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "DATABASE_INDEPENDANT" /Yu"dbtool.h" /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x809 /d "_DEBUG"
+# ADD RSC /l 0x809 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /debug /machine:I386 /out:"../../miranda/bin/debug/dbtool.exe" /pdbtype:sept
+# SUBTRACT LINK32 /pdb:none
+
+!ELSEIF "$(CFG)" == "dbtool - Win32 Debug Unicode"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "dbtool___Win32_Debug_Unicode"
+# PROP BASE Intermediate_Dir "dbtool___Win32_Debug_Unicode"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug_Unicode"
+# PROP Intermediate_Dir "Debug_Unicode"
+# PROP Ignore_Export_Lib 1
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "DATABASE_INDEPENDANT" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "UNICODE" /D "DATABASE_INDEPENDANT" /Yu"dbtool.h" /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x809 /d "_DEBUG"
+# ADD RSC /l 0x809 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /debug /machine:I386 /out:"../../miranda/bin/debug/dbtool.exe" /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /debug /machine:I386 /out:"../../miranda/bin/debug unicode/dbtool.exe" /pdbtype:sept
+# SUBTRACT LINK32 /pdb:none
+
+!ELSEIF "$(CFG)" == "dbtool - Win32 Release Unicode"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "dbtool___Win32_Release_Unicode"
+# PROP BASE Intermediate_Dir "dbtool___Win32_Release_Unicode"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release_Unicode"
+# PROP Intermediate_Dir "Release_Unicode"
+# PROP Ignore_Export_Lib 1
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "../../include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "DATABASE_INDEPENDANT" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../../include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "UNICODE" /D "DATABASE_INDEPENDANT" /Yu"dbtool.h" /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x809 /d "NDEBUG"
+# ADD RSC /l 0x809 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /map /machine:I386 /out:"../../miranda/bin/release/dbtool.exe" /ALIGN:4096 /ALIGN:4096
+# SUBTRACT BASE LINK32 /pdb:none /debug
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /map /machine:I386 /out:"../../miranda/bin/release unicode/dbtool.exe"
+# SUBTRACT LINK32 /pdb:none
+
+!ENDIF
+
+# Begin Target
+
+# Name "dbtool - Win32 Release"
+# Name "dbtool - Win32 Debug"
+# Name "dbtool - Win32 Debug Unicode"
+# Name "dbtool - Win32 Release Unicode"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Group "Workers"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\aggressive.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\contactchain.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\eventchain.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\finaltasks.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\initialchecks.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\modulechain.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\settingschain.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\user.cpp
+# End Source File
+# End Group
+# Begin Group "Wizard Pages"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=.\cleaning.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\fileaccess.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\finished.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\openerror.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\progress.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\selectdb.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\welcome.cpp
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=.\disk.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\langpack.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\main.cpp
+# ADD CPP /Yc"dbtool.h"
+# End Source File
+# Begin Source File
+
+SOURCE=.\wizard.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\worker.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\database.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\dbtool.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\res\dbthdr.emf
+# End Source File
+# Begin Source File
+
+SOURCE=.\res\dbtool.emf
+# End Source File
+# Begin Source File
+
+SOURCE=.\res\dbtool.ico
+# End Source File
+# Begin Source File
+
+SOURCE=.\res\profileg.ico
+# End Source File
+# Begin Source File
+
+SOURCE=.\res\profiler.ico
+# End Source File
+# Begin Source File
+
+SOURCE=.\res\profiley.ico
+# End Source File
+# Begin Source File
+
+SOURCE=.\resource.rc
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=.\dbtool.exe.manifest
+# End Source File
+# End Target
+# End Project
diff --git a/plugins/Dbx_mmap_SA/Dbtool/dbtool.dsw b/plugins/Dbx_mmap_SA/Dbtool/dbtool.dsw
new file mode 100644
index 0000000000..790aea45f4
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/dbtool.dsw
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "dbtool"=".\dbtool.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/plugins/Dbx_mmap_SA/Dbtool/dbtool.exe.manifest b/plugins/Dbx_mmap_SA/Dbtool/dbtool.exe.manifest
new file mode 100644
index 0000000000..1b6aab686b
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/dbtool.exe.manifest
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+<assemblyIdentity
+ version="1.0.0.0"
+ processorArchitecture="X86"
+ name="Miranda.Miranda.Miranda"
+ type="win32"
+/>
+<description>Miranda</description>
+ <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
+ <security>
+ <requestedPrivileges>
+ <requestedExecutionLevel
+ level="asInvoker"
+ uiAccess="false"/>
+ </requestedPrivileges>
+ </security>
+ </trustInfo>
+<dependency>
+ <dependentAssembly>
+ <assemblyIdentity
+ type="win32"
+ name="Microsoft.Windows.Common-Controls"
+ version="6.0.0.0"
+ processorArchitecture="X86"
+ publicKeyToken="6595b64144ccf1df"
+ language="*"
+ />
+ </dependentAssembly>
+</dependency>
+</assembly>
diff --git a/plugins/Dbx_mmap_SA/Dbtool/dbtool.h b/plugins/Dbx_mmap_SA/Dbtool/dbtool.h
new file mode 100644
index 0000000000..7cd3caf67b
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/dbtool.h
@@ -0,0 +1,129 @@
+/*
+Miranda Database Tool
+Copyright 2000-2011 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#if defined( UNICODE ) && !defined( _UNICODE )
+ #define _UNICODE
+#endif
+
+#include <tchar.h>
+
+#include <windows.h>
+#include <stdio.h>
+#include <stddef.h>
+#include <io.h>
+#include <stdarg.h>
+#include <process.h>
+#include <direct.h>
+#include <malloc.h>
+#include <commctrl.h>
+#include <time.h>
+#include <win2k.h>
+
+//#include <newpluginapi.h> // Only needed to keep m_database.h happy
+#define CallService(a,b,c) 1
+
+#include "m_database.h"
+#include "database.h" // Note: This is a copy of database.h from the Miranda IM v0.3 tree.
+ // Remember to update this when releasing new dbtool versions.
+#include "resource.h"
+
+#define WZM_GOTOPAGE (WM_USER+1)
+#define WZN_PAGECHANGING (WM_USER+1221)
+#define WZN_CANCELCLICKED (WM_USER+1222)
+
+struct DbToolOptions {
+ TCHAR filename[MAX_PATH];
+ TCHAR workingFilename[MAX_PATH];
+ TCHAR outputFilename[MAX_PATH];
+ TCHAR backupFilename[MAX_PATH];
+ HANDLE hFile;
+ HANDLE hOutFile;
+ HANDLE hMap;
+ BYTE *pFile;
+ DWORD error;
+ int bCheckOnly,bBackup,bAggressive;
+ int bEraseHistory,bMarkRead,bConvertUtf;
+};
+
+extern HINSTANCE hInst;
+extern DbToolOptions opts;
+extern DBHeader dbhdr;
+
+int DoMyControlProcessing(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam,INT_PTR *bReturn);
+
+INT_PTR CALLBACK SelectDbDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam);
+INT_PTR CALLBACK CleaningDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam);
+INT_PTR CALLBACK ProgressDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam);
+INT_PTR CALLBACK FileAccessDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam);
+INT_PTR CALLBACK WizardDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam);
+INT_PTR CALLBACK FinishedDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam);
+INT_PTR CALLBACK WelcomeDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam);
+INT_PTR CALLBACK OpenErrorDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam);
+
+struct DBSignature {
+ char name[15];
+ BYTE eof;
+};
+static struct DBSignature dbSignature={"Miranda ICQ DB",0x1A};
+static struct DBSignature dbSignatureEncrypted={"Miranda ICQ SD",0x1A};
+
+#define SIZEOF(X) (sizeof(X)/sizeof(X[0]))
+
+#define STATUS_MESSAGE 0
+#define STATUS_WARNING 1
+#define STATUS_ERROR 2
+#define STATUS_FATAL 3
+#define STATUS_SUCCESS 4
+#define STATUS_CLASSMASK 0x0f
+int AddToStatus(DWORD flags, TCHAR* fmt,...);
+void SetProgressBar(int perThou);
+
+int PeekSegment(DWORD ofs,PVOID buf,int cbBytes);
+int ReadSegment(DWORD ofs,PVOID buf,int cbBytes);
+#define WSOFS_END 0xFFFFFFFF
+#define WS_ERROR 0xFFFFFFFF
+DWORD WriteSegment(DWORD ofs,PVOID buf,int cbBytes);
+int ReadWrittenSegment(DWORD ofs,PVOID buf,int cbBytes);
+int SignatureValid(DWORD ofs,DWORD signature);
+DWORD ConvertModuleNameOfs(DWORD ofsOld);
+void FreeModuleChain();
+extern BOOL bEncrypted;
+
+int TranslateDialog(HWND hwndDlg);
+void LoadLangPackModule(void);
+void UnloadLangPackModule(void);
+
+char* LangPackTranslateString(const char *szEnglish, const int W);
+__inline LPSTR Translate(LPSTR source)
+{ return ( LPSTR )LangPackTranslateString( source, 0 );
+}
+
+#if defined( _UNICODE )
+ #define TranslateT(s) (TCHAR*)LangPackTranslateString((LPCSTR)_T(s),1)
+ #define TranslateTS(s) (TCHAR*)LangPackTranslateString((LPCSTR)s,1)
+#else
+ #define TranslateT(s) LangPackTranslateString(s,0)
+ #define TranslateTS(s) LangPackTranslateString(s,0)
+#endif
+
+char* Utf8DecodeCP(char* str, int codepage, wchar_t** ucs2);
+char* Utf8EncodeUcs2(const wchar_t* src);
+bool is_utf8_string(const char* str);
diff --git a/plugins/Dbx_mmap_SA/Dbtool/dbtool.mak b/plugins/Dbx_mmap_SA/Dbtool/dbtool.mak
new file mode 100644
index 0000000000..f5d98b0047
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/dbtool.mak
@@ -0,0 +1,528 @@
+# Microsoft Developer Studio Generated NMAKE File, Based on dbtool.dsp
+!IF "$(CFG)" == ""
+CFG=dbtool - Win32 Debug Unicode
+!MESSAGE No configuration specified. Defaulting to dbtool - Win32 Debug Unicode.
+!ENDIF
+
+!IF "$(CFG)" != "dbtool - Win32 Release" && "$(CFG)" != "dbtool - Win32 Debug" && "$(CFG)" != "dbtool - Win32 Debug Unicode" && "$(CFG)" != "dbtool - Win32 Release Unicode"
+!MESSAGE Invalid configuration "$(CFG)" specified.
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "dbtool.mak" CFG="dbtool - Win32 Debug Unicode"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "dbtool - Win32 Release" (based on "Win32 (x86) Application")
+!MESSAGE "dbtool - Win32 Debug" (based on "Win32 (x86) Application")
+!MESSAGE "dbtool - Win32 Debug Unicode" (based on "Win32 (x86) Application")
+!MESSAGE "dbtool - Win32 Release Unicode" (based on "Win32 (x86) Application")
+!MESSAGE
+!ERROR An invalid configuration is specified.
+!ENDIF
+
+!IF "$(OS)" == "Windows_NT"
+NULL=
+!ELSE
+NULL=nul
+!ENDIF
+
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "dbtool - Win32 Release"
+
+OUTDIR=.\Release
+INTDIR=.\Release
+
+ALL : "..\..\miranda\bin\release\dbtool.exe"
+
+
+CLEAN :
+ -@erase "$(INTDIR)\aggressive.obj"
+ -@erase "$(INTDIR)\cleaning.obj"
+ -@erase "$(INTDIR)\contactchain.obj"
+ -@erase "$(INTDIR)\dbtool.pch"
+ -@erase "$(INTDIR)\disk.obj"
+ -@erase "$(INTDIR)\eventchain.obj"
+ -@erase "$(INTDIR)\fileaccess.obj"
+ -@erase "$(INTDIR)\finaltasks.obj"
+ -@erase "$(INTDIR)\finished.obj"
+ -@erase "$(INTDIR)\initialchecks.obj"
+ -@erase "$(INTDIR)\langpack.obj"
+ -@erase "$(INTDIR)\main.obj"
+ -@erase "$(INTDIR)\modulechain.obj"
+ -@erase "$(INTDIR)\openerror.obj"
+ -@erase "$(INTDIR)\progress.obj"
+ -@erase "$(INTDIR)\resource.res"
+ -@erase "$(INTDIR)\selectdb.obj"
+ -@erase "$(INTDIR)\settingschain.obj"
+ -@erase "$(INTDIR)\user.obj"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(INTDIR)\welcome.obj"
+ -@erase "$(INTDIR)\wizard.obj"
+ -@erase "$(INTDIR)\worker.obj"
+ -@erase "$(OUTDIR)\dbtool.map"
+ -@erase "..\..\miranda\bin\release\dbtool.exe"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "../../include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "DATABASE_INDEPENDANT" /Fp"$(INTDIR)\dbtool.pch" /Yu"dbtool.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
+MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32
+RSC_PROJ=/l 0x809 /fo"$(INTDIR)\resource.res" /d "NDEBUG"
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\dbtool.bsc"
+BSC32_SBRS= \
+
+LINK32=link.exe
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /incremental:no /pdb:"$(OUTDIR)\dbtool.pdb" /map:"$(INTDIR)\dbtool.map" /machine:I386 /out:"../../miranda/bin/release/dbtool.exe"
+LINK32_OBJS= \
+ "$(INTDIR)\aggressive.obj" \
+ "$(INTDIR)\contactchain.obj" \
+ "$(INTDIR)\eventchain.obj" \
+ "$(INTDIR)\finaltasks.obj" \
+ "$(INTDIR)\initialchecks.obj" \
+ "$(INTDIR)\modulechain.obj" \
+ "$(INTDIR)\settingschain.obj" \
+ "$(INTDIR)\user.obj" \
+ "$(INTDIR)\cleaning.obj" \
+ "$(INTDIR)\fileaccess.obj" \
+ "$(INTDIR)\finished.obj" \
+ "$(INTDIR)\openerror.obj" \
+ "$(INTDIR)\progress.obj" \
+ "$(INTDIR)\selectdb.obj" \
+ "$(INTDIR)\welcome.obj" \
+ "$(INTDIR)\disk.obj" \
+ "$(INTDIR)\langpack.obj" \
+ "$(INTDIR)\main.obj" \
+ "$(INTDIR)\wizard.obj" \
+ "$(INTDIR)\worker.obj" \
+ "$(INTDIR)\resource.res"
+
+"..\..\miranda\bin\release\dbtool.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ELSEIF "$(CFG)" == "dbtool - Win32 Debug"
+
+OUTDIR=.\Debug
+INTDIR=.\Debug
+
+ALL : "..\..\miranda\bin\debug\dbtool.exe"
+
+
+CLEAN :
+ -@erase "$(INTDIR)\aggressive.obj"
+ -@erase "$(INTDIR)\cleaning.obj"
+ -@erase "$(INTDIR)\contactchain.obj"
+ -@erase "$(INTDIR)\dbtool.pch"
+ -@erase "$(INTDIR)\disk.obj"
+ -@erase "$(INTDIR)\eventchain.obj"
+ -@erase "$(INTDIR)\fileaccess.obj"
+ -@erase "$(INTDIR)\finaltasks.obj"
+ -@erase "$(INTDIR)\finished.obj"
+ -@erase "$(INTDIR)\initialchecks.obj"
+ -@erase "$(INTDIR)\langpack.obj"
+ -@erase "$(INTDIR)\main.obj"
+ -@erase "$(INTDIR)\modulechain.obj"
+ -@erase "$(INTDIR)\openerror.obj"
+ -@erase "$(INTDIR)\progress.obj"
+ -@erase "$(INTDIR)\resource.res"
+ -@erase "$(INTDIR)\selectdb.obj"
+ -@erase "$(INTDIR)\settingschain.obj"
+ -@erase "$(INTDIR)\user.obj"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(INTDIR)\vc60.pdb"
+ -@erase "$(INTDIR)\welcome.obj"
+ -@erase "$(INTDIR)\wizard.obj"
+ -@erase "$(INTDIR)\worker.obj"
+ -@erase "$(OUTDIR)\dbtool.pdb"
+ -@erase "..\..\miranda\bin\debug\dbtool.exe"
+ -@erase "..\..\miranda\bin\debug\dbtool.ilk"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "DATABASE_INDEPENDANT" /Fp"$(INTDIR)\dbtool.pch" /Yu"dbtool.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
+MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32
+RSC_PROJ=/l 0x809 /fo"$(INTDIR)\resource.res" /d "_DEBUG"
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\dbtool.bsc"
+BSC32_SBRS= \
+
+LINK32=link.exe
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /incremental:yes /pdb:"$(OUTDIR)\dbtool.pdb" /debug /machine:I386 /out:"../../miranda/bin/debug/dbtool.exe" /pdbtype:sept
+LINK32_OBJS= \
+ "$(INTDIR)\aggressive.obj" \
+ "$(INTDIR)\contactchain.obj" \
+ "$(INTDIR)\eventchain.obj" \
+ "$(INTDIR)\finaltasks.obj" \
+ "$(INTDIR)\initialchecks.obj" \
+ "$(INTDIR)\modulechain.obj" \
+ "$(INTDIR)\settingschain.obj" \
+ "$(INTDIR)\user.obj" \
+ "$(INTDIR)\cleaning.obj" \
+ "$(INTDIR)\fileaccess.obj" \
+ "$(INTDIR)\finished.obj" \
+ "$(INTDIR)\openerror.obj" \
+ "$(INTDIR)\progress.obj" \
+ "$(INTDIR)\selectdb.obj" \
+ "$(INTDIR)\welcome.obj" \
+ "$(INTDIR)\disk.obj" \
+ "$(INTDIR)\langpack.obj" \
+ "$(INTDIR)\main.obj" \
+ "$(INTDIR)\wizard.obj" \
+ "$(INTDIR)\worker.obj" \
+ "$(INTDIR)\resource.res"
+
+"..\..\miranda\bin\debug\dbtool.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ELSEIF "$(CFG)" == "dbtool - Win32 Debug Unicode"
+
+OUTDIR=.\Debug_Unicode
+INTDIR=.\Debug_Unicode
+
+ALL : "..\..\miranda\bin\debug unicode\dbtool.exe"
+
+
+CLEAN :
+ -@erase "$(INTDIR)\aggressive.obj"
+ -@erase "$(INTDIR)\cleaning.obj"
+ -@erase "$(INTDIR)\contactchain.obj"
+ -@erase "$(INTDIR)\dbtool.pch"
+ -@erase "$(INTDIR)\disk.obj"
+ -@erase "$(INTDIR)\eventchain.obj"
+ -@erase "$(INTDIR)\fileaccess.obj"
+ -@erase "$(INTDIR)\finaltasks.obj"
+ -@erase "$(INTDIR)\finished.obj"
+ -@erase "$(INTDIR)\initialchecks.obj"
+ -@erase "$(INTDIR)\langpack.obj"
+ -@erase "$(INTDIR)\main.obj"
+ -@erase "$(INTDIR)\modulechain.obj"
+ -@erase "$(INTDIR)\openerror.obj"
+ -@erase "$(INTDIR)\progress.obj"
+ -@erase "$(INTDIR)\resource.res"
+ -@erase "$(INTDIR)\selectdb.obj"
+ -@erase "$(INTDIR)\settingschain.obj"
+ -@erase "$(INTDIR)\user.obj"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(INTDIR)\vc60.pdb"
+ -@erase "$(INTDIR)\welcome.obj"
+ -@erase "$(INTDIR)\wizard.obj"
+ -@erase "$(INTDIR)\worker.obj"
+ -@erase "$(OUTDIR)\dbtool.pdb"
+ -@erase "..\..\miranda\bin\debug unicode\dbtool.exe"
+ -@erase "..\..\miranda\bin\debug unicode\dbtool.ilk"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP_PROJ=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "UNICODE" /D "DATABASE_INDEPENDANT" /Fp"$(INTDIR)\dbtool.pch" /Yu"dbtool.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
+MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32
+RSC_PROJ=/l 0x809 /fo"$(INTDIR)\resource.res" /d "_DEBUG"
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\dbtool.bsc"
+BSC32_SBRS= \
+
+LINK32=link.exe
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /incremental:yes /pdb:"$(OUTDIR)\dbtool.pdb" /debug /machine:I386 /out:"../../miranda/bin/debug unicode/dbtool.exe" /pdbtype:sept
+LINK32_OBJS= \
+ "$(INTDIR)\aggressive.obj" \
+ "$(INTDIR)\contactchain.obj" \
+ "$(INTDIR)\eventchain.obj" \
+ "$(INTDIR)\finaltasks.obj" \
+ "$(INTDIR)\initialchecks.obj" \
+ "$(INTDIR)\modulechain.obj" \
+ "$(INTDIR)\settingschain.obj" \
+ "$(INTDIR)\user.obj" \
+ "$(INTDIR)\cleaning.obj" \
+ "$(INTDIR)\fileaccess.obj" \
+ "$(INTDIR)\finished.obj" \
+ "$(INTDIR)\openerror.obj" \
+ "$(INTDIR)\progress.obj" \
+ "$(INTDIR)\selectdb.obj" \
+ "$(INTDIR)\welcome.obj" \
+ "$(INTDIR)\disk.obj" \
+ "$(INTDIR)\langpack.obj" \
+ "$(INTDIR)\main.obj" \
+ "$(INTDIR)\wizard.obj" \
+ "$(INTDIR)\worker.obj" \
+ "$(INTDIR)\resource.res"
+
+"..\..\miranda\bin\debug unicode\dbtool.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ELSEIF "$(CFG)" == "dbtool - Win32 Release Unicode"
+
+OUTDIR=.\Release_Unicode
+INTDIR=.\Release_Unicode
+
+ALL : "..\..\miranda\bin\release unicode\dbtool.exe"
+
+
+CLEAN :
+ -@erase "$(INTDIR)\aggressive.obj"
+ -@erase "$(INTDIR)\cleaning.obj"
+ -@erase "$(INTDIR)\contactchain.obj"
+ -@erase "$(INTDIR)\dbtool.pch"
+ -@erase "$(INTDIR)\disk.obj"
+ -@erase "$(INTDIR)\eventchain.obj"
+ -@erase "$(INTDIR)\fileaccess.obj"
+ -@erase "$(INTDIR)\finaltasks.obj"
+ -@erase "$(INTDIR)\finished.obj"
+ -@erase "$(INTDIR)\initialchecks.obj"
+ -@erase "$(INTDIR)\langpack.obj"
+ -@erase "$(INTDIR)\main.obj"
+ -@erase "$(INTDIR)\modulechain.obj"
+ -@erase "$(INTDIR)\openerror.obj"
+ -@erase "$(INTDIR)\progress.obj"
+ -@erase "$(INTDIR)\resource.res"
+ -@erase "$(INTDIR)\selectdb.obj"
+ -@erase "$(INTDIR)\settingschain.obj"
+ -@erase "$(INTDIR)\user.obj"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(INTDIR)\welcome.obj"
+ -@erase "$(INTDIR)\wizard.obj"
+ -@erase "$(INTDIR)\worker.obj"
+ -@erase "$(OUTDIR)\dbtool.map"
+ -@erase "..\..\miranda\bin\release unicode\dbtool.exe"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP_PROJ=/nologo /MD /W3 /GX /O2 /I "../../include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "UNICODE" /D "DATABASE_INDEPENDANT" /Fp"$(INTDIR)\dbtool.pch" /Yu"dbtool.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
+MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32
+RSC_PROJ=/l 0x809 /fo"$(INTDIR)\resource.res" /d "NDEBUG"
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\dbtool.bsc"
+BSC32_SBRS= \
+
+LINK32=link.exe
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /subsystem:windows /incremental:no /pdb:"$(OUTDIR)\dbtool.pdb" /map:"$(INTDIR)\dbtool.map" /machine:I386 /out:"../../miranda/bin/release unicode/dbtool.exe"
+LINK32_OBJS= \
+ "$(INTDIR)\aggressive.obj" \
+ "$(INTDIR)\contactchain.obj" \
+ "$(INTDIR)\eventchain.obj" \
+ "$(INTDIR)\finaltasks.obj" \
+ "$(INTDIR)\initialchecks.obj" \
+ "$(INTDIR)\modulechain.obj" \
+ "$(INTDIR)\settingschain.obj" \
+ "$(INTDIR)\user.obj" \
+ "$(INTDIR)\cleaning.obj" \
+ "$(INTDIR)\fileaccess.obj" \
+ "$(INTDIR)\finished.obj" \
+ "$(INTDIR)\openerror.obj" \
+ "$(INTDIR)\progress.obj" \
+ "$(INTDIR)\selectdb.obj" \
+ "$(INTDIR)\welcome.obj" \
+ "$(INTDIR)\disk.obj" \
+ "$(INTDIR)\langpack.obj" \
+ "$(INTDIR)\main.obj" \
+ "$(INTDIR)\wizard.obj" \
+ "$(INTDIR)\worker.obj" \
+ "$(INTDIR)\resource.res"
+
+"..\..\miranda\bin\release unicode\dbtool.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ENDIF
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+
+!IF "$(NO_EXTERNAL_DEPS)" != "1"
+!IF EXISTS("dbtool.dep")
+!INCLUDE "dbtool.dep"
+!ELSE
+!MESSAGE Warning: cannot find "dbtool.dep"
+!ENDIF
+!ENDIF
+
+
+!IF "$(CFG)" == "dbtool - Win32 Release" || "$(CFG)" == "dbtool - Win32 Debug" || "$(CFG)" == "dbtool - Win32 Debug Unicode" || "$(CFG)" == "dbtool - Win32 Release Unicode"
+SOURCE=.\aggressive.cpp
+
+"$(INTDIR)\aggressive.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\contactchain.cpp
+
+"$(INTDIR)\contactchain.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\eventchain.cpp
+
+"$(INTDIR)\eventchain.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\finaltasks.cpp
+
+"$(INTDIR)\finaltasks.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\initialchecks.cpp
+
+"$(INTDIR)\initialchecks.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\modulechain.cpp
+
+"$(INTDIR)\modulechain.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\settingschain.cpp
+
+"$(INTDIR)\settingschain.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\user.cpp
+
+"$(INTDIR)\user.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\cleaning.cpp
+
+"$(INTDIR)\cleaning.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\fileaccess.cpp
+
+"$(INTDIR)\fileaccess.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\finished.cpp
+
+"$(INTDIR)\finished.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\openerror.cpp
+
+"$(INTDIR)\openerror.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\progress.cpp
+
+"$(INTDIR)\progress.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\selectdb.cpp
+
+"$(INTDIR)\selectdb.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\welcome.cpp
+
+"$(INTDIR)\welcome.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\disk.cpp
+
+"$(INTDIR)\disk.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\langpack.cpp
+
+"$(INTDIR)\langpack.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\main.cpp
+
+!IF "$(CFG)" == "dbtool - Win32 Release"
+
+CPP_SWITCHES=/nologo /MD /W3 /GX /O2 /I "../../include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "DATABASE_INDEPENDANT" /Fp"$(INTDIR)\dbtool.pch" /Yc"dbtool.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
+
+"$(INTDIR)\main.obj" "$(INTDIR)\dbtool.pch" : $(SOURCE) "$(INTDIR)"
+ $(CPP) @<<
+ $(CPP_SWITCHES) $(SOURCE)
+<<
+
+
+!ELSEIF "$(CFG)" == "dbtool - Win32 Debug"
+
+CPP_SWITCHES=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "DATABASE_INDEPENDANT" /Fp"$(INTDIR)\dbtool.pch" /Yc"dbtool.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
+
+"$(INTDIR)\main.obj" "$(INTDIR)\dbtool.pch" : $(SOURCE) "$(INTDIR)"
+ $(CPP) @<<
+ $(CPP_SWITCHES) $(SOURCE)
+<<
+
+
+!ELSEIF "$(CFG)" == "dbtool - Win32 Debug Unicode"
+
+CPP_SWITCHES=/nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "UNICODE" /D "DATABASE_INDEPENDANT" /Fp"$(INTDIR)\dbtool.pch" /Yc"dbtool.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
+
+"$(INTDIR)\main.obj" "$(INTDIR)\dbtool.pch" : $(SOURCE) "$(INTDIR)"
+ $(CPP) @<<
+ $(CPP_SWITCHES) $(SOURCE)
+<<
+
+
+!ELSEIF "$(CFG)" == "dbtool - Win32 Release Unicode"
+
+CPP_SWITCHES=/nologo /MD /W3 /GX /O2 /I "../../include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "UNICODE" /D "DATABASE_INDEPENDANT" /Fp"$(INTDIR)\dbtool.pch" /Yc"dbtool.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
+
+"$(INTDIR)\main.obj" "$(INTDIR)\dbtool.pch" : $(SOURCE) "$(INTDIR)"
+ $(CPP) @<<
+ $(CPP_SWITCHES) $(SOURCE)
+<<
+
+
+!ENDIF
+
+SOURCE=.\wizard.cpp
+
+"$(INTDIR)\wizard.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\worker.cpp
+
+"$(INTDIR)\worker.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\dbtool.pch"
+
+
+SOURCE=.\resource.rc
+
+"$(INTDIR)\resource.res" : $(SOURCE) "$(INTDIR)"
+ $(RSC) $(RSC_PROJ) $(SOURCE)
+
+
+
+!ENDIF
+
diff --git a/plugins/Dbx_mmap_SA/Dbtool/dbtool.vcproj b/plugins/Dbx_mmap_SA/Dbtool/dbtool.vcproj
new file mode 100644
index 0000000000..8fbd7f6fba
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/dbtool.vcproj
@@ -0,0 +1,1380 @@
+<?xml version="1.0" encoding="windows-1251"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="dbtool"
+ ProjectGUID="{EEDDE5B0-C023-40C2-96A5-1D1F4B11B791}"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/dbtool.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../include"
+ PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="dbtool.h"
+ BrowseInformationFile="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/dbtool.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ InlineFunctionExpansion="1"
+ FavorSizeOrSpeed="2"
+ AdditionalIncludeDirectories="../../../include"
+ PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="dbtool.h"
+ AssemblerOutput="3"
+ BrowseInformationFile="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ GenerateMapFile="true"
+ MapFileName="$(OutDir)/$(ProjectName).map"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ OptimizeForWindows98="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug Unicode|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/dbtool.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../include"
+ PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ BufferSecurityCheck="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="dbtool.h"
+ BrowseInformationFile="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release Unicode|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/dbtool.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ FavorSizeOrSpeed="2"
+ OmitFramePointers="false"
+ AdditionalIncludeDirectories="../../../include"
+ PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="dbtool.h"
+ AssemblerOutput="4"
+ BrowseInformationFile="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib"
+ GenerateDebugInformation="true"
+ GenerateMapFile="true"
+ MapFileName="$(OutDir)/$(ProjectName).map"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ OptimizeForWindows98="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="disk.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\encryption.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\langpack.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ ExceptionHandling="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="wizard.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="worker.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <Filter
+ Name="Workers"
+ >
+ <File
+ RelativePath="aggressive.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="contactchain.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="eventchain.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="finaltasks.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="initialchecks.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="modulechain.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="settingschain.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="user.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Wizard Pages"
+ >
+ <File
+ RelativePath="cleaning.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="fileaccess.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="finished.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="openerror.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="progress.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="selectdb.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="welcome.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath="database.h"
+ >
+ </File>
+ <File
+ RelativePath="dbtool.h"
+ >
+ </File>
+ <File
+ RelativePath=".\resource.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ <File
+ RelativePath="res\dbthdr.emf"
+ >
+ </File>
+ <File
+ RelativePath="res\dbtool.emf"
+ >
+ </File>
+ <File
+ RelativePath="res\dbtool.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\res\delete.ico"
+ >
+ </File>
+ <File
+ RelativePath="res\profileg.ico"
+ >
+ </File>
+ <File
+ RelativePath="res\profiler.ico"
+ >
+ </File>
+ <File
+ RelativePath="res\profiley.ico"
+ >
+ </File>
+ <File
+ RelativePath="resource.rc"
+ >
+ </File>
+ </Filter>
+ <File
+ RelativePath="dbtool.exe.manifest"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/plugins/Dbx_mmap_SA/Dbtool/dbtool_10.vcxproj b/plugins/Dbx_mmap_SA/Dbtool/dbtool_10.vcxproj
new file mode 100644
index 0000000000..74cc7b9756
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/dbtool_10.vcxproj
@@ -0,0 +1,569 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug Unicode|Win32">
+ <Configuration>Debug Unicode</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug Unicode|x64">
+ <Configuration>Debug Unicode</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release Unicode|Win32">
+ <Configuration>Release Unicode</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release Unicode|x64">
+ <Configuration>Release Unicode</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectName>dbtool</ProjectName>
+ <ProjectGuid>{A2E9DA24-95E4-4414-94AF-488A382E276A}</ProjectGuid>
+ <RootNamespace>dbtool</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'" Label="Configuration">
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\</IntDir>
+ <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</IgnoreImportLibrary>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</IgnoreImportLibrary>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\</IntDir>
+ <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</IgnoreImportLibrary>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">true</IgnoreImportLibrary>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">$(SolutionDir)$(Configuration)64\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">$(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\</IntDir>
+ <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">true</IgnoreImportLibrary>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">true</IgnoreImportLibrary>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">$(SolutionDir)$(Configuration)64\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">$(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\</IntDir>
+ <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">true</IgnoreImportLibrary>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Debug/dbtool.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>dbtool.h</PrecompiledHeaderFile>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>../../../include/msapi/</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>.\Debug/dbtool.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>dbtool.h</PrecompiledHeaderFile>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>../../../include/msapi/</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalManifestDependencies>type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27*%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Release/dbtool.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>../../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>false</ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>dbtool.h</PrecompiledHeaderFile>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <RuntimeTypeInfo>false</RuntimeTypeInfo>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FloatingPointModel>Fast</FloatingPointModel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>../../../include/msapi/</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalManifestDependencies>type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27X86%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)$(ProjectName).map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>.\Release/dbtool.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>../../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>false</ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>dbtool.h</PrecompiledHeaderFile>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <RuntimeTypeInfo>false</RuntimeTypeInfo>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FloatingPointModel>Fast</FloatingPointModel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>../../../include/msapi/</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalManifestDependencies>type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27*%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <GenerateMapFile>true</GenerateMapFile>
+ <MapFileName>$(OutDir)$(ProjectName).map</MapFileName>
+ <SubSystem>Windows</SubSystem>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Debug/dbtool.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>dbtool.h</PrecompiledHeaderFile>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>../../../include/msapi/</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>.\Debug/dbtool.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>dbtool.h</PrecompiledHeaderFile>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>../../../include/msapi/</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalManifestDependencies>type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27*%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <SubSystem>Windows</SubSystem>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Release/dbtool.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>../../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>false</ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>dbtool.h</PrecompiledHeaderFile>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <RuntimeTypeInfo>false</RuntimeTypeInfo>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FloatingPointModel>Fast</FloatingPointModel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>../../../include/msapi/</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalManifestDependencies>type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27X86%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ <SubSystem>Windows</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>.\Release/dbtool.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>../../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>false</ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>dbtool.h</PrecompiledHeaderFile>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <RuntimeTypeInfo>false</RuntimeTypeInfo>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FloatingPointModel>Fast</FloatingPointModel>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>../../../include/msapi/</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalManifestDependencies>type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27*%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ <SubSystem>Windows</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="disk.cpp" />
+ <ClCompile Include="encryption.cpp" />
+ <ClCompile Include="langpack.cpp" />
+ <ClCompile Include="main.cpp">
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
+ </ClCompile>
+ <ClCompile Include="utf.cpp" />
+ <ClCompile Include="wizard.cpp" />
+ <ClCompile Include="worker.cpp" />
+ <ClCompile Include="aggressive.cpp" />
+ <ClCompile Include="contactchain.cpp" />
+ <ClCompile Include="eventchain.cpp" />
+ <ClCompile Include="finaltasks.cpp" />
+ <ClCompile Include="initialchecks.cpp" />
+ <ClCompile Include="modulechain.cpp" />
+ <ClCompile Include="settingschain.cpp" />
+ <ClCompile Include="user.cpp" />
+ <ClCompile Include="cleaning.cpp" />
+ <ClCompile Include="fileaccess.cpp" />
+ <ClCompile Include="finished.cpp" />
+ <ClCompile Include="openerror.cpp" />
+ <ClCompile Include="progress.cpp" />
+ <ClCompile Include="selectdb.cpp" />
+ <ClCompile Include="welcome.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="database.h" />
+ <ClInclude Include="dbtool.h" />
+ <ClInclude Include="Version.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="res\dbtool.ico" />
+ <None Include="res\profileg.ico" />
+ <None Include="res\profiler.ico" />
+ <None Include="res\profiley.ico" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="resource.rc" />
+ <ResourceCompile Include="Version.rc" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/plugins/Dbx_mmap_SA/Dbtool/dbtool_10.vcxproj.filters b/plugins/Dbx_mmap_SA/Dbtool/dbtool_10.vcxproj.filters
new file mode 100644
index 0000000000..202d0b374d
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/dbtool_10.vcxproj.filters
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{72e8c0e0-409e-4656-8598-9a0c769f0e34}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
+ </Filter>
+ <Filter Include="Source Files\Workers">
+ <UniqueIdentifier>{c81aa4f4-b471-4488-909a-ab503857cb18}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Source Files\Wizard Pages">
+ <UniqueIdentifier>{eccf4f04-aceb-441f-924b-ead9bbb92168}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{12ab2eb9-15e3-4147-ae4a-847ddc95c531}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{07c47951-e20f-43c5-912f-ea300b807935}</UniqueIdentifier>
+ <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="disk.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="langpack.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="main.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="wizard.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="worker.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="aggressive.cpp">
+ <Filter>Source Files\Workers</Filter>
+ </ClCompile>
+ <ClCompile Include="contactchain.cpp">
+ <Filter>Source Files\Workers</Filter>
+ </ClCompile>
+ <ClCompile Include="eventchain.cpp">
+ <Filter>Source Files\Workers</Filter>
+ </ClCompile>
+ <ClCompile Include="finaltasks.cpp">
+ <Filter>Source Files\Workers</Filter>
+ </ClCompile>
+ <ClCompile Include="initialchecks.cpp">
+ <Filter>Source Files\Workers</Filter>
+ </ClCompile>
+ <ClCompile Include="modulechain.cpp">
+ <Filter>Source Files\Workers</Filter>
+ </ClCompile>
+ <ClCompile Include="settingschain.cpp">
+ <Filter>Source Files\Workers</Filter>
+ </ClCompile>
+ <ClCompile Include="user.cpp">
+ <Filter>Source Files\Workers</Filter>
+ </ClCompile>
+ <ClCompile Include="cleaning.cpp">
+ <Filter>Source Files\Wizard Pages</Filter>
+ </ClCompile>
+ <ClCompile Include="fileaccess.cpp">
+ <Filter>Source Files\Wizard Pages</Filter>
+ </ClCompile>
+ <ClCompile Include="finished.cpp">
+ <Filter>Source Files\Wizard Pages</Filter>
+ </ClCompile>
+ <ClCompile Include="openerror.cpp">
+ <Filter>Source Files\Wizard Pages</Filter>
+ </ClCompile>
+ <ClCompile Include="progress.cpp">
+ <Filter>Source Files\Wizard Pages</Filter>
+ </ClCompile>
+ <ClCompile Include="selectdb.cpp">
+ <Filter>Source Files\Wizard Pages</Filter>
+ </ClCompile>
+ <ClCompile Include="welcome.cpp">
+ <Filter>Source Files\Wizard Pages</Filter>
+ </ClCompile>
+ <ClCompile Include="utf.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="encryption.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="database.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="dbtool.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="Version.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="res\dbtool.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\profileg.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\profiler.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\profiley.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="resource.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ <ResourceCompile Include="Version.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/plugins/Dbx_mmap_SA/Dbtool/dbtool_8.vcproj b/plugins/Dbx_mmap_SA/Dbtool/dbtool_8.vcproj
new file mode 100644
index 0000000000..efdcd6867e
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/dbtool_8.vcproj
@@ -0,0 +1,1399 @@
+<?xml version="1.0" encoding="windows-1251"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="dbtool"
+ ProjectGUID="{A2E9DA24-95E4-4414-94AF-488A382E276A}"
+ RootNamespace="dbtool"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/dbtool.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="dbtool.h"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/dbtool.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ InlineFunctionExpansion="1"
+ FavorSizeOrSpeed="2"
+ OmitFramePointers="true"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT"
+ StringPooling="true"
+ ExceptionHandling="0"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="dbtool.h"
+ AssemblerOutput="3"
+ BrowseInformationFile="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalManifestDependencies="type=&apos;Win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; processorArchitecture=&apos;X86&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos;"
+ GenerateDebugInformation="true"
+ GenerateMapFile="true"
+ MapFileName="$(OutDir)/$(ProjectName).map"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ OptimizeForWindows98="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug Unicode|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/dbtool.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="dbtool.h"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release Unicode|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="1"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/dbtool.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ InlineFunctionExpansion="1"
+ FavorSizeOrSpeed="2"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT"
+ StringPooling="true"
+ ExceptionHandling="0"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="dbtool.h"
+ AssemblerOutput="3"
+ BrowseInformationFile="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib"
+ LinkIncremental="0"
+ SuppressStartupBanner="true"
+ AdditionalManifestDependencies="type=&apos;Win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; processorArchitecture=&apos;X86&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos;"
+ GenerateDebugInformation="true"
+ GenerateMapFile="true"
+ MapFileName="$(OutDir)/$(ProjectName).map"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ OptimizeForWindows98="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="disk.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\langpack.cpp"
+ >
+ </File>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="wizard.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="worker.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <Filter
+ Name="Workers"
+ >
+ <File
+ RelativePath="aggressive.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="contactchain.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="eventchain.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="finaltasks.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="initialchecks.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="modulechain.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="settingschain.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="user.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Wizard Pages"
+ >
+ <File
+ RelativePath="cleaning.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="fileaccess.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="finished.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="openerror.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="progress.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="selectdb.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="welcome.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath="database.h"
+ >
+ </File>
+ <File
+ RelativePath="dbtool.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ <File
+ RelativePath="res\dbthdr.emf"
+ >
+ </File>
+ <File
+ RelativePath="res\dbtool.emf"
+ >
+ </File>
+ <File
+ RelativePath="res\dbtool.ico"
+ >
+ </File>
+ <File
+ RelativePath="res\profileg.ico"
+ >
+ </File>
+ <File
+ RelativePath="res\profiler.ico"
+ >
+ </File>
+ <File
+ RelativePath="res\profiley.ico"
+ >
+ </File>
+ <File
+ RelativePath="resource.rc"
+ >
+ </File>
+ </Filter>
+ <File
+ RelativePath="dbtool.exe.manifest"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/plugins/Dbx_mmap_SA/Dbtool/dbtool_9.sln b/plugins/Dbx_mmap_SA/Dbtool/dbtool_9.sln
new file mode 100644
index 0000000000..e9fccb0d9a
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/dbtool_9.sln
@@ -0,0 +1,26 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dbtool", "dbtool_9.vcproj", "{A2E9DA24-95E4-4414-94AF-488A382E276A}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug Unicode|Win32 = Debug Unicode|Win32
+ Debug|Win32 = Debug|Win32
+ Release Unicode|Win32 = Release Unicode|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {A2E9DA24-95E4-4414-94AF-488A382E276A}.Debug Unicode|Win32.ActiveCfg = Debug Unicode|Win32
+ {A2E9DA24-95E4-4414-94AF-488A382E276A}.Debug Unicode|Win32.Build.0 = Debug Unicode|Win32
+ {A2E9DA24-95E4-4414-94AF-488A382E276A}.Debug|Win32.ActiveCfg = Debug|Win32
+ {A2E9DA24-95E4-4414-94AF-488A382E276A}.Debug|Win32.Build.0 = Debug|Win32
+ {A2E9DA24-95E4-4414-94AF-488A382E276A}.Release Unicode|Win32.ActiveCfg = Release Unicode|Win32
+ {A2E9DA24-95E4-4414-94AF-488A382E276A}.Release Unicode|Win32.Build.0 = Release Unicode|Win32
+ {A2E9DA24-95E4-4414-94AF-488A382E276A}.Release|Win32.ActiveCfg = Release|Win32
+ {A2E9DA24-95E4-4414-94AF-488A382E276A}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/plugins/Dbx_mmap_SA/Dbtool/dbtool_9.vcproj b/plugins/Dbx_mmap_SA/Dbtool/dbtool_9.vcproj
new file mode 100644
index 0000000000..1c449dd7bf
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/dbtool_9.vcproj
@@ -0,0 +1,1363 @@
+<?xml version="1.0" encoding="windows-1251"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="dbtool"
+ ProjectGUID="{A2E9DA24-95E4-4414-94AF-488A382E276A}"
+ RootNamespace="dbtool"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/dbtool.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="dbtool.h"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib"
+ AdditionalManifestDependencies="type=&apos;Win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; processorArchitecture=&apos;*&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos;"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/dbtool.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ InlineFunctionExpansion="1"
+ EnableIntrinsicFunctions="false"
+ FavorSizeOrSpeed="2"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT"
+ StringPooling="true"
+ ExceptionHandling="0"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="dbtool.h"
+ AssemblerOutput="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib"
+ LinkIncremental="0"
+ AdditionalManifestDependencies="type=&apos;Win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; processorArchitecture=&apos;*&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos;"
+ GenerateDebugInformation="true"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug Unicode|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/dbtool.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="dbtool.h"
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib"
+ AdditionalManifestDependencies="type=&apos;Win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; processorArchitecture=&apos;*&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos;"
+ LinkIncremental="1"
+ GenerateDebugInformation="true"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release Unicode|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="1"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/dbtool.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ InlineFunctionExpansion="1"
+ FavorSizeOrSpeed="2"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;DATABASE_INDEPENDANT"
+ StringPooling="true"
+ ExceptionHandling="0"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="dbtool.h"
+ AssemblerOutput="3"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib"
+ LinkIncremental="0"
+ AdditionalManifestDependencies="type=&apos;Win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; processorArchitecture=&apos;*&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos;"
+ GenerateDebugInformation="true"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="disk.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\encryption.cpp"
+ >
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="2"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\langpack.cpp"
+ >
+ </File>
+ <File
+ RelativePath="main.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\utf.cpp"
+ >
+ </File>
+ <File
+ RelativePath="wizard.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="worker.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <Filter
+ Name="Workers"
+ >
+ <File
+ RelativePath="aggressive.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="contactchain.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="eventchain.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="finaltasks.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="initialchecks.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="modulechain.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="settingschain.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="user.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Wizard Pages"
+ >
+ <File
+ RelativePath="cleaning.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="fileaccess.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="finished.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="openerror.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="progress.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="selectdb.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="welcome.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath="database.h"
+ >
+ </File>
+ <File
+ RelativePath="dbtool.h"
+ >
+ </File>
+ <File
+ RelativePath=".\resource.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ <File
+ RelativePath="res\dbthdr.emf"
+ >
+ </File>
+ <File
+ RelativePath=".\res\dbtool.bmp"
+ >
+ </File>
+ <File
+ RelativePath="res\dbtool.emf"
+ >
+ </File>
+ <File
+ RelativePath="res\dbtool.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\res\delete.ico"
+ >
+ </File>
+ <File
+ RelativePath="res\profileg.ico"
+ >
+ </File>
+ <File
+ RelativePath="res\profiler.ico"
+ >
+ </File>
+ <File
+ RelativePath="res\profiley.ico"
+ >
+ </File>
+ <File
+ RelativePath="resource.rc"
+ >
+ </File>
+ </Filter>
+ <File
+ RelativePath=".\dbtool.exe.manifest"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/plugins/Dbx_mmap_SA/Dbtool/disk.cpp b/plugins/Dbx_mmap_SA/Dbtool/disk.cpp
new file mode 100644
index 0000000000..685f86569f
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/disk.cpp
@@ -0,0 +1,112 @@
+/*
+Miranda Database Tool
+Copyright (C) 2001-2005 Richard Hughes
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+extern DWORD spaceProcessed,sourceFileSize;
+
+int SignatureValid(DWORD ofs,DWORD signature)
+{
+ DWORD sig;
+
+ if(ofs+sizeof(sig)>=sourceFileSize) {
+ AddToStatus(STATUS_ERROR,TranslateT("Invalid offset found (database truncated?)"));
+ return 0;
+ }
+
+ sig = *(DWORD*)(opts.pFile+ofs);
+
+ return sig==signature;
+}
+
+int PeekSegment(DWORD ofs,PVOID buf,int cbBytes)
+{
+ DWORD bytesRead;
+
+ if(ofs>=sourceFileSize) {
+ AddToStatus(STATUS_ERROR,TranslateT("Invalid offset found"));
+ return ERROR_SEEK;
+ }
+
+ if (ofs+cbBytes>sourceFileSize)
+ bytesRead = sourceFileSize - ofs;
+ else
+ bytesRead = cbBytes;
+
+ if(bytesRead==0) {
+ AddToStatus(STATUS_ERROR,TranslateT("Error reading, database truncated? (%u)"),GetLastError());
+ return ERROR_READ_FAULT;
+ }
+
+ CopyMemory(buf, opts.pFile+ofs, bytesRead);
+
+ if((int)bytesRead<cbBytes) return ERROR_HANDLE_EOF;
+ return ERROR_SUCCESS;
+}
+
+int ReadSegment(DWORD ofs,PVOID buf,int cbBytes)
+{
+ int ret;
+
+ ret=PeekSegment(ofs,buf,cbBytes);
+ if(ret!=ERROR_SUCCESS && ret!=ERROR_HANDLE_EOF) return ret;
+
+ if(opts.bAggressive) {
+ if (ofs+cbBytes>sourceFileSize) {
+ AddToStatus(STATUS_WARNING,TranslateT("Can't write to working file, aggressive mode may be too aggressive now"));
+ ZeroMemory(opts.pFile+ofs,sourceFileSize-ofs);
+ }
+ else
+ ZeroMemory(opts.pFile+ofs,cbBytes);
+ }
+ spaceProcessed+=cbBytes;
+ return ERROR_SUCCESS;
+}
+
+DWORD WriteSegment(DWORD ofs,PVOID buf,int cbBytes)
+{
+ DWORD bytesWritten;
+ if(opts.bCheckOnly) return 0xbfbfbfbf;
+ if(ofs==WSOFS_END) {
+ ofs=dbhdr.ofsFileEnd;
+ dbhdr.ofsFileEnd+=cbBytes;
+ }
+ SetFilePointer(opts.hOutFile,ofs,NULL,FILE_BEGIN);
+ WriteFile(opts.hOutFile,buf,cbBytes,&bytesWritten,NULL);
+ if((int)bytesWritten<cbBytes) {
+ AddToStatus(STATUS_FATAL,TranslateT("Can't write to output file - disk full? (%u)"),GetLastError());
+ return WS_ERROR;
+ }
+ return ofs;
+}
+
+
+int ReadWrittenSegment(DWORD ofs,PVOID buf,int cbBytes)
+{
+ DWORD bytesRead;
+ if(opts.bCheckOnly) return 0xbfbfbfbf;
+ if(ofs + cbBytes > dbhdr.ofsFileEnd )
+ return ERROR_SEEK;
+
+ SetFilePointer(opts.hOutFile,ofs,NULL,FILE_BEGIN);
+ ReadFile(opts.hOutFile,buf,cbBytes,&bytesRead,NULL);
+ if((int)bytesRead<cbBytes)
+ return ERROR_READ_FAULT;
+
+ return ERROR_SUCCESS;
+}
diff --git a/plugins/Dbx_mmap_SA/Dbtool/encryption.cpp b/plugins/Dbx_mmap_SA/Dbtool/encryption.cpp
new file mode 100644
index 0000000000..aabe3f98b2
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/encryption.cpp
@@ -0,0 +1,304 @@
+// (C) Artem Shpynov aka FYR and Igonin Vitaliy aka chaos.persei, 2007 - 2008
+
+#include "dbtool.h"
+
+typedef struct{
+ void* (__stdcall *GenerateKey)(char* pwd);
+ void (__stdcall *FreeKey)(void* key);
+ void (__stdcall *EncryptMem)(BYTE* data, int size, void* key);
+ void (__stdcall *DecryptMem)(BYTE* data, int size, void* key);
+
+ char* Name;
+ char* Info;
+ char* Author;
+ char* Site;
+ char* Email;
+
+ DWORD Version;
+
+ WORD uid;
+} Cryptor;
+
+typedef struct{
+ char dllname[255];
+ HMODULE hLib;
+ Cryptor* cryptor;
+} CryptoModule;
+
+BOOL CALLBACK DlgStdInProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
+
+char encryptKey[255];
+size_t encryptKeyLength;
+
+int wrongPass = 0;
+void* key;
+
+Cryptor* CryptoEngine = NULL;
+
+int ModulesCount = 0;
+CryptoModule* Modules[100];
+
+
+void zero_fill(BYTE * pBuf, size_t bufSize)
+{
+ size_t i;
+ for(i = 0; i < bufSize; i++)
+ pBuf[i] = 0;
+}
+
+void InitSecurity()
+{
+ HMODULE hLib;
+ WIN32_FIND_DATAA fd;
+
+ Cryptor* (__stdcall *GetCryptor)();
+
+ {
+ TCHAR szMirandaDir[MAX_PATH];
+ szMirandaDir[ 0 ] = 0;
+ TCHAR *str2;
+ GetModuleFileName(NULL,szMirandaDir,SIZEOF(szMirandaDir));
+ str2 = _tcsrchr(szMirandaDir,'\\');
+ if( str2 != NULL )
+ *str2=0;
+ _tchdir(szMirandaDir);
+ }
+
+ HANDLE hFile = FindFirstFileA(".\\plugins\\cryptors\\*.dll", &fd);
+
+ AddToStatus(STATUS_MESSAGE,TranslateT("Scanning cryptors directory"));
+
+ ModulesCount = 0;
+ while (hFile != INVALID_HANDLE_VALUE)
+ {
+ char tmp[MAX_PATH], buf[255];
+ strcpy(tmp, ".\\plugins\\cryptors\\");
+ strcat(tmp, fd.cFileName);
+
+ hLib = LoadLibraryA(tmp);
+ if(hLib){
+ GetCryptor = (Cryptor* (__stdcall *)()) GetProcAddress(hLib, "GetCryptor");
+ if(GetCryptor){
+ TCHAR Name[100], Version[100], DllName[100];
+
+
+ Modules[ModulesCount] = (CryptoModule*) malloc(sizeof(CryptoModule));
+ Modules[ModulesCount]->cryptor = GetCryptor();
+ strcpy(Modules[ModulesCount]->dllname, fd.cFileName);
+ Modules[ModulesCount]->hLib = hLib;
+
+ _snprintf(buf,SIZEOF(buf),"%d.%d.%d.%d", HIBYTE(HIWORD(Modules[ModulesCount]->cryptor->Version)), LOBYTE(HIWORD(Modules[ModulesCount]->cryptor->Version)), HIBYTE(LOWORD(Modules[ModulesCount]->cryptor->Version)), LOBYTE(LOWORD(Modules[ModulesCount]->cryptor->Version)));
+#ifdef _UNICODE
+ mbstowcs(Name, Modules[ModulesCount]->cryptor->Name, 100);
+ mbstowcs(Version, buf, 100);
+ mbstowcs(DllName, Modules[ModulesCount]->dllname, 100);
+#else
+ strcpy(Name, Modules[ModulesCount]->cryptor->Name);
+ strcpy(Version, buf);
+ strcpy(DllName, Modules[ModulesCount]->dllname);
+#endif
+ AddToStatus(STATUS_MESSAGE,TranslateT("Cryptor loaded: %s [%s] (%s)"), Name, Version, DllName);
+
+ ModulesCount++;
+ }else{
+ FreeLibrary(hLib);
+ }
+ }
+ if(ModulesCount >= 100) break;
+ if(!FindNextFileA(hFile, &fd)) break;
+ }
+
+ AddToStatus(STATUS_MESSAGE,TranslateT("%d crypto modules loaded"), ModulesCount);
+}
+
+void UnloadSecurity()
+{
+ int i;
+
+ if(CryptoEngine) CryptoEngine->FreeKey(key);
+
+ for(i = 0; i < ModulesCount; i++)
+ {
+ FreeLibrary(Modules[i]->hLib);
+ free(Modules[i]);
+ }
+}
+
+void EncoderInit()
+{
+ encryptKey[encryptKeyLength] = 0;
+ key = CryptoEngine->GenerateKey(encryptKey);
+}
+
+void EncodeCopyMemory(BYTE * dst, void * src, size_t size )
+{
+ memcpy(dst, src, size);
+ CryptoEngine->EncryptMem(dst, (int)size, key);
+}
+
+void DecodeCopyMemory(BYTE * dst, void * src, size_t size )
+{
+ memcpy(dst, src, size);
+ CryptoEngine->DecryptMem(dst, (int)size, key);
+}
+
+
+void EncodeMemory(BYTE * mem, size_t size)
+{
+ CryptoEngine->EncryptMem(mem, (int)size, key);
+}
+
+void DecodeMemory(BYTE * mem, size_t size)
+{
+ CryptoEngine->DecryptMem(mem, (int)size, key);
+}
+
+int bCheckingPass = 0;
+
+int CheckPassword(WORD checkWord, WORD cryptorUID, char * szDBName)
+{
+ WORD ver;
+ int res;
+
+ if(bCheckingPass) return 0;
+ bCheckingPass = 1;
+
+ {
+ int i;
+ int Found = 0;
+ for(i = 0; i < ModulesCount; i++){
+ if(cryptorUID == Modules[i]->cryptor->uid){
+ CryptoEngine = Modules[i]->cryptor;
+ Found = 1;
+ break;
+ }
+ }
+ if(!Found){
+ AddToStatus(STATUS_FATAL, TranslateT("Sorry, but your database encrypted with unknown module"), MB_OK);
+ bCheckingPass = 0;
+ return 0;
+ }
+ }
+
+ {
+ wchar_t Name[100], Author[100];
+
+ mbstowcs(Name, CryptoEngine->Name, 100);
+ mbstowcs(Author, CryptoEngine->Author, 100);
+
+ AddToStatus(STATUS_MESSAGE, TranslateT("Database encrypted with %s by %s"), Name, Author);
+ }
+
+ while(1){
+ res = DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_LOGIN), NULL, (DLGPROC)DlgStdInProc, (LPARAM)szDBName);
+ if(res == IDCANCEL)
+ {
+ wrongPass = 0;
+ bCheckingPass = 0;
+ return 0;
+ }
+ if(encryptKeyLength < 1) continue;
+ EncoderInit();
+ DecodeCopyMemory((BYTE*)&ver, &checkWord, sizeof(checkWord));
+ if(ver == 0x5195)
+ {
+ wrongPass = 0;
+ bCheckingPass = 0;
+ return 1;
+ }
+ wrongPass++;
+ }
+
+ bCheckingPass = 0;
+}
+
+
+UINT oldLangID = 0;
+void LanguageChanged(HWND hDlg)
+{
+ UINT LangID = (UINT)GetKeyboardLayout(0);
+ char Lang[3] = {0};
+ if (LangID != oldLangID)
+ {
+ oldLangID = LangID;
+ GetLocaleInfoA(MAKELCID((LangID & 0xffffffff), SORT_DEFAULT), LOCALE_SABBREVLANGNAME, Lang, 2);
+ SetDlgItemTextA(hDlg, IDC_LANG, Lang);
+ }
+}
+
+BOOL CALLBACK DlgStdInProc(HWND hDlg, UINT uMsg,WPARAM wParam,LPARAM lParam)
+{
+ switch(uMsg)
+ {
+ case WM_INITDIALOG:
+ {
+ HWND hwndCtrl;
+// if(pluginLink && ServiceExists(MS_LANGPACK_TRANSLATEDIALOG))
+ TranslateDialog(hDlg);
+
+ if(lParam && !wrongPass) SetDlgItemTextA(hDlg, IDC_DBNAME, (LPCSTR)lParam);
+ if(wrongPass)
+ {
+ if (wrongPass > 2)
+ {
+ hwndCtrl = GetDlgItem(hDlg, IDC_USERPASS);
+ EnableWindow(hwndCtrl, FALSE);
+ hwndCtrl = GetDlgItem(hDlg, IDOK);
+ EnableWindow(hwndCtrl, FALSE);
+
+ SetDlgItemText(hDlg, IDC_LOGININFO, TranslateT("Too many errors!"));
+
+ }
+ else
+ {
+ SetDlgItemText(hDlg, IDC_LOGININFO, TranslateT("Password is not correct!"));
+ }
+ }
+ oldLangID = 0;
+ SetTimer(hDlg,1,200,NULL);
+ LanguageChanged(hDlg);
+ return TRUE;
+ }
+
+ case WM_CTLCOLORSTATIC:
+ {
+ if ((HWND)lParam == GetDlgItem(hDlg, IDC_LANG))
+ {
+ SetTextColor((HDC)wParam, GetSysColor(COLOR_HIGHLIGHTTEXT));
+ SetBkMode((HDC)wParam, TRANSPARENT);
+ return (BOOL)GetSysColorBrush(COLOR_HIGHLIGHT);
+ }
+
+ return FALSE;
+ }
+
+ case WM_COMMAND:
+ {
+ UINT uid = LOWORD(wParam);
+
+ if(uid == IDOK){
+ if(!GetWindowLongPtr(hDlg,GWLP_USERDATA))
+ {
+ encryptKeyLength = GetDlgItemTextA(hDlg, IDC_USERPASS, encryptKey, 254);
+ EndDialog(hDlg,IDOK);
+ }else{
+
+ }
+ }else if(uid == IDCANCEL){
+ EndDialog(hDlg,IDCANCEL);
+ }
+ }
+ case WM_TIMER:
+ {
+ LanguageChanged(hDlg);
+ return FALSE;
+ }
+ case WM_DESTROY:
+ {
+ KillTimer(hDlg, 1);
+ return FALSE;
+ }
+ }
+
+ return FALSE;
+}
diff --git a/plugins/Dbx_mmap_SA/Dbtool/eventchain.cpp b/plugins/Dbx_mmap_SA/Dbtool/eventchain.cpp
new file mode 100644
index 0000000000..c48ab1b821
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/eventchain.cpp
@@ -0,0 +1,363 @@
+/*
+Miranda Database Tool
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2000-2011 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+static BOOL backLookup;
+static DWORD ofsThisEvent,ofsPrevEvent;
+static DWORD ofsDestPrevEvent;
+static DWORD eventCount;
+static DWORD lastTimestamp;
+static DWORD ofsFirstUnread,timestampFirstUnread;
+static DWORD memsize = 0;
+static DBEvent* memblock = NULL;
+static DBEvent* dbePrevEvent = NULL;
+
+static void ConvertOldEvent( DBEvent*& dbei )
+{
+ int msglen = (int)strlen(( char* )dbei->blob) + 1, msglenW = 0;
+ if ( msglen != (int) dbei->cbBlob ) {
+ int i, count = (( dbei->cbBlob - msglen ) / sizeof( WCHAR ));
+ WCHAR* p = ( WCHAR* )&dbei->blob[ msglen ];
+ for ( i=0; i < count; i++ ) {
+ if ( p[i] == 0 ) {
+ msglenW = i;
+ break;
+ } } }
+ else {
+ if( !is_utf8_string(( char* )dbei->blob) )
+ dbei->flags &= ~DBEF_UTF;
+ }
+
+ if ( msglenW > 0 && msglenW <= msglen ) {
+ char* utf8str = Utf8EncodeUcs2(( WCHAR* )&dbei->blob[ msglen ] );
+ dbei->cbBlob = (DWORD)strlen( utf8str )+1;
+ dbei->flags |= DBEF_UTF;
+ if (offsetof(DBEvent,blob)+dbei->cbBlob > memsize) {
+ memsize = offsetof(DBEvent,blob)+dbei->cbBlob;
+ memblock = (DBEvent*)realloc(memblock, memsize);
+ dbei = memblock;
+ }
+ memcpy( &dbei->blob, utf8str, dbei->cbBlob );
+ free(utf8str);
+} }
+
+static void WriteOfsNextToPrevious(DWORD ofsPrev,DBContact *dbc,DWORD ofsNext)
+{
+ if(ofsPrev)
+ WriteSegment(ofsPrev+offsetof(DBEvent,ofsNext),&ofsNext,sizeof(DWORD));
+ else
+ dbc->ofsFirstEvent=ofsNext;
+}
+
+static void FinishUp(DWORD ofsLast,DBContact *dbc)
+{
+ WriteOfsNextToPrevious(ofsLast,dbc,0);
+ if(eventCount!=dbc->eventCount)
+ AddToStatus(STATUS_WARNING,TranslateT("Event count marked wrongly: correcting"));
+ dbc->eventCount=eventCount;
+ dbc->ofsLastEvent=ofsLast;
+ if(opts.bMarkRead) {
+ dbc->ofsFirstUnreadEvent=0;
+ dbc->timestampFirstUnread=0;
+ }
+ else {
+ dbc->ofsFirstUnreadEvent=ofsFirstUnread;
+ dbc->timestampFirstUnread=timestampFirstUnread;
+ }
+ if (memsize && memblock) {
+ free(memblock);
+ memsize = 0;
+ memblock = NULL;
+ }
+}
+
+static DWORD WriteEvent(DBEvent *dbe)
+{
+ DWORD ofs = WriteSegment( WSOFS_END, dbe, offsetof(DBEvent,blob)+dbe->cbBlob );
+ if ( ofs == WS_ERROR ) {
+ free( memblock );
+ memblock = NULL;
+ memsize = 0;
+ return 0;
+ }
+ return ofs;
+}
+
+int WorkEventChain(DWORD ofsContact,DBContact *dbc,int firstTime)
+{
+ DBEvent *dbeNew,dbeOld;
+ DBEvent *dbePrev = NULL;
+ DWORD ofsDestThis;
+ int isUnread=0;
+
+ if(firstTime) {
+ dbePrevEvent = NULL;
+ ofsPrevEvent=0;
+ ofsDestPrevEvent=0;
+ ofsThisEvent=dbc->ofsFirstEvent;
+ eventCount=0;
+ backLookup=0;
+ lastTimestamp=0;
+ ofsFirstUnread=timestampFirstUnread=0;
+ if(opts.bEraseHistory) {
+ dbc->eventCount=0;
+ dbc->ofsFirstEvent=0;
+ dbc->ofsLastEvent=0;
+ dbc->ofsFirstUnreadEvent=0;
+ dbc->timestampFirstUnread=0;
+ return ERROR_NO_MORE_ITEMS;
+ } }
+
+ if(ofsThisEvent==0) {
+ FinishUp(ofsDestPrevEvent,dbc);
+ return ERROR_NO_MORE_ITEMS;
+ }
+ if(!SignatureValid(ofsThisEvent,DBEVENT_SIGNATURE))
+ {
+ DWORD ofsNew = 0;
+ DWORD ofsTmp = dbc->ofsLastEvent;
+
+ if (!backLookup && ofsTmp) {
+ backLookup = 1;
+ while(SignatureValid(ofsTmp,DBEVENT_SIGNATURE))
+ {
+ if(PeekSegment(ofsTmp,&dbeOld,sizeof(dbeOld))!=ERROR_SUCCESS)
+ break;
+ ofsNew = ofsTmp;
+ ofsTmp = dbeOld.ofsPrev;
+ }
+ }
+ if (ofsNew) {
+ AddToStatus(STATUS_WARNING,TranslateT("Event chain corrupted, trying to recover..."));
+ ofsThisEvent = ofsNew;
+ } else {
+ AddToStatus(STATUS_ERROR,TranslateT("Event chain corrupted, further entries ignored"));
+ FinishUp(ofsDestPrevEvent,dbc);
+ return ERROR_NO_MORE_ITEMS;
+ }
+ }
+
+ if(PeekSegment(ofsThisEvent,&dbeOld,sizeof(dbeOld))!=ERROR_SUCCESS) {
+ FinishUp(ofsDestPrevEvent,dbc);
+ return ERROR_NO_MORE_ITEMS;
+ }
+
+ if(firstTime) {
+ if(!(dbeOld.flags&DBEF_FIRST)) {
+ AddToStatus(STATUS_WARNING,TranslateT("First event not marked as such: correcting"));
+ dbeOld.flags|=DBEF_FIRST;
+ }
+ dbeOld.ofsPrev=ofsContact;
+ lastTimestamp=dbeOld.timestamp;
+ }
+ else if(dbeOld.flags&DBEF_FIRST) {
+ AddToStatus(STATUS_WARNING,TranslateT("Event marked as first which is not: correcting"));
+ dbeOld.flags&=~DBEF_FIRST;
+ }
+
+ if(dbeOld.flags&~(DBEF_FIRST|DBEF_READ|DBEF_SENT|DBEF_RTL|DBEF_UTF)) {
+ AddToStatus(STATUS_WARNING,TranslateT("Extra flags found in event: removing"));
+ dbeOld.flags&=(DBEF_FIRST|DBEF_READ|DBEF_SENT|DBEF_RTL|DBEF_UTF);
+ }
+
+ if(!(dbeOld.flags&(DBEF_READ|DBEF_SENT))) {
+ if(opts.bMarkRead) dbeOld.flags|=DBEF_READ;
+ else if(ofsFirstUnread==0) {
+ if(dbc->ofsFirstUnreadEvent!=ofsThisEvent || dbc->timestampFirstUnread!=dbeOld.timestamp)
+ AddToStatus(STATUS_WARNING,TranslateT("First unread event marked wrong: fixing"));
+ isUnread=1;
+ } }
+
+ if(dbeOld.cbBlob>1024*1024 || dbeOld.cbBlob==0) {
+ AddToStatus(STATUS_ERROR,TranslateT("Infeasibly large event blob: skipping"));
+ ofsThisEvent=dbeOld.ofsNext;
+ return ERROR_SUCCESS;
+ }
+
+ if ( dbePrevEvent && dbeOld.timestamp == lastTimestamp ) {
+ int len = offsetof(DBEvent,blob)+dbePrevEvent->cbBlob;
+ dbePrev = (DBEvent*)malloc(len);
+ memcpy(dbePrev, dbePrevEvent, len);
+ }
+
+ if (offsetof(DBEvent,blob)+dbeOld.cbBlob > memsize) {
+ memsize = offsetof(DBEvent,blob)+dbeOld.cbBlob;
+ memblock = (DBEvent*)realloc(memblock, memsize);
+ }
+ dbeNew=memblock;
+
+ if(ReadSegment(ofsThisEvent,dbeNew,offsetof(DBEvent,blob)+dbeOld.cbBlob)!=ERROR_SUCCESS) {
+ FinishUp(ofsDestPrevEvent,dbc);
+ return ERROR_NO_MORE_ITEMS;
+ }
+
+ if((dbeNew->ofsModuleName=ConvertModuleNameOfs(dbeOld.ofsModuleName))==0) {
+ ofsThisEvent=dbeOld.ofsNext;
+ return ERROR_SUCCESS;
+ }
+
+ if(!firstTime && dbeOld.ofsPrev!=ofsPrevEvent)
+ AddToStatus(STATUS_WARNING,TranslateT("Event not backlinked correctly: fixing"));
+
+ dbeNew->flags=dbeOld.flags;
+ dbeNew->ofsPrev=ofsDestPrevEvent;
+ dbeNew->ofsNext=0;
+
+ if ( dbeOld.eventType == EVENTTYPE_MESSAGE && opts.bConvertUtf )
+ ConvertOldEvent(dbeNew);
+
+ if ( dbePrev )
+ {
+ if ( dbePrev->cbBlob == dbeNew->cbBlob &&
+ dbePrev->ofsModuleName == dbeNew->ofsModuleName &&
+ dbePrev->eventType == dbeNew->eventType &&
+ (dbePrev->flags & DBEF_SENT) == (dbeNew->flags & DBEF_SENT) &&
+ !memcmp( dbePrev->blob, dbeNew->blob, dbeNew->cbBlob )
+ ) {
+ AddToStatus(STATUS_WARNING,TranslateT("Duplicate event was found: skipping"));
+ if (dbc->eventCount)
+ dbc->eventCount--;
+ free(dbePrev);
+ // ofsDestPrevEvent is still the same!
+ ofsPrevEvent=ofsThisEvent;
+ ofsThisEvent=dbeOld.ofsNext;
+ return ERROR_SUCCESS;
+ }
+ free(dbePrev);
+ }
+ else if ( !firstTime && dbeNew->timestamp < lastTimestamp )
+ {
+ DWORD found = 0;
+ DBEvent dbeTmp;
+ DWORD ofsTmp;
+
+ if (opts.bCheckOnly)
+ {
+ if (!opts.bAggressive)
+ {
+ ofsTmp = dbeOld.ofsPrev;
+ while(PeekSegment(ofsTmp,&dbeTmp,sizeof(dbeTmp))==ERROR_SUCCESS)
+ {
+ if (dbeTmp.ofsPrev == ofsContact) {
+ found = 1;
+ break;
+ }
+ if (dbeTmp.timestamp < dbeNew->timestamp) {
+ found = 2;
+ break;
+ }
+ ofsTmp = dbeTmp.ofsPrev;
+ }
+ }
+ AddToStatus(STATUS_WARNING,TranslateT("Event position in chain is not correct"));
+ }
+ else
+ {
+ ofsTmp = ofsDestPrevEvent;
+ while(ReadWrittenSegment(ofsTmp,&dbeTmp,sizeof(dbeTmp))==ERROR_SUCCESS)
+ {
+ if (dbeTmp.ofsPrev == ofsContact) {
+ found = 1;
+ break;
+ }
+ if (dbeTmp.timestamp < dbeNew->timestamp) {
+ found = 2;
+ break;
+ }
+ ofsTmp = dbeTmp.ofsPrev;
+ }
+ if (found)
+ AddToStatus(STATUS_WARNING,TranslateT("Event position in chain is not correct: fixing"));
+ else
+ AddToStatus(STATUS_WARNING,TranslateT("Event position in chain is not correct: unable to fix"));
+ }
+
+ // insert before FIRST
+ if (found == 1 && !opts.bCheckOnly) {
+ dbeNew->flags|=DBEF_FIRST;
+ dbeNew->ofsPrev=ofsContact;
+ dbeNew->ofsNext=dbc->ofsFirstEvent;
+
+ ofsDestThis = WriteEvent(dbeNew);
+ if ( !ofsDestThis )
+ return ERROR_HANDLE_DISK_FULL;
+
+ if ( isUnread && timestampFirstUnread >= dbeNew->timestamp ) {
+ ofsFirstUnread=ofsDestThis;
+ timestampFirstUnread=dbeNew->timestamp;
+ }
+ // fix first event
+ WriteOfsNextToPrevious(0,dbc,ofsDestThis);
+ // fix next event
+ WriteSegment(dbeNew->ofsNext+offsetof(DBEvent,ofsPrev),&ofsDestThis,sizeof(DWORD));
+ dbeTmp.flags &=~DBEF_FIRST;
+ WriteSegment(dbeNew->ofsNext+offsetof(DBEvent,flags),&dbeTmp.flags,sizeof(DWORD));
+ }
+ else if (found == 2 && !opts.bCheckOnly) {
+
+ dbeNew->ofsPrev=ofsTmp;
+ dbeNew->ofsNext=dbeTmp.ofsNext;
+
+ ofsDestThis = WriteEvent(dbeNew);
+ if ( !ofsDestThis )
+ return ERROR_HANDLE_DISK_FULL;
+
+ if ( isUnread && timestampFirstUnread >= dbeNew->timestamp ) {
+ ofsFirstUnread=ofsDestThis;
+ timestampFirstUnread=dbeNew->timestamp;
+ }
+ // fix previous event
+ WriteOfsNextToPrevious(dbeNew->ofsPrev,dbc,ofsDestThis);
+ // fix next event
+ WriteSegment(dbeNew->ofsNext+offsetof(DBEvent,ofsPrev),&ofsDestThis,sizeof(DWORD));
+ }
+
+ if (found) {
+ eventCount++;
+ // ofsDestPrevEvent is still the same!
+ ofsPrevEvent=ofsThisEvent;
+ ofsThisEvent=dbeOld.ofsNext;
+ return ERROR_SUCCESS;
+ }
+ }
+
+ lastTimestamp=dbeNew->timestamp;
+ dbePrevEvent = dbeNew;
+
+ ofsDestThis = WriteEvent(dbeNew);
+ if ( !ofsDestThis )
+ return ERROR_HANDLE_DISK_FULL;
+
+ if ( isUnread ) {
+ ofsFirstUnread=ofsDestThis;
+ timestampFirstUnread=dbeOld.timestamp;
+ }
+
+ eventCount++;
+ WriteOfsNextToPrevious(ofsDestPrevEvent,dbc,ofsDestThis);
+
+ ofsDestPrevEvent=ofsDestThis;
+ ofsPrevEvent=ofsThisEvent;
+ ofsThisEvent=dbeOld.ofsNext;
+ return ERROR_SUCCESS;
+}
diff --git a/plugins/Dbx_mmap_SA/Dbtool/fileaccess.cpp b/plugins/Dbx_mmap_SA/Dbtool/fileaccess.cpp
new file mode 100644
index 0000000000..2fdd16c082
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/fileaccess.cpp
@@ -0,0 +1,69 @@
+/*
+Miranda Database Tool
+Copyright (C) 2001-2005 Richard Hughes
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+INT_PTR CALLBACK FileAccessDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam)
+{
+ INT_PTR bReturn;
+
+ if(DoMyControlProcessing(hdlg,message,wParam,lParam,&bReturn)) return bReturn;
+ switch(message) {
+ case WM_INITDIALOG:
+ CheckDlgButton(hdlg,IDC_CHECKONLY,opts.bCheckOnly);
+ CheckDlgButton(hdlg,IDC_BACKUP,opts.bBackup);
+ CheckDlgButton(hdlg,IDC_AGGRESSIVE,opts.bAggressive);
+ SendMessage(hdlg,WM_COMMAND,MAKEWPARAM(IDC_CHECKONLY,BN_CLICKED),0);
+ TranslateDialog(hdlg);
+ return TRUE;
+ case WZN_PAGECHANGING:
+ opts.bCheckOnly=IsDlgButtonChecked(hdlg,IDC_CHECKONLY);
+ opts.bAggressive=IsDlgButtonChecked(hdlg,IDC_AGGRESSIVE);
+ if(opts.bCheckOnly) opts.bBackup=0;
+ else opts.bBackup=IsDlgButtonChecked(hdlg,IDC_BACKUP);
+ break;
+ case WM_COMMAND:
+ switch(LOWORD(wParam)) {
+ case IDC_BACK:
+ SendMessage(GetParent(hdlg),WZM_GOTOPAGE,IDD_SELECTDB,(LPARAM)SelectDbDlgProc);
+ break;
+ case IDOK:
+ if(opts.bCheckOnly) {
+ if (!opts.hFile) {
+ opts.hFile = CreateFile( opts.filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL );
+ if ( opts.hFile == INVALID_HANDLE_VALUE ) {
+ opts.hFile = NULL;
+ opts.error = GetLastError();
+ SendMessage( GetParent(hdlg), WZM_GOTOPAGE, IDD_OPENERROR, ( LPARAM )OpenErrorDlgProc );
+ break;
+ }
+ }
+ SendMessage(GetParent(hdlg),WZM_GOTOPAGE,IDD_PROGRESS,(LPARAM)ProgressDlgProc);
+ }
+ else
+ SendMessage(GetParent(hdlg),WZM_GOTOPAGE,IDD_CLEANING,(LPARAM)CleaningDlgProc);
+ break;
+ case IDC_CHECKONLY:
+ EnableWindow(GetDlgItem(hdlg,IDC_BACKUP),!IsDlgButtonChecked(hdlg,IDC_CHECKONLY));
+ EnableWindow(GetDlgItem(hdlg,IDC_STBACKUP),!IsDlgButtonChecked(hdlg,IDC_CHECKONLY));
+ break;
+ }
+ break;
+ }
+ return FALSE;
+}
diff --git a/plugins/Dbx_mmap_SA/Dbtool/finaltasks.cpp b/plugins/Dbx_mmap_SA/Dbtool/finaltasks.cpp
new file mode 100644
index 0000000000..b7a99a5189
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/finaltasks.cpp
@@ -0,0 +1,78 @@
+/*
+Miranda Database Tool
+Copyright (C) 2001-2005 Richard Hughes
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+extern int errorCount;
+
+int WorkFinalTasks(int firstTime)
+{
+ FreeModuleChain();
+ AddToStatus(STATUS_MESSAGE,TranslateT("Processing final tasks"));
+ dbhdr.slackSpace=0;
+ if(WriteSegment(0,&dbhdr,sizeof(dbhdr))==WS_ERROR)
+ return ERROR_WRITE_FAULT;
+ if (opts.hFile) {
+ CloseHandle(opts.hFile);
+ opts.hFile = NULL;
+ }
+ if ( opts.hOutFile ) {
+ CloseHandle(opts.hOutFile);
+ opts.hOutFile = NULL;
+ }
+ if (opts.pFile) {
+ UnmapViewOfFile(opts.pFile);
+ opts.pFile = NULL;
+ }
+ if (opts.hMap) {
+ CloseHandle(opts.hMap);
+ opts.hMap = NULL;
+ }
+ if(errorCount && !opts.bBackup && !opts.bCheckOnly) {
+ extern time_t ts;
+ time_t dlg_ts = time(NULL);
+ if ( IDYES == MessageBox( NULL,
+ TranslateT("Errors were encountered, however you selected not to backup the original database. It is strongly recommended that you do so in case important data was omitted. Do you wish to keep a backup of the original database?"),
+ TranslateT("Miranda Database Tool"), MB_YESNO ))
+ opts.bBackup = 1;
+ ts += time(NULL) - dlg_ts;
+ }
+ if(opts.bBackup) {
+ int i;
+ TCHAR dbPath[MAX_PATH],dbFile[MAX_PATH];
+ _tcscpy( dbPath, opts.filename );
+ TCHAR* str2 = _tcsrchr( dbPath, '\\' );
+ if ( str2 != NULL ) {
+ _tcscpy( dbFile, str2+1 );
+ *str2 = 0;
+ }
+ else {
+ _tcscpy( dbFile, dbPath );
+ dbPath[0] = 0;
+ }
+ for(i=1;;i++) {
+ if(i==1) wsprintf(opts.backupFilename,TranslateT("%s\\Backup of %s"),dbPath,dbFile);
+ else wsprintf(opts.backupFilename,TranslateT("%s\\Backup (%d) of %s"),dbPath,i,dbFile);
+ if(_taccess(opts.backupFilename,0)==-1) break;
+ }
+ MoveFile(opts.filename,opts.backupFilename) || AddToStatus(STATUS_WARNING,TranslateT("Unable to rename original file"));
+ }
+ else if(!opts.bCheckOnly) DeleteFile(opts.filename) || AddToStatus(STATUS_WARNING,TranslateT("Unable to delete original file"));
+ if(!opts.bCheckOnly) MoveFile(opts.outputFilename,opts.filename) || AddToStatus(STATUS_WARNING,TranslateT("Unable to rename output file"));
+ return ERROR_NO_MORE_ITEMS;
+}
diff --git a/plugins/Dbx_mmap_SA/Dbtool/finished.cpp b/plugins/Dbx_mmap_SA/Dbtool/finished.cpp
new file mode 100644
index 0000000000..1716f72dd4
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/finished.cpp
@@ -0,0 +1,82 @@
+/*
+Miranda Database Tool
+Copyright (C) 2001-2005 Richard Hughes
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+#define WM_LAUNCHMIRANDA (WM_USER+1)
+INT_PTR CALLBACK FinishedDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam)
+{
+ INT_PTR bReturn;
+
+ if(DoMyControlProcessing(hdlg,message,wParam,lParam,&bReturn)) return bReturn;
+ switch(message) {
+ case WM_INITDIALOG:
+ EnableWindow(GetDlgItem(GetParent(hdlg),IDC_BACK),FALSE);
+ SetDlgItemText(GetParent(hdlg),IDCANCEL,TranslateT("&Finish"));
+ SetWindowLongPtr(GetDlgItem(hdlg,IDC_DBFILE),GWL_STYLE,GetWindowLongPtr(GetDlgItem(hdlg,IDC_DBFILE),GWL_STYLE)|SS_PATHELLIPSIS);
+ SetDlgItemText( hdlg, IDC_DBFILE, opts.filename );
+ if(opts.bBackup) {
+ ShowWindow(GetDlgItem(hdlg,IDC_STBACKUP),TRUE);
+ SetWindowLongPtr(GetDlgItem(hdlg,IDC_BACKUPFILE),GWL_STYLE,GetWindowLongPtr(GetDlgItem(hdlg,IDC_BACKUPFILE),GWL_STYLE)|SS_PATHELLIPSIS);
+ SetDlgItemText(hdlg,IDC_BACKUPFILE,opts.backupFilename);
+ }
+ else ShowWindow(GetDlgItem(hdlg,IDC_STBACKUP),FALSE);
+ TranslateDialog(hdlg);
+ return TRUE;
+ case WM_LAUNCHMIRANDA:
+ if(IsDlgButtonChecked(hdlg,IDC_LAUNCHMIRANDA)) {
+ TCHAR dbFile[MAX_PATH],dbPath[MAX_PATH],*str2;
+ _tcscpy(dbPath,opts.filename);
+ str2 = _tcsrchr(dbPath,'\\');
+ if ( str2 == NULL ) {
+ _tcscpy( dbFile, dbPath );
+ dbPath[ 0 ] = 0;
+ }
+ else {
+ _tcscpy( dbFile, str2+1 );
+ *str2 = 0;
+ }
+ str2 = _tcsrchr( dbFile, '.' );
+ if ( str2 != NULL )
+ *str2 = 0;
+ _tcscat( dbPath, _T("\\miranda32.exe"));
+ if ( GetFileAttributes( dbPath ) == INVALID_FILE_ATTRIBUTES ) {
+ GetModuleFileName( NULL, dbPath, SIZEOF( dbPath ));
+ if (( str2 = _tcsrchr( dbPath, '\\' )) != NULL )
+ *str2 = 0;
+ else
+ dbPath[0] = 0;
+ _tcscat( dbPath, _T("\\miranda32.exe"));
+ }
+ ShellExecute( hdlg, NULL, dbPath, dbFile, _T(""), SW_SHOW );
+ }
+ break;
+ case WZN_CANCELCLICKED:
+ SendMessage(hdlg,WM_LAUNCHMIRANDA,0,0);
+ break;
+ case WM_COMMAND:
+ switch(LOWORD(wParam)) {
+ case IDOK:
+ SendMessage(hdlg,WM_LAUNCHMIRANDA,0,0);
+ SendMessage(GetParent(hdlg),WZM_GOTOPAGE,IDD_SELECTDB,(LPARAM)SelectDbDlgProc);
+ break;
+ }
+ break;
+ }
+ return FALSE;
+}
diff --git a/plugins/Dbx_mmap_SA/Dbtool/initialchecks.cpp b/plugins/Dbx_mmap_SA/Dbtool/initialchecks.cpp
new file mode 100644
index 0000000000..a2f621df46
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/initialchecks.cpp
@@ -0,0 +1,98 @@
+/*
+Miranda Database Tool
+Copyright (C) 2001-2005 Richard Hughes
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+BOOL bEncrypted;
+extern DWORD sourceFileSize,spaceUsed;
+int CheckPassword(WORD version, WORD cryptorUID, char * szDBName);
+void InitSecurity();
+
+int WorkInitialChecks(int firstTime)
+{
+ DWORD bytesRead;
+
+ sourceFileSize=GetFileSize(opts.hFile,NULL);
+ if(sourceFileSize==0) {
+ AddToStatus(STATUS_WARNING,TranslateT("Database is newly created and has no data to process"));
+ AddToStatus(STATUS_SUCCESS,TranslateT("Processing completed successfully"));
+ return ERROR_INVALID_DATA;
+ }
+ ReadFile(opts.hFile,&dbhdr,sizeof(dbhdr),&bytesRead,NULL);
+ if(bytesRead<sizeof(dbhdr)) {
+ AddToStatus(STATUS_FATAL,TranslateT("Database is corrupted and too small to contain any recoverable data"));
+ return ERROR_BAD_FORMAT;
+ }
+ bEncrypted = false;
+ if(memcmp(dbhdr.signature,&dbSignature,sizeof(dbhdr.signature))) {
+ if(memcmp(dbhdr.signature,&dbSignatureEncrypted,sizeof(dbhdr.signature))){
+ AddToStatus(STATUS_FATAL,TranslateT("Database signature is corrupted, automatic repair is impossible"));
+ return ERROR_BAD_FORMAT;
+ }
+ AddToStatus(STATUS_SUCCESS,TranslateT("Database is Secured MMAP database"));
+ InitSecurity();
+ if(CheckPassword(dbhdr.checkWord, dbhdr.cryptorUID, (char*)Translate("your database"))){
+ AddToStatus(STATUS_SUCCESS,TranslateT("Secured MMAP: authorization successful"));
+ bEncrypted = true;
+ }
+ else
+ {
+ AddToStatus(STATUS_FATAL,TranslateT("You are not authorized for access to Database"));
+ return ERROR_BAD_FORMAT;
+ }
+ }
+ if(dbhdr.checkWord!=0x0700 && !bEncrypted) {
+ AddToStatus(STATUS_FATAL,TranslateT("Database is marked as belonging to an unknown version of Miranda"));
+ return ERROR_BAD_FORMAT;
+ }
+ _tcscpy(opts.workingFilename,opts.filename);
+
+ if(opts.bCheckOnly) {
+ _tcscpy( opts.outputFilename, TranslateT("<check only>"));
+ opts.hOutFile=INVALID_HANDLE_VALUE;
+ }
+ else {
+ _tcscpy(opts.outputFilename,opts.filename);
+ *_tcsrchr(opts.outputFilename,'.')=0;
+ _tcscat(opts.outputFilename,TranslateT(" (Output).dat"));
+ opts.hOutFile = CreateFile(opts.outputFilename,GENERIC_WRITE,FILE_SHARE_READ,NULL,CREATE_ALWAYS,FILE_FLAG_SEQUENTIAL_SCAN,NULL);
+ if ( opts.hOutFile == INVALID_HANDLE_VALUE ) {
+ AddToStatus(STATUS_FATAL,TranslateT("Can't create output file (%u)"),GetLastError());
+ return ERROR_ACCESS_DENIED;
+ }
+ }
+
+ opts.hMap = CreateFileMapping(opts.hFile, NULL, opts.bAggressive?PAGE_WRITECOPY:PAGE_READONLY, 0, 0, NULL);
+
+ if (opts.hMap)
+ opts.pFile = (BYTE*)MapViewOfFile(opts.hMap, opts.bAggressive?FILE_MAP_COPY:FILE_MAP_READ, 0, 0 ,0);
+ else {
+ AddToStatus(STATUS_FATAL,TranslateT("Can't create file mapping (%u)"),GetLastError());
+ return ERROR_ACCESS_DENIED;
+ }
+
+ if (!opts.pFile) {
+ AddToStatus(STATUS_FATAL,TranslateT("Can't create map view of file (%u)"),GetLastError());
+ return ERROR_ACCESS_DENIED;
+ }
+ if(ReadSegment(0,&dbhdr,sizeof(dbhdr))!=ERROR_SUCCESS) return ERROR_READ_FAULT;
+ if(WriteSegment(0,&dbhdr,sizeof(dbhdr))==WS_ERROR) return ERROR_HANDLE_DISK_FULL;
+ spaceUsed=dbhdr.ofsFileEnd-dbhdr.slackSpace;
+ dbhdr.ofsFileEnd=sizeof(dbhdr);
+ return ERROR_NO_MORE_ITEMS;
+}
diff --git a/plugins/Dbx_mmap_SA/Dbtool/langpack.cpp b/plugins/Dbx_mmap_SA/Dbtool/langpack.cpp
new file mode 100644
index 0000000000..85df5cdf22
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/langpack.cpp
@@ -0,0 +1,392 @@
+/*
+
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2000-2011 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#include "dbtool.h"
+
+struct LangPackEntry {
+ unsigned linePos;
+ DWORD englishHash;
+ char *english; //not currently used, the hash does everything
+ char *local;
+ wchar_t *wlocal;
+};
+
+struct LangPackStruct {
+ TCHAR filename[MAX_PATH];
+ char language[64];
+ char lastModifiedUsing[64];
+ char authors[256];
+ char authorEmail[128];
+ struct LangPackEntry *entry;
+ int entryCount;
+ LCID localeID;
+ UINT defaultANSICp;
+} static langPack;
+
+static void TrimString(char *str)
+{
+ size_t start, len = strlen(str);
+ while(str[0] && (unsigned char)str[len-1] <= ' ') str[--len] = 0;
+ for (start = 0; str[start] && (unsigned char)str[start] <= ' '; start++);
+ memmove(str, str + start, len - start + 1);
+}
+
+static void TrimStringSimple(char *str)
+{
+ size_t len = strlen(str);
+ if (str[len-1] == '\n') str[--len] = '\0';
+ if (str[len-1] == '\r') str[len-1] = '\0';
+}
+
+static int IsEmpty(char *str)
+{
+ int i = 0;
+
+ while (str[i])
+ {
+ if (str[i] != ' ' && str[i] != '\r' && str[i] != '\n')
+ return 0;
+ i++;
+ }
+ return 1;
+}
+
+void ConvertBackslashes(char *str, UINT fileCp)
+{
+ char *pstr;
+ for (pstr = str; *pstr; pstr = CharNextExA(fileCp, pstr, 0))
+ {
+ if( *pstr == '\\' )
+ {
+ switch( pstr[1] )
+ {
+ case 'n': *pstr = '\n'; break;
+ case 't': *pstr = '\t'; break;
+ case 'r': *pstr = '\r'; break;
+ default: *pstr = pstr[1]; break;
+ }
+ memmove(pstr+1, pstr+2, strlen(pstr+2) + 1);
+ }
+ }
+}
+
+#ifdef _DEBUG
+#pragma optimize( "gt", on )
+#endif
+
+// MurmurHash2
+unsigned int __fastcall hash(const void * key, unsigned int len)
+{
+ // 'm' and 'r' are mixing constants generated offline.
+ // They're not really 'magic', they just happen to work well.
+ const unsigned int m = 0x5bd1e995;
+ const int r = 24;
+
+ // Initialize the hash to a 'random' value
+ unsigned int h = len;
+
+ // Mix 4 bytes at a time into the hash
+ const unsigned char * data = (const unsigned char *)key;
+
+ while(len >= 4)
+ {
+ unsigned int k = *(unsigned int *)data;
+
+ k *= m;
+ k ^= k >> r;
+ k *= m;
+
+ h *= m;
+ h ^= k;
+
+ data += 4;
+ len -= 4;
+ }
+
+ // Handle the last few bytes of the input array
+ switch(len)
+ {
+ case 3: h ^= data[2] << 16;
+ case 2: h ^= data[1] << 8;
+ case 1: h ^= data[0];
+ h *= m;
+ };
+
+ // Do a few final mixes of the hash to ensure the last few
+ // bytes are well-incorporated.
+ h ^= h >> 13;
+ h *= m;
+ h ^= h >> 15;
+
+ return h;
+}
+
+unsigned int __fastcall hashstrW(const char * key)
+{
+ if (key == NULL) return 0;
+ const unsigned int len = (unsigned int)wcslen((const wchar_t*)key);
+ char* buf = (char*)alloca(len + 1);
+ for (unsigned i = 0; i <= len ; ++i)
+ buf[i] = key[i << 1];
+ return hash(buf, len);
+}
+
+__inline unsigned int hashstr(const char * key)
+{
+ if (key == NULL) return 0;
+ const unsigned int len = (unsigned int)strlen((const char*)key);
+ return hash(key, len);
+}
+
+#ifdef _DEBUG
+#pragma optimize( "", on )
+#endif
+
+static int SortLangPackHashesProc(struct LangPackEntry *arg1,struct LangPackEntry *arg2)
+{
+ if(arg1->englishHash<arg2->englishHash) return -1;
+ if(arg1->englishHash>arg2->englishHash) return 1;
+ /* both source strings of the same hash (may not be the same string thou) put
+ the one that was written first to be found first */
+ if(arg1->linePos<arg2->linePos) return -1;
+ if(arg1->linePos>arg2->linePos) return 1;
+ return 0;
+}
+
+
+static int SortLangPackHashesProc2(struct LangPackEntry *arg1,struct LangPackEntry *arg2)
+{
+ if(arg1->englishHash<arg2->englishHash) return -1;
+ if(arg1->englishHash>arg2->englishHash) return 1;
+ return 0;
+}
+
+static int LoadLangPack(const TCHAR *szLangPack)
+{
+ FILE *fp;
+ char line[4096] = "";
+ char *pszColon;
+ char *pszLine;
+ int entriesAlloced;
+ int startOfLine=0;
+ unsigned int linePos=1;
+ LCID langID;
+ UINT fileCp = CP_ACP;
+
+ lstrcpy(langPack.filename,szLangPack);
+ fp = _tfopen(szLangPack,_T("rt"));
+ if(fp==NULL) return 1;
+ fgets(line,sizeof(line),fp);
+ size_t lineLen = strlen(line);
+ if (lineLen >= 3 && line[0]=='\xef' && line[1]=='\xbb' && line[2]=='\xbf')
+ {
+ fileCp = CP_UTF8;
+ memmove(line, line + 3, lineLen - 2);
+ }
+ TrimString(line);
+ if(lstrcmpA(line,"Miranda Language Pack Version 1")) {fclose(fp); return 2;}
+ //headers
+ while(!feof(fp)) {
+ startOfLine=ftell(fp);
+ if(fgets(line,sizeof(line),fp)==NULL) break;
+ TrimString(line);
+ if(IsEmpty(line) || line[0]==';' || line[0]==0) continue;
+ if(line[0]=='[') break;
+ pszColon=strchr(line,':');
+ if(pszColon==NULL) {fclose(fp); return 3;}
+ *pszColon=0;
+ if(!lstrcmpA(line,"Language")) {_snprintf(langPack.language,sizeof(langPack.language),"%s",pszColon+1); TrimString(langPack.language);}
+ else if(!lstrcmpA(line,"Last-Modified-Using")) {_snprintf(langPack.lastModifiedUsing,sizeof(langPack.lastModifiedUsing),"%s",pszColon+1); TrimString(langPack.lastModifiedUsing);}
+ else if(!lstrcmpA(line,"Authors")) {_snprintf(langPack.authors,sizeof(langPack.authors),"%s",pszColon+1); TrimString(langPack.authors);}
+ else if(!lstrcmpA(line,"Author-email")) {_snprintf(langPack.authorEmail,sizeof(langPack.authorEmail),"%s",pszColon+1); TrimString(langPack.authorEmail);}
+ else if(!lstrcmpA(line, "Locale")) {
+ char szBuf[20], *stopped;
+
+ TrimString(pszColon + 1);
+ langID = (USHORT)strtol(pszColon + 1, &stopped, 16);
+ langPack.localeID = MAKELCID(langID, 0);
+ GetLocaleInfoA(langPack.localeID, LOCALE_IDEFAULTANSICODEPAGE, szBuf, 10);
+ szBuf[5] = 0; // codepages have max. 5 digits
+ langPack.defaultANSICp = atoi(szBuf);
+ if (fileCp == CP_ACP)
+ fileCp = langPack.defaultANSICp;
+ }
+ }
+
+ //body
+ fseek(fp,startOfLine,SEEK_SET);
+ entriesAlloced=0;
+ while(!feof(fp)) {
+ if(fgets(line,sizeof(line),fp)==NULL) break;
+ if(IsEmpty(line) || line[0]==';' || line[0]==0) continue;
+ TrimStringSimple(line);
+ ConvertBackslashes(line, fileCp);
+ if(line[0]=='[' && line[lstrlenA(line)-1]==']') {
+ if(langPack.entryCount && langPack.entry[langPack.entryCount-1].local==NULL) {
+ if(langPack.entry[langPack.entryCount-1].english!=NULL) free(langPack.entry[langPack.entryCount-1].english);
+ langPack.entryCount--;
+ }
+ pszLine = line+1;
+ line[lstrlenA(line)-1]='\0';
+ TrimStringSimple(line);
+ if(++langPack.entryCount>entriesAlloced) {
+ entriesAlloced+=128;
+ langPack.entry=(struct LangPackEntry*)realloc(langPack.entry,sizeof(struct LangPackEntry)*entriesAlloced);
+ }
+ langPack.entry[langPack.entryCount-1].english=NULL;
+ langPack.entry[langPack.entryCount-1].englishHash=hashstr(pszLine);
+ langPack.entry[langPack.entryCount-1].local=NULL;
+ langPack.entry[langPack.entryCount-1].wlocal = NULL;
+ langPack.entry[langPack.entryCount-1].linePos=linePos++;
+ }
+ else if(langPack.entryCount) {
+ struct LangPackEntry* E = &langPack.entry[langPack.entryCount-1];
+
+ if(E->local==NULL) {
+ E->local = _strdup(line);
+ if (fileCp == CP_UTF8)
+ Utf8DecodeCP(E->local, langPack.defaultANSICp, NULL);
+
+ {
+ int iNeeded = MultiByteToWideChar(fileCp, 0, line, -1, 0, 0);
+ E->wlocal = (wchar_t *)malloc((iNeeded+1) * sizeof(wchar_t));
+ MultiByteToWideChar(fileCp, 0, line, -1, E->wlocal, iNeeded);
+ }
+ }
+ else {
+ size_t iOldLenA = strlen(E->local);
+ E->local = (char*)realloc(E->local, iOldLenA + strlen(line) + 2);
+ strcat(E->local, "\n");
+ strcat(E->local, line);
+ if (fileCp == CP_UTF8)
+ Utf8DecodeCP(E->local + iOldLenA + 1, langPack.defaultANSICp, NULL);
+ {
+ int iNeeded = MultiByteToWideChar(fileCp, 0, line, -1, 0, 0);
+ size_t iOldLen = wcslen(E->wlocal);
+ E->wlocal = (wchar_t*)realloc(E->wlocal, ( sizeof(wchar_t) * ( iOldLen + iNeeded + 2)));
+ wcscat(E->wlocal, L"\n");
+ MultiByteToWideChar(fileCp, 0, line, -1, E->wlocal + iOldLen+1, iNeeded);
+ }
+ }
+ }
+ }
+ fclose(fp);
+
+ qsort(langPack.entry,langPack.entryCount,sizeof(LangPackEntry),(int(*)(const void*,const void*))SortLangPackHashesProc);
+
+ return 0;
+}
+
+char *LangPackTranslateString(const char *szEnglish, const int W)
+{
+ struct LangPackEntry key,*entry;
+
+ if ( langPack.entryCount == 0 || szEnglish == NULL ) return (char*)szEnglish;
+
+ key.englishHash = W ? hashstrW(szEnglish) : hashstr(szEnglish);
+ entry=(struct LangPackEntry*)bsearch(&key,langPack.entry,langPack.entryCount,sizeof(struct LangPackEntry),(int(*)(const void*,const void*))SortLangPackHashesProc2);
+ if(entry==NULL) return (char*)szEnglish;
+ while(entry>langPack.entry)
+ {
+ entry--;
+ if(entry->englishHash!=key.englishHash) {
+ entry++;
+ return W ? (char *)entry->wlocal : entry->local;
+ }
+ }
+ return W ? (char *)entry->wlocal : entry->local;
+}
+
+#if defined( _UNICODE )
+ #define FLAGS 1
+#else
+ #define FLAGS 0
+#endif
+
+static void TranslateWindow( HWND hwnd )
+{
+ TCHAR title[2048];
+ GetWindowText(hwnd, title, SIZEOF( title ));
+ {
+ TCHAR* result = ( TCHAR* )LangPackTranslateString(( char* )title, FLAGS );
+ if ( result != title )
+ SetWindowText(hwnd, result );
+} }
+
+static BOOL CALLBACK TranslateDialogEnumProc(HWND hwnd,LPARAM lParam)
+{
+ TCHAR szClass[32];
+ int id = GetDlgCtrlID( hwnd );
+
+ GetClassName(hwnd,szClass,SIZEOF(szClass));
+ if(!lstrcmpi(szClass,_T("static")) || !lstrcmpi(szClass,_T("hyperlink")) || !lstrcmpi(szClass,_T("button")) || !lstrcmpi(szClass,_T("MButtonClass")))
+ TranslateWindow(hwnd);
+ else if(!lstrcmpi(szClass,_T("edit"))) {
+ if ( GetWindowLong(hwnd,GWL_STYLE)&ES_READONLY)
+ TranslateWindow(hwnd);
+ }
+ return TRUE;
+}
+
+int TranslateDialog( HWND hwndDlg )
+{
+ TranslateWindow( hwndDlg );
+ EnumChildWindows( hwndDlg,TranslateDialogEnumProc,0);
+ return 0;
+}
+
+void LoadLangPackModule(void)
+{
+ HANDLE hFind;
+ TCHAR szSearch[MAX_PATH], *str2, szLangPack[MAX_PATH];
+ WIN32_FIND_DATA fd;
+
+ GetModuleFileName(GetModuleHandle(NULL),szSearch,MAX_PATH);
+ str2 = _tcsrchr(szSearch, '\\');
+ if (str2) *str2 = 0; else str2 = szSearch;
+ _tcscat(szSearch, _T("\\langpack_*.txt"));
+ hFind = FindFirstFile(szSearch, &fd);
+ if (hFind != INVALID_HANDLE_VALUE)
+ {
+ FindClose(hFind);
+
+ _tcscpy(str2 + 1, fd.cFileName);
+ _tcscpy(szLangPack, szSearch);
+ LoadLangPack(szLangPack);
+ }
+}
+
+void UnloadLangPackModule(void)
+{
+ for (int i = 0; i < langPack.entryCount; i++) {
+ free(langPack.entry[i].english);
+ free(langPack.entry[i].local);
+ free(langPack.entry[i].wlocal);
+ }
+ if (langPack.entryCount) {
+ free(langPack.entry);
+ langPack.entry=0;
+ langPack.entryCount=0;
+ }
+}
+
diff --git a/plugins/Dbx_mmap_SA/Dbtool/langpack_dbtool.txt b/plugins/Dbx_mmap_SA/Dbtool/langpack_dbtool.txt
new file mode 100644
index 0000000000..05ad39086c
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/langpack_dbtool.txt
@@ -0,0 +1,157 @@
+Miranda Language Pack Version 1
+Language: Chinese (Traditional)
+Locale: 0404
+Last-Modified-Using: Miranda IM 0.6.0
+Authors: Stark Wong
+Author-email: starkwong@hotmail.com
+Plugins-included:
+
+; Generated on Jan 17 2007 11:12:35 China Standard Time (CST/GMT+8)
+
+; /dbtool/aggressive.cpp
+[Performing aggressive pass]
+[Aggressive: random junk at %08X: skipping]
+[Aggressive: unlinked data at %08X: can't automatically place]
+
+; /dbtool/contactchain.cpp
+[Contact count marked wrongly: correcting]
+[Processing contact chain]
+[Contact chain corrupted, further entries ignored]
+
+; /dbtool/disk.cpp
+[Invalid offset found]
+[Error reading, database truncated? (%u)]
+[Can't write to working file, aggressive mode may be too aggressive now (%u)]
+[Can't write to output file - disk full? (%u)]
+
+; /dbtool/eventchain.cpp
+[Event count marked wrongly: correcting]
+[Event chain corrupted, trying to recover...]
+[Event chain corrupted, further entries ignored]
+[First event not marked as such: correcting]
+[Event marked as first which is not: correcting]
+[Extra flags found in event: removing]
+[First unread event marked wrong: fixing]
+[Infeasibly large event blob: skipping]
+[Event not backlinked correctly: fixing]
+[Duplicate event was found: skipping]
+[Event position in chain is not correct]
+[Event position in chain is not correct: fixing]
+[Event position in chain is not correct: unable to fix]
+
+; /dbtool/finaltasks.cpp
+[Processing final tasks]
+[Unable to delete aggressive working file]
+[Errors were encountered, however you selected not to backup the original database. It is strongly recommended that you do so in case important data was omitted. Do you wish to keep a backup of the original database?]
+[Miranda Database Tool]
+[%s\\Backup of %s]
+[%s\\Backup (%d) of %s]
+[Unable to rename original file]
+[Unable to delete original file]
+[Unable to rename output file]
+
+; /dbtool/finished.cpp
+[&Finish]
+
+; /dbtool/initialchecks.cpp
+[Database is newly created and has no data to process]
+[Processing completed successfully]
+[Database is corrupted and too small to contain any recoverable data]
+[Database signature is corrupted, automatic repair is impossible]
+[Database is marked as belonging to an unknown version of Miranda]
+[<check only>]
+[(Output).dat]
+[Can't create output file (%u)]
+[Can't create file mapping (%u)]
+[Can't create map view of file (%u)]
+
+; /dbtool/modulechain.cpp
+[Processing module name chain]
+[Module chain corrupted, further entries ignored]
+[Unreasonably long module name, skipping]
+[Module name '%s' is not unique: %d duplicates found)]
+[Invalid module name offset, skipping data]
+
+; /dbtool/progress.cpp
+[Click Next to continue]
+[Processing has not yet completed, if you cancel now then the changes that have currently been made will be rolled back and the original database will be restored. Do you still want to cancel?]
+[Processing has not yet completed, if you go back now then the changes that have currently been made will be rolled back and the original database will be restored. Do you still want to go back?]
+
+; /dbtool/resource.rc:IDD_WELCOME
+[Static]
+[Welcome to the Miranda Database Wizard]
+[Using this Wizard you can compact your Miranda profile database to remove dead space created during normal usage, as well as repair a large number of issues that could affect the database.]
+[To continue, click Next.]
+[This programme is licenced under the terms of the GNU General Public License.]
+
+; /dbtool/resource.rc:IDD_WIZARD
+[< &Back]
+[&Next >]
+[Cancel]
+
+; /dbtool/resource.rc:IDD_SELECTDB
+[Select Miranda Profile]
+[You can choose the Miranda profile database to compact or repair.]
+[Select the &profile database from the list below. If the database you wish to use is not listed here then click Other to browse your computer.]
+[&File:]
+[&Other...]
+
+; /dbtool/resource.rc:IDD_OPENERROR
+[Error Opening Database]
+[There was an error opening the profile database given.]
+[Click Next to try opening the file again, or click Back to select a new profile database to manipulate.]
+[The file may be in use by a currently running copy of Miranda. Exit any running Mirandas and click Next to retry.]
+
+; /dbtool/resource.rc:IDD_FILEACCESS
+[File Access Options]
+[You can select low level options to determine how the database is processed.]
+[Create backup]
+[Creates a backup copy of the database before any of the requested changes are made.]
+[Aggressively find corruption]
+[Scans the database for data that is not linked to any other data. This requires more disk space and more time, so is only required if you suspect corruption.]
+[Check consistency only]
+[Just checks that the database is valid, without writing anything to the disk.]
+
+; /dbtool/resource.rc:IDD_CLEANING
+[Cleaning Options]
+[You can choose to remove information from the database while it is being processed.]
+[Erase all histories]
+[Removes all the saved history for all contacts in the database.]
+[Mark all events read]
+[Marks all the history events as read. This will rectify any problems with old messages always appearing in the message window log box.]
+
+; /dbtool/resource.rc:IDD_PROGRESS
+[Working...]
+[Please wait while the requested operations are being performed.]
+
+; /dbtool/resource.rc:IDD_FINISHED
+[Finished!]
+[All tasks have been completed.]
+[Launch Miranda with this profile]
+[Launches Miranda with the profile that was just worked on.]
+[Backup:]
+[The processing of the database has been completed. Click Next to return to the start of the wizard to select another database to check, or click Finish to exit the wizard.]
+
+; /dbtool/selectdb.cpp
+[Database]
+[Total size]
+[Wasted]
+[Miranda Databases (*.dat)]
+[All Files]
+
+; /dbtool/settingschain.cpp
+[Settings chain corrupted, further entries ignored]
+[Infeasibly large settings blob: skipping]
+[Empty settings group at %08X: skipping]
+
+; /dbtool/user.cpp
+[Processing user data]
+[User corrupted, this could cause major problems]
+[More than one user contact: keeping only first]
+
+; /dbtool/worker.cpp
+[Database worker thread activated]
+[Processing aborted by user]
+[Elapsed time: %d sec]
+[All tasks completed but with errors (%d)]
+[All tasks completed successfully]
diff --git a/plugins/Dbx_mmap_SA/Dbtool/main.cpp b/plugins/Dbx_mmap_SA/Dbtool/main.cpp
new file mode 100644
index 0000000000..014881e34d
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/main.cpp
@@ -0,0 +1,32 @@
+/*
+Miranda Database Tool
+Copyright (C) 2001-2005 Richard Hughes
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+HINSTANCE hInst;
+
+DbToolOptions opts = {0};
+
+int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
+{
+ hInst=hInstance;
+ LoadLangPackModule();
+ InitCommonControls();
+ DialogBox(hInst,MAKEINTRESOURCE(IDD_WIZARD),NULL,WizardDlgProc);
+ return 0;
+}
diff --git a/plugins/Dbx_mmap_SA/Dbtool/modulechain.cpp b/plugins/Dbx_mmap_SA/Dbtool/modulechain.cpp
new file mode 100644
index 0000000000..515ec9bfbd
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/modulechain.cpp
@@ -0,0 +1,148 @@
+/*
+Miranda Database Tool
+Copyright (C) 2001-2005 Richard Hughes
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+struct ModChainEntry {
+ DWORD ofsOld,ofsNew;
+ int size;
+ char name[257];
+} static *modChain=NULL;
+static int modChainCount;
+static DWORD ofsCurrent;
+static int phase,iCurrentModName;
+static DWORD ofsLast;
+static int last_mod = 0;
+
+int WorkModuleChain(int firstTime)
+{
+ DBModuleName moduleName,*newModName;
+
+ if(firstTime) {
+ AddToStatus(STATUS_MESSAGE,TranslateT("Processing module name chain"));
+ modChainCount=0;
+ last_mod = 0;
+ if(modChain!=NULL) free(modChain);
+ modChain = (ModChainEntry*)malloc(sizeof(ModChainEntry));
+ phase=0;
+ ofsCurrent=dbhdr.ofsFirstModuleName;
+ }
+ switch(phase) {
+ case 0:
+ if(ofsCurrent==0) {
+ phase++;
+ return ERROR_SUCCESS;
+ }
+ if(!SignatureValid(ofsCurrent,DBMODULENAME_SIGNATURE)) {
+ AddToStatus(STATUS_ERROR,TranslateT("Module chain corrupted, further entries ignored"));
+ phase++;
+ return ERROR_SUCCESS;
+ }
+ if(PeekSegment(ofsCurrent,&moduleName,offsetof(DBModuleName,name))!=ERROR_SUCCESS) {
+ phase++;
+ return ERROR_SUCCESS;
+ }
+ if(moduleName.cbName>256)
+ AddToStatus(STATUS_WARNING,TranslateT("Unreasonably long module name, skipping"));
+ else {
+ modChain=(ModChainEntry*)realloc(modChain,sizeof(ModChainEntry)*++modChainCount);
+
+ modChain[modChainCount-1].ofsOld=ofsCurrent;
+ modChain[modChainCount-1].size=offsetof(DBModuleName,name)+moduleName.cbName;
+ modChain[modChainCount-1].ofsNew=0;
+
+ if (moduleName.cbName)
+ PeekSegment(ofsCurrent+offsetof(DBModuleName,name),&modChain[modChainCount-1].name,moduleName.cbName);
+ modChain[modChainCount-1].name[moduleName.cbName]=0;
+ }
+ ofsCurrent=moduleName.ofsNext;
+ break;
+ case 1:
+ ofsLast = 0;
+ iCurrentModName=0;
+ dbhdr.ofsFirstModuleName=0;
+ phase++;
+ case 2:
+ if(iCurrentModName>=modChainCount) {
+ DWORD dw = 0;
+ if(ofsLast) WriteSegment(ofsLast+offsetof(DBModuleName,ofsNext),&dw,sizeof(DWORD));
+ return ERROR_NO_MORE_ITEMS;
+ }
+ if(modChain[iCurrentModName].ofsNew==0) {
+ newModName=(DBModuleName*)_alloca(modChain[iCurrentModName].size);
+ if(ReadSegment(modChain[iCurrentModName].ofsOld,newModName,modChain[iCurrentModName].size)!=ERROR_SUCCESS)
+ return ERROR_NO_MORE_ITEMS;
+ if((modChain[iCurrentModName].ofsNew=WriteSegment(WSOFS_END,newModName,modChain[iCurrentModName].size))==WS_ERROR)
+ return ERROR_HANDLE_DISK_FULL;
+ { // check duplicated modulenames
+ int i, n=0;
+ for(i=iCurrentModName+1;i<modChainCount;i++)
+ if(!strcmp(modChain[i].name, modChain[iCurrentModName].name)) {
+ modChain[i].ofsNew = modChain[iCurrentModName].ofsNew;
+ n++;
+ }
+ if (n) {
+ TCHAR *pszModuleName;
+#ifdef UNICODE
+ TCHAR szModuleName[257];
+ MultiByteToWideChar(CP_ACP, 0, modChain[iCurrentModName].name, -1, szModuleName, sizeof(szModuleName) / sizeof(TCHAR));
+ pszModuleName = szModuleName;
+#else
+ pszModuleName = modChain[iCurrentModName].name;
+#endif
+ AddToStatus(STATUS_WARNING,TranslateT("Module name '%s' is not unique: %d duplicates found)"), pszModuleName, n);
+ }
+ }
+ if(iCurrentModName==0)
+ dbhdr.ofsFirstModuleName=modChain[iCurrentModName].ofsNew;
+ else
+ if(WriteSegment(ofsLast+offsetof(DBModuleName,ofsNext),&modChain[iCurrentModName].ofsNew,sizeof(DWORD))==WS_ERROR)
+ return ERROR_HANDLE_DISK_FULL;
+ ofsLast = modChain[iCurrentModName].ofsNew;
+ }
+ iCurrentModName++;
+ break;
+ }
+ return ERROR_SUCCESS;
+}
+
+DWORD ConvertModuleNameOfs(DWORD ofsOld)
+{
+ int i;
+
+ if ( modChain[last_mod].ofsOld==ofsOld )
+ return modChain[last_mod].ofsNew;
+
+ for(i=0;i<modChainCount;i++)
+ if(modChain[i].ofsOld==ofsOld) {
+ last_mod = i;
+ return modChain[last_mod].ofsNew;
+ }
+
+ AddToStatus(STATUS_ERROR,TranslateT("Invalid module name offset, skipping data"));
+ return 0;
+}
+
+void FreeModuleChain()
+{
+ if(modChain!=NULL) {
+ free(modChain);
+ modChain = NULL;
+ last_mod = 0;
+ }
+}
diff --git a/plugins/Dbx_mmap_SA/Dbtool/openerror.cpp b/plugins/Dbx_mmap_SA/Dbtool/openerror.cpp
new file mode 100644
index 0000000000..292d688be7
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/openerror.cpp
@@ -0,0 +1,55 @@
+/*
+Miranda Database Tool
+Copyright (C) 2001-2005 Richard Hughes
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+INT_PTR CALLBACK OpenErrorDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam)
+{
+ INT_PTR bReturn;
+
+ if(DoMyControlProcessing(hdlg,message,wParam,lParam,&bReturn)) return bReturn;
+ switch(message) {
+ case WM_INITDIALOG:
+ { TCHAR szError[256];
+ FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,NULL,opts.error,0,szError,SIZEOF(szError),NULL);
+ SetDlgItemText(hdlg,IDC_ERRORTEXT,szError);
+ }
+ if(opts.error==ERROR_SHARING_VIOLATION) ShowWindow(GetDlgItem(hdlg,IDC_INUSE),SW_SHOW);
+ SetWindowLongPtr( GetDlgItem( hdlg, IDC_FILE ), GWL_STYLE, GetWindowLongPtr( GetDlgItem( hdlg, IDC_FILE ), GWL_STYLE ) | SS_PATHELLIPSIS );
+ TranslateDialog( hdlg );
+ SetDlgItemText( hdlg, IDC_FILE, opts.filename );
+ return TRUE;
+ case WM_COMMAND:
+ switch(LOWORD(wParam)) {
+ case IDC_BACK:
+ SendMessage(GetParent(hdlg),WZM_GOTOPAGE,IDD_SELECTDB,(LPARAM)SelectDbDlgProc);
+ break;
+ case IDOK:
+ opts.hFile = CreateFile( opts.filename, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL );
+ if ( opts.hFile == INVALID_HANDLE_VALUE ) {
+ opts.hFile = NULL;
+ opts.error = GetLastError();
+ SendMessage( GetParent( hdlg ), WZM_GOTOPAGE, IDD_OPENERROR, ( LPARAM )OpenErrorDlgProc );
+ }
+ else SendMessage( GetParent( hdlg ), WZM_GOTOPAGE, IDD_FILEACCESS, ( LPARAM )FileAccessDlgProc );
+ break;
+ }
+ break;
+ }
+ return FALSE;
+}
diff --git a/plugins/Dbx_mmap_SA/Dbtool/progress.cpp b/plugins/Dbx_mmap_SA/Dbtool/progress.cpp
new file mode 100644
index 0000000000..4b7d7979b4
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/progress.cpp
@@ -0,0 +1,213 @@
+/*
+Miranda Database Tool
+Copyright (C) 2001-2005 Richard Hughes
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+#define WM_PROCESSINGDONE (WM_USER+1)
+
+void __cdecl WorkerThread(void *unused);
+static HWND hwndStatus,hdlgProgress,hwndBar;
+HANDLE hEventRun = NULL, hEventAbort = NULL;
+int errorCount;
+
+int AddToStatus(DWORD flags, TCHAR* fmt,...)
+{
+ va_list vararg;
+ TCHAR str[256];
+ int i,ret;
+
+ va_start(vararg,fmt);
+ ret=_vsntprintf(str,SIZEOF(str),fmt,vararg);
+ va_end(vararg);
+ i=SendMessage(hwndStatus,LB_ADDSTRING,0,(LPARAM)str);
+ SendMessage(hwndStatus,LB_SETITEMDATA,i,flags);
+ InvalidateRect(hwndStatus,NULL,FALSE);
+ SendMessage(hwndStatus,LB_SETTOPINDEX,i,0);
+#ifdef _DEBUG
+ OutputDebugString(str);
+ OutputDebugStringA("\n");
+#endif
+ if((flags&STATUS_CLASSMASK)==STATUS_ERROR) errorCount++;
+ return ret;
+}
+
+void SetProgressBar(int perThou)
+{
+ SendMessage(hwndBar,PBM_SETPOS,perThou,0);
+}
+
+void ProcessingDone(void)
+{
+ if (opts.pFile) {
+ UnmapViewOfFile(opts.pFile);
+ opts.pFile = NULL;
+ }
+ if (opts.hMap) {
+ CloseHandle(opts.hMap);
+ opts.hMap = NULL;
+ }
+ SendMessage(hdlgProgress,WM_PROCESSINGDONE,0,0);
+}
+
+INT_PTR CALLBACK ProgressDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam)
+{
+ INT_PTR bReturn;
+ static int fontHeight,listWidth;
+ static int manualAbort;
+ static HFONT hBoldFont = NULL;
+
+ if(DoMyControlProcessing(hdlg,message,wParam,lParam,&bReturn)) return bReturn;
+ switch(message) {
+ case WM_INITDIALOG:
+ EnableWindow(GetDlgItem(GetParent(hdlg),IDOK),FALSE);
+ hdlgProgress=hdlg;
+ hwndStatus=GetDlgItem(hdlg,IDC_STATUS);
+ errorCount=0;
+ hwndBar=GetDlgItem(hdlg,IDC_PROGRESS);
+ SendMessage(hwndBar,PBM_SETRANGE,0,MAKELPARAM(0,1000));
+ { HDC hdc;
+ HFONT hFont,hoFont;
+ SIZE s;
+ hdc=GetDC(NULL);
+ hFont=(HFONT)SendMessage(hdlg,WM_GETFONT,0,0);
+ hoFont=(HFONT)SelectObject(hdc,hFont);
+ GetTextExtentPoint32(hdc,_T("x"),1,&s);
+ SelectObject(hdc,hoFont);
+ ReleaseDC(NULL,hdc);
+ fontHeight=s.cy;
+ }
+ { RECT rc;
+ GetClientRect(GetDlgItem(hdlg,IDC_STATUS),&rc);
+ listWidth=rc.right;
+ }
+ {
+ LOGFONT lf;
+ GetObject((HFONT)SendDlgItemMessage(hdlg,IDC_STATUS,WM_GETFONT,0,0),sizeof(lf),&lf);
+ lf.lfWeight=FW_BOLD;
+ hBoldFont=CreateFontIndirect(&lf);
+ }
+ manualAbort=0;
+ hEventRun=CreateEvent(NULL,TRUE,TRUE,NULL);
+ hEventAbort=CreateEvent(NULL,TRUE,FALSE,NULL);
+ TranslateDialog(hdlg);
+ _beginthread(WorkerThread,0,NULL);
+ return TRUE;
+ case WM_MEASUREITEM:
+ { LPMEASUREITEMSTRUCT mis=(LPMEASUREITEMSTRUCT)lParam;
+ mis->itemWidth=listWidth;
+ mis->itemHeight=fontHeight;
+ return TRUE;
+ }
+ case WM_DRAWITEM:
+ { LPDRAWITEMSTRUCT dis=(LPDRAWITEMSTRUCT)lParam;
+ TCHAR str[256];
+ int bold=0;
+ HFONT hoFont;
+ if((int)dis->itemID==-1) break;
+ SendMessage(dis->hwndItem,LB_GETTEXT,dis->itemID,(LPARAM)str);
+ switch(dis->itemData&STATUS_CLASSMASK) {
+ case STATUS_MESSAGE:
+ SetTextColor(dis->hDC,RGB(0,0,0));
+ break;
+ case STATUS_WARNING:
+ SetTextColor(dis->hDC,RGB(192,128,0));
+ break;
+ case STATUS_ERROR:
+ SetTextColor(dis->hDC,RGB(192,0,0));
+ break;
+ case STATUS_FATAL:
+ bold=1;
+ SetTextColor(dis->hDC,RGB(192,0,0));
+ break;
+ case STATUS_SUCCESS:
+ bold=1;
+ SetTextColor(dis->hDC,RGB(0,192,0));
+ break;
+ }
+ if(bold) hoFont=(HFONT)SelectObject(dis->hDC,hBoldFont);
+ ExtTextOut(dis->hDC,dis->rcItem.left,dis->rcItem.top,ETO_CLIPPED|ETO_OPAQUE,&dis->rcItem,str,(UINT)_tcslen(str),NULL);
+ if(bold) SelectObject(dis->hDC,hoFont);
+ return TRUE;
+ }
+ case WM_PROCESSINGDONE:
+ SetProgressBar(1000);
+ EnableWindow(GetDlgItem(GetParent(hdlg),IDOK),TRUE);
+ if(manualAbort==1)
+ EndDialog(GetParent(hdlg),0);
+ else if(manualAbort==2) {
+ if(opts.bCheckOnly)
+ SendMessage(GetParent(hdlg),WZM_GOTOPAGE,IDD_FILEACCESS,(LPARAM)FileAccessDlgProc);
+ else {
+ SendMessage(GetParent(hdlg),WZM_GOTOPAGE,IDD_CLEANING,(LPARAM)CleaningDlgProc);
+ CloseHandle(opts.hOutFile);
+ opts.hOutFile = NULL;
+ }
+ break;
+ }
+ AddToStatus(STATUS_SUCCESS,TranslateT("Click Next to continue"));
+ break;
+ case WZN_CANCELCLICKED:
+ ResetEvent(hEventRun);
+ if(IsWindowEnabled(GetDlgItem(GetParent(hdlg),IDOK))) break;
+ if(MessageBox(hdlg,TranslateT("Processing has not yet completed, if you cancel now then the changes that have currently been made will be rolled back and the original database will be restored. Do you still want to cancel?"),TranslateT("Miranda Database Tool"),MB_YESNO)==IDYES) {
+ manualAbort=1;
+ SetEvent(hEventAbort);
+ }
+ SetEvent(hEventRun);
+ SetWindowLongPtr(hdlg,DWLP_MSGRESULT,TRUE);
+ return TRUE;
+ case WM_COMMAND:
+ switch(LOWORD(wParam)) {
+ case IDC_BACK:
+ ResetEvent(hEventRun);
+ if(!IsWindowEnabled(GetDlgItem(GetParent(hdlg),IDOK))) {
+ if(MessageBox(hdlg,TranslateT("Processing has not yet completed, if you go back now then the changes that have currently been made will be rolled back and the original database will be restored. Do you still want to go back?"),TranslateT("Miranda Database Tool"),MB_YESNO)==IDYES) {
+ manualAbort=2;
+ SetEvent(hEventAbort);
+ }
+ SetEvent(hEventRun);
+ break;
+ }
+ SetEvent(hEventRun);
+ if(opts.bCheckOnly)
+ SendMessage(GetParent(hdlg),WZM_GOTOPAGE,IDD_FILEACCESS,(LPARAM)FileAccessDlgProc);
+ else
+ SendMessage(GetParent(hdlg),WZM_GOTOPAGE,IDD_CLEANING,(LPARAM)CleaningDlgProc);
+ break;
+ case IDOK:
+ SendMessage(GetParent(hdlg),WZM_GOTOPAGE,IDD_FINISHED,(LPARAM)FinishedDlgProc);
+ break;
+ }
+ break;
+ case WM_DESTROY:
+ if (hEventAbort) {
+ CloseHandle(hEventAbort);
+ hEventAbort = NULL;
+ }
+ if (hEventRun) {
+ CloseHandle(hEventRun);
+ hEventRun = NULL;
+ }
+ if (hBoldFont) {
+ DeleteObject(hBoldFont);
+ hBoldFont = NULL;
+ }
+ break;
+ }
+ return FALSE;
+}
diff --git a/plugins/Dbx_mmap_SA/Dbtool/res/dbtool.bmp b/plugins/Dbx_mmap_SA/Dbtool/res/dbtool.bmp
new file mode 100644
index 0000000000..30a050bd61
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/res/dbtool.bmp
Binary files differ
diff --git a/plugins/Dbx_mmap_SA/Dbtool/res/dbtool.ico b/plugins/Dbx_mmap_SA/Dbtool/res/dbtool.ico
new file mode 100644
index 0000000000..b752129bc5
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/res/dbtool.ico
Binary files differ
diff --git a/plugins/Dbx_mmap_SA/Dbtool/res/delete.ico b/plugins/Dbx_mmap_SA/Dbtool/res/delete.ico
new file mode 100644
index 0000000000..6e39da592b
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/res/delete.ico
Binary files differ
diff --git a/plugins/Dbx_mmap_SA/Dbtool/res/profileg.ico b/plugins/Dbx_mmap_SA/Dbtool/res/profileg.ico
new file mode 100644
index 0000000000..1cd1caa5e4
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/res/profileg.ico
Binary files differ
diff --git a/plugins/Dbx_mmap_SA/Dbtool/res/profiler.ico b/plugins/Dbx_mmap_SA/Dbtool/res/profiler.ico
new file mode 100644
index 0000000000..2dc702c863
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/res/profiler.ico
Binary files differ
diff --git a/plugins/Dbx_mmap_SA/Dbtool/res/profiley.ico b/plugins/Dbx_mmap_SA/Dbtool/res/profiley.ico
new file mode 100644
index 0000000000..d482ee47ad
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/res/profiley.ico
Binary files differ
diff --git a/plugins/Dbx_mmap_SA/Dbtool/resource.h b/plugins/Dbx_mmap_SA/Dbtool/resource.h
new file mode 100644
index 0000000000..f92176c33f
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/resource.h
@@ -0,0 +1,58 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by resource.rc
+//
+#define IDC_BACK 3
+#define IDD_WIZARD 101
+#define IDI_DBTOOL 102
+#define IDI_PROFILEGREEN 104
+#define IDR_DEFAULT1 104
+#define IDI_PROFILEYELLOW 105
+#define IDB_BITMAP1 105
+#define IDD_WELCOME 106
+#define IDI_PROFILERED 106
+#define IDD_SELECTDB 107
+#define IDD_OPENERROR 108
+#define IDD_FILEACCESS 109
+#define IDD_CLEANING 110
+#define IDD_PROGRESS 111
+#define IDD_FINISHED 112
+#define IDI_BAD 113
+#define IDD_LOGIN 113
+#define IDC_WATERMARK 1000
+#define IDC_TITLE 1001
+#define IDC_HDRLOGO 1002
+#define IDC_DBLIST 1003
+#define IDC_FILE 1004
+#define IDC_OTHER 1005
+#define IDC_ERRORTEXT 1006
+#define IDC_INUSE 1007
+#define IDC_BACKUP 1008
+#define IDC_AGGRESSIVE 1009
+#define IDC_ERASEHISTORY 1010
+#define IDC_CHECKONLY 1010
+#define IDC_MARKREAD 1011
+#define IDC_PROGRESS 1011
+#define IDC_STATUS 1012
+#define IDC_STBACKUP 1013
+#define IDC_LAUNCHMIRANDA 1015
+#define IDC_DBFILE 1016
+#define IDC_BACKUPFILE 1017
+#define IDC_CHECK1 1018
+#define IDC_CONVERTUTF 1018
+#define IDC_DBNAME 1019
+#define IDC_USERPASS 1021
+#define IDC_LANG 1022
+#define IDC_LOGININFO 1023
+#define IDC_STATIC -1
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 114
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1024
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/plugins/Dbx_mmap_SA/Dbtool/resource.rc b/plugins/Dbx_mmap_SA/Dbtool/resource.rc
new file mode 100644
index 0000000000..7aa4cba249
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/resource.rc
@@ -0,0 +1,368 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include <windows.h>
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// Neutral resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU)
+#ifdef _WIN32
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Bitmap
+//
+
+IDB_BITMAP1 BITMAP "res\\dbtool.bmp"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_LOGIN DIALOGEX 0, 0, 182, 78
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
+EXSTYLE WS_EX_TOPMOST | WS_EX_TOOLWINDOW
+CAPTION "Miranda MMAP Secured Database"
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+ DEFPUSHBUTTON "OK",IDOK,33,59,54,14
+ PUSHBUTTON "Cancel",IDCANCEL,91,59,54,14
+ CTEXT "Please enter password for",IDC_LOGININFO,6,4,169,8
+ CTEXT "",IDC_DBNAME,5,14,169,8
+ EDITTEXT IDC_USERPASS,15,33,132,14,ES_PASSWORD | ES_AUTOHSCROLL
+ CTEXT "EN",IDC_LANG,155,32,16,14,SS_CENTERIMAGE
+ CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,0,26,181,1
+ CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,0,53,181,1
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO
+BEGIN
+ IDD_LOGIN, DIALOG
+ BEGIN
+ LEFTMARGIN, 6
+ RIGHTMARGIN, 175
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 73
+ HORZGUIDE, 68
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+#endif // Russian resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// RT_MANIFEST
+//
+
+1 RT_MANIFEST "dbtool.exe.manifest"
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.K.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_WELCOME DIALOGEX 0, 0, 262, 143
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ CONTROL IDI_PROFILEYELLOW,IDC_WATERMARK,"Static",SS_BITMAP,0,0,63,143
+ LTEXT "whiterect",IDC_STATIC,63,0,199,143
+ LTEXT "Welcome to the Miranda Database Wizard",IDC_TITLE,77,12,178,24,0,WS_EX_TRANSPARENT
+ LTEXT "Using this Wizard you can compact your Miranda profile database to remove dead space created during normal usage, as well as repair a large number of issues that could affect the database.",IDC_STATIC,77,46,178,32,0,WS_EX_TRANSPARENT
+ LTEXT "To continue, click Next.",IDC_STATIC,77,85,178,8,0,WS_EX_TRANSPARENT
+ LTEXT "This programme is licenced under the terms of the GNU General Public License.",IDC_STATIC,77,122,178,16,WS_DISABLED
+END
+
+IDD_WIZARD DIALOGEX 0, 0, 262, 174
+STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_CAPTION | WS_SYSMENU
+EXSTYLE WS_EX_CONTROLPARENT
+CAPTION "Miranda Database Tool"
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ PUSHBUTTON "< &Back",IDC_BACK,96,153,50,14
+ DEFPUSHBUTTON "&Next >",IDOK,146,153,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,205,153,50,14
+ CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,-5,143,269,1
+END
+
+IDD_SELECTDB DIALOGEX 0, 0, 262, 143
+STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | WS_CHILD
+EXSTYLE WS_EX_CONTROLPARENT
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ LTEXT "whiterect",IDC_STATIC,2,0,259,32
+ LTEXT "Select Miranda Profile",IDC_STATIC,11,6,206,8,WS_BORDER
+ ICON IDI_DBTOOL,IDC_HDRLOGO,234,3,20,20
+ LTEXT "You can choose the Miranda profile database to compact or repair.",IDC_STATIC,20,14,220,16
+ LTEXT "Select the &profile database from the list below. If the database you wish to use is not listed here then click Other to browse your computer.",IDC_STATIC,10,35,242,16
+ CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,-1,32,264,1
+ CONTROL "List1",IDC_DBLIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | LVS_AUTOARRANGE | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,10,53,242,72
+ LTEXT "&File:",IDC_STATIC,10,130,20,8
+ EDITTEXT IDC_FILE,32,128,176,12,ES_AUTOHSCROLL
+ PUSHBUTTON "&Other...",IDC_OTHER,212,128,40,12
+END
+
+IDD_OPENERROR DIALOGEX 0, 0, 262, 143
+STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | WS_CHILD
+EXSTYLE WS_EX_CONTROLPARENT
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ LTEXT "whiterect",IDC_STATIC,0,0,261,32
+ LTEXT "Error Opening Database",IDC_STATIC,11,6,206,8,WS_BORDER
+ ICON IDI_DBTOOL,IDC_HDRLOGO,234,3,20,20
+ LTEXT "There was an error opening the profile database given.",IDC_STATIC,20,14,197,16
+ CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,-1,32,264,1
+ LTEXT "",IDC_ERRORTEXT,23,38,226,16,SS_NOPREFIX | WS_BORDER
+ LTEXT "Click Next to try opening the file again, or click Back to select a new profile database to manipulate.",IDC_STATIC,23,67,226,16
+ LTEXT "The file may be in use by a currently running copy of Miranda. Exit any running Mirandas and click Next to retry.",IDC_INUSE,23,87,226,16,NOT WS_VISIBLE
+ LTEXT "",IDC_FILE,23,57,226,8,SS_NOPREFIX
+END
+
+IDD_FILEACCESS DIALOGEX 0, 0, 262, 143
+STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | WS_CHILD
+EXSTYLE WS_EX_CONTROLPARENT
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ LTEXT "whiterect",IDC_STATIC,0,0,261,32
+ LTEXT "File Access Options",IDC_STATIC,11,6,206,8,WS_BORDER
+ ICON IDI_DBTOOL,IDC_HDRLOGO,234,3,20,20
+ LTEXT "You can select low level options to determine how the database is processed.",IDC_STATIC,20,14,197,16
+ CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,-1,32,264,1
+ CONTROL "Create backup",IDC_BACKUP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,69,226,10,WS_EX_CLIENTEDGE
+ LTEXT "Creates a backup copy of the database before any of the requested changes are made.",IDC_STBACKUP,37,80,212,16
+ CONTROL "Aggressively find corruption",IDC_AGGRESSIVE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,100,226,10,WS_EX_CLIENTEDGE
+ LTEXT "Scans the database for data that is not linked to any other data. This requires more disk space and more time, so is only required if you suspect corruption.",IDC_STATIC,37,111,212,24
+ CONTROL "Check consistency only",IDC_CHECKONLY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,38,226,10,WS_EX_CLIENTEDGE
+ LTEXT "Just checks that the database is valid, without writing anything to the disk.",IDC_STATIC,37,49,212,16
+END
+
+IDD_CLEANING DIALOGEX 0, 0, 262, 143
+STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | WS_CHILD
+EXSTYLE WS_EX_CONTROLPARENT
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ LTEXT "whiterect",IDC_STATIC,0,0,261,32
+ LTEXT "Cleaning Options",IDC_STATIC,11,6,206,8,WS_BORDER
+ ICON IDI_DBTOOL,IDC_HDRLOGO,234,3,20,20
+ LTEXT "You can choose to remove information from the database while it is being processed.",IDC_STATIC,20,14,220,16
+ CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,-1,32,264,1
+ CONTROL "Erase all histories",IDC_ERASEHISTORY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,38,226,10,WS_EX_CLIENTEDGE
+ LTEXT "Removes all the saved history for all contacts in the database.",IDC_STATIC,37,49,212,8
+ CONTROL "Mark all events read",IDC_MARKREAD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,62,226,10,WS_EX_CLIENTEDGE
+ LTEXT "Marks all the history events as read. This will rectify any problems with old messages always appearing in the message window log box.",IDC_STATIC,37,73,212,24
+ CONTROL "Convert old Unicode messages to UTF8",IDC_CONVERTUTF,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,101,226,10,WS_EX_CLIENTEDGE
+ LTEXT "Converts history messages in pre-0.7 format (ANSI+UCS2) to the new UTF8 format supported by 0.7. Saves the database space in most cases (recommended).",IDC_STATIC,37,111,212,25
+END
+
+IDD_PROGRESS DIALOGEX 0, 0, 262, 143
+STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | WS_CHILD
+EXSTYLE WS_EX_CONTROLPARENT
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ LTEXT "whiterect",-1,0,0,261,32
+ LTEXT "Working...",-1,11,6,206,8,WS_BORDER
+ ICON IDI_DBTOOL,IDC_HDRLOGO,234,3,20,20
+ LTEXT "Please wait while the requested operations are being performed.",-1,20,14,197,16
+ CONTROL "",-1,"Static",SS_ETCHEDHORZ,-1,32,264,1
+ CONTROL "Progress1",IDC_PROGRESS,"msctls_progress32",PBS_SMOOTH | WS_BORDER,20,38,222,11
+ LISTBOX IDC_STATUS,20,52,222,84,NOT LBS_NOTIFY | LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_DISABLENOSCROLL | LBS_NOSEL | WS_VSCROLL | WS_TABSTOP
+END
+
+IDD_FINISHED DIALOGEX 0, 0, 262, 143
+STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | WS_CHILD
+EXSTYLE WS_EX_CONTROLPARENT
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ LTEXT "whiterect",IDC_STATIC,0,0,262,32
+ LTEXT "Finished!",IDC_STATIC,11,6,206,8,WS_BORDER
+ ICON IDI_DBTOOL,IDC_HDRLOGO,234,3,20,20
+ LTEXT "All tasks have been completed.",IDC_STATIC,20,14,197,16
+ CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,-1,32,264,1
+ CONTROL "Launch Miranda with this profile",IDC_LAUNCHMIRANDA,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,87,239,10,WS_EX_CLIENTEDGE
+ LTEXT "Launches Miranda with the profile that was just worked on.",IDC_STATIC,37,98,225,8
+ LTEXT "",IDC_DBFILE,23,68,239,8,SS_NOPREFIX | WS_BORDER
+ RTEXT "Backup:",IDC_STBACKUP,23,76,30,8
+ LTEXT "",IDC_BACKUPFILE,69,76,193,8,SS_NOPREFIX
+ LTEXT "The processing of the database has been completed. Click Next to return to the start of the wizard to select another database to check, or click Finish to exit the wizard.",IDC_STATIC,23,38,220,24
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO
+BEGIN
+ IDD_WELCOME, DIALOG
+ BEGIN
+ LEFTMARGIN, 5
+ RIGHTMARGIN, 255
+ VERTGUIDE, 77
+ TOPMARGIN, 5
+ BOTTOMMARGIN, 138
+ END
+
+ IDD_WIZARD, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 255
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 167
+ END
+
+ IDD_SELECTDB, DIALOG
+ BEGIN
+ LEFTMARGIN, 23
+ RIGHTMARGIN, 249
+ TOPMARGIN, 38
+ BOTTOMMARGIN, 136
+ END
+
+ IDD_OPENERROR, DIALOG
+ BEGIN
+ LEFTMARGIN, 23
+ RIGHTMARGIN, 249
+ TOPMARGIN, 38
+ BOTTOMMARGIN, 136
+ END
+
+ IDD_FILEACCESS, DIALOG
+ BEGIN
+ LEFTMARGIN, 23
+ RIGHTMARGIN, 249
+ VERTGUIDE, 37
+ TOPMARGIN, 38
+ BOTTOMMARGIN, 136
+ END
+
+ IDD_CLEANING, DIALOG
+ BEGIN
+ LEFTMARGIN, 23
+ RIGHTMARGIN, 249
+ VERTGUIDE, 37
+ TOPMARGIN, 38
+ BOTTOMMARGIN, 136
+ END
+
+ IDD_PROGRESS, DIALOG
+ BEGIN
+ LEFTMARGIN, 20
+ RIGHTMARGIN, 242
+ TOPMARGIN, 38
+ BOTTOMMARGIN, 136
+ END
+
+ IDD_FINISHED, DIALOG
+ BEGIN
+ LEFTMARGIN, 23
+ VERTGUIDE, 37
+ TOPMARGIN, 38
+ BOTTOMMARGIN, 136
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include <windows.h>\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_DBTOOL ICON "res\\dbtool.ico"
+IDI_PROFILEGREEN ICON "res\\profileg.ico"
+IDI_PROFILEYELLOW ICON "res\\profiley.ico"
+IDI_PROFILERED ICON "res\\profiler.ico"
+IDI_BAD ICON "res\\delete.ico"
+
+#endif // Neutral resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/plugins/Dbx_mmap_SA/Dbtool/selectdb.cpp b/plugins/Dbx_mmap_SA/Dbtool/selectdb.cpp
new file mode 100644
index 0000000000..d8fa36ed75
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/selectdb.cpp
@@ -0,0 +1,303 @@
+/*
+Miranda Database Tool
+Copyright (C) 2001-2005 Richard Hughes
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+void GetProfileDirectory(TCHAR* szMirandaDir, TCHAR* szPath, int cbPath)
+{
+ TCHAR szProfileDir[MAX_PATH], szExpandedProfileDir[MAX_PATH], szMirandaBootIni[MAX_PATH];
+
+ lstrcpy(szMirandaBootIni,szMirandaDir);
+ lstrcat(szMirandaBootIni,_T("\\mirandaboot.ini"));
+ GetPrivateProfileString(_T("Database"),_T("ProfileDir"),_T("./Profiles"),szProfileDir,SIZEOF(szProfileDir),szMirandaBootIni);
+ ExpandEnvironmentStrings(szProfileDir,szExpandedProfileDir,SIZEOF(szExpandedProfileDir));
+ _tchdir(szMirandaDir);
+ if(!_tfullpath(szPath,szExpandedProfileDir,cbPath))
+ lstrcpyn(szPath,szMirandaDir,cbPath);
+ if(szPath[lstrlen(szPath)-1]=='\\')
+ szPath[lstrlen(szPath)-1] = 0;
+}
+
+static int AddDatabaseToList(HWND hwndList, TCHAR* filename, TCHAR* dir)
+{
+ LV_ITEM lvi;
+ int iNewItem;
+ TCHAR szSize[20], *pName, *pDot, szName[MAX_PATH];
+ HANDLE hDbFile;
+ DBHeader dbhdr;
+ DWORD bytesRead;
+ DWORD totalSize,wasted=0;
+ int broken=0;
+
+ lvi.mask=LVIF_PARAM;
+ lvi.iSubItem=0;
+ for(lvi.iItem=ListView_GetItemCount(hwndList)-1;lvi.iItem>=0;lvi.iItem--) {
+ ListView_GetItem(hwndList,&lvi);
+ if( !_tcsicmp(( TCHAR* )lvi.lParam,filename)) return lvi.iItem;
+ }
+ hDbFile=CreateFile(filename,GENERIC_READ,FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,0,NULL);
+ if ( hDbFile == INVALID_HANDLE_VALUE )
+ return -1;
+
+ ReadFile(hDbFile,&dbhdr,sizeof(dbhdr),&bytesRead,NULL);
+ totalSize=GetFileSize(hDbFile,NULL);
+
+ broken = (bytesRead<sizeof(dbhdr) || memcmp(dbhdr.signature,&dbSignature,sizeof(dbhdr.signature)));
+
+ if(!broken) {
+ wasted = dbhdr.slackSpace;
+ if (totalSize>dbhdr.ofsFileEnd)
+ wasted+=totalSize-dbhdr.ofsFileEnd;
+ }
+ CloseHandle(hDbFile);
+
+ pName = _tcsrchr(filename,'\\');
+ if ( pName == NULL )
+ pName = ( LPTSTR )filename;
+ else
+ pName++;
+ _tcscpy(szName,dir);
+ _tcscat(szName,pName);
+ pDot = _tcsrchr( szName, '.' );
+ if ( pDot != NULL && !_tcsicmp( pDot, _T(".dat")) )
+ *pDot=0;
+
+ lvi.iItem = 0;
+ lvi.mask = LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE;
+ lvi.iSubItem = 0;
+ lvi.lParam = ( LPARAM )_tcsdup(filename);
+ lvi.pszText = szName;
+ if (broken)
+ lvi.iImage = 3;
+ else if ( wasted < 1024*128 )
+ lvi.iImage = 0;
+ else if ( wasted < 1024*256 + (DWORD)(totalSize > 2*1024*1024 ) ? 256 * 1024 : 0 )
+ lvi.iImage=1;
+ else
+ lvi.iImage=2;
+
+ iNewItem = ListView_InsertItem(hwndList, &lvi );
+ _stprintf(szSize,_T("%.2lf MB"),totalSize/1048576.0);
+ ListView_SetItemText(hwndList,iNewItem,1,szSize);
+ if ( !broken ) {
+ _stprintf(szSize,_T("%.2lf MB"),wasted/1048576.0);
+ ListView_SetItemText(hwndList,iNewItem,2,szSize);
+ }
+ return iNewItem;
+}
+
+void FindAdd(HWND hdlg, TCHAR *szProfileDir, TCHAR *szPrefix)
+{
+ HANDLE hFind;
+ WIN32_FIND_DATA fd;
+ TCHAR szSearchPath[MAX_PATH],szFilename[MAX_PATH];
+
+ lstrcpy(szSearchPath,szProfileDir);
+ lstrcat(szSearchPath,_T("\\*.*"));
+
+ hFind=FindFirstFile(szSearchPath,&fd);
+ if (hFind!=INVALID_HANDLE_VALUE) {
+ do {
+ if ((fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && _tcscmp(fd.cFileName, _T(".")) && _tcscmp(fd.cFileName, _T(".."))) {
+ wsprintf(szFilename,_T("%s\\%s\\%s.dat"),szProfileDir,fd.cFileName,fd.cFileName);
+ if (_taccess(szFilename, 0) == 0)
+ AddDatabaseToList(GetDlgItem(hdlg,IDC_DBLIST),szFilename,szPrefix);
+ }
+ } while(FindNextFile(hFind,&fd));
+ FindClose(hFind);
+ }
+}
+
+TCHAR *addstring(TCHAR *str, TCHAR *add) {
+ _tcscpy(str,add);
+ return str + _tcslen(add) + 1;
+}
+
+INT_PTR CALLBACK SelectDbDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam)
+{
+ INT_PTR bReturn;
+ if ( DoMyControlProcessing( hdlg, message, wParam, lParam, &bReturn ))
+ return bReturn;
+
+ switch ( message ) {
+ case WM_INITDIALOG:
+ {
+ TCHAR szMirandaPath[MAX_PATH];
+ szMirandaPath[ 0 ] = 0;
+ { HIMAGELIST hIml;
+ hIml=ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON),
+ (IsWinVerXPPlus() ? ILC_COLOR32 : ILC_COLOR16) | ILC_MASK, 3, 3);
+ ImageList_AddIcon(hIml,LoadIcon(hInst,MAKEINTRESOURCE(IDI_PROFILEGREEN)));
+ ImageList_AddIcon(hIml,LoadIcon(hInst,MAKEINTRESOURCE(IDI_PROFILEYELLOW)));
+ ImageList_AddIcon(hIml,LoadIcon(hInst,MAKEINTRESOURCE(IDI_PROFILERED)));
+ ImageList_AddIcon(hIml,LoadIcon(hInst,MAKEINTRESOURCE(IDI_BAD)));
+ ListView_SetImageList(GetDlgItem(hdlg,IDC_DBLIST),hIml,LVSIL_SMALL);
+ }
+ ListView_SetExtendedListViewStyleEx(GetDlgItem(hdlg,IDC_DBLIST),LVS_EX_FULLROWSELECT,LVS_EX_FULLROWSELECT);
+ { LV_COLUMN lvc;
+ lvc.mask = LVCF_WIDTH | LVCF_FMT | LVCF_TEXT;
+ lvc.cx = 205;
+ lvc.fmt = LVCFMT_LEFT;
+ lvc.pszText = TranslateT("Database");
+ ListView_InsertColumn( GetDlgItem(hdlg,IDC_DBLIST), 0, &lvc );
+ lvc.cx = 68;
+ lvc.fmt = LVCFMT_RIGHT;
+ lvc.pszText = TranslateT("Total size");
+ ListView_InsertColumn(GetDlgItem(hdlg,IDC_DBLIST), 1, &lvc );
+ lvc.pszText = TranslateT("Wasted");
+ ListView_InsertColumn(GetDlgItem(hdlg,IDC_DBLIST), 2, &lvc );
+ }
+ {
+ TCHAR *str2;
+ GetModuleFileName(NULL,szMirandaPath,SIZEOF(szMirandaPath));
+ str2 = _tcsrchr(szMirandaPath,'\\');
+ if( str2 != NULL )
+ *str2=0;
+ }
+ {
+ int i = 0;
+ HKEY hKey;
+ TCHAR szProfileDir[MAX_PATH];
+ DWORD cbData = SIZEOF(szMirandaPath);
+ TCHAR szMirandaProfiles[MAX_PATH];
+
+ _tcscpy(szMirandaProfiles, szMirandaPath);
+ _tcscat(szMirandaProfiles, _T("\\Profiles"));
+ GetProfileDirectory(szMirandaPath,szProfileDir,SIZEOF(szProfileDir));
+
+ // search in profile dir (using ini file)
+ if( lstrcmpi(szProfileDir,szMirandaProfiles) )
+ FindAdd(hdlg, szProfileDir, _T("[ini]\\"));
+
+ FindAdd(hdlg, szMirandaProfiles, _T("[prf]\\"));
+ // search in current dir (as DBTOOL)
+ FindAdd(hdlg, szMirandaPath, _T("[ . ]\\"));
+
+ // search in profile dir (using registry path + ini file)
+ if(RegOpenKeyEx(HKEY_LOCAL_MACHINE,_T("Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\miranda32.exe"),0,KEY_QUERY_VALUE,&hKey) == ERROR_SUCCESS) {
+ if(RegQueryValueEx(hKey,_T("Path"),NULL,NULL,(PBYTE)szMirandaPath,&cbData) == ERROR_SUCCESS) {
+ if( lstrcmp(szProfileDir,szMirandaPath) ) {
+ GetProfileDirectory(szMirandaPath,szProfileDir,SIZEOF(szProfileDir));
+ FindAdd(hdlg, szProfileDir, _T("[reg]\\"));
+ }
+ }
+ RegCloseKey(hKey);
+ }
+ // select
+ if ( opts.filename[0] )
+ i = AddDatabaseToList( GetDlgItem( hdlg, IDC_DBLIST ), opts.filename, _T("") );
+ if ( i == -1 )
+ i = 0;
+ ListView_SetItemState( GetDlgItem(hdlg,IDC_DBLIST), i, LVIS_SELECTED, LVIS_SELECTED );
+ }
+ if ( opts.hFile != NULL && opts.hFile != INVALID_HANDLE_VALUE ) {
+ CloseHandle( opts.hFile );
+ opts.hFile = NULL;
+ }
+ TranslateDialog( hdlg );
+ return TRUE;
+ }
+
+ case WZN_PAGECHANGING:
+ GetDlgItemText( hdlg, IDC_FILE, opts.filename, SIZEOF(opts.filename));
+ break;
+
+ case WM_COMMAND:
+ switch(LOWORD(wParam)) {
+ case IDC_FILE:
+ if(HIWORD(wParam)==EN_CHANGE)
+ EnableWindow(GetDlgItem(GetParent(hdlg),IDOK),GetWindowTextLength(GetDlgItem(hdlg,IDC_FILE)));
+ break;
+ case IDC_OTHER:
+ { OPENFILENAME ofn={0};
+ TCHAR str[MAX_PATH];
+
+ // _T("Miranda Databases (*.dat)\0*.DAT\0All Files (*)\0*\0");
+ TCHAR *filter, *tmp, *tmp1, *tmp2;
+ tmp1 = TranslateT("Miranda Databases (*.dat)");
+ tmp2 = TranslateT("All Files");
+ filter = tmp = (TCHAR*)_alloca((_tcslen(tmp1)+_tcslen(tmp2)+11)*sizeof(TCHAR));
+ tmp = addstring(tmp, tmp1);
+ tmp = addstring(tmp, _T("*.DAT"));
+ tmp = addstring(tmp, tmp2);
+ tmp = addstring(tmp, _T("*"));
+ *tmp = 0;
+
+ GetDlgItemText( hdlg, IDC_FILE, str, SIZEOF( str ));
+ ofn.lStructSize = sizeof(ofn);
+ ofn.hwndOwner = hdlg;
+ ofn.hInstance = NULL;
+ ofn.lpstrFilter = filter;
+ ofn.lpstrDefExt = _T("dat");
+ ofn.lpstrFile = str;
+ ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;
+ ofn.nMaxFile = SIZEOF(str);
+ ofn.nMaxFileTitle = MAX_PATH;
+ if ( GetOpenFileName( &ofn )) {
+ int i;
+ i = AddDatabaseToList( GetDlgItem(hdlg,IDC_DBLIST), str, _T("") );
+ if ( i == -1 )
+ i=0;
+ ListView_SetItemState( GetDlgItem(hdlg,IDC_DBLIST), i, LVIS_SELECTED, LVIS_SELECTED );
+ }
+ break;
+ }
+ case IDC_BACK:
+ SendMessage(GetParent(hdlg),WZM_GOTOPAGE,IDD_WELCOME,(LPARAM)WelcomeDlgProc);
+ break;
+ case IDOK:
+ opts.hFile = CreateFile( opts.filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL );
+ if ( opts.hFile == INVALID_HANDLE_VALUE ) {
+ opts.hFile = NULL;
+ opts.error = GetLastError();
+ SendMessage( GetParent(hdlg), WZM_GOTOPAGE, IDD_OPENERROR, ( LPARAM )OpenErrorDlgProc );
+ }
+ else SendMessage( GetParent(hdlg), WZM_GOTOPAGE, IDD_FILEACCESS, (LPARAM)FileAccessDlgProc );
+ break;
+ }
+ break;
+ case WM_NOTIFY:
+ switch(((LPNMHDR)lParam)->idFrom) {
+ case IDC_DBLIST:
+ switch(((LPNMLISTVIEW)lParam)->hdr.code) {
+ case LVN_ITEMCHANGED:
+ { LV_ITEM lvi;
+ lvi.iItem=ListView_GetNextItem(GetDlgItem(hdlg,IDC_DBLIST),-1,LVNI_SELECTED);
+ if(lvi.iItem==-1) break;
+ lvi.mask=LVIF_PARAM;
+ ListView_GetItem(GetDlgItem(hdlg,IDC_DBLIST),&lvi);
+ SetDlgItemText(hdlg,IDC_FILE,(TCHAR*)lvi.lParam);
+ SendMessage(hdlg,WM_COMMAND,MAKEWPARAM(IDC_FILE,EN_CHANGE),(LPARAM)GetDlgItem(hdlg,IDC_FILE));
+ break;
+ }
+ }
+ break;
+ }
+ break;
+ case WM_DESTROY:
+ { LV_ITEM lvi;
+ lvi.mask=LVIF_PARAM;
+ for(lvi.iItem=ListView_GetItemCount(GetDlgItem(hdlg,IDC_DBLIST))-1;lvi.iItem>=0;lvi.iItem--) {
+ ListView_GetItem(GetDlgItem(hdlg,IDC_DBLIST),&lvi);
+ free((char*)lvi.lParam);
+ }
+ }
+ break;
+ }
+ return FALSE;
+}
diff --git a/plugins/Dbx_mmap_SA/Dbtool/settingschain.cpp b/plugins/Dbx_mmap_SA/Dbtool/settingschain.cpp
new file mode 100644
index 0000000000..6c7b95febc
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/settingschain.cpp
@@ -0,0 +1,72 @@
+/*
+Miranda Database Tool
+Copyright (C) 2001-2005 Richard Hughes
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+static DWORD ofsThisSettings,ofsDestPrevSettings;
+
+int WorkSettingsChain(DWORD ofsContact,DBContact *dbc,int firstTime)
+{
+ DBContactSettings *dbcsNew,dbcsOld;
+ DWORD ofsDestThis;
+ int ret;
+
+ if(firstTime) {
+ ofsDestPrevSettings=0;
+ ofsThisSettings=dbc->ofsFirstSettings;
+ dbc->ofsFirstSettings=0;
+ }
+ if(ofsThisSettings==0)
+ return ERROR_NO_MORE_ITEMS;
+ if(!SignatureValid(ofsThisSettings,DBCONTACTSETTINGS_SIGNATURE)) {
+ AddToStatus(STATUS_ERROR,TranslateT("Settings chain corrupted, further entries ignored"));
+ return ERROR_NO_MORE_ITEMS;
+ }
+ if(PeekSegment(ofsThisSettings,&dbcsOld,sizeof(dbcsOld))!=ERROR_SUCCESS)
+ return ERROR_NO_MORE_ITEMS;
+ if(dbcsOld.cbBlob>256*1024 || dbcsOld.cbBlob==0) {
+ AddToStatus(STATUS_ERROR,TranslateT("Infeasibly large settings blob: skipping"));
+ ofsThisSettings=dbcsOld.ofsNext;
+ return ERROR_SUCCESS;
+ }
+ dbcsNew=(DBContactSettings*)_alloca(offsetof(DBContactSettings,blob)+dbcsOld.cbBlob);
+ if((ret=ReadSegment(ofsThisSettings,dbcsNew,offsetof(DBContactSettings,blob)+dbcsOld.cbBlob))!=ERROR_SUCCESS) {
+ if(ret!=ERROR_HANDLE_EOF) { //eof is OK because blank space at the end doesn't matter
+ return ERROR_NO_MORE_ITEMS;
+ }
+ }
+ if((dbcsNew->ofsModuleName=ConvertModuleNameOfs(dbcsOld.ofsModuleName))==0) {
+ ofsThisSettings=dbcsOld.ofsNext;
+ return ERROR_SUCCESS;
+ }
+ if(dbcsNew->blob[0]==0) {
+ AddToStatus(STATUS_MESSAGE,TranslateT("Empty settings group at %08X: skipping"),ofsThisSettings);
+ ofsThisSettings=dbcsOld.ofsNext;
+ return ERROR_SUCCESS;
+ }
+ dbcsNew->ofsNext=0;
+ //TODO? validate all settings in blob/compact if necessary
+ if((ofsDestThis=WriteSegment(WSOFS_END,dbcsNew,offsetof(DBContactSettings,blob)+dbcsNew->cbBlob))==WS_ERROR) {
+ return ERROR_HANDLE_DISK_FULL;
+ }
+ if(ofsDestPrevSettings) WriteSegment(ofsDestPrevSettings+offsetof(DBContactSettings,ofsNext),&ofsDestThis,sizeof(DWORD));
+ else dbc->ofsFirstSettings=ofsDestThis;
+ ofsDestPrevSettings=ofsDestThis;
+ ofsThisSettings=dbcsOld.ofsNext;
+ return ERROR_SUCCESS;
+}
diff --git a/plugins/Dbx_mmap_SA/Dbtool/user.cpp b/plugins/Dbx_mmap_SA/Dbtool/user.cpp
new file mode 100644
index 0000000000..79f30eace7
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/user.cpp
@@ -0,0 +1,71 @@
+/*
+Miranda Database Tool
+Copyright (C) 2001-2005 Richard Hughes
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+static DBContact user;
+static int phase;
+static DWORD ofsUser;
+
+int WorkSettingsChain(DWORD ofsContact,DBContact *dbc,int firstTime);
+int WorkEventChain(DWORD ofsContact,DBContact *dbc,int firstTime);
+
+int WorkUser(int firstTime)
+{
+ int first=0;
+
+ if(firstTime) {
+ AddToStatus(STATUS_MESSAGE,TranslateT("Processing user data"));
+ if(!SignatureValid(dbhdr.ofsUser,DBCONTACT_SIGNATURE)) {
+ AddToStatus(STATUS_ERROR,TranslateT("User corrupted, this could cause major problems"));
+ return ERROR_NO_MORE_ITEMS;
+ }
+ if(ReadSegment(dbhdr.ofsUser,&user,sizeof(DBContact))!=ERROR_SUCCESS)
+ return ERROR_NO_MORE_ITEMS;
+ if(user.ofsNext) {
+ AddToStatus(STATUS_WARNING,TranslateT("More than one user contact: keeping only first"));
+ user.ofsNext=0;
+ }
+ if((ofsUser=WriteSegment(WSOFS_END,&user,sizeof(DBContact)))==WS_ERROR)
+ return ERROR_HANDLE_DISK_FULL;
+ dbhdr.ofsUser=ofsUser;
+ phase=0;
+ first=1;
+ }
+ switch(phase) {
+ int ret;
+
+ case 0:
+ ret=WorkSettingsChain(ofsUser,&user,first);
+ if(ret==ERROR_NO_MORE_ITEMS) {
+ phase++; first=1;
+ }
+ else if(ret) return ret;
+ else break;
+ case 1:
+ ret=WorkEventChain(ofsUser,&user,first);
+ if(ret==ERROR_NO_MORE_ITEMS) {
+ if(WriteSegment(ofsUser,&user,sizeof(DBContact))==WS_ERROR)
+ return ERROR_HANDLE_DISK_FULL;
+ return ERROR_NO_MORE_ITEMS;
+ }
+ else if(ret) return ret;
+ break;
+ }
+ return ERROR_SUCCESS;
+} \ No newline at end of file
diff --git a/plugins/Dbx_mmap_SA/Dbtool/utf.cpp b/plugins/Dbx_mmap_SA/Dbtool/utf.cpp
new file mode 100644
index 0000000000..157d5d00f5
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/utf.cpp
@@ -0,0 +1,445 @@
+/*
+
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2000-2009 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+ Copyright 2000 Alexandre Julliard of Wine project
+ (UTF-8 conversion routines)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#include "dbtool.h"
+
+/* number of following bytes in sequence based on first byte value (for bytes above 0x7f) */
+static const char utf8_length[128] =
+{
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0x80-0x8f */
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0x90-0x9f */
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0xa0-0xaf */
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0xb0-0xbf */
+ 0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 0xc0-0xcf */
+ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 0xd0-0xdf */
+ 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, /* 0xe0-0xef */
+ 3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0 /* 0xf0-0xff */
+};
+
+/* first byte mask depending on UTF-8 sequence length */
+static const unsigned char utf8_mask[4] = { 0x7f, 0x1f, 0x0f, 0x07 };
+
+/* minimum Unicode value depending on UTF-8 sequence length */
+static const unsigned int utf8_minval[4] = { 0x0, 0x80, 0x800, 0x10000 };
+
+
+/* get the next char value taking surrogates into account */
+static unsigned int getSurrogateValue(const wchar_t *src, unsigned int srclen)
+{
+ if (src[0] >= 0xd800 && src[0] <= 0xdfff) /* surrogate pair */
+ {
+ if (src[0] > 0xdbff || /* invalid high surrogate */
+ srclen <= 1 || /* missing low surrogate */
+ src[1] < 0xdc00 || src[1] > 0xdfff) /* invalid low surrogate */
+ return 0;
+ return 0x10000 + ((src[0] & 0x3ff) << 10) + (src[1] & 0x3ff);
+ }
+ return src[0];
+}
+
+/* query necessary dst length for src string */
+static int Ucs2toUtf8Len(const wchar_t *src, unsigned int srclen)
+{
+ int len;
+ unsigned int val;
+
+ for (len = 0; srclen; srclen--, src++)
+ {
+ if (*src < 0x80) /* 0x00-0x7f: 1 byte */
+ {
+ len++;
+ continue;
+ }
+ if (*src < 0x800) /* 0x80-0x7ff: 2 bytes */
+ {
+ len += 2;
+ continue;
+ }
+ if (!(val = getSurrogateValue(src, srclen)))
+ {
+ return -2;
+ }
+ if (val < 0x10000) /* 0x800-0xffff: 3 bytes */
+ len += 3;
+ else /* 0x10000-0x10ffff: 4 bytes */
+ {
+ len += 4;
+ src++;
+ srclen--;
+ }
+ }
+ return len;
+}
+
+int Ucs2toUtf8Len(const wchar_t *src)
+{
+ if ( src == 0 )
+ return 0;
+
+ return Ucs2toUtf8Len( src, (int)wcslen( src ));
+}
+
+/* wide char to UTF-8 string conversion */
+/* return -1 on dst buffer overflow, -2 on invalid input char */
+int Ucs2toUtf8(const wchar_t *src, int srclen, char *dst, int dstlen)
+{
+ int len;
+
+ for (len = dstlen; srclen; srclen--, src++)
+ {
+ WCHAR ch = *src;
+ unsigned int val;
+
+ if (ch < 0x80) /* 0x00-0x7f: 1 byte */
+ {
+ if (!len--) return -1; /* overflow */
+ *dst++ = ch;
+ continue;
+ }
+
+ if (ch < 0x800) /* 0x80-0x7ff: 2 bytes */
+ {
+ if ((len -= 2) < 0) return -1; /* overflow */
+ dst[1] = 0x80 | (ch & 0x3f);
+ ch >>= 6;
+ dst[0] = 0xc0 | ch;
+ dst += 2;
+ continue;
+ }
+
+ if (!(val = getSurrogateValue(src, srclen)))
+ {
+ return -2;
+ }
+
+ if (val < 0x10000) /* 0x800-0xffff: 3 bytes */
+ {
+ if ((len -= 3) < 0) return -1; /* overflow */
+ dst[2] = 0x80 | (val & 0x3f);
+ val >>= 6;
+ dst[1] = 0x80 | (val & 0x3f);
+ val >>= 6;
+ dst[0] = 0xe0 | val;
+ dst += 3;
+ }
+ else /* 0x10000-0x10ffff: 4 bytes */
+ {
+ if ((len -= 4) < 0) return -1; /* overflow */
+ dst[3] = 0x80 | (val & 0x3f);
+ val >>= 6;
+ dst[2] = 0x80 | (val & 0x3f);
+ val >>= 6;
+ dst[1] = 0x80 | (val & 0x3f);
+ val >>= 6;
+ dst[0] = 0xf0 | val;
+ dst += 4;
+ src++;
+ srclen--;
+ }
+ }
+ return dstlen - len;
+}
+
+/* helper for the various utf8 mbstowcs functions */
+static unsigned int decodeUtf8Char(unsigned char ch, const char **str, const char *strend)
+{
+ unsigned int len = utf8_length[ch-0x80];
+ unsigned int res = ch & utf8_mask[len];
+ const char *end = *str + len;
+
+ if (end > strend) return ~0;
+ switch(len)
+ {
+ case 3:
+ if ((ch = end[-3] ^ 0x80) >= 0x40) break;
+ res = (res << 6) | ch;
+ (*str)++;
+ case 2:
+ if ((ch = end[-2] ^ 0x80) >= 0x40) break;
+ res = (res << 6) | ch;
+ (*str)++;
+ case 1:
+ if ((ch = end[-1] ^ 0x80) >= 0x40) break;
+ res = (res << 6) | ch;
+ (*str)++;
+ if (res < utf8_minval[len]) break;
+ return res;
+ }
+ return ~0;
+}
+
+/* query necessary dst length for src string */
+static inline int Utf8toUcs2Len(const char *src, int srclen)
+{
+ int ret = 0;
+ unsigned int res;
+ const char *srcend = src + srclen;
+
+ while (src < srcend)
+ {
+ unsigned char ch = *src++;
+ if (ch < 0x80) /* special fast case for 7-bit ASCII */
+ {
+ ret++;
+ continue;
+ }
+ if ((res = decodeUtf8Char(ch, &src, srcend)) <= 0x10ffff)
+ {
+ if (res > 0xffff) ret++;
+ ret++;
+ }
+ else return -2; /* bad char */
+ /* otherwise ignore it */
+ }
+ return ret;
+}
+
+/* UTF-8 to wide char string conversion */
+/* return -1 on dst buffer overflow, -2 on invalid input char */
+int Utf8toUcs2(const char *src, int srclen, wchar_t *dst, int dstlen)
+{
+ unsigned int res;
+ const char *srcend = src + srclen;
+ wchar_t *dstend = dst + dstlen;
+
+ while ((dst < dstend) && (src < srcend))
+ {
+ unsigned char ch = *src++;
+ if (ch < 0x80) /* special fast case for 7-bit ASCII */
+ {
+ *dst++ = ch;
+ continue;
+ }
+ if ((res = decodeUtf8Char(ch, &src, srcend)) <= 0xffff)
+ {
+ *dst++ = res;
+ }
+ else if (res <= 0x10ffff) /* we need surrogates */
+ {
+ if (dst == dstend - 1) return -1; /* overflow */
+ res -= 0x10000;
+ *dst++ = 0xd800 | (res >> 10);
+ *dst++ = 0xdc00 | (res & 0x3ff);
+ }
+ else return -2; /* bad char */
+ /* otherwise ignore it */
+ }
+ if (src < srcend) return -1; /* overflow */
+ return dstlen - (dstend - dst);
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// Utf8Decode - converts UTF8-encoded string to the UCS2/MBCS format
+
+char* Utf8DecodeCP(char* str, int codepage, wchar_t** ucs2)
+{
+ int len;
+ bool needs_free = false;
+ wchar_t* tempBuf = NULL;
+ if ( ucs2 )
+ *ucs2 = NULL;
+
+ if (str == NULL)
+ return NULL;
+
+ len = (int)strlen(str);
+
+ if (len < 2) {
+ if (ucs2 != NULL) {
+ *ucs2 = tempBuf = (wchar_t*)malloc((len + 1) * sizeof(wchar_t));
+ MultiByteToWideChar(codepage, 0, str, len, tempBuf, len);
+ tempBuf[len] = 0;
+ }
+ return str;
+ }
+
+ int destlen = Utf8toUcs2Len(str, len);
+ if (destlen < 0)
+ return NULL;
+
+ if (ucs2 == NULL) {
+ __try
+ {
+ tempBuf = (wchar_t*)alloca((destlen + 1) * sizeof(wchar_t));
+ }
+ __except(EXCEPTION_EXECUTE_HANDLER)
+ {
+ tempBuf = NULL;
+ needs_free = true;
+ }
+ }
+
+ if ( tempBuf == NULL ) {
+ tempBuf = (wchar_t*)malloc((destlen + 1) * sizeof(wchar_t));
+ if ( tempBuf == NULL )
+ return NULL;
+ }
+
+ Utf8toUcs2(str, len, tempBuf, destlen);
+ tempBuf[destlen] = 0;
+ WideCharToMultiByte(codepage, 0, tempBuf, -1, str, len + 1, "?", NULL);
+
+ if (ucs2)
+ *ucs2 = tempBuf;
+ else if (needs_free)
+ free(tempBuf);
+
+ return str;
+}
+
+wchar_t* Utf8DecodeUcs2(const char* str)
+{
+ if (str == NULL)
+ return NULL;
+
+ int len = (int)strlen(str);
+
+ int destlen = Utf8toUcs2Len(str, len);
+ if (destlen < 0) return NULL;
+
+ wchar_t* ucs2 = (wchar_t*)malloc((destlen + 1) * sizeof(wchar_t));
+ if (ucs2 == NULL) return NULL;
+
+ if (Utf8toUcs2(str, len, ucs2, destlen) >= 0)
+ {
+ ucs2[destlen] = 0;
+ return ucs2;
+ }
+
+ free(ucs2);
+
+ return NULL;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// Utf8Encode - converts MBCS string to the UTF8-encoded format
+
+char* Utf8EncodeCP(const char* src, int codepage)
+{
+ int len;
+ bool needs_free = false;
+ char* result = NULL;
+ wchar_t* tempBuf;
+
+ if (src == NULL)
+ return NULL;
+
+ len = (int)strlen(src);
+
+ __try
+ {
+ tempBuf = (wchar_t*)alloca((len + 1) * sizeof(wchar_t));
+ }
+ __except(EXCEPTION_EXECUTE_HANDLER)
+ {
+ tempBuf = (wchar_t*)malloc((len + 1) * sizeof(wchar_t));
+ if (tempBuf == NULL) return NULL;
+ needs_free = true;
+ }
+
+ len = MultiByteToWideChar(codepage, 0, src, -1, tempBuf, len + 1);
+
+ int destlen = Ucs2toUtf8Len(tempBuf, len);
+ if (destlen >= 0)
+ {
+ result = (char*)malloc(destlen + 1);
+ if (result)
+ {
+ Ucs2toUtf8(tempBuf, len, result, destlen);
+ result[destlen] = 0;
+ }
+ }
+
+ if (needs_free)
+ free(tempBuf);
+
+ return result;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// Utf8Encode - converts UCS2 string to the UTF8-encoded format
+
+char* Utf8EncodeUcs2(const wchar_t* src)
+{
+ if (src == NULL)
+ return NULL;
+
+ int len = (int)wcslen(src);
+
+ int destlen = Ucs2toUtf8Len(src, len);
+ if (destlen < 0) return NULL;
+
+ char* result = (char*)malloc(destlen + 1);
+ if (result == NULL)
+ return NULL;
+
+ Ucs2toUtf8(src, len, result, destlen);
+ result[destlen] = 0;
+
+ return result;
+}
+
+bool is_utf8_string(const char* str)
+{
+ int expect_bytes = 0, utf_found = 0;
+
+ if (!str) return 0;
+
+ while (*str) {
+ if ((*str & 0x80) == 0) {
+ /* Looks like an ASCII character */
+ if (expect_bytes)
+ /* byte of UTF-8 character expected */
+ return 0;
+ }
+ else {
+ /* Looks like byte of an UTF-8 character */
+ if (expect_bytes) {
+ /* expect_bytes already set: first byte of UTF-8 char already seen */
+ if ((*str & 0xC0) != 0x80) {
+ /* again first byte ?!?! */
+ return 0;
+ }
+ }
+ else {
+ /* First byte of the UTF-8 character */
+ /* count initial one bits and set expect_bytes to 1 less */
+ char ch = *str;
+ while (ch & 0x80) {
+ expect_bytes++;
+ ch = (ch & 0x7f) << 1;
+ }
+ }
+ /* OK, next byte of UTF-8 character */
+ /* Decrement number of expected bytes */
+ if ( --expect_bytes == 0 )
+ utf_found = 1;
+ }
+ str++;
+ }
+
+ return (utf_found && expect_bytes == 0);
+}
diff --git a/plugins/Dbx_mmap_SA/Dbtool/welcome.cpp b/plugins/Dbx_mmap_SA/Dbtool/welcome.cpp
new file mode 100644
index 0000000000..291281e70a
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/welcome.cpp
@@ -0,0 +1,61 @@
+/*
+Miranda Database Tool
+Copyright (C) 2001-2005 Richard Hughes
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+INT_PTR CALLBACK WelcomeDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam)
+{
+ static HENHMETAFILE hEmfWatermark;
+ static HFONT hTitleFont;
+ INT_PTR bReturn;
+
+ if(DoMyControlProcessing(hdlg,message,wParam,lParam,&bReturn)) return bReturn;
+ switch(message) {
+ case WM_INITDIALOG:
+
+ {
+ NONCLIENTMETRICS ncm = {0};
+ ncm.cbSize = sizeof(ncm);
+ SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &ncm, 0);
+ LOGFONT TitleLogFont = ncm.lfMessageFont;
+ TitleLogFont.lfWeight = FW_BOLD;
+ lstrcpy(TitleLogFont.lfFaceName, TEXT("Verdana Bold"));
+
+ HDC hdc = GetDC(NULL);
+ INT FontSize = 12;
+ TitleLogFont.lfHeight = 0 - GetDeviceCaps(hdc, LOGPIXELSY) * FontSize / 72;
+ hTitleFont = CreateFontIndirect(&TitleLogFont);
+ ReleaseDC(NULL, hdc);
+ }
+ SendDlgItemMessage(hdlg,IDC_TITLE,WM_SETFONT,(WPARAM)hTitleFont,0);
+ EnableWindow(GetDlgItem(GetParent(hdlg),IDC_BACK),FALSE);
+ return FALSE;
+ case WM_COMMAND:
+ switch(LOWORD(wParam)) {
+ case IDOK:
+ SendMessage(GetParent(hdlg),WZM_GOTOPAGE,IDD_SELECTDB,(LPARAM)SelectDbDlgProc);
+ break;
+ }
+ break;
+ case WM_DESTROY:
+ DeleteEnhMetaFile(hEmfWatermark);
+ DeleteObject(hTitleFont);
+ break;
+ }
+ return FALSE;
+}
diff --git a/plugins/Dbx_mmap_SA/Dbtool/wizard.cpp b/plugins/Dbx_mmap_SA/Dbtool/wizard.cpp
new file mode 100644
index 0000000000..499b420dd9
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/wizard.cpp
@@ -0,0 +1,138 @@
+/*
+Miranda Database Tool
+Copyright 2000-2011 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+static HFONT hBoldFont=NULL;
+static HENHMETAFILE hEmfHeaderLogo=NULL;
+
+static BOOL CALLBACK MyControlsEnumChildren(HWND hwnd,LPARAM lParam)
+{
+ DWORD style=GetWindowLongPtr(hwnd,GWL_STYLE);
+ DWORD exstyle=GetWindowLongPtr(hwnd,GWL_EXSTYLE);
+ char szClass[64];
+ int makeBold=0;
+
+ GetClassNameA(hwnd,szClass,sizeof(szClass));
+ if(!strcmp(szClass,"Static")) {
+ if(((style&SS_TYPEMASK)==SS_LEFT || (style&SS_TYPEMASK)==SS_CENTER || (style&SS_TYPEMASK)==SS_RIGHT) && exstyle&WS_EX_CLIENTEDGE)
+ makeBold=1;
+ }
+ else if(!strcmp(szClass,"Button")) {
+ if(exstyle&WS_EX_CLIENTEDGE)
+ makeBold=1;
+ }
+ if(makeBold) {
+ if(hBoldFont==NULL) {
+ LOGFONT lf;
+ hBoldFont=(HFONT)SendMessage(hwnd,WM_GETFONT,0,0);
+ GetObject(hBoldFont,sizeof(lf),&lf);
+ lf.lfWeight=FW_BOLD;
+ hBoldFont=CreateFontIndirect(&lf);
+ }
+ SendMessage(hwnd,WM_SETFONT,(WPARAM)hBoldFont,0);
+ SetWindowLongPtr(hwnd,GWL_EXSTYLE,exstyle&~WS_EX_CLIENTEDGE);
+ SetWindowPos(hwnd,0,0,0,0,0,SWP_NOZORDER|SWP_NOMOVE|SWP_NOSIZE|SWP_FRAMECHANGED);
+ }
+ return TRUE;
+}
+
+int DoMyControlProcessing(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam,INT_PTR *bReturn)
+{
+ switch(message) {
+ case WM_INITDIALOG:
+ EnumChildWindows(hdlg,MyControlsEnumChildren,0);
+
+ break;
+ case WM_CTLCOLORSTATIC:
+ if (GetWindowLongPtr((HWND)lParam, GWL_ID) == IDC_HDRLOGO){
+ SetBkColor((HDC)wParam,RGB(255,255,255));
+ *bReturn=(BOOL)GetStockObject(WHITE_BRUSH);
+ return TRUE;
+ }
+ if((GetWindowLongPtr((HWND)lParam,GWL_STYLE)&0xFFFF)==0) {
+ TCHAR szText[256];
+ GetWindowText((HWND)lParam,szText,SIZEOF(szText));
+ if(!_tcscmp(szText,_T("whiterect"))) {
+ SetTextColor((HDC)wParam,RGB(255,255,255));
+ SetBkColor((HDC)wParam,RGB(255,255,255));
+ SetBkMode((HDC)wParam,OPAQUE);
+ *bReturn=(INT_PTR)GetStockObject(WHITE_BRUSH);
+ return TRUE;
+ }
+ else {
+ SetBkMode((HDC)wParam,TRANSPARENT);
+ *bReturn=(INT_PTR)GetStockObject(NULL_BRUSH);
+ return TRUE;
+ }
+ }
+ break;
+ }
+ return FALSE;
+}
+
+INT_PTR CALLBACK WizardDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam)
+{
+ static HWND hdlgPage;
+
+ switch(message) {
+ case WM_INITDIALOG:
+ SendMessage(hdlg,WM_SETICON,ICON_SMALL,(LPARAM)LoadIcon(hInst,MAKEINTRESOURCE(IDI_DBTOOL)));
+ hdlgPage=NULL;
+ SendMessage(hdlg,WZM_GOTOPAGE,IDD_WELCOME,(LPARAM)WelcomeDlgProc);
+ TranslateDialog(hdlg);
+ return TRUE;
+ case WZM_GOTOPAGE:
+ if(hdlgPage!=NULL) DestroyWindow(hdlgPage);
+ EnableWindow(GetDlgItem(hdlg,IDC_BACK),TRUE);
+ EnableWindow(GetDlgItem(hdlg,IDOK),TRUE);
+ EnableWindow(GetDlgItem(hdlg,IDCANCEL),TRUE);
+ SetDlgItemText(hdlg,IDCANCEL,TranslateT("Cancel"));
+ hdlgPage=CreateDialog(hInst,MAKEINTRESOURCE(wParam),hdlg,(DLGPROC)lParam);
+ TranslateDialog(hdlgPage);
+ SetWindowPos(hdlgPage,0,0,0,0,0,SWP_NOZORDER|SWP_NOSIZE);
+ ShowWindow(hdlgPage,SW_SHOW);
+ break;
+ case WM_COMMAND:
+ switch(LOWORD(wParam)) {
+ case IDC_BACK:
+ case IDOK:
+ SendMessage(hdlgPage,WZN_PAGECHANGING,wParam,0);
+ SendMessage(hdlgPage,message,wParam,lParam);
+ break;
+ case IDCANCEL:
+ if(SendMessage(hdlgPage,WZN_CANCELCLICKED,0,0)) break;
+ EndDialog(hdlg,0);
+ break;
+ }
+ break;
+ case WM_DESTROY:
+ if (opts.hFile)
+ CloseHandle(opts.hFile);
+ if (opts.hOutFile)
+ CloseHandle(opts.hOutFile);
+ DestroyWindow(hdlgPage);
+ UnloadLangPackModule();
+ if(hBoldFont!=NULL) DeleteObject(hBoldFont);
+ if(hEmfHeaderLogo!=NULL) DeleteEnhMetaFile(hEmfHeaderLogo);
+ break;
+ }
+ return FALSE;
+}
diff --git a/plugins/Dbx_mmap_SA/Dbtool/worker.cpp b/plugins/Dbx_mmap_SA/Dbtool/worker.cpp
new file mode 100644
index 0000000000..7f22539f8f
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Dbtool/worker.cpp
@@ -0,0 +1,76 @@
+/*
+Miranda Database Tool
+Copyright (C) 2001-2005 Richard Hughes
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "dbtool.h"
+
+void ProcessingDone(void);
+int WorkInitialChecks(int firstTime);
+int WorkModuleChain(int firstTime);
+int WorkUser(int firstTime);
+int WorkContactChain(int firstTime);
+int WorkAggressive(int firstTime);
+int WorkFinalTasks(int firstTime);
+
+extern HANDLE hEventRun,hEventAbort;
+extern int errorCount;
+time_t ts;
+DBHeader dbhdr;
+DWORD spaceProcessed,sourceFileSize;
+DWORD spaceUsed, sp;
+
+static int (*Workers[6])(int)=
+ {WorkInitialChecks,WorkModuleChain,WorkUser,WorkContactChain,WorkAggressive,WorkFinalTasks};
+
+void __cdecl WorkerThread(void *unused)
+{
+ int task,ret,firstTime;
+ ts=time(NULL);
+
+ AddToStatus(STATUS_MESSAGE,TranslateT("Database worker thread activated"));
+ SetFilePointer(opts.hFile,0,NULL,FILE_BEGIN);
+ spaceUsed=1; spaceProcessed=0; sp=0;
+ firstTime=0;
+
+ for(task=0;;) {
+ if (spaceProcessed/(spaceUsed/1000+1) > sp) {
+ sp = spaceProcessed/(spaceUsed/1000+1);
+ SetProgressBar(sp);
+ }
+ WaitForSingleObject(hEventRun,INFINITE);
+ if(WaitForSingleObject(hEventAbort,0)==WAIT_OBJECT_0) {
+ AddToStatus(STATUS_FATAL,TranslateT("Processing aborted by user"));
+ break;
+ }
+ ret=Workers[task](firstTime);
+ firstTime=0;
+ if(ret==ERROR_NO_MORE_ITEMS) {
+ if(++task==sizeof(Workers)/sizeof(Workers[0])) {
+ AddToStatus(STATUS_MESSAGE,TranslateT("Elapsed time: %d sec"), time(NULL)-ts);
+ if(errorCount)
+ AddToStatus(STATUS_SUCCESS,TranslateT("All tasks completed but with errors (%d)"),errorCount);
+ else
+ AddToStatus(STATUS_SUCCESS,TranslateT("All tasks completed successfully"));
+ break;
+ }
+ firstTime=1;
+ }
+ else if(ret!=ERROR_SUCCESS)
+ break;
+ }
+ ProcessingDone();
+}
diff --git a/plugins/Dbx_mmap_SA/Import_SA/ICQserver.c b/plugins/Dbx_mmap_SA/Import_SA/ICQserver.c
new file mode 100644
index 0000000000..62666c7531
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Import_SA/ICQserver.c
@@ -0,0 +1,73 @@
+/*
+
+Import plugin for Miranda IM
+
+Copyright (C) 2001-2005 Martin Öberg, Richard Hughes, Roland Rabien & Tristan Van de Vreede
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+// ==============
+// == INCLUDES ==
+// ==============
+
+#include "import.h"
+
+#include "ICQserver.h"
+
+// ====================
+// ====================
+// == IMPLEMENTATION ==
+// ====================
+// ====================
+
+BOOL CALLBACK ICQserverPageProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam)
+{
+ switch(message) {
+ case WM_INITDIALOG:
+ SendMessage(GetParent(hdlg),WIZM_DISABLEBUTTON,0,0);
+ SendMessage(GetParent(hdlg),WIZM_ENABLEBUTTON,1,0);
+ SendMessage(GetParent(hdlg),WIZM_DISABLEBUTTON,2,0);
+ TranslateDialogDefault(hdlg);
+ ICQserverImport();
+ return TRUE;
+
+ case WM_COMMAND:
+ switch(LOWORD(wParam)) {
+ case IDOK:
+ PostMessage(GetParent(hdlg),WIZM_GOTOPAGE,IDD_FINISHED,(LPARAM)FinishedPageProc);
+ break;
+ case IDCANCEL:
+ PostMessage(GetParent(hdlg),WM_CLOSE,0,0);
+ break;
+ }
+ break;
+ }
+ return FALSE;
+}
+
+static void ICQserverImport()
+{
+ // Clear last update stamp
+ DBDeleteContactSetting(NULL, szICQModuleName[ iICQAccount ], "SrvLastUpdate");
+ DBDeleteContactSetting(NULL, szICQModuleName[ iICQAccount ], "SrvRecordCount");
+
+ // Enable contacts downloading
+ DBWriteContactSettingByte(NULL, szICQModuleName[ iICQAccount ], "UseServerCList", 1);
+ DBWriteContactSettingByte(NULL, szICQModuleName[ iICQAccount ], "AddServerNew", 1);
+ DBWriteContactSettingByte(NULL, szICQModuleName[ iICQAccount ], "UseServerNicks", 1);
+ DBWriteContactSettingByte(NULL, szICQModuleName[ iICQAccount ], "ServerAddRemove", 1);
+}
diff --git a/plugins/Dbx_mmap_SA/Import_SA/ICQserver.h b/plugins/Dbx_mmap_SA/Import_SA/ICQserver.h
new file mode 100644
index 0000000000..864890a978
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Import_SA/ICQserver.h
@@ -0,0 +1,62 @@
+/*
+
+Import plugin for Miranda IM
+
+Copyright (C) 2001,2002,2003,2004 Martin Öberg, Richard Hughes, Roland Rabien & Tristan Van de Vreede
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+
+
+#ifndef ICQSERVER_H
+#define ICQSERVER_H
+
+#include <windows.h>
+
+// ======================
+// == GLOBAL FUNCTIONS ==
+// ======================
+
+// =====================
+// == LOCAL FUNCTIONS ==
+// =====================
+
+// Main function
+static void ICQserverImport();
+
+// GUI callbacks
+INT_PTR CALLBACK FinishedPageProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam);
+
+
+// ======================
+// == GLOBAL VARIABLES ==
+// ======================
+
+extern int cICQAccounts;
+extern char ** szICQModuleName;
+extern TCHAR ** tszICQAccountName;
+extern int iICQAccount;
+
+// =====================
+// == LOCAL VARIABLES ==
+// =====================
+
+// =============
+// == DEFINES ==
+// =============
+
+#endif \ No newline at end of file
diff --git a/plugins/Dbx_mmap_SA/Import_SA/Version.rc b/plugins/Dbx_mmap_SA/Import_SA/Version.rc
new file mode 100644
index 0000000000..4784a68f66
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Import_SA/Version.rc
@@ -0,0 +1,38 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "afxres.h"
+#include "version.h"
+
+#ifdef _WIN32
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+#endif //_WIN32
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION __FILEVERSION_STRING
+ PRODUCTVERSION __FILEVERSION_STRING
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x0L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "000004b0"
+ BEGIN
+ VALUE "FileDescription", __DESCRIPTIONSHORT
+ VALUE "InternalName", __PLUGIN_NAME
+ VALUE "LegalCopyright", __COPYRIGHT
+ VALUE "OriginalFilename", __FILENAME
+ VALUE "ProductName", __PLUGIN_NAME
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0, 1200
+ END
+END
diff --git a/plugins/Dbx_mmap_SA/Import_SA/docs/import-ICQ_Db_Specs.txt b/plugins/Dbx_mmap_SA/Import_SA/docs/import-ICQ_Db_Specs.txt
new file mode 100644
index 0000000000..7308d85f9b
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Import_SA/docs/import-ICQ_Db_Specs.txt
@@ -0,0 +1,1004 @@
+
+The latest version of this document is always at:
+http://cvs.sourceforge.net/viewcvs.py/miranda-icq/Plugins/import/docs/import-ICQ_Db_Specs.txt
+
+============================================================================
+= ICQ_Db_Specs.txt -- Updated 2002-07-08
+=
+= This document describes parts of the fileformat used by the databases in
+= ICQ 99a - 2002a and is based on the 99a & 99b database specifications as
+= described in "ICQNEWDB.TXT" by Derek Soeder.
+=
+= Current maintainer: Strickz (strickz at miranda-im.org)
+=
+=
+=
+= To understand the file format as a whole it is also necessary to read
+= icqnewdb.txt and icqprop.txt. I have tried to use the same syntax in
+= this document to make it easier to understand and compare the different
+= parts.
+=
+= The information in this document is in no way guaranteed to be correct, use
+= at own your own risk and feel free to send me any corrections you may have.
+=
+============================================================================
+
+
+
+***
+*** File Headers
+***
+
+
+ ================================================================
+ == Format of IDX main header (20 BYTES):
+ ================================================================
+ 00000000 3 LONGS Unknown, but always 4, 20, 8.
+ (04,00,00,00,14h,00,00,00,08,00,00,00)
+ 0000000C LONG IDX pointer to root entry
+ 00000010 LONG ICQ database version
+ 10 = ICQ 99a
+ 14 = ICQ 99b
+ 17 = ICQ 2000a
+ 18 = ICQ 2000b
+ 19 = ICQ 2001a,2001b,2002a,2003a
+ 00000014 --- Start of first IDX page header
+
+
+ ================================================================
+ == Format of IDX page header (205 BYTES):
+ ================================================================
+ 00000000 5 LONGS Unknown, but always 201, 0, 0, 0, 0.
+ 00000014 LONG Pointer to next page header. -1 if this is the
+ last page.
+ 00000018 LONG Unknown, always 1?
+ 0000001C LONG Number of bytes in each slot (20)
+ 00000020 LONG Number of fragments in the page with one
+ or more consecutive free slots.
+ 00000024 LONG Number of empty slots in this page.
+ 00000028 10 LONGS Unknown, always 0?
+ 00000050 125 BYTES Allocation bitmap
+ 000000CD --- 1000 list entries (slots)
+
+
+ Notes by Derek:
+ --------------
+ Apparently, if you start at the root entry and walk the chain via
+ the LONG at offset +8 in each following IDX entry, you'll eventually
+ arrive at a complete chain of valid entries (entry status = -2).
+
+ Notes by Strickz:
+ ----------------
+ Initially an IDX file is 20225 bytes large: 20 bytes main header + 205 bytes
+ (first page header) + 20000 bytes (first IDX page). The file is always resized
+ in blocks of 20205 bytes (one page with header), I'm guessing this isn't done
+ until some data wants to be written and there is no fragment large enough to
+ hold it.
+
+ Offset 0c64: This is a bitmap that shows the status of all slots in the
+ page. Each page is divided into 1000 slots which requires a bitmap of
+ 1000/8 = 225 bytes. It would probably be possible to go through all entries in
+ the database by using the bitmap directly, page by page, instead of traversing
+ the chain.
+
+ Offset 0x20: I don't really see what practical use this value has. It can be
+ used as a measurement of the degree of fragmentation of the page, but keeping this
+ updated each write should slow things down... And it offers no speed-up
+ either, to write something to a page you still have to scan for a fragment large
+ enough for your data.
+
+
+ ================================================================
+ == Format of IDX linked list entry (20 BYTES each):
+ ================================================================
+
+ 00000000 LONG entry status? :
+ -2 = valid IDX entry
+ else = ?
+ 00000004 LONG DAT entry number:
+ 1..15 = ???a
+ 1005 = My Details
+ 1006 = Address Book?
+ 1007 = Sound themes
+ 1009 Unknown, about 222 bytes of binary data. I don't
+ recognize the data yet but there is a pattern.
+ 1014 = Chats event folder?
+ 1015 = A list of nicks with some data
+ 1025 = Looks related to Message archive. Contains several lists,
+ System, Sent & Received, From Web, Messages, etc... Lists
+ contains nicks or UINs with some data attached.
+ 1050 = Unknown
+ 1051 = Unknown
+ 1052 = Unknown
+ 1100 = Unknown
+ 1101 = Looks likes external app info
+ 1102 = Objectionable Words List?
+ 1110 = ICQ Servers List
+ 2001+ = user events/contact info
+ 00000008 LONG IDX pointer to next entry (-1 = none)
+ 0000000C LONG IDX pointer to previous entry (-1 = none)
+ 00000010 LONG DAT pointer to corresponding DAT entry (-1 = none)
+
+
+ Notes by Strickz:
+ ----------------
+ The chain is not a simple double linked list, there are several smaller chains that
+ merge into the main chain at different points.
+ The root entry has a DAT-ptr that doesn't point into the DAT file, if you use it
+ with the IDX file you arrive at a chain fragment that end up in the main chain.
+
+ All entries with status -2 points to a entry in the DAT file.
+
+
+ ===============================================================
+ == Format of DAT main header (8 BYTES):
+ ================================================================
+ 00000000 2 LONG Unknown, but always 4, 8.
+ (04,00,00,00,08,00,00,00)
+ 00000008 --- Start of first DAT page header
+
+
+ ================================================================
+ == Format of DAT page header (205 BYTES):
+ ================================================================
+ 00000000 6 LONGS Unknown, but always 201, 0, 0, 0, 0, 0.
+ 00000014 LONG Pointer to next page header. -1 if this is the
+ last page.
+ 00000018 LONG Unknown, always 0?
+ 0000001C LONG Number of bytes in each slot (64)
+ 00000020 LONG Number of fragments in the page with one
+ or more consecutive free slots.
+ 00000024 LONG Number of empty slots in this page
+ 00000028 10 LONGS Unknown, always 0?
+ 00000050 125 BYTES Allocation bitmap
+ 000000CD --- One page of DAT entries
+
+
+
+***
+*** My details
+***
+
+
+ ================================================================
+ == Format of My Details v99a (ICQ 99a) data:
+ ================================================================
+ 00000000 LONG The following number of bytes in data
+ 00000004 LONG Where entry is filed? (-1 = MyDetails)
+ 00000008 LONG DAT entry number = 1005
+ 0000000C BYTE First byte of signature = E4h
+ 0000000D UNKNOWN 15 Rest of signature
+ 23,A3,DB,DF,B8,D1,11,8A,65,00,60,08,71,A3,91
+ 0000001C WORD // Separator value
+ 0000001E LONG Label = 55534552h ('USER')
+ 00000022 LONG User entry status: 6 = "My Details"
+ 00000026 44 BYTEs Unused??? (0)
+ 00000052 WORD // Separator value
+ 00000054 LONG Number of default event WAV entries
+ 00000058 --- List of consecutive default event WAV entries
+ $+00000000 38 BYTEs Unused??? (0)
+ +00000026 WORD // Separator value
+ +00000028 LONG Number of user properties
+ 0000002C --- List of consecutive user properties
+ $+00000000 --- 99a user information for owner of this DAT file
+
+ $+00000000 WORD length of password
+ +00000002 ASCIIZ user's ICQ password
+ $+00000000 LONG ??? (1)
+ +00000004 14 BYTEs ??? (03 00 00 00 00 01 00 00 00 00 00 00 00 00)
+ +00000012 WORD length of POP3 account user name
+ +00000014 ASCIIZ POP3 account user name
+ $+00000000 WORD length of POP3 account password
+ +00000002 ASCIIZ POP3 account password
+ $+00000000 WORD length of POP3 server name
+ +00000002 ASCIIZ POP3 server name
+ $+00000000 1 BYTE ??? (10/0Ah)
+ +00000001 20 BYTEs ??? (0)
+ +00000015 LONG Number of contact groups
+ +00000019 --- List of consecutive contact group entries
+ $+00000000 LONG unused??? (0)
+ +00000004 BYTE ??? (1)
+ +00000005 WORD // Separator value
+ +00000007 LONG Number of additional user properties
+ +0000000B --- List of consecutive user properties
+
+
+ >> Format of 99a user information:
+ $+00000000 WORD length of user name
+ +00000002 ASCIIZ user name (what user is called; usually nickname)
+ $+00000000 WORD length of nickname
+ +00000002 ASCIIZ nickname
+ $+00000000 WORD length of First Name
+ +00000002 ASCIIZ First Name
+ $+00000000 WORD length of Last Name
+ +00000002 ASCIIZ Last Name
+ $+00000000 WORD length of primary e-mail address
+ +00000002 ASCIIZ primary e-mail address
+ $+00000000 LONG UIN of this user
+ +00000004 BYTE authorization -- 0:required to add user, 1:none
+ +00000005 CHAR GMT offset (negative count of half-hours):
+ +00000006 DWORD current/last IP address (network byte order)
+ +0000000A BYTE gender -- 0:Not Specified, 1:Female, 2:Male
+ +0000000B LONG Home Country
+ +0000000F LONG age of user (-1 = not entered)
+ +00000013 WORD length of Home City text
+ +00000015 ASCIIZ Home City text
+ $+00000000 WORD length of Home State text
+ +00000002 ASCIIZ Home State text
+ $+00000000 WORD length of additional details text
+ +00000002 ASCIIZ additional details text (info specified by user)
+ $+00000000 WORD length of user's Homepage URL
+ +00000002 ASCIIZ user's Homepage URL
+ $+00000000 WORD length of Home Phone number
+ +00000002 ASCIIZ Home Phone number
+ $+00000000 WORD length of notes text
+ +00000002 ASCIIZ notes text (empty in My Details)
+
+ $+00000000 LONG Home Zip Code (0 = not entered)
+ +00000004 LONG timestamp of last Phonebook update
+ +00000008 LONG unused??? (0)
+ +0000000C LONG number of Phonebook entries
+ +00000010 --- list of consecutive Phonebook entries
+
+// verkar vara tom i mydetails
+ $+00000000 WORD length of picture file name
+ +00000002 ASCIIZ local path and file name of user's saved picture
+ $+00000000 8 BYTEs unused??? (0) 6??
+ +00000008 WORD //separator value <-- redan här är det 2 bytes fel
+ +0000000A LONG timestamp of last My Details update
+ +0000000E WORD length of secondary e-mail address
+ +00000010 ASCIIZ secondary e-mail address
+ $+00000000 WORD length of old e-mail address
+ +00000002 ASCIIZ old e-mail address
+ $+00000000 LONG ??? (0)
+ +00000004 BYTE day of birthdate
+ +00000005 BYTE month of birthdate (1..12 = January..December)
+ +00000006 BYTE year of birthday (0..99 = 1900..1999) //Y2K!!!
+ +00000007 LONG ??? 2
+ +0000000B LONG ??? 1
+ +0000000F 3 BYTEs languages spoken
+ +00000012 WORD length of Home Street Address
+ +00000014 ASCIIZ Home Street Address
+ $+00000000 WORD length of Home Fax number
+ +00000002 ASCIIZ Home Fax number
+ $+00000000 WORD length of Home Cellular number
+ +00000002 ASCIIZ Home Cellular number
+ $+00000000 LONG ??? (0)
+ +00000004 WORD length of Company Div/Dept
+ +00000006 ASCIIZ Company Div/Dept
+ $+00000000 BYTE Occupation
+ +00000001 LONG ??? (0)
+ +00000005 WORD length of Company Position
+ +00000007 ASCIIZ Company Position
+ $+00000000 WORD length of Company Name
+ +00000002 ASCIIZ Company Name
+ $+00000000 WORD length of Work Street Address
+ +00000002 ASCIIZ Work Street Address
+ $+00000000 WORD length of Work State text
+ +00000002 ASCIIZ Work State text
+ $+00000000 WORD length of Work City text
+ +00000002 ASCIIZ Work City text
+ $+00000000 LONG Work Zip Code (0 = not entered)
+ +00000004 LONG Work Country (see "Home Country" for values)
+ +00000008 WORD length of Work Phone number
+ +0000000A ASCIIZ Work Phone number
+ $+00000000 WORD length of Work Fax number
+ +00000002 ASCIIZ Work Fax number
+ $+00000000 WORD length of Work Homepage URL
+ +00000002 ASCIIZ Work Homepage URL
+ $+00000000 WORD length of Past Background #1 keywords
+ +00000002 ASCIIZ Past Background #1 keywords
+ $+00000000 WORD Past Bkg. #1 category
+ +00000002 WORD length of Past Background #2 keywords
+ +00000004 ASCIIZ Past Background #2 keywords
+ $+00000000 WORD Past Bkg. #2 category (see list for Past Bkg. #1)
+ +00000002 WORD length of Past Background #3 keywords
+ +00000004 ASCIIZ Past Background #3 keywords
+ $+00000000 WORD Past Bkg. #3 category (see list for Past Bkg. #1)
+ +00000002 WORD length of Affiliation #1 keywords
+ +00000004 ASCIIZ Affiliation #1 keywords
+ $+00000000 WORD Affiliation #1 category
+ +00000002 WORD length of Affiliation #2 keywords
+ +00000004 ASCIIZ Affiliation #2 keywords
+ $+00000000 WORD Affiliation #2 category (see list for Affil. #1)
+ +00000002 WORD length of Affiliation #3 keywords
+ +00000004 ASCIIZ Affiliation #3 keywords
+ $+00000000 WORD Affiliation #3 category (see list for Affil. #1)
+ +00000002 20 BYTEs unused??? (0)
+ +00000016 WORD length of Interest #1 keywords
+ +00000018 ASCIIZ Interest #1 keywords
+ $+00000000 WORD Interest #1 category
+ +00000002 WORD length of Interest #2 keywords
+ +00000004 ASCIIZ Interest #2 keywords
+ $+00000000 WORD Interest #2 category (see list for Interest #1)
+ +00000002 WORD length of Interest #3 keywords
+ +00000004 ASCIIZ Interest #3 keywords
+ $+00000000 WORD Interest #3 category (see list for Interest #1)
+ +00000002 WORD length of Interest #4 keywords
+ +00000004 ASCIIZ Interest #4 keywords
+ $+00000000 WORD Interest #4 category (see list for Interest #1)
+ +00000002 40 BYTES unused??? (0)
+
+
+
+ ================================================================
+ == Format of My Details v99b (ICQ 99b) data:
+ ================================================================
+ 00000000 LONG The following number of bytes in data
+ 00000004 LONG -1 (Entry is not filed)
+ 00000008 LONG DAT entry number = 1005
+ 0000000C BYTE first byte of signature = E4h
+ 0000000D UNKNOWN 15 Rest of signature
+ 23,A3,DB,DF,B8,D1,11,8A,65,00,60,08,71,A3,91
+ 0000001C WORD // Separator value
+ 0000001E LONG label = 55534552h ('USER')
+ 00000022 LONG user entry status: 6 = "My Details"
+ 00000026 LONG 0 (Unknown, most likely an unused group entry)
+ 0000002A WORD // Separator value
+ 0000002C LONG Number of user event WAV entries
+ 00000030 --- List of consecutive user event WAV entries
+ $+00000000 WORD // Separator value
+ +00000002 LONG Number of property blocks
+ +00000006 --- List of consecutive property blocks
+ +00000000 DWORD Timestamp
+ 00000004 LONG Unknown (0)
+ +00000008 LONG Number of Phonebook entries
+ +0000000C --- List of consecutive Phonebook entries
+ $+00000000 WORD // Separator value
+ +00000002 DWORD Timestamp
+ $+00000006 LONG Number of contact groups
+ +0000000A --- List of consecutive contact groups
+
+
+
+ ================================================================
+ == Format of My Details v2000/2 (ICQ 2000a/2000b/2002a) data:
+ ================================================================
+ 00000000 LONG The following number of bytes in data
+ 00000004 LONG -1 (Entry is not filed)
+ 00000008 LONG DAT entry number = 1005
+ 0000000C BYTE first byte of signature = E4h
+ 0000000D UNKNOWN 15 Rest of signature
+ 23,A3,DB,DF,B8,D1,11,8A,65,00,60,08,71,A3,91
+ 0000001C WORD // Separator value
+ 0000001E LONG label = 55534552h ('USER')
+ 00000022 LONG user entry status: 6 = "My Details"
+ 00000026 LONG 0 (Unknown, most likely an unused group entry)
+ 0000002A WORD // Separator value
+ 0000002C LONG Number of user event WAV entries
+ 00000030 --- List of consecutive user event WAV entries
+ $+00000000 WORD // Separator value
+ +00000002 LONG Number of property blocks
+ +00000006 --- List of consecutive property blocks
+ $+00000000 WORD // Separator value
+ +00000002 LONG Timestamp, time of last update?
+ +00000006 LONG Number of contact groups
+ +0000000A --- List of consecutive contact groups
+
+
+
+ ================================================================
+ == Format of My Details v2001a (ICQ 2001a/2001b) data:
+ ================================================================
+ 00000000 LONG The following number of bytes in data
+ 00000004 LONG -1 (Entry is not filed)
+ 00000008 LONG DAT entry number = 1005
+ 0000000C BYTE first byte of signature = E4h
+ 0000000D UNKNOWN 15 Rest of signature
+ 23,A3,DB,DF,B8,D1,11,8A,65,00,60,08,71,A3,91
+ 0000001C WORD // Separator value
+ 0000001E LONG label = 55534552h ('USER')
+ 00000022 LONG User entry status: 6 = "My Details"
+ 00000026 LONG 0 (Unknown, most likely an unused group entry)
+ 0000002A WORD // Separator value
+ 0000002C LONG Number of property blocks
+ 00000030 List of consecutive property blocks
+ $+00000000 WORD // Separator value
+ +00000002 LONG Time of last information update? (local time)
+ Example: 7D,FE,56,3C (32bit date+time, with seconds)
+ = 01-29-2002, 19:56:45
+ +00000006 LONG Number of contact groups
+ +0000000A --- List of consecutive contact groups
+
+
+
+
+***
+*** Messages
+***
+
+
+ ================================================================
+ == URL Message format (ICQ 99a-2002a)
+ ================================================================
+ 00000000 LONG The following number of bytes in data
+ 00000004 LONG Entry type?
+ 0 = Message
+ 00000008 LONG DAT entry number
+ 0000000C UNKNOWN 16 Signature
+ E0,23,A3,DB,DF,B8,D1,11,8A,65,00,60,08,71,A3,91
+ or:
+ A0,C0,0C,2F,5C,95,D3,11,8D,D7,00,10,4B,06,46,2E
+ 0000001C WORD // Separator value
+ 0000001E LONG Filing flags
+ bit 0 = filed in 0:Outgoing, 1:Incoming
+ bit 1 = filed in 'Deleted Items', 0:No, 1:Yes
+ bit 2 = filed in 'MessageDialog', 0:No, 1:Yes
+ 00000022 WORD Entry sub type
+ 4 = URL
+ 00000024 LONG UIN of sender/receiver
+ 00000028 WORD Length of description and url (incl. NULL)
+ 0000002C ASCIIZ Description and URL. This is a single string but with
+ two parts. They are separated with one FEh BYTE (-2).
+ $+00000000 LONG Status of receiving user:
+ 0: Online, FFC, Invisible, Offline
+ 4: Away
+ 14: N/A
+ -1: Occupied, DND,
+ 00000004 LONG Sent or received
+ 0: Received
+ 1: Sent
+ 00000008 WORD // Separator value
+ 0000000A LONG Timestamp
+ 0000000D UNKNOWN 27 Zeroes
+
+
+ Notes by Strickz:
+ 1. When a URL message is received it is first stored in a longer format, when it
+ has been read it is rewritten with the smaller format described above.
+ 2. I haven't seen any syntax difference between the two signatures, so I treat them
+ exactly the same for now.
+
+
+ ================================================================
+ == Short Message Format (ICQ 99a-2002a)
+ ================================================================
+ 00000000 LONG The following number of bytes in data
+ 00000004 LONG Entry type?
+ 0 = Message
+ 5 = Unread message
+ 00000008 LONG DAT entry number
+ 0000000C UNKNOWN 16 Signature
+ E0,23,A3,DB,DF,B8,D1,11,8A,65,00,60,08,71,A3,91
+ 0000001C WORD // Separator value
+ 0000001E LONG Filing flags
+ bit 0 = filed in 0:Outgoing, 1:Incoming
+ bit 1 = filed in 'Deleted Items', 0:No, 1:Yes
+ bit 2 = filed in 'MessageDialog', 0:No, 1:Yes
+ Unread messages = 0
+ 00000022 WORD Entry sub type
+ 1 = Message
+ 00000024 LONG UIN of sender/receiver
+ 00000028 WORD Length of message text
+ 0000002C ASCIIZ Message text
+ $+00000000 LONG Status of receiving user:
+ 0: Online, FFC, Invisible, Offline
+ 4: Away
+ 14: N/A
+ -1: Occupied, DND,
+ 00000004 LONG Sent or received
+ 0: Received
+ 1: Sent
+ +00000008 WORD // Separator value
+ +0000000A LONG Timestamp
+ +0000000E UNKNOWN 27 27 zeroes
+
+
+
+ ================================================================
+ == Long Message Format
+ ================================================================
+
+ 00000000 LONG The following number of bytes in data
+ 00000004 LONG Entry type?
+ 0 = Message
+ 5 = Unread message
+ 00000008 LONG DAT entry number
+ 0000000C UNKNOWN 16 Signature
+ 50,3B,C1,5C,5C,95,D3,11,8D,D7,00,10,4B,06,46,2E
+ 0000001C WORD // Separator value
+ 0000001E LONG Filing flags
+ bit 0 = filed in 0:Outgoing, 1:Incoming
+ bit 1 = filed in 'Deleted Items', 0:No, 1:Yes
+ bit 2 = filed in 'MessageDialog', 0:No, 1:Yes
+ Unread messages = 0
+ 00000022 WORD Entry sub type
+ 1 = Message
+ 00000024 LONG UIN of sender/receiver
+ 00000028 WORD Length of text
+ When received from 2002a this is 1 and text is only a
+ NULL character
+ 0000002A ASCIIZ ANSI text
+ $+00000000 LONG Status of receiving user:
+ 0: Online, FFC, Invisible, Offline, DND, Occupied
+ 4: Away
+ 14: N/A
+ Value is always 0 when receiving client was Miranda
+ 00000004 LONG Sent or received
+ 0: Received
+ 1: Sent
+ 00000008 WORD // Separator value
+ 0000000A LONG Timestamp
+ 0000000E UNKNOWN 19 Zeroes
+ 00000021 WORD Length of Rich text
+ When message was sent to online 2002a user, this is 0 and the rich
+ text is missing.
+ 00000023 ASCIIZ Rich Text
+ $+00000000 WORD Length of UTF8 text
+ +00000002 ASCIIZ UTF8 Text
+ $+00000000 LONG Unknown, always 0
+ +00000004 LONG Unknown, always 0
+ +00000009 LONG Unknown, received: 00800080h
+ sent : 00FFFFFFh
+
+
+ Notes: The long format can keep up to three copies of the message text,
+ two versions in plain text format and one in rich text format. The reason
+ for this is unknown but it looks pretty stupid. The rich text version is never
+ used once a message has been sent/received. Yet it is stored in the database making
+ each message entry 2-3 times larger.
+
+
+
+
+
+ ================================================================
+ == URL format Miranda (unread event)
+ ================================================================
+ 00000000 LONG The following number of bytes in data
+ 00000004 LONG Where entry is filed?
+ 5 = Unread?
+ 00000008 LONG DAT entry number?
+ 0000000C UNKNOWN 16 Signature
+ EA,23,A3,DB,DF,B8,D1,11,8A,65,00,60,08,71,A3,91
+ 0000001C WORD // Separator value
+ 0000001E LONG Filing status?
+ bit 0 = filed as 0:Sent, 1:Received
+ bit 1 = in Deleted Items -- 0:no, 1:yes
+ bit 2 = in Messages -- 0:no, 1:yes
+ 0 = Unread
+ 00000022 WORD 1Ah (26)
+ 00000024 LONG UIN of sender/receiver
+ 00000028 LONg Length of description and url (incl. NULL)
+ 0000002C ASCIIZ Description and URL
+* $+00000000 LONG 4
+* 00000004 LONG 0
+ 00000008 WORD // Separator value
+ 0000000A LONG Timestamp
+ 0000000D UNKNOWN 27 Zeroes
+
+ 00000028 WORD Length of signature and the textstring+zeroes ++ START OF BLOCK
+ 0000002A UNKNOWN 16 Another signature?
+ 37,1C,58,72,E9,87,D4,11,A4,C1,00,D0,B7,59,B1,D9
+ 0000003C WORD 0
+ 0000003E LONG Length of textstring (no terminating zero)
+* 00000042 ASCIIZ String: "Send URL"
+ $+00000000 LONG 0
+ +00000005 LONG 1
+ +00000009 UNKNOWN 11 Zeroes ++ ENDS BLOCK
+
+ +0000000F LONG Looks like length of url+4 bytes.
+ +00000013 LONG Length of URL message content
+ +00000017 ASCIIZ Description+URL, the two parts are separated with
+ one FEh BYTE (-2). Not NULL terminated.
+
+
+ ================================================================
+ == URL format 2002a (unread)
+ ================================================================
+ 00000000 LONG The following number of bytes in data
+ 00000004 LONG Where entry is filed?
+ 5 = Unread?
+ 00000008 LONG DAT entry number?
+ 0000000C UNKNOWN 16 Signature
+ EA,23,A3,DB,DF,B8,D1,11,8A,65,00,60,08,71,A3,91
+ 0000001C WORD // Separator value
+ 0000001E LONG Filing status?
+ bit 0 = filed as 0:Sent, 1:Received
+ bit 1 = in Deleted Items -- 0:no, 1:yes
+ bit 2 = in Messages -- 0:no, 1:yes
+ 0 = Unread
+ 00000022 WORD 1Ah (26)
+ 00000024 LONG UIN of sender/receiver
+ 00000028 LONG 1 (length?)
+ 0000002C UNKNOWN 1 0, Terminating zero of an empty string?
+* 0000002D UNKNOWN 6 Zeroes
+ 00000033 WORD // Separator value
+ 00000035 LONG Timestamp
+ 00000039 UNKNOWN 27 Zeroes
+
+ 00000054 WORD Length of signature and the textstring+zeroes ++ START OF BLOCK
+ 00000056 UNKNOWN 16 Another signature?
+ 37,1C,58,72,E9,87,D4,11,A4,C1,00,D0,B7,59,B1,D9
+ 00000066 WORD 0
+ 0000006C LONG Length of textstring (no terminating zero)
+ 0000005F ASCIIZ String: "Send Web Page Address (URL)"
+ $+00000000 BYTE 0 (terminating null?)
+ +00000001 LONG 0
+ +00000005 LONG 1
+ +00000009 UNKNOWN 6 Zeroes ++ ENDS BLOCK
+
+ +0000000F LONG Looks like length of url+4 bytes. I have seen entries where ++ START OF BLOCK
+ this value overflows the total event size at offset 0 by
+ 2 bytes. Bug in ICQ?
+ +00000013 LONG Length of URL message content (excl. NULL)
+ +00000017 ASCIIZ Description+URL, the two parts are separated with
+ one FEh BYTE (-2). ++ ENDS BLOCK
+
+ $+00000000 WORD 0
+
+
+
+***
+*** Contact
+***
+
+
+ ================================================================
+ == Format of Contact v99a (ICQ 99a) data:
+ ================================================================
+ 00000000 LONG The following number of bytes in data
+ 00000004 LONG Where entry is filed?
+ -1 = not filed? (Ex. MyDetails)
+ 0 = Messages?
+ 1 = Contact list?
+ 2 = Ignore list?
+ 9 = System Messages?
+ 00000008 LONG DAT entry number = 1005
+ 0000000C UNKNOWN 16 Signature
+ E5,23,A3,DB,DF,B8,D1,11,8A,65,00,60,08,71,A3,91
+ 0000001C WORD // Separator value
+ 0000001E LONG Label = 55534552h ('USER')
+ 00000022 LONG User entry status:
+ 2 = active
+ 3 = Awaiting authorization
+ 5 = removed from contact list
+ 12 = deleted from address book?
+ 13 = outdated/defunct???
+ 14 = outdated/defunct???
+ 00000026 LONG GroupID of contact group containing user
+ 0000002A 40 BYTEs Unknown
+ 00000052 WORD // Separator value
+ 00000054 LONG Number of user event WAV entries
+ 00000058 --- List of consecutive user event WAV entries
+ $+00000000 38 BYTEs Unknown
+ +00000026 WORD // Separator value
+ +00000028 --- 99a user information for this contact
+ See 'My Details v99a' for syntax
+
+
+
+ ================================================================
+ == Format of Contact (Db99b) data:
+ ================================================================
+ 00000000 LONG The following number of bytes in data
+ 00000004 LONG Where entry is filed?
+ -1 = not filed? (Ex. MyDetails)
+ 0 = Messages?
+ 1 = Contact list?
+ 2 = Ignore list?
+ 9 = System Messages?
+ 00000008 LONG DAT entry number = 1005
+ 0000000C UNKNOWN 16 Signature
+ E5,23,A3,DB,DF,B8,D1,11,8A,65,00,60,08,71,A3,91
+ 0000001C WORD // Separator value
+ 0000001E LONG Label = 55534552h ('USER')
+ 00000022 LONG User entry status:
+ 2 = active
+ 3 = Awaiting authorization
+ 5 = removed from contact list
+ 12 = deleted from address book?
+ 13 = outdated/defunct???
+ 14 = outdated/defunct???
+ 00000026 LONG GroupID of contact group containing user
+ 0000002A WORD // Separator value
+ 0000002C LONG Number of user event WAV entries
+ 00000030 --- List of consecutive user event WAV entries
+ $+00000000 WORD // Separator value
+ +00000002 LONG Number of property blocks
+ +00000006 --- List of consecutive property blocks
+ +00000000 DWORD Timestamp
+ 00000004 LONG Unknown (0)
+ +00000008 LONG Number of Phonebook entries
+ +0000000C --- List of consecutive Phonebook entries
+ $+00000000 WORD // Separator value
+ +00000002 DWORD Timestamp
+
+
+
+ ================================================================
+ == Format of Contact v2000a & v2000b (ICQ 2000a/2000b) data:
+ ================================================================
+ 00000000 LONG The following number of bytes in data
+ 00000004 LONG Where entry is filed?
+ -1 = not filed? (Ex. MyDetails)
+ 0 = Messages?
+ 1 = Contact list?
+ 2 = Ignore list?
+ 9 = System Messages?
+ 00000008 LONG DAT entry number = 1005
+ 0000000C UNKNOWN 16 Signature
+ E5,23,A3,DB,DF,B8,D1,11,8A,65,00,60,08,71,A3,91
+ 0000001C WORD // Separator value
+ 0000001E LONG Label = 55534552h ('USER')
+ 00000022 LONG User entry status:
+ 2 = active
+ 3 = Awaiting authorization
+ 5 = removed from contact list
+ 12 = deleted from address book?
+ 13 = outdated/defunct???
+ 14 = outdated/defunct???
+ 00000026 LONG GroupID of contact group containing user
+ 0000002A WORD // Separator value
+ 0000002C LONG Number of user event WAV entries
+ 00000030 --- List of consecutive user event WAV entries
+ $+00000000 WORD // Separator value
+ +00000002 LONG Number of property blocks
+ +00000006 --- List of consecutive property blocks
+ $+00000000 WORD // Separator value
+ +00000002 LONG Timestamp, time of last update?
+
+
+
+ ================================================================
+ == Format of Contact v2001a (ICQ 2001a/2001b) data:
+ ================================================================
+ 00000000 LONG The following number of bytes in data
+ 00000004 LONG Where entry is filed?
+ -1 = not filed? (Ex. MyDetails)
+ 0 = Messages?
+ 1 = Contact list?
+ 2 = Ignore list?
+ 9 = System Messages?
+ 00000008 LONG DAT entry number = 1005
+ 0000000C UNKNOWN 16 Signature
+ E5,23,A3,DB,DF,B8,D1,11,8A,65,00,60,08,71,A3,91
+ 0000001C WORD // Separator value
+ 0000001E LONG Label = 55534552h ('USER')
+ 00000022 LONG User entry status:
+ 2 = active
+ 3 = Awaiting authorization
+ 5 = removed from contact list
+ 12 = deleted from address book?
+ 13 = outdated/defunct???
+ 14 = outdated/defunct???
+ 00000026 LONG GroupID of contact group containing user
+ 0000002A WORD // Separator value
+ 0000002C LONG Number of property blocks
+ 00000030 --- List of consecutive property blocks
+ $+00000000 WORD // Separator value
+ +00000002 LONG Timestamp, time of last update
+
+
+
+ ================================================================
+ == Format of Contact v2002a (ICQ 2002a) data:
+ ================================================================
+
+ 00000000 LONG The following number of bytes in data
+ 00000004 LONG Where entry is filed?
+ -1 = not filed? (Ex. MyDetails)
+ 0 = Messages?
+ 1 = Contact list?
+ 2 = Ignore list?
+ 9 = System Messages?
+ 00000008 LONG DAT entry number = 1005
+ 0000000C UNKNOWN 16 Signature
+ E5,23,A3,DB,DF,B8,D1,11,8A,65,00,60,08,71,A3,91
+ 0000001C WORD // Separator value
+ 0000001E LONG label = 55534552h ('USER')
+ 00000022 LONG User entry status:
+ 2 = active
+ 3 = Awaiting authorization
+ 5 = removed from contact list
+ 12 = deleted from address book?
+ 13 = outdated/defunct???
+ 14 = outdated/defunct???
+ 00000026 LONG GroupID of contact group containing user
+ 0000002A WORD // Separator value
+ 0000002C LONG Unknown, 0
+ 00000030 WORD // Separator value
+ 00000032 LONG Number of property blocks
+ 00000036 List of consecutive property blocks
+ $+00000000 WORD // Separator value
+ +00000002 LONG Timestamp, time of last update
+
+
+ >> Contact properties that sounds interesting
+ Property Data type Description
+ ----------------------------------- ----------- -----------------------------
+ UserCategory LONG Unknown (Entry status?)
+ RealGroupID LONG Same as GroupID above?
+ ----------------------------------- ----------- -----------------------------
+ Comment: The question here is, if the same information appears both in header
+ and in properties, which one should we use? Can they be different?
+
+
+
+***
+*** General
+***
+
+
+ >> Separator values
+ The separator value appears in many places. It is a 2-byte value and
+ reflects the version of ICQ that the database was used with. Exactly
+ when and how the values get updated is still a bit unclear. Not all
+ entries get updated when the ICQ version is updated, there are always
+ a couple of entries that are left with the old value but they still appear
+ correctly in the history.
+
+
+ Version Separator value ICQ release date
+ ----------------- ------------------- ----------------
+ ICQ 2003a v5.45 21,02
+ ICQ 2002a 16,02 (534) 19/04 2002
+ ICQ 2002a 15,02 (533) 25/03 2002
+ ICQ 2001b v5.18 06,02 (518) 28/11 2001
+ ICQ 2001b v5.17 05,02 (517) 12/11 2001
+ ICQ 2001b v5.16 04,02 (516) 08/11 2001
+ ICQ 2001b v5.15 03,02 (515) 30/10 2001
+ ICQ 2001 v4.70 15/10 2001
+ ICQ 2001 v4.65 01,D1 (465) 04/09 2001
+ ICQ 200 v4.63 07/02 2001
+ ICQ 200 v4.60 25/10 2000
+ ICQ 200 v4.56 26/09 2000
+ ICQ 2000b v4.55 21/09 2000
+ ICQ 2000a v4.31 31/05 2000
+ ICQ 2000a v4.30 11/05 2000
+ ICQ 2000a v4.29 24/04 2000
+ ICQ 99b v3.19 31/08 2000
+ ICQ 99b v3.18 29/08 1999
+ ICQ 99b v3.17 16/08 1999
+ ICQ 99b v3.01 ?
+ ICQ 99a v2.24 01/08 1999
+ ICQ 99a v2.22 15/06 1999
+ ICQ 99a v2.21 18/05 1999
+ ICQ 99a v2.20 03/05 1999
+ ICQ 99a v2.15 13/04 1999
+ ICQ 99a v2.05 CD,00 (205) ?
+ ICQ 98 v1.52 98,00 (152) ? 1998
+
+
+
+ >> Format of property block:
+ 00000000 WORD // Separator value
+ 00000004 LONG Number of user properties
+ 00000008 --- List of consecutive user properties
+
+
+ >> Format of each property:
+ 00000000 WORD Length of property name
+ 00000002 ASCIIZ Property name
+ $+00000000 BYTE Property value type:
+ 100 / 64h = CHAR
+ 101 / 65h = BYTE
+ 102 / 66h = WORD
+ 103 / 67h = INTEGER
+ 104 / 68h = DWORD
+ 105 / 69h = LONG
+ 107 / 6bh = ASCIIZ (1 WORD + String)
+ 109 / 6dh = Sublist (see below)
+ 111 / 6fh = DWORD (length) + BYTE array
+ +00000001 <var> Property value
+
+
+ >> Format of 6D sub list
+ 00000000 LONG Number of properties in sub list
+ 00000004 BYTE Sublist type? (6B or 6E)
+ 00000005 --- List of consecutive 6D6B or 6D6E properties
+
+ Comment: There appears to exist two variations, the 6B- & the 6E-variation.
+ 6B is just a list of strings, 6E is a complete property list which
+ means that it can be recursive.
+
+ >> Format of the 6D6B property
+ 00000000 WORD Length of string
+ 00000002 ASCIZZ String
+
+ >> Format of the 6D6E property
+ 00000000 WORD // Separator value
+ 00000002 LONG Number of properties
+ 00000006 --- List of consecutive properties
+
+ Comment: This is the same as a standard property block.
+
+
+ >> Format of Wav entry:
+ 00000000 WORD //separator value
+ 00000002 LONG user event for which Wav will be played:
+ 1 = Message
+ 2 = Chat
+ 3 = File
+ 4 = URL
+ 10 = Externals
+ 19 = Contact
+ 20 = Phone
+ 2007 = User ID // Not in My Details
+ 2010 = Online Alert
+ 00000006 LONG 0:play default WAV, 1:play the user-specified WAV
+ 0000000A WORD length of file name
+ 0000000C ASCIIZ full path and file name of WAV
+
+
+ >> Format of contact group (2000a and later):
+ 00000000 WORD // Separator value
+ 00000002 LONG Number of group properties
+ 00000006 List of group properties
+
+ Comment: This is the same as a standard property block.
+
+ >> Known group properties
+ Property Data type Description
+ ----------------------------------- ----------- -----------------------------
+ FirstState LONG Unknown (Visual state?)
+ GroupID LONG 3 = Awaiting authorization, 1000 and over
+ means a user defined group
+ GroupName ASCIIZ Name of the group
+ ParentID LONG Unknown (always 0 in my test DBs)
+ ----------------------------------- ----------- -----------------------------
+ Comment: Only GroupID and GroupName seems to be required
+
+
+ >> Format of contact group (99a & 99b):
+ 00000000 LONG Group ID:
+ 3 = Awaiting authorization, 1000 and over
+ means a user defined group
+ 00000004 WORD Length of group name
+ 00000006 ASCIIZ Group name
+ $+00000000 LONG Unknown, usually -1
+ +00000004 WORD Group visual status, 0 = Closed, 1 = Open
+
+
+ >> Format of Event WAV entry (99a):
+ 00000000 WORD // Separator value
+ 00000002 LONG User event for which WAV will be played:
+ 1 = Message
+ 2 = Chat
+ 3 = File
+ 4 = URL
+ 10 = Externals
+ 19 = Contact
+ 20 = Phone
+ 2007 = User ID //not in My Details
+ 2010 = Online Alert
+ 00000006 LONG 0 = Play default WAV, 1 = play the user-specified WAV
+ 0000000A WORD length of file name
+ 0000000C ASCIIZ full path and file name of WAV
+
+
+ >> Format of Phonebook entry (99a & 99b):
+ 00000000 WORD length of phone number entry name
+ 00000002 ASCIIZ phone number entry name
+ $+00000000 WORD length of area code text
+ +00000002 ASCIIZ area code text
+ $+00000000 WORD length of prefix text
+ +00000002 ASCIIZ prefix text
+ $+00000000 WORD length of country name
+ +00000002 ASCIIZ country name
+ $+00000000 WORD ??? (0) 1
+ +00000002 WORD length of number (last 4 digits) text
+ +00000004 ASCIIZ number text
+
+
+ >> Timestamps
+
+ >> Entry types
+
+ 00h - Message
+ 09h - System message
+ 0Bh - Chat log?
+
+ >> DAT Signatures
+
+ DAT signatures are sequences of 16 bytes that appear in the beginning of most
+ database entry types. They could be useful if you want to scan a DAT file for
+ certain types of data without using the IDX file.
+
+ Various messages: E0,23,A3,DB,DF,B8,D1,11,8A,65,00,60,08,71,A3,91
+ Chat request: E1,23,A3,DB,DF,B8,D1,11,8A,65,00,60,08,71,A3,91
+ File request: E2,23,A3,DB,DF,B8,D1,11,8A,65,00,60,08,71,A3,91
+ My Details: E4,23,A3,DB,DF,B8,D1,11,8A,65,00,60,08,71,A3,91
+ Contact: E5,23,A3,DB,DF,B8,D1,11,8A,65,00,60,08,71,A3,91
+ Reminder: E6,23,A3,DB,DF,B8,D1,11,8A,65,00,60,08,71,A3,91
+ Note: EE,23,A3,DB,DF,B8,D1,11,8A,65,00,60,08,71,A3,91
diff --git a/plugins/Dbx_mmap_SA/Import_SA/docs/import-license.txt b/plugins/Dbx_mmap_SA/Import_SA/docs/import-license.txt
new file mode 100644
index 0000000000..ca3fe8d547
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Import_SA/docs/import-license.txt
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) 19yy <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) 19yy name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/plugins/Dbx_mmap_SA/Import_SA/docs/import-readme.txt b/plugins/Dbx_mmap_SA/Import_SA/docs/import-readme.txt
new file mode 100644
index 0000000000..0ad0b7b1d2
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Import_SA/docs/import-readme.txt
@@ -0,0 +1,128 @@
+
+ Import Plugin for Miranda IM
+ ____________________________
+
+
+About
+_____
+
+This Miranda IM plugin allows you to import contacts and messages
+from your Mirabilis ICQ database and from Miranda IM profiles. Please note
+that this plugin does not import settings and preferences.
+
+
+
+Installation
+____________
+
+Simply copy "import.dll" into your Miranda IM plugin directory (usually
+"C:\Program Files\Miranda IM\Plugins\") and restart Miranda IM.
+
+You start the import by selecting "Import..." in the main menu.
+
+
+
+Changes
+_______
+
+0.9.2
+
+Bugfixes:
+ - Another crash with non-IM contacts.
+ - Miranda IM visibility lists were imported wrong.
+ - Some general stability improvements when dealing with corrupted
+ Miranda IM databases.
+
+
+0.9.1
+
+Bugfixes:
+ - No longer crashes when importing Miranda contacts from a protocol
+ with no unique ID setting (Weather, RSS, etc).
+
+
+0.9
+
+Bugfixes:
+ - Don't auto run wizard until at least one protocol is installed.
+ - Don't enable Mirabilis import unless ICQ is installed.
+ - Memory leaks.
+
+New features:
+ - Supports all installed protocols.
+ - 20% smaller.
+
+
+0.8.1
+
+Bugfixes:
+ - Fixed a crash while importing from Miranda IM databases.
+
+New features:
+ - Added AIM support for Miranda IM import.
+ - Added YAHOO support for Miranda IM import.
+
+
+0.8
+
+Bugfixes:
+ - Fixed two memory leaks and a crash while importing from Miranda IM databases.
+
+New features:
+ - Added ICQ Corp support for Miranda IM import (thanks Sergey).
+
+
+
+Known Problems
+______________
+
+- It is not possible to import from Mirabilis ICQ 2003b. This feature is being
+ worked on and will be available in a future version.
+
+- Weather stations, RSS feeds, and other non-IM items are not imported when you
+ import contacts from a Miranda IM database. It has not yet been decided if
+ this feature will be added or not.
+
+
+
+Support and Bug Reporting
+_________________________
+
+We cannot give support through e-mail or instant messages. Please visit the Miranda IM
+help page at http://www.miranda-im.org/help/ if you need help with this plugin.
+
+If the help page does not answer your question, please visit the Miranda IM support
+forum at: http://forums.miranda-im.org and we will try to assist you. Remember that
+everyone involved in this project are unpaid volounteers, so keep it friendly.
+
+If you want to report a bug, do so in the official bug tracker at:
+http://bugs.miranda-im.org/
+
+
+
+Contact
+_______
+
+Current maintainer is Martin Öberg.
+E-mail: strickz at miranda-im.org
+
+
+
+License and Copyright
+_____________________
+
+Copyright (C) 2001-2005 Martin Öberg, Richard Hughes, Roland Rabien & Tristan Van de Vreede
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
diff --git a/plugins/Dbx_mmap_SA/Import_SA/docs/import-translation.txt b/plugins/Dbx_mmap_SA/Import_SA/docs/import-translation.txt
new file mode 100644
index 0000000000..d971470cf0
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Import_SA/docs/import-translation.txt
@@ -0,0 +1,55 @@
+Miranda Language Pack Version 1
+Locale: 0809
+Authors: Miranda IM Development Team
+Author-email: project-info@miranda-im.org
+Last-Modified-Using: Miranda IM 0.6.1
+Plugins-included:
+
+; Generated by lpgen on Thu Jan 11 20:52:59 2007
+; Translations: 35
+
+; main.c
+;[&Import...]
+
+; mirabilis.c
+;[The given file does not exist. Please check that you have entered the name correctly.]
+;[Mirabilis Import]
+;[Mirabilis ICQ database indexes (*.idx)\0*.IDX\0All Files (*)\0*\0]
+
+; miranda.c
+;[Miranda Import]
+;[Miranda IM database (*.dat)\0*.DAT\0All Files (*)\0*\0]
+
+; wizard.c
+;[Finish]
+;[Cancel]
+
+; resource.rc
+;[From a Miranda IM database.]
+;[From a Mirabilis ICQ (99a - 2003a) database.]
+;[Use the Find/Add contacts tool to populate my contact list.]
+;[Do not load the import plugin at startup again]
+;[Progress1]
+;[Import all contacts and all messages]
+;[Only import contacts]
+;[&Next >]
+;[&Other Database...]
+;[&Other Profile...]
+;[< &Back]
+;[Choose how you would like to import:]
+;[This wizard will help you import contacts and message history from Mirabilis ICQ, as well as letting you import from other Miranda IM profiles.]
+;[Click ]
+;[If you wish to import more information, click ]
+;[You will probably never need to use this wizard again, so you can save memory by not loading it every time you start Miranda. This will mean that the import menu item will no longer be available.]
+;[Import completed]
+;[If at a future date you wish to use the wizard again, you can make it load again by going to the Plugins section of the Options dialog box.]
+;[Miranda has found Mirabilis ICQ databases corresponding to the following ICQ numbers. Please select the one you wish to import, or click ]
+;[Miranda has found Miranda profiles with the following names. Please select the one you wish to import, or click ]
+;[Now importing...]
+;[Select this if you want to import as much data as possible. This is the recommended option.]
+;[Select this if you want to import contacts but don't want to import any message history.]
+;[Miranda has now been configured to automatically download the contacts in your server-side contact list the next time you connect to ICQ.]
+;[If you want to change the way Miranda handles server-side contacts at a later time, you can do this in the ]
+;[&Filename:]
+;[Import Information Wizard]
+
diff --git a/plugins/Dbx_mmap_SA/Import_SA/encryption.c b/plugins/Dbx_mmap_SA/Import_SA/encryption.c
new file mode 100644
index 0000000000..6cb98d20c1
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Import_SA/encryption.c
@@ -0,0 +1,315 @@
+// (C) Artem Shpynov aka FYR and Igonin Vitaliy aka chaos.persei, 2007 - 2008
+
+#include "import.h"
+
+typedef struct{
+ void* (__stdcall *GenerateKey)(char* pwd);
+ void (__stdcall *FreeKey)(void* key);
+ void (__stdcall *EncryptMem)(BYTE* data, int size, void* key);
+ void (__stdcall *DecryptMem)(BYTE* data, int size, void* key);
+
+ char* Name;
+ char* Info;
+ char* Author;
+ char* Site;
+ char* Email;
+
+ DWORD Version;
+
+ WORD uid;
+} Cryptor;
+
+typedef struct{
+ char dllname[255];
+ HMODULE hLib;
+ Cryptor* cryptor;
+} CryptoModule;
+
+BOOL CALLBACK DlgStdInProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
+
+char encryptKey[255];
+size_t encryptKeyLength;
+
+int wrongPass = 0;
+void* key;
+
+Cryptor* CryptoEngine = NULL;
+
+int ModulesCount = 0;
+CryptoModule* Modules[100];
+
+
+void zero_fill(BYTE * pBuf, size_t bufSize)
+{
+ size_t i;
+ for(i = 0; i < bufSize; i++)
+ pBuf[i] = 0;
+}
+
+void InitSecurity()
+{
+ HMODULE hLib;
+ WIN32_FIND_DATAA fd;
+ HANDLE hFile;
+
+ Cryptor* (__stdcall *GetCryptor)();
+
+ {
+ TCHAR szMirandaDir[MAX_PATH];
+ TCHAR *str2;
+
+ szMirandaDir[ 0 ] = 0;
+
+ GetModuleFileName(NULL,szMirandaDir,SIZEOF(szMirandaDir));
+ str2 = _tcsrchr(szMirandaDir,'\\');
+ if( str2 != NULL )
+ *str2=0;
+ _tchdir(szMirandaDir);
+ }
+
+ hFile = FindFirstFileA(".\\plugins\\cryptors\\*.dll", &fd);
+
+ AddMessage(LPGEN("Scanning cryptors directory"));
+
+ ModulesCount = 0;
+ while (hFile != INVALID_HANDLE_VALUE)
+ {
+ char tmp[MAX_PATH], buf[255];
+ strcpy(tmp, ".\\plugins\\cryptors\\");
+ strcat(tmp, fd.cFileName);
+
+ hLib = LoadLibraryA(tmp);
+ if(hLib){
+ GetCryptor = (Cryptor* (__stdcall *)()) GetProcAddress(hLib, "GetCryptor");
+ if(GetCryptor){
+ //TCHAR Name[100], Version[100], DllName[100];
+
+
+ Modules[ModulesCount] = (CryptoModule*) malloc(sizeof(CryptoModule));
+ Modules[ModulesCount]->cryptor = GetCryptor();
+ strcpy(Modules[ModulesCount]->dllname, fd.cFileName);
+ Modules[ModulesCount]->hLib = hLib;
+
+ _snprintf(buf,SIZEOF(buf),"%d.%d.%d.%d", HIBYTE(HIWORD(Modules[ModulesCount]->cryptor->Version)), LOBYTE(HIWORD(Modules[ModulesCount]->cryptor->Version)), HIBYTE(LOWORD(Modules[ModulesCount]->cryptor->Version)), LOBYTE(LOWORD(Modules[ModulesCount]->cryptor->Version)));
+ // Unsane: none
+/*
+#ifdef _UNICODE
+ mbstowcs(Name, Modules[ModulesCount]->cryptor->Name, 100);
+ mbstowcs(Version, buf, 100);
+ mbstowcs(DllName, Modules[ModulesCount]->dllname, 100);
+#else
+
+ strcpy(Name, Modules[ModulesCount]->cryptor->Name);
+ strcpy(Version, buf);
+ strcpy(DllName, Modules[ModulesCount]->dllname);
+#endif
+*/
+ AddMessage(LPGEN("Cryptor loaded: %s [%s] (%s)"), Modules[ModulesCount]->cryptor->Name, buf, Modules[ModulesCount]->dllname);
+
+ ModulesCount++;
+ }else{
+ FreeLibrary(hLib);
+ }
+ }
+ if(ModulesCount >= 100) break;
+ if(!FindNextFileA(hFile, &fd)) break;
+ }
+
+ AddMessage(LPGEN("%d crypto modules loaded"), ModulesCount);
+}
+
+void UnloadSecurity()
+{
+ int i;
+
+ if(CryptoEngine) CryptoEngine->FreeKey(key);
+
+ for(i = 0; i < ModulesCount; i++)
+ {
+ FreeLibrary(Modules[i]->hLib);
+ free(Modules[i]);
+ }
+}
+
+void EncoderInit()
+{
+ encryptKey[encryptKeyLength] = 0;
+ key = CryptoEngine->GenerateKey(encryptKey);
+}
+
+void EncodeCopyMemory(BYTE * dst, void * src, size_t size )
+{
+ memcpy(dst, src, size);
+ CryptoEngine->EncryptMem(dst, (int)size, key);
+}
+
+void DecodeCopyMemory(BYTE * dst, void * src, size_t size )
+{
+ memcpy(dst, src, size);
+ CryptoEngine->DecryptMem(dst, (int)size, key);
+}
+
+
+void EncodeMemory(BYTE * mem, size_t size)
+{
+ CryptoEngine->EncryptMem(mem, (int)size, key);
+}
+
+void DecodeMemory(BYTE * mem, size_t size)
+{
+ CryptoEngine->DecryptMem(mem, (int)size, key);
+}
+
+int bCheckingPass = 0;
+
+int CheckPassword(WORD checkWord, WORD cryptorUID, TCHAR * szDBName)
+{
+ WORD ver;
+ int res;
+
+ if(bCheckingPass) return 0;
+ bCheckingPass = 1;
+
+ {
+ int i;
+ int Found = 0;
+ for(i = 0; i < ModulesCount; i++){
+ if(cryptorUID == Modules[i]->cryptor->uid){
+ CryptoEngine = Modules[i]->cryptor;
+ Found = 1;
+ break;
+ }
+ }
+ if(!Found){
+ AddMessage(LPGEN("Sorry, but your database encrypted with unknown module"), MB_OK);
+ bCheckingPass = 0;
+ return 0;
+ }
+ }
+
+ {
+ //wchar_t Name[100], Author[100];
+
+ // Unsane: none
+ AddMessage(LPGEN("Database encrypted with %s by %s"), CryptoEngine->Name, CryptoEngine->Author);
+ }
+
+ while(1){
+ res = DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_LOGIN), NULL, (DLGPROC)DlgStdInProc, (LPARAM)szDBName);
+ if(res == IDCANCEL)
+ {
+ wrongPass = 0;
+ bCheckingPass = 0;
+ return 0;
+ }
+ if(encryptKeyLength < 1) continue;
+ EncoderInit();
+ DecodeCopyMemory((BYTE*)&ver, &checkWord, sizeof(checkWord));
+ if(ver == 0x5195)
+ {
+ wrongPass = 0;
+ bCheckingPass = 0;
+ return 1;
+ }
+ wrongPass++;
+ }
+
+ bCheckingPass = 0;
+}
+
+
+UINT oldLangID = 0;
+void LanguageChanged(HWND hDlg)
+{
+ UINT LangID = (UINT)GetKeyboardLayout(0);
+ char Lang[3] = {0};
+ if (LangID != oldLangID)
+ {
+ oldLangID = LangID;
+ GetLocaleInfoA(MAKELCID((LangID & 0xffffffff), SORT_DEFAULT), LOCALE_SABBREVLANGNAME, Lang, 2);
+ SetDlgItemTextA(hDlg, IDC_LANG, Lang);
+ }
+}
+
+BOOL CALLBACK DlgStdInProc(HWND hDlg, UINT uMsg,WPARAM wParam,LPARAM lParam)
+{
+ HICON hIcon = 0;
+ TCHAR tszHeaderTxt[256];
+ switch(uMsg)
+ {
+ case WM_INITDIALOG:
+ {
+ HWND hwndCtrl;
+ TranslateDialogDefault(hDlg);
+
+ hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_PASS));
+ SendMessage(GetDlgItem(hDlg, IDC_HEADERBAR), WM_SETICON, 0, (LPARAM)hIcon);
+
+ if(!wrongPass)
+ {
+ mir_sntprintf(tszHeaderTxt, SIZEOF(tszHeaderTxt), _T("%s\n%s"), TranslateT("Please type in your password for"), lParam);
+ SetWindowText(GetDlgItem(hDlg, IDC_HEADERBAR), tszHeaderTxt);
+ }
+ else
+ {
+ if (wrongPass > 2)
+ {
+ hwndCtrl = GetDlgItem(hDlg, IDC_USERPASS);
+ EnableWindow(hwndCtrl, FALSE);
+ hwndCtrl = GetDlgItem(hDlg, IDOK);
+ EnableWindow(hwndCtrl, FALSE);
+
+ SetWindowText(GetDlgItem(hDlg, IDC_HEADERBAR), TranslateT("Too many errors!"));
+ }
+ else
+ SetWindowText(GetDlgItem(hDlg, IDC_HEADERBAR), TranslateT("Password is not correct!"));
+ }
+ oldLangID = 0;
+ SetTimer(hDlg,1,200,NULL);
+ LanguageChanged(hDlg);
+ return TRUE;
+ }
+
+ case WM_CTLCOLORSTATIC:
+ {
+ if ((HWND)lParam == GetDlgItem(hDlg, IDC_LANG))
+ {
+ SetTextColor((HDC)wParam, GetSysColor(COLOR_HIGHLIGHTTEXT));
+ SetBkMode((HDC)wParam, TRANSPARENT);
+ return (BOOL)GetSysColorBrush(COLOR_HIGHLIGHT);
+ }
+
+ return FALSE;
+ }
+
+ case WM_COMMAND:
+ {
+ UINT uid = LOWORD(wParam);
+
+ if(uid == IDOK){
+ if(!GetWindowLongPtr(hDlg,GWLP_USERDATA))
+ {
+ encryptKeyLength = GetDlgItemTextA(hDlg, IDC_USERPASS, encryptKey, 254);
+ EndDialog(hDlg,IDOK);
+ }else{
+
+ }
+ }else if(uid == IDCANCEL){
+ EndDialog(hDlg,IDCANCEL);
+ }
+ }
+ case WM_TIMER:
+ {
+ LanguageChanged(hDlg);
+ return FALSE;
+ }
+ case WM_DESTROY:
+ {
+ KillTimer(hDlg, 1);
+ DestroyIcon(hIcon);
+ return FALSE;
+ }
+ }
+
+ return FALSE;
+}
diff --git a/plugins/Dbx_mmap_SA/Import_SA/import.dep b/plugins/Dbx_mmap_SA/Import_SA/import.dep
new file mode 100644
index 0000000000..a19a392168
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Import_SA/import.dep
@@ -0,0 +1,110 @@
+# Microsoft Developer Studio Generated Dependency File, included by import.mak
+
+.\ICQserver.c : \
+ "..\..\include\m_clist.h"\
+ "..\..\include\m_database.h"\
+ "..\..\include\m_findadd.h"\
+ "..\..\include\m_langpack.h"\
+ "..\..\include\m_plugins.h"\
+ "..\..\include\m_protocols.h"\
+ "..\..\include\m_protomod.h"\
+ "..\..\include\m_protosvc.h"\
+ "..\..\include\m_system.h"\
+ "..\..\include\m_utils.h"\
+ "..\..\include\newpluginapi.h"\
+ "..\..\include\statusmodes.h"\
+ "..\..\include\win2k.h"\
+ ".\ICQserver.h"\
+ ".\import.h"\
+
+
+.\main.c : \
+ "..\..\include\m_clist.h"\
+ "..\..\include\m_database.h"\
+ "..\..\include\m_findadd.h"\
+ "..\..\include\m_langpack.h"\
+ "..\..\include\m_plugins.h"\
+ "..\..\include\m_protocols.h"\
+ "..\..\include\m_protomod.h"\
+ "..\..\include\m_protosvc.h"\
+ "..\..\include\m_system.h"\
+ "..\..\include\m_utils.h"\
+ "..\..\include\newpluginapi.h"\
+ "..\..\include\statusmodes.h"\
+ "..\..\include\win2k.h"\
+ ".\import.h"\
+
+
+.\mirabilis.c : \
+ "..\..\include\m_clist.h"\
+ "..\..\include\m_database.h"\
+ "..\..\include\m_findadd.h"\
+ "..\..\include\m_langpack.h"\
+ "..\..\include\m_plugins.h"\
+ "..\..\include\m_protocols.h"\
+ "..\..\include\m_protomod.h"\
+ "..\..\include\m_protosvc.h"\
+ "..\..\include\m_system.h"\
+ "..\..\include\m_utils.h"\
+ "..\..\include\newpluginapi.h"\
+ "..\..\include\statusmodes.h"\
+ "..\..\include\win2k.h"\
+ ".\import.h"\
+ ".\mirabilis.h"\
+
+
+.\miranda.c : \
+ "..\..\include\m_clist.h"\
+ "..\..\include\m_database.h"\
+ "..\..\include\m_findadd.h"\
+ "..\..\include\m_langpack.h"\
+ "..\..\include\m_plugins.h"\
+ "..\..\include\m_protocols.h"\
+ "..\..\include\m_protomod.h"\
+ "..\..\include\m_protosvc.h"\
+ "..\..\include\m_system.h"\
+ "..\..\include\m_utils.h"\
+ "..\..\include\newpluginapi.h"\
+ "..\..\include\statusmodes.h"\
+ "..\..\include\win2k.h"\
+ ".\import.h"\
+ ".\mirandadb0700.h"\
+
+
+.\progress.c : \
+ "..\..\include\m_clist.h"\
+ "..\..\include\m_database.h"\
+ "..\..\include\m_findadd.h"\
+ "..\..\include\m_langpack.h"\
+ "..\..\include\m_plugins.h"\
+ "..\..\include\m_protocols.h"\
+ "..\..\include\m_protomod.h"\
+ "..\..\include\m_protosvc.h"\
+ "..\..\include\m_system.h"\
+ "..\..\include\m_utils.h"\
+ "..\..\include\newpluginapi.h"\
+ "..\..\include\statusmodes.h"\
+ "..\..\include\win2k.h"\
+ ".\import.h"\
+
+
+.\wizard.c : \
+ "..\..\include\m_clist.h"\
+ "..\..\include\m_database.h"\
+ "..\..\include\m_findadd.h"\
+ "..\..\include\m_langpack.h"\
+ "..\..\include\m_plugins.h"\
+ "..\..\include\m_protocols.h"\
+ "..\..\include\m_protomod.h"\
+ "..\..\include\m_protosvc.h"\
+ "..\..\include\m_system.h"\
+ "..\..\include\m_utils.h"\
+ "..\..\include\newpluginapi.h"\
+ "..\..\include\statusmodes.h"\
+ "..\..\include\win2k.h"\
+ ".\import.h"\
+
+
+.\resource.rc : \
+ ".\import.ico"\
+
diff --git a/plugins/Dbx_mmap_SA/Import_SA/import.dsp b/plugins/Dbx_mmap_SA/Import_SA/import.dsp
new file mode 100644
index 0000000000..ca414238ee
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Import_SA/import.dsp
@@ -0,0 +1,238 @@
+# Microsoft Developer Studio Project File - Name="import" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=import - Win32 Debug Unicode
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "import.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "import.mak" CFG="import - Win32 Debug Unicode"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "import - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "import - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "import - Win32 Release Unicode" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "import - Win32 Debug Unicode" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "import - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 1
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IMPORT_EXPORTS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /Zi /O1 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IMPORT_EXPORTS" /Yu"import.h" /FD /c
+# SUBTRACT CPP /Fr
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x809 /d "NDEBUG"
+# ADD RSC /l 0x809 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /base:"0x22000000" /dll /map /debug /machine:I386 /out:"../../bin/release/plugins/import.dll" /ALIGN:4096 /ignore:4108
+# SUBTRACT LINK32 /pdb:none
+
+!ELSEIF "$(CFG)" == "import - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IMPORT_EXPORTS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IMPORT_EXPORTS" /FR /Yu"import.h" /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x809 /d "_DEBUG"
+# ADD RSC /l 0x809 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /base:"0x22000000" /dll /pdb:"../../Bin/Debug/Plugins/import.pdb" /map:"../../Bin/Debug/Plugins/import.map" /debug /machine:I386 /out:"../../bin/debug/plugins/import.dll" /pdbtype:sept
+# SUBTRACT LINK32 /pdb:none
+
+!ELSEIF "$(CFG)" == "import - Win32 Release Unicode"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "import___Win32_Release_Unicode"
+# PROP BASE Intermediate_Dir "import___Win32_Release_Unicode"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release_Unicode"
+# PROP Intermediate_Dir "Release_Unicode"
+# PROP Ignore_Export_Lib 1
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /W3 /GX /Zi /O1 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IMPORT_EXPORTS" /FR /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /Zi /O1 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "IMPORT_EXPORTS" /Yu"import.h" /FD /c
+# SUBTRACT CPP /Fr
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x809 /d "NDEBUG"
+# ADD RSC /l 0x809 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /base:"0x22000000" /dll /map /machine:I386 /out:"../../bin/release/plugins/import.dll" /ALIGN:4096 /ignore:4108
+# SUBTRACT BASE LINK32 /pdb:none
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /base:"0x22000000" /dll /map /debug /machine:I386 /out:"../../bin/release unicode/plugins/import.dll" /ALIGN:4096 /ignore:4108
+# SUBTRACT LINK32 /pdb:none
+
+!ELSEIF "$(CFG)" == "import - Win32 Debug Unicode"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "import___Win32_Debug_Unicode"
+# PROP BASE Intermediate_Dir "import___Win32_Debug_Unicode"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug_Unicode"
+# PROP Intermediate_Dir "Debug_Unicode"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IMPORT_EXPORTS" /FR /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "IMPORT_EXPORTS" /FR /Yu"import.h" /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x809 /d "_DEBUG"
+# ADD RSC /l 0x809 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /base:"0x22000000" /dll /pdb:"../../Bin/Debug/Plugins/import.pdb" /map:"../../Bin/Debug/Plugins/import.map" /debug /machine:I386 /out:"../../bin/debug/plugins/import.dll" /pdbtype:sept
+# SUBTRACT BASE LINK32 /pdb:none
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /base:"0x22000000" /dll /pdb:"../../Bin/Debug/Plugins/import.pdb" /map:"../../Bin/Debug/Plugins/import.map" /debug /machine:I386 /out:"../../bin/debug unicode/plugins/import.dll" /pdbtype:sept
+# SUBTRACT LINK32 /pdb:none
+
+!ENDIF
+
+# Begin Target
+
+# Name "import - Win32 Release"
+# Name "import - Win32 Debug"
+# Name "import - Win32 Release Unicode"
+# Name "import - Win32 Debug Unicode"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\ICQserver.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\main.c
+# ADD CPP /Yc"import.h"
+# End Source File
+# Begin Source File
+
+SOURCE=.\mirabilis.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\miranda.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\progress.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\wizard.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\ICQserver.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\import.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\mirabilis.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\mirandadb0700.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\import.ico
+# End Source File
+# Begin Source File
+
+SOURCE=.\resource.rc
+# End Source File
+# End Group
+# Begin Group "Documentation"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=".\docs\import-ICQ_Db_Specs.txt"
+# End Source File
+# Begin Source File
+
+SOURCE=".\docs\import-license.txt"
+# End Source File
+# Begin Source File
+
+SOURCE=".\docs\import-readme.txt"
+# End Source File
+# Begin Source File
+
+SOURCE=".\docs\import-translation.txt"
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/plugins/Dbx_mmap_SA/Import_SA/import.dsw b/plugins/Dbx_mmap_SA/Import_SA/import.dsw
new file mode 100644
index 0000000000..0efffe9da1
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Import_SA/import.dsw
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "import"=".\import.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/plugins/Dbx_mmap_SA/Import_SA/import.h b/plugins/Dbx_mmap_SA/Import_SA/import.h
new file mode 100644
index 0000000000..8ac41c66c9
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Import_SA/import.h
@@ -0,0 +1,118 @@
+/*
+
+Import plugin for Miranda IM
+
+Copyright (C) 2001,2002,2003,2004 Martin Öberg, Richard Hughes, Roland Rabien & Tristan Van de Vreede
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+
+//#define _LOGGING 1
+
+#define MIRANDA_VER 0x0900
+#define MIRANDA_CUSTOM_LP
+
+#define WINVER 0x0501
+#define _WIN32_WINNT 0x0501
+#define _WIN32_IE 0x0501
+
+#include <m_stdhdr.h>
+
+#include <windows.h>
+#include <commctrl.h> // datetimepicker
+
+#include <stddef.h>
+#include <time.h>
+#include <io.h>
+
+#include <win2k.h>
+#include <newpluginapi.h>
+#include <m_langpack.h>
+#include <m_system.h>
+#include <m_database.h>
+#include <m_protocols.h>
+#include <m_protosvc.h>
+#include <m_protomod.h>
+#include <m_utils.h>
+#include <m_findadd.h>
+#include <m_clist.h>
+
+// Unsane: none
+#include "resource.h"
+
+// ** Global constants
+
+#define IMPORT_MODULE "MIMImport" // Module name
+#define IMPORT_SERVICE "MIMImport/Import" // Service for menu item
+
+// Keys
+#define IMP_KEY_FR "FirstRun" // First run
+
+
+#define WIZM_GOTOPAGE (WM_USER+10) //wParam=resource id, lParam=dlgproc
+#define WIZM_DISABLEBUTTON (WM_USER+11) //wParam=0:back, 1:next, 2:cancel
+#define WIZM_SETCANCELTEXT (WM_USER+12) //lParam=(char*)newText
+#define WIZM_ENABLEBUTTON (WM_USER+13) //wParam=0:back, 1:next, 2:cancel
+
+#define PROGM_SETPROGRESS (WM_USER+10) //wParam=0..100
+#define PROGM_ADDMESSAGE (WM_USER+11) //lParam=(char*)szText
+#define SetProgress(n) SendMessage(hdlgProgress,PROGM_SETPROGRESS,n,0)
+
+#define ICQOSCPROTONAME "ICQ"
+#define MSNPROTONAME "MSN"
+#define YAHOOPROTONAME "YAHOO"
+#define NSPPROTONAME "NET_SEND"
+#define ICQCORPPROTONAME "ICQ Corp"
+#define AIMPROTONAME "AIM"
+
+// Import type
+#define IMPORT_CONTACTS 0
+#define IMPORT_ALL 1
+#define IMPORT_CUSTOM 2
+
+// Custom import options
+#define IOPT_ADDUNKNOWN 1
+#define IOPT_MSGSENT 2
+#define IOPT_MSGRECV 4
+#define IOPT_URLSENT 8
+#define IOPT_URLRECV 16
+#define IOPT_AUTHREQ 32
+#define IOPT_ADDED 64
+#define IOPT_FILESENT 128
+#define IOPT_FILERECV 256
+#define IOPT_OTHERSENT 512
+#define IOPT_OTHERRECV 1024
+#define IOPT_SYSTEM 2048
+#define IOPT_CONTACTS 4096
+#define IOPT_GROUPS 8192
+
+
+struct MM_INTERFACE mmi;
+struct UTF8_INTERFACE utfi;
+
+// Unsane: none
+extern HINSTANCE hInst;
+
+void AddMessage( const char* fmt, ... );
+void DecodeMemory(BYTE * mem, size_t size);
+void DecodeCopyMemory(BYTE * dst, void * src, size_t size );
+
+int CreateGroup(BYTE type, const char* name, HANDLE hContact);
+
+extern HWND hdlgProgress;
+
+extern DWORD nDupes, nContactsCount, nMessagesCount, nGroupsCount, nSkippedEvents, nSkippedContacts;
diff --git a/plugins/Dbx_mmap_SA/Import_SA/import.mak b/plugins/Dbx_mmap_SA/Import_SA/import.mak
new file mode 100644
index 0000000000..3b227e2398
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Import_SA/import.mak
@@ -0,0 +1,516 @@
+# Microsoft Developer Studio Generated NMAKE File, Based on import.dsp
+!IF "$(CFG)" == ""
+CFG=import - Win32 Debug Unicode
+!MESSAGE No configuration specified. Defaulting to import - Win32 Debug Unicode.
+!ENDIF
+
+!IF "$(CFG)" != "import - Win32 Release" && "$(CFG)" != "import - Win32 Debug" && "$(CFG)" != "import - Win32 Release Unicode" && "$(CFG)" != "import - Win32 Debug Unicode"
+!MESSAGE Invalid configuration "$(CFG)" specified.
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "import.mak" CFG="import - Win32 Debug Unicode"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "import - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "import - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "import - Win32 Release Unicode" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "import - Win32 Debug Unicode" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+!ERROR An invalid configuration is specified.
+!ENDIF
+
+!IF "$(OS)" == "Windows_NT"
+NULL=
+!ELSE
+NULL=nul
+!ENDIF
+
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "import - Win32 Release"
+
+OUTDIR=.\Release
+INTDIR=.\Release
+
+ALL : "..\..\bin\release\plugins\import.dll"
+
+
+CLEAN :
+ -@erase "$(INTDIR)\ICQserver.obj"
+ -@erase "$(INTDIR)\import.pch"
+ -@erase "$(INTDIR)\main.obj"
+ -@erase "$(INTDIR)\mirabilis.obj"
+ -@erase "$(INTDIR)\miranda.obj"
+ -@erase "$(INTDIR)\progress.obj"
+ -@erase "$(INTDIR)\resource.res"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(INTDIR)\vc60.pdb"
+ -@erase "$(INTDIR)\wizard.obj"
+ -@erase "$(OUTDIR)\import.exp"
+ -@erase "$(OUTDIR)\import.map"
+ -@erase "$(OUTDIR)\import.pdb"
+ -@erase "..\..\bin\release\plugins\import.dll"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP_PROJ=/nologo /MD /W3 /GX /Zi /O1 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IMPORT_EXPORTS" /Fp"$(INTDIR)\import.pch" /Yu"import.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
+MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32
+RSC_PROJ=/l 0x809 /fo"$(INTDIR)\resource.res" /d "NDEBUG"
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\import.bsc"
+BSC32_SBRS= \
+
+LINK32=link.exe
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /base:"0x22000000" /dll /incremental:no /pdb:"$(OUTDIR)\import.pdb" /map:"$(INTDIR)\import.map" /debug /machine:I386 /out:"../../bin/release/plugins/import.dll" /implib:"$(OUTDIR)\import.lib" /ALIGN:4096 /ignore:4108
+LINK32_OBJS= \
+ "$(INTDIR)\ICQserver.obj" \
+ "$(INTDIR)\main.obj" \
+ "$(INTDIR)\mirabilis.obj" \
+ "$(INTDIR)\miranda.obj" \
+ "$(INTDIR)\progress.obj" \
+ "$(INTDIR)\wizard.obj" \
+ "$(INTDIR)\resource.res"
+
+"..\..\bin\release\plugins\import.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ELSEIF "$(CFG)" == "import - Win32 Debug"
+
+OUTDIR=.\Debug
+INTDIR=.\Debug
+# Begin Custom Macros
+OutDir=.\Debug
+# End Custom Macros
+
+ALL : "..\..\bin\debug\plugins\import.dll" "$(OUTDIR)\import.bsc"
+
+
+CLEAN :
+ -@erase "$(INTDIR)\ICQserver.obj"
+ -@erase "$(INTDIR)\ICQserver.sbr"
+ -@erase "$(INTDIR)\import.pch"
+ -@erase "$(INTDIR)\main.obj"
+ -@erase "$(INTDIR)\main.sbr"
+ -@erase "$(INTDIR)\mirabilis.obj"
+ -@erase "$(INTDIR)\mirabilis.sbr"
+ -@erase "$(INTDIR)\miranda.obj"
+ -@erase "$(INTDIR)\miranda.sbr"
+ -@erase "$(INTDIR)\progress.obj"
+ -@erase "$(INTDIR)\progress.sbr"
+ -@erase "$(INTDIR)\resource.res"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(INTDIR)\vc60.pdb"
+ -@erase "$(INTDIR)\wizard.obj"
+ -@erase "$(INTDIR)\wizard.sbr"
+ -@erase "$(OUTDIR)\import.bsc"
+ -@erase "$(OUTDIR)\import.exp"
+ -@erase "$(OUTDIR)\import.lib"
+ -@erase "..\..\bin\debug\plugins\import.dll"
+ -@erase "..\..\bin\debug\plugins\import.ilk"
+ -@erase "..\..\Bin\Debug\Plugins\import.map"
+ -@erase "..\..\Bin\Debug\Plugins\import.pdb"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IMPORT_EXPORTS" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\import.pch" /Yu"import.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
+MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32
+RSC_PROJ=/l 0x809 /fo"$(INTDIR)\resource.res" /d "_DEBUG"
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\import.bsc"
+BSC32_SBRS= \
+ "$(INTDIR)\ICQserver.sbr" \
+ "$(INTDIR)\main.sbr" \
+ "$(INTDIR)\mirabilis.sbr" \
+ "$(INTDIR)\miranda.sbr" \
+ "$(INTDIR)\progress.sbr" \
+ "$(INTDIR)\wizard.sbr"
+
+"$(OUTDIR)\import.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
+ $(BSC32) @<<
+ $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
+LINK32=link.exe
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /base:"0x22000000" /dll /incremental:yes /pdb:"../../Bin/Debug/Plugins/import.pdb" /map:"../../Bin/Debug/Plugins/import.map" /debug /machine:I386 /out:"../../bin/debug/plugins/import.dll" /implib:"$(OUTDIR)\import.lib" /pdbtype:sept
+LINK32_OBJS= \
+ "$(INTDIR)\ICQserver.obj" \
+ "$(INTDIR)\main.obj" \
+ "$(INTDIR)\mirabilis.obj" \
+ "$(INTDIR)\miranda.obj" \
+ "$(INTDIR)\progress.obj" \
+ "$(INTDIR)\wizard.obj" \
+ "$(INTDIR)\resource.res"
+
+"..\..\bin\debug\plugins\import.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ELSEIF "$(CFG)" == "import - Win32 Release Unicode"
+
+OUTDIR=.\Release_Unicode
+INTDIR=.\Release_Unicode
+
+ALL : "..\..\bin\release unicode\plugins\import.dll"
+
+
+CLEAN :
+ -@erase "$(INTDIR)\ICQserver.obj"
+ -@erase "$(INTDIR)\import.pch"
+ -@erase "$(INTDIR)\main.obj"
+ -@erase "$(INTDIR)\mirabilis.obj"
+ -@erase "$(INTDIR)\miranda.obj"
+ -@erase "$(INTDIR)\progress.obj"
+ -@erase "$(INTDIR)\resource.res"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(INTDIR)\vc60.pdb"
+ -@erase "$(INTDIR)\wizard.obj"
+ -@erase "$(OUTDIR)\import.exp"
+ -@erase "$(OUTDIR)\import.map"
+ -@erase "$(OUTDIR)\import.pdb"
+ -@erase "..\..\bin\release unicode\plugins\import.dll"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP_PROJ=/nologo /MD /W3 /GX /Zi /O1 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "IMPORT_EXPORTS" /Fp"$(INTDIR)\import.pch" /Yu"import.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
+MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32
+RSC_PROJ=/l 0x809 /fo"$(INTDIR)\resource.res" /d "NDEBUG"
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\import.bsc"
+BSC32_SBRS= \
+
+LINK32=link.exe
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /base:"0x22000000" /dll /incremental:no /pdb:"$(OUTDIR)\import.pdb" /map:"$(INTDIR)\import.map" /debug /machine:I386 /out:"../../bin/release unicode/plugins/import.dll" /implib:"$(OUTDIR)\import.lib" /ALIGN:4096 /ignore:4108
+LINK32_OBJS= \
+ "$(INTDIR)\ICQserver.obj" \
+ "$(INTDIR)\main.obj" \
+ "$(INTDIR)\mirabilis.obj" \
+ "$(INTDIR)\miranda.obj" \
+ "$(INTDIR)\progress.obj" \
+ "$(INTDIR)\wizard.obj" \
+ "$(INTDIR)\resource.res"
+
+"..\..\bin\release unicode\plugins\import.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ELSEIF "$(CFG)" == "import - Win32 Debug Unicode"
+
+OUTDIR=.\Debug_Unicode
+INTDIR=.\Debug_Unicode
+# Begin Custom Macros
+OutDir=.\Debug_Unicode
+# End Custom Macros
+
+ALL : "..\..\bin\debug unicode\plugins\import.dll" "$(OUTDIR)\import.bsc"
+
+
+CLEAN :
+ -@erase "$(INTDIR)\ICQserver.obj"
+ -@erase "$(INTDIR)\ICQserver.sbr"
+ -@erase "$(INTDIR)\import.pch"
+ -@erase "$(INTDIR)\main.obj"
+ -@erase "$(INTDIR)\main.sbr"
+ -@erase "$(INTDIR)\mirabilis.obj"
+ -@erase "$(INTDIR)\mirabilis.sbr"
+ -@erase "$(INTDIR)\miranda.obj"
+ -@erase "$(INTDIR)\miranda.sbr"
+ -@erase "$(INTDIR)\progress.obj"
+ -@erase "$(INTDIR)\progress.sbr"
+ -@erase "$(INTDIR)\resource.res"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(INTDIR)\vc60.pdb"
+ -@erase "$(INTDIR)\wizard.obj"
+ -@erase "$(INTDIR)\wizard.sbr"
+ -@erase "$(OUTDIR)\import.bsc"
+ -@erase "$(OUTDIR)\import.exp"
+ -@erase "$(OUTDIR)\import.lib"
+ -@erase "..\..\bin\debug unicode\plugins\import.dll"
+ -@erase "..\..\bin\debug unicode\plugins\import.ilk"
+ -@erase "..\..\Bin\Debug\Plugins\import.map"
+ -@erase "..\..\Bin\Debug\Plugins\import.pdb"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP_PROJ=/nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "IMPORT_EXPORTS" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\import.pch" /Yu"import.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
+MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32
+RSC_PROJ=/l 0x809 /fo"$(INTDIR)\resource.res" /d "_DEBUG"
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\import.bsc"
+BSC32_SBRS= \
+ "$(INTDIR)\ICQserver.sbr" \
+ "$(INTDIR)\main.sbr" \
+ "$(INTDIR)\mirabilis.sbr" \
+ "$(INTDIR)\miranda.sbr" \
+ "$(INTDIR)\progress.sbr" \
+ "$(INTDIR)\wizard.sbr"
+
+"$(OUTDIR)\import.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
+ $(BSC32) @<<
+ $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
+LINK32=link.exe
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib /nologo /base:"0x22000000" /dll /incremental:yes /pdb:"../../Bin/Debug/Plugins/import.pdb" /map:"../../Bin/Debug/Plugins/import.map" /debug /machine:I386 /out:"../../bin/debug unicode/plugins/import.dll" /implib:"$(OUTDIR)\import.lib" /pdbtype:sept
+LINK32_OBJS= \
+ "$(INTDIR)\ICQserver.obj" \
+ "$(INTDIR)\main.obj" \
+ "$(INTDIR)\mirabilis.obj" \
+ "$(INTDIR)\miranda.obj" \
+ "$(INTDIR)\progress.obj" \
+ "$(INTDIR)\wizard.obj" \
+ "$(INTDIR)\resource.res"
+
+"..\..\bin\debug unicode\plugins\import.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ENDIF
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+
+!IF "$(NO_EXTERNAL_DEPS)" != "1"
+!IF EXISTS("import.dep")
+!INCLUDE "import.dep"
+!ELSE
+!MESSAGE Warning: cannot find "import.dep"
+!ENDIF
+!ENDIF
+
+
+!IF "$(CFG)" == "import - Win32 Release" || "$(CFG)" == "import - Win32 Debug" || "$(CFG)" == "import - Win32 Release Unicode" || "$(CFG)" == "import - Win32 Debug Unicode"
+SOURCE=.\ICQserver.c
+
+!IF "$(CFG)" == "import - Win32 Release"
+
+
+"$(INTDIR)\ICQserver.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\import.pch"
+
+
+!ELSEIF "$(CFG)" == "import - Win32 Debug"
+
+
+"$(INTDIR)\ICQserver.obj" "$(INTDIR)\ICQserver.sbr" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\import.pch"
+
+
+!ELSEIF "$(CFG)" == "import - Win32 Release Unicode"
+
+
+"$(INTDIR)\ICQserver.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\import.pch"
+
+
+!ELSEIF "$(CFG)" == "import - Win32 Debug Unicode"
+
+
+"$(INTDIR)\ICQserver.obj" "$(INTDIR)\ICQserver.sbr" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\import.pch"
+
+
+!ENDIF
+
+SOURCE=.\main.c
+
+!IF "$(CFG)" == "import - Win32 Release"
+
+CPP_SWITCHES=/nologo /MD /W3 /GX /Zi /O1 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IMPORT_EXPORTS" /Fp"$(INTDIR)\import.pch" /Yc"import.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
+
+"$(INTDIR)\main.obj" "$(INTDIR)\import.pch" : $(SOURCE) "$(INTDIR)"
+ $(CPP) @<<
+ $(CPP_SWITCHES) $(SOURCE)
+<<
+
+
+!ELSEIF "$(CFG)" == "import - Win32 Debug"
+
+CPP_SWITCHES=/nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "IMPORT_EXPORTS" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\import.pch" /Yc"import.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
+
+"$(INTDIR)\main.obj" "$(INTDIR)\main.sbr" "$(INTDIR)\import.pch" : $(SOURCE) "$(INTDIR)"
+ $(CPP) @<<
+ $(CPP_SWITCHES) $(SOURCE)
+<<
+
+
+!ELSEIF "$(CFG)" == "import - Win32 Release Unicode"
+
+CPP_SWITCHES=/nologo /MD /W3 /GX /Zi /O1 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "IMPORT_EXPORTS" /Fp"$(INTDIR)\import.pch" /Yc"import.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
+
+"$(INTDIR)\main.obj" "$(INTDIR)\import.pch" : $(SOURCE) "$(INTDIR)"
+ $(CPP) @<<
+ $(CPP_SWITCHES) $(SOURCE)
+<<
+
+
+!ELSEIF "$(CFG)" == "import - Win32 Debug Unicode"
+
+CPP_SWITCHES=/nologo /MDd /W3 /Gm /GX /Zi /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "IMPORT_EXPORTS" /FR"$(INTDIR)\\" /Fp"$(INTDIR)\import.pch" /Yc"import.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
+
+"$(INTDIR)\main.obj" "$(INTDIR)\main.sbr" "$(INTDIR)\import.pch" : $(SOURCE) "$(INTDIR)"
+ $(CPP) @<<
+ $(CPP_SWITCHES) $(SOURCE)
+<<
+
+
+!ENDIF
+
+SOURCE=.\mirabilis.c
+
+!IF "$(CFG)" == "import - Win32 Release"
+
+
+"$(INTDIR)\mirabilis.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\import.pch"
+
+
+!ELSEIF "$(CFG)" == "import - Win32 Debug"
+
+
+"$(INTDIR)\mirabilis.obj" "$(INTDIR)\mirabilis.sbr" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\import.pch"
+
+
+!ELSEIF "$(CFG)" == "import - Win32 Release Unicode"
+
+
+"$(INTDIR)\mirabilis.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\import.pch"
+
+
+!ELSEIF "$(CFG)" == "import - Win32 Debug Unicode"
+
+
+"$(INTDIR)\mirabilis.obj" "$(INTDIR)\mirabilis.sbr" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\import.pch"
+
+
+!ENDIF
+
+SOURCE=.\miranda.c
+
+!IF "$(CFG)" == "import - Win32 Release"
+
+
+"$(INTDIR)\miranda.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\import.pch"
+
+
+!ELSEIF "$(CFG)" == "import - Win32 Debug"
+
+
+"$(INTDIR)\miranda.obj" "$(INTDIR)\miranda.sbr" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\import.pch"
+
+
+!ELSEIF "$(CFG)" == "import - Win32 Release Unicode"
+
+
+"$(INTDIR)\miranda.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\import.pch"
+
+
+!ELSEIF "$(CFG)" == "import - Win32 Debug Unicode"
+
+
+"$(INTDIR)\miranda.obj" "$(INTDIR)\miranda.sbr" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\import.pch"
+
+
+!ENDIF
+
+SOURCE=.\progress.c
+
+!IF "$(CFG)" == "import - Win32 Release"
+
+
+"$(INTDIR)\progress.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\import.pch"
+
+
+!ELSEIF "$(CFG)" == "import - Win32 Debug"
+
+
+"$(INTDIR)\progress.obj" "$(INTDIR)\progress.sbr" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\import.pch"
+
+
+!ELSEIF "$(CFG)" == "import - Win32 Release Unicode"
+
+
+"$(INTDIR)\progress.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\import.pch"
+
+
+!ELSEIF "$(CFG)" == "import - Win32 Debug Unicode"
+
+
+"$(INTDIR)\progress.obj" "$(INTDIR)\progress.sbr" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\import.pch"
+
+
+!ENDIF
+
+SOURCE=.\wizard.c
+
+!IF "$(CFG)" == "import - Win32 Release"
+
+
+"$(INTDIR)\wizard.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\import.pch"
+
+
+!ELSEIF "$(CFG)" == "import - Win32 Debug"
+
+
+"$(INTDIR)\wizard.obj" "$(INTDIR)\wizard.sbr" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\import.pch"
+
+
+!ELSEIF "$(CFG)" == "import - Win32 Release Unicode"
+
+
+"$(INTDIR)\wizard.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\import.pch"
+
+
+!ELSEIF "$(CFG)" == "import - Win32 Debug Unicode"
+
+
+"$(INTDIR)\wizard.obj" "$(INTDIR)\wizard.sbr" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\import.pch"
+
+
+!ENDIF
+
+SOURCE=.\resource.rc
+
+"$(INTDIR)\resource.res" : $(SOURCE) "$(INTDIR)"
+ $(RSC) $(RSC_PROJ) $(SOURCE)
+
+
+
+!ENDIF
+
+
diff --git a/plugins/Dbx_mmap_SA/Import_SA/import_sa.vcproj b/plugins/Dbx_mmap_SA/Import_SA/import_sa.vcproj
new file mode 100644
index 0000000000..27c67dd232
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Import_SA/import_sa.vcproj
@@ -0,0 +1,616 @@
+<?xml version="1.0" encoding="windows-1251"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="import_sa"
+ ProjectGUID="{962F0513-40CE-469E-B87B-8634EA48D9AC}"
+ SccProjectName=""
+ SccLocalPath="">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2"
+ WholeProgramOptimization="TRUE">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ GlobalOptimizations="TRUE"
+ InlineFunctionExpansion="1"
+ FavorSizeOrSpeed="2"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;IMPORT_EXPORTS"
+ StringPooling="TRUE"
+ ExceptionHandling="FALSE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ UsePrecompiledHeader="3"
+ PrecompiledHeaderThrough="import.h"
+ AssemblerOutput="3"
+ BrowseInformation="1"
+ BrowseInformationFile="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="TRUE"
+ AdditionalOptions="/ALIGN:4096 /ignore:4108"
+ AdditionalDependencies="vc7to6.lib comctl32.lib oldnames.lib"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="../../lib"
+ IgnoreAllDefaultLibraries="TRUE"
+ GenerateDebugInformation="TRUE"
+ GenerateMapFile="TRUE"
+ MapFileName="$(OutDir)/$(ProjectName).map"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ OptimizeForWindows98="1"
+ BaseAddress="0x22000000"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="TRUE"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/import.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="2057"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;IMPORT_EXPORTS"
+ ExceptionHandling="FALSE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="3"
+ PrecompiledHeaderThrough="import.h"
+ BrowseInformation="1"
+ BrowseInformationFile="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="comctl32.lib"
+ LinkIncremental="2"
+ SuppressStartupBanner="TRUE"
+ GenerateDebugInformation="TRUE"
+ BaseAddress="0x22000000"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="TRUE"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/import.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="2057"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Debug Unicode|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="1">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;IMPORT_EXPORTS"
+ ExceptionHandling="FALSE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ BufferSecurityCheck="TRUE"
+ UsePrecompiledHeader="3"
+ PrecompiledHeaderThrough="import.h"
+ BrowseInformation="1"
+ BrowseInformationFile="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="TRUE"
+ AdditionalDependencies="comctl32.lib"
+ LinkIncremental="2"
+ SuppressStartupBanner="TRUE"
+ GenerateDebugInformation="TRUE"
+ BaseAddress="0x22000000"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="TRUE"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/import.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="2057"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release Unicode|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="1"
+ WholeProgramOptimization="FALSE">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ GlobalOptimizations="TRUE"
+ FavorSizeOrSpeed="2"
+ OmitFramePointers="FALSE"
+ OptimizeForProcessor="0"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;IMPORT_EXPORTS"
+ StringPooling="TRUE"
+ ExceptionHandling="FALSE"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="TRUE"
+ UsePrecompiledHeader="3"
+ PrecompiledHeaderThrough="import.h"
+ AssemblerOutput="3"
+ BrowseInformation="1"
+ BrowseInformationFile="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="TRUE"
+ AdditionalOptions="/ALIGN:4096 /ignore:4108"
+ AdditionalDependencies="vc7to6.lib comctl32.lib oldnames.lib"
+ AdditionalLibraryDirectories="../../lib"
+ IgnoreAllDefaultLibraries="TRUE"
+ GenerateDebugInformation="TRUE"
+ GenerateMapFile="TRUE"
+ MapFileName="$(OutDir)/$(ProjectName).map"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ OptimizeForWindows98="1"
+ BaseAddress="0x22000000"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="TRUE"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/import.tlb"
+ HeaderFileName=""/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="2057"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+ <File
+ RelativePath="encryption.c">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="1"
+ AdditionalIncludeDirectories=""
+ BrowseInformation="1"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ BasicRuntimeChecks="3"
+ BrowseInformation="1"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ BasicRuntimeChecks="3"
+ BrowseInformation="1"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="1"
+ AdditionalIncludeDirectories=""
+ BrowseInformation="1"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="ICQserver.c">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="1"
+ AdditionalIncludeDirectories=""
+ BrowseInformation="1"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ BasicRuntimeChecks="3"
+ BrowseInformation="1"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ BasicRuntimeChecks="3"
+ BrowseInformation="1"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="1"
+ AdditionalIncludeDirectories=""
+ BrowseInformation="1"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="main.c">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="1"
+ AdditionalIncludeDirectories=""
+ UsePrecompiledHeader="1"
+ BrowseInformation="1"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ BasicRuntimeChecks="3"
+ UsePrecompiledHeader="1"
+ BrowseInformation="1"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ BasicRuntimeChecks="3"
+ UsePrecompiledHeader="1"
+ BrowseInformation="1"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="1"
+ AdditionalIncludeDirectories=""
+ UsePrecompiledHeader="1"
+ BrowseInformation="1"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="mirabilis.c">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="1"
+ AdditionalIncludeDirectories=""
+ BrowseInformation="1"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ BasicRuntimeChecks="3"
+ BrowseInformation="1"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ BasicRuntimeChecks="3"
+ BrowseInformation="1"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="1"
+ AdditionalIncludeDirectories=""
+ BrowseInformation="1"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="miranda.c">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="1"
+ AdditionalIncludeDirectories=""
+ BrowseInformation="1"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ BasicRuntimeChecks="3"
+ BrowseInformation="1"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ BasicRuntimeChecks="3"
+ BrowseInformation="1"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="1"
+ AdditionalIncludeDirectories=""
+ BrowseInformation="1"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="progress.c">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="1"
+ AdditionalIncludeDirectories=""
+ BrowseInformation="1"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ BasicRuntimeChecks="3"
+ BrowseInformation="1"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ BasicRuntimeChecks="3"
+ BrowseInformation="1"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="1"
+ AdditionalIncludeDirectories=""
+ BrowseInformation="1"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="wizard.c">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="1"
+ AdditionalIncludeDirectories=""
+ BrowseInformation="1"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ BasicRuntimeChecks="3"
+ BrowseInformation="1"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ BasicRuntimeChecks="3"
+ BrowseInformation="1"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="1"
+ AdditionalIncludeDirectories=""
+ BrowseInformation="1"/>
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl">
+ <File
+ RelativePath="ICQserver.h">
+ </File>
+ <File
+ RelativePath="import.h">
+ </File>
+ <File
+ RelativePath="mirabilis.h">
+ </File>
+ <File
+ RelativePath="mirandadb0700.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+ <File
+ RelativePath="import.ico">
+ </File>
+ <File
+ RelativePath="resource.rc">
+ </File>
+ </Filter>
+ <Filter
+ Name="Documentation"
+ Filter="">
+ <File
+ RelativePath="docs\import-ICQ_Db_Specs.txt">
+ </File>
+ <File
+ RelativePath="docs\import-license.txt">
+ </File>
+ <File
+ RelativePath="docs\import-readme.txt">
+ </File>
+ <File
+ RelativePath="docs\import-translation.txt">
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/plugins/Dbx_mmap_SA/Import_SA/import_sa_10.vcxproj b/plugins/Dbx_mmap_SA/Import_SA/import_sa_10.vcxproj
new file mode 100644
index 0000000000..ce18f2a4d3
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Import_SA/import_sa_10.vcxproj
@@ -0,0 +1,642 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug Unicode|Win32">
+ <Configuration>Debug Unicode</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug Unicode|x64">
+ <Configuration>Debug Unicode</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release Unicode|Win32">
+ <Configuration>Release Unicode</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release Unicode|x64">
+ <Configuration>Release Unicode</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectName>import_sa</ProjectName>
+ <ProjectGuid>{9299B507-1AF9-4C93-9560-5F637D1E0C9E}</ProjectGuid>
+ <RootNamespace>import_sa</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</IgnoreImportLibrary>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64/Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\</IntDir>
+ <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</IgnoreImportLibrary>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IgnoreImportLibrary>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64/Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\</IntDir>
+ <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</IgnoreImportLibrary>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">true</IgnoreImportLibrary>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">$(SolutionDir)$(Configuration)64/Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">$(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\</IntDir>
+ <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">true</IgnoreImportLibrary>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">true</IgnoreImportLibrary>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">$(SolutionDir)$(Configuration)64/Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">$(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\</IntDir>
+ <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">true</IgnoreImportLibrary>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Release/import.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>../../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;IMPORT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <FloatingPointModel>Fast</FloatingPointModel>
+ <RuntimeTypeInfo>false</RuntimeTypeInfo>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>import.h</PrecompiledHeaderFile>
+ <AssemblerListingLocation>
+ </AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0809</Culture>
+ <AdditionalIncludeDirectories>../../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalOptions>/ALIGN:4096 /ignore:4108 %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <AdditionalManifestDependencies>type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27X86%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <GenerateMapFile>false</GenerateMapFile>
+ <MapFileName>
+ </MapFileName>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <BaseAddress>0x22000000</BaseAddress>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>.\Release/import.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>../../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;IMPORT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <FloatingPointModel>Fast</FloatingPointModel>
+ <RuntimeTypeInfo>false</RuntimeTypeInfo>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>import.h</PrecompiledHeaderFile>
+ <AssemblerListingLocation>
+ </AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0809</Culture>
+ <AdditionalIncludeDirectories>../../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalOptions>/ALIGN:4096 /ignore:4108 %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <AdditionalManifestDependencies>type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27*%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <GenerateMapFile>false</GenerateMapFile>
+ <MapFileName>
+ </MapFileName>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <BaseAddress>0x22000000</BaseAddress>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Debug/import.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;IMPORT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <FloatingPointModel>Fast</FloatingPointModel>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>import.h</PrecompiledHeaderFile>
+ <AssemblerListingLocation>
+ </AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0809</Culture>
+ <AdditionalIncludeDirectories>../../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <GenerateMapFile>false</GenerateMapFile>
+ <MapFileName>
+ </MapFileName>
+ <BaseAddress>0x22000000</BaseAddress>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>.\Debug/import.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;IMPORT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>import.h</PrecompiledHeaderFile>
+ <AssemblerListingLocation>
+ </AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0809</Culture>
+ <AdditionalIncludeDirectories>../../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <AdditionalManifestDependencies>type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27*%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <GenerateMapFile>false</GenerateMapFile>
+ <MapFileName>
+ </MapFileName>
+ <BaseAddress>0x22000000</BaseAddress>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Debug/import.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;IMPORT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>false</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <FloatingPointModel>Fast</FloatingPointModel>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>import.h</PrecompiledHeaderFile>
+ <AssemblerListingLocation>
+ </AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>../../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <MapFileName>
+ </MapFileName>
+ <BaseAddress>0x22000000</BaseAddress>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ <AdditionalManifestDependencies>type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27X86%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>.\Debug/import.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;IMPORT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>false</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <FloatingPointModel>Precise</FloatingPointModel>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>import.h</PrecompiledHeaderFile>
+ <AssemblerListingLocation>
+ </AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0809</Culture>
+ <AdditionalIncludeDirectories>../../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <AdditionalManifestDependencies>type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27*%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <GenerateMapFile>false</GenerateMapFile>
+ <MapFileName>
+ </MapFileName>
+ <BaseAddress>0x22000000</BaseAddress>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Release/import.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>../../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;IMPORT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <FloatingPointModel>Fast</FloatingPointModel>
+ <RuntimeTypeInfo>false</RuntimeTypeInfo>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>import.h</PrecompiledHeaderFile>
+ <AssemblerListingLocation>
+ </AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>../../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalOptions>/ALIGN:4096 /ignore:4108 %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalManifestDependencies>type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27X86%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <BaseAddress>0x22000000</BaseAddress>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>X64</TargetEnvironment>
+ <TypeLibraryName>.\Release/import.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>../../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;IMPORT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <BufferSecurityCheck>false</BufferSecurityCheck>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <FloatingPointModel>Fast</FloatingPointModel>
+ <RuntimeTypeInfo>false</RuntimeTypeInfo>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>import.h</PrecompiledHeaderFile>
+ <AssemblerListingLocation>
+ </AssemblerListingLocation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0809</Culture>
+ <AdditionalIncludeDirectories>../../../include;../../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Link>
+ <AdditionalOptions>/ALIGN:4096 /ignore:4108 %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalManifestDependencies>type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27*%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <BaseAddress>0x22000000</BaseAddress>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX64</TargetMachine>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="encryption.c" />
+ <ClCompile Include="ICQserver.c" />
+ <ClCompile Include="main.c">
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
+ </ClCompile>
+ <ClCompile Include="mirabilis.c" />
+ <ClCompile Include="miranda.c" />
+ <ClCompile Include="progress.c" />
+ <ClCompile Include="wizard.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="ICQserver.h" />
+ <ClInclude Include="import.h" />
+ <ClInclude Include="mirabilis.h" />
+ <ClInclude Include="mirandadb0700.h" />
+ <ClInclude Include="resource.h" />
+ <ClInclude Include="version.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="docs\import-ICQ_Db_Specs.txt" />
+ <None Include="docs\import-license.txt" />
+ <None Include="docs\import-readme.txt" />
+ <None Include="docs\import-translation.txt" />
+ <None Include="res\import.ico" />
+ <None Include="res\pass.ico" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="resource.rc" />
+ <ResourceCompile Include="Version.rc" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/plugins/Dbx_mmap_SA/Import_SA/import_sa_10.vcxproj.filters b/plugins/Dbx_mmap_SA/Import_SA/import_sa_10.vcxproj.filters
new file mode 100644
index 0000000000..af9d0a9c31
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Import_SA/import_sa_10.vcxproj.filters
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{a952b5a4-0c48-4471-ac27-3fa8f97ba56e}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{1a2203c1-a6f3-40e3-9b09-b2e5ab72dbbc}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{e10cb216-83c1-4eb2-95ec-09f1e42a2c96}</UniqueIdentifier>
+ <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
+ </Filter>
+ <Filter Include="Documentation">
+ <UniqueIdentifier>{8ad8cb39-e207-46f6-8fbf-1f5871148568}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="ICQserver.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="main.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="mirabilis.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="miranda.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="progress.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="wizard.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="encryption.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="ICQserver.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="import.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="mirabilis.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="mirandadb0700.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="resource.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="version.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="docs\import-ICQ_Db_Specs.txt">
+ <Filter>Documentation</Filter>
+ </None>
+ <None Include="docs\import-license.txt">
+ <Filter>Documentation</Filter>
+ </None>
+ <None Include="docs\import-readme.txt">
+ <Filter>Documentation</Filter>
+ </None>
+ <None Include="docs\import-translation.txt">
+ <Filter>Documentation</Filter>
+ </None>
+ <None Include="res\import.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\pass.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="resource.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ <ResourceCompile Include="Version.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/plugins/Dbx_mmap_SA/Import_SA/import_sa_8.vcproj b/plugins/Dbx_mmap_SA/Import_SA/import_sa_8.vcproj
new file mode 100644
index 0000000000..d6662fdd68
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Import_SA/import_sa_8.vcproj
@@ -0,0 +1,552 @@
+<?xml version="1.0" encoding="windows-1251"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="import_sa"
+ ProjectGUID="{9299B507-1AF9-4C93-9560-5F637D1E0C9E}"
+ RootNamespace="import_sa"
+ SccProjectName=""
+ SccLocalPath=""
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/import.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ InlineFunctionExpansion="2"
+ FavorSizeOrSpeed="2"
+ OmitFramePointers="true"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;IMPORT_EXPORTS"
+ StringPooling="true"
+ ExceptionHandling="0"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="import.h"
+ AssemblerListingLocation=""
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ AdditionalOptions="/ALIGN:4096 /ignore:4108"
+ AdditionalDependencies="comctl32.lib"
+ SuppressStartupBanner="true"
+ AdditionalManifestDependencies="type=&apos;Win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; processorArchitecture=&apos;X86&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos;"
+ GenerateDebugInformation="true"
+ GenerateMapFile="false"
+ MapFileName=""
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="1"
+ BaseAddress="0x22000000"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/import.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;IMPORT_EXPORTS"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="import.h"
+ AssemblerListingLocation=""
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="comctl32.lib"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ GenerateMapFile="false"
+ MapFileName=""
+ BaseAddress="0x22000000"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug Unicode|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/import.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;IMPORT_EXPORTS"
+ StringPooling="false"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ EnableFunctionLevelLinking="true"
+ FloatingPointModel="0"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="import.h"
+ AssemblerListingLocation=""
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="comctl32.lib"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ GenerateMapFile="false"
+ MapFileName=""
+ BaseAddress="0x22000000"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release Unicode|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/import.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ InlineFunctionExpansion="1"
+ FavorSizeOrSpeed="2"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;IMPORT_EXPORTS"
+ StringPooling="true"
+ ExceptionHandling="0"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="import.h"
+ AssemblerListingLocation=""
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ AdditionalOptions="/ALIGN:4096 /ignore:4108"
+ AdditionalDependencies="comctl32.lib"
+ SuppressStartupBanner="true"
+ AdditionalManifestDependencies="type=&apos;Win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; processorArchitecture=&apos;X86&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos;"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ GenerateMapFile="false"
+ MapFileName=""
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="1"
+ BaseAddress="0x22000000"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="encryption.c"
+ >
+ </File>
+ <File
+ RelativePath="ICQserver.c"
+ >
+ </File>
+ <File
+ RelativePath="main.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="mirabilis.c"
+ >
+ </File>
+ <File
+ RelativePath="miranda.c"
+ >
+ </File>
+ <File
+ RelativePath="progress.c"
+ >
+ </File>
+ <File
+ RelativePath="wizard.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath="ICQserver.h"
+ >
+ </File>
+ <File
+ RelativePath="import.h"
+ >
+ </File>
+ <File
+ RelativePath="mirabilis.h"
+ >
+ </File>
+ <File
+ RelativePath="mirandadb0700.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ <File
+ RelativePath="import.ico"
+ >
+ </File>
+ <File
+ RelativePath="resource.rc"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Documentation"
+ >
+ <File
+ RelativePath="docs\import-ICQ_Db_Specs.txt"
+ >
+ </File>
+ <File
+ RelativePath="docs\import-license.txt"
+ >
+ </File>
+ <File
+ RelativePath="docs\import-readme.txt"
+ >
+ </File>
+ <File
+ RelativePath="docs\import-translation.txt"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/plugins/Dbx_mmap_SA/Import_SA/import_sa_9.vcproj b/plugins/Dbx_mmap_SA/Import_SA/import_sa_9.vcproj
new file mode 100644
index 0000000000..6ebaec1644
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Import_SA/import_sa_9.vcproj
@@ -0,0 +1,998 @@
+<?xml version="1.0" encoding="windows-1251"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="import_sa"
+ ProjectGUID="{9299B507-1AF9-4C93-9560-5F637D1E0C9E}"
+ RootNamespace="import_sa"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/import.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ InlineFunctionExpansion="1"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="2"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;IMPORT_EXPORTS"
+ StringPooling="true"
+ ExceptionHandling="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ FloatingPointModel="2"
+ RuntimeTypeInfo="false"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="import.h"
+ AssemblerListingLocation=""
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ AdditionalOptions="/ALIGN:4096 /ignore:4108"
+ AdditionalDependencies="comctl32.lib"
+ SuppressStartupBanner="true"
+ AdditionalManifestDependencies="type=&apos;Win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; processorArchitecture=&apos;X86&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos;"
+ GenerateDebugInformation="true"
+ GenerateMapFile="false"
+ MapFileName=""
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="1"
+ BaseAddress="0x22000000"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)64/Plugins"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)64/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="3"
+ TypeLibraryName=".\Release/import.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ InlineFunctionExpansion="1"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="2"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;IMPORT_EXPORTS"
+ StringPooling="true"
+ ExceptionHandling="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ FloatingPointModel="2"
+ RuntimeTypeInfo="false"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="import.h"
+ AssemblerListingLocation=""
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ AdditionalOptions="/ALIGN:4096 /ignore:4108"
+ AdditionalDependencies="comctl32.lib"
+ SuppressStartupBanner="true"
+ AdditionalManifestDependencies="type=&apos;Win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; processorArchitecture=&apos;*&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos;"
+ GenerateDebugInformation="true"
+ GenerateMapFile="false"
+ MapFileName=""
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="1"
+ BaseAddress="0x22000000"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/import.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;IMPORT_EXPORTS"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ EnableFunctionLevelLinking="true"
+ FloatingPointModel="2"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="import.h"
+ AssemblerListingLocation=""
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ AdditionalDependencies="comctl32.lib"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ GenerateMapFile="false"
+ MapFileName=""
+ BaseAddress="0x22000000"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)64/Plugins"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)64/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="3"
+ TypeLibraryName=".\Debug/import.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;IMPORT_EXPORTS"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="import.h"
+ AssemblerListingLocation=""
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ AdditionalDependencies="comctl32.lib"
+ SuppressStartupBanner="true"
+ AdditionalManifestDependencies="type=&apos;Win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; processorArchitecture=&apos;*&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos;"
+ GenerateDebugInformation="true"
+ GenerateMapFile="false"
+ MapFileName=""
+ BaseAddress="0x22000000"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug Unicode|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/import.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;IMPORT_EXPORTS"
+ StringPooling="false"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ EnableFunctionLevelLinking="true"
+ FloatingPointModel="2"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="import.h"
+ AssemblerListingLocation=""
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ AdditionalDependencies="comctl32.lib"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ GenerateMapFile="false"
+ MapFileName=""
+ BaseAddress="0x22000000"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug Unicode|x64"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)64/Plugins"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)64/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="3"
+ TypeLibraryName=".\Debug/import.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;IMPORT_EXPORTS"
+ StringPooling="false"
+ ExceptionHandling="0"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ EnableFunctionLevelLinking="true"
+ FloatingPointModel="0"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="import.h"
+ AssemblerListingLocation=""
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ AdditionalDependencies="comctl32.lib"
+ SuppressStartupBanner="true"
+ AdditionalManifestDependencies="type=&apos;Win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; processorArchitecture=&apos;*&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos;"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ GenerateMapFile="false"
+ MapFileName=""
+ BaseAddress="0x22000000"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release Unicode|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/import.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ InlineFunctionExpansion="1"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="2"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;IMPORT_EXPORTS"
+ StringPooling="true"
+ ExceptionHandling="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ FloatingPointModel="2"
+ RuntimeTypeInfo="false"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="import.h"
+ AssemblerListingLocation=""
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ AdditionalOptions="/ALIGN:4096 /ignore:4108"
+ AdditionalDependencies="comctl32.lib"
+ AdditionalManifestDependencies="type=&apos;Win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; processorArchitecture=&apos;X86&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos;"
+ GenerateDebugInformation="true"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="1"
+ BaseAddress="0x22000000"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release Unicode|x64"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)64/Plugins"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)64/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="3"
+ TypeLibraryName=".\Release/import.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ InlineFunctionExpansion="1"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="2"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../include;../../ExternalAPI"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;IMPORT_EXPORTS"
+ StringPooling="true"
+ ExceptionHandling="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="false"
+ EnableFunctionLevelLinking="true"
+ FloatingPointModel="2"
+ RuntimeTypeInfo="false"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="import.h"
+ AssemblerListingLocation=""
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ AdditionalOptions="/ALIGN:4096 /ignore:4108"
+ AdditionalDependencies="comctl32.lib"
+ AdditionalManifestDependencies="type=&apos;Win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; processorArchitecture=&apos;*&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos;"
+ GenerateDebugInformation="true"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="1"
+ BaseAddress="0x22000000"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="encryption.c"
+ >
+ </File>
+ <File
+ RelativePath="ICQserver.c"
+ >
+ </File>
+ <File
+ RelativePath="main.c"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="mirabilis.c"
+ >
+ </File>
+ <File
+ RelativePath="miranda.c"
+ >
+ </File>
+ <File
+ RelativePath="progress.c"
+ >
+ </File>
+ <File
+ RelativePath="wizard.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath="ICQserver.h"
+ >
+ </File>
+ <File
+ RelativePath="import.h"
+ >
+ </File>
+ <File
+ RelativePath="mirabilis.h"
+ >
+ </File>
+ <File
+ RelativePath="mirandadb0700.h"
+ >
+ </File>
+ <File
+ RelativePath=".\resource.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ <File
+ RelativePath="import.ico"
+ >
+ </File>
+ <File
+ RelativePath="resource.rc"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Documentation"
+ >
+ <File
+ RelativePath="docs\import-ICQ_Db_Specs.txt"
+ >
+ </File>
+ <File
+ RelativePath="docs\import-license.txt"
+ >
+ </File>
+ <File
+ RelativePath="docs\import-readme.txt"
+ >
+ </File>
+ <File
+ RelativePath="docs\import-translation.txt"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/plugins/Dbx_mmap_SA/Import_SA/main.c b/plugins/Dbx_mmap_SA/Import_SA/main.c
new file mode 100644
index 0000000000..8a5b2a39f8
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Import_SA/main.c
@@ -0,0 +1,553 @@
+/*
+
+Import plugin for Miranda IM
+
+Copyright (C) 2001-2005 Martin Öberg, Richard Hughes, Roland Rabien & Tristan Van de Vreede
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+#include "import.h"
+#include "version.h"
+
+void FreeVariant( DBVARIANT* dbv );
+void WriteVariant( HANDLE hContact, const char* module, const char* var, DBVARIANT* dbv );
+
+BOOL IsDuplicateEvent(HANDLE hContact, DBEVENTINFO dbei);
+
+
+int nImportOption;
+int nCustomOptions;
+int hLangpack;
+
+int cICQAccounts = 0;
+char ** szICQModuleName = NULL;
+TCHAR ** tszICQAccountName = NULL;
+int iICQAccount = 0;
+
+static HANDLE hHookModulesLoaded = NULL;
+static HANDLE hHookOnExit = NULL;
+static HANDLE hImportService = NULL;
+
+INT_PTR CALLBACK WizardDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam);
+
+HINSTANCE hInst;
+PLUGINLINK *pluginLink;
+static HWND hwndWizard = NULL;
+
+PLUGININFOEX pluginInfo = {
+ sizeof(PLUGININFOEX),
+ __PLUGIN_NAME,
+ __VERSION_DWORD,
+ __DESCRIPTION,
+ __AUTHOR,
+ __AUTHOREMAIL,
+ __COPYRIGHT,
+ __AUTHORWEB,
+ UNICODE_AWARE,
+ 0, //{2D77A746-00A6-4343-BFC5-F808CDD772EA}
+ {0x2d77a746, 0xa6, 0x4343, { 0xbf, 0xc5, 0xf8, 0x8, 0xcd, 0xd7, 0x72, 0xea }}
+};
+
+BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
+{
+ hInst = hinstDLL;
+ return TRUE;
+}
+
+static INT_PTR ImportCommand(WPARAM wParam,LPARAM lParam)
+{
+ if (IsWindow(hwndWizard)) {
+ SetForegroundWindow(hwndWizard);
+ SetFocus(hwndWizard);
+ }
+ else hwndWizard = CreateDialog(hInst, MAKEINTRESOURCE(IDD_WIZARD), NULL, WizardDlgProc);
+
+ return 0;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// MirandaPluginInfoEx - returns an information about a plugin
+
+__declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
+{
+ if (mirandaVersion < PLUGIN_MAKE_VERSION(0, 8, 0, 0))
+ return NULL;
+
+ return &pluginInfo;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// MirandaPluginInterfaces - returns the protocol interface to the core
+
+static const MUUID interfaces[] = {MIID_IMPORT, MIID_LAST};
+
+__declspec(dllexport) const MUUID* MirandaPluginInterfaces(void)
+{
+ return interfaces;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// Performs a primary set of actions upon plugin loading
+
+static int ModulesLoaded(WPARAM wParam, LPARAM lParam)
+{
+ int nProtocols = 0;
+ int n;
+ PROTOCOLDESCRIPTOR **ppProtos = NULL;
+
+ if (DBGetContactSettingByte(NULL, IMPORT_MODULE, IMP_KEY_FR, 1))
+ return 0;
+
+ // Only autorun import wizard if at least one protocol is installed
+ CallService(MS_PROTO_ENUMPROTOCOLS, (WPARAM)&nProtocols, (LPARAM)&ppProtos);
+ for (n=0; n < nProtocols; n++) {
+ if (ppProtos[n]->type == PROTOTYPE_PROTOCOL) {
+ CallService(IMPORT_SERVICE, 0, 0);
+ DBWriteContactSettingByte(NULL, IMPORT_MODULE, IMP_KEY_FR, 1);
+ break;
+ } }
+ return 0;
+}
+
+static int OnExit(WPARAM wParam, LPARAM lParam)
+{
+ if ( hwndWizard )
+ SendMessage(hwndWizard, WM_CLOSE, 0, 0);
+ return 0;
+}
+
+int __declspec(dllexport) Load(PLUGINLINK *link)
+{
+ pluginLink = link;
+ mir_getMMI( &mmi );
+ mir_getUTFI( &utfi );
+ mir_getLP( &pluginInfo );
+
+ hImportService = CreateServiceFunction(IMPORT_SERVICE, ImportCommand);
+ {
+ CLISTMENUITEM mi;
+ ZeroMemory(&mi, sizeof(mi));
+ mi.cbSize = sizeof(mi);
+ mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_IMPORT));
+ mi.pszName = LPGEN("&Import...");
+ mi.position = 500050000;
+ mi.pszService = IMPORT_SERVICE;
+ CallService(MS_CLIST_ADDMAINMENUITEM, 0, (LPARAM)&mi);
+ }
+ hHookModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
+ hHookOnExit = HookEvent(ME_SYSTEM_OKTOEXIT, OnExit);
+ {
+ INITCOMMONCONTROLSEX icex;
+ icex.dwSize = sizeof(icex);
+ icex.dwICC = ICC_DATE_CLASSES;
+ InitCommonControlsEx(&icex);
+ }
+
+ return 0;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// Unload a plugin
+
+int __declspec(dllexport) Unload(void)
+{
+ if (hHookModulesLoaded)
+ UnhookEvent(hHookModulesLoaded);
+ if (hHookOnExit)
+ UnhookEvent(hHookOnExit);
+ if (hImportService)
+ DestroyServiceFunction(hImportService);
+
+ return 0;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
+BOOL IsProtocolLoaded(char* pszProtocolName)
+{
+ return CallService(MS_PROTO_ISPROTOCOLLOADED, 0, (LPARAM)pszProtocolName) ? TRUE : FALSE;
+}
+
+BOOL EnumICQAccounts()
+{
+ int count, i = 0;
+ PROTOACCOUNT ** accs;
+
+ while (cICQAccounts)
+ {
+ cICQAccounts--;
+ free(szICQModuleName[cICQAccounts]);
+ free(tszICQAccountName[cICQAccounts]);
+ }
+
+ ProtoEnumAccounts(&count, &accs);
+ szICQModuleName = (char**)realloc(szICQModuleName, count * sizeof(char**));
+ tszICQAccountName = (TCHAR**)realloc(tszICQAccountName, count * sizeof(TCHAR**));
+ while (i < count)
+ {
+ if ((0 == strcmp(ICQOSCPROTONAME, accs[i]->szProtoName)) && accs[i]->bIsEnabled)
+ {
+ szICQModuleName[cICQAccounts] = strdup(accs[i]->szModuleName);
+ tszICQAccountName[cICQAccounts] = _tcsdup(accs[i]->tszAccountName);
+ cICQAccounts++;
+ }
+ i++;
+ }
+ return cICQAccounts != 0;
+}
+
+void FreeICQAccountsList()
+{
+ while (cICQAccounts)
+ {
+ cICQAccounts--;
+ free(szICQModuleName[cICQAccounts]);
+ free(tszICQAccountName[cICQAccounts]);
+ }
+
+ if (szICQModuleName)
+ free(szICQModuleName);
+ if (tszICQAccountName)
+ free(tszICQAccountName);
+
+ szICQModuleName = NULL;
+ tszICQAccountName = NULL;
+}
+
+HANDLE HContactFromNumericID(char* pszProtoName, char* pszSetting, DWORD dwID)
+{
+ char* szProto;
+ HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ while (hContact != NULL)
+ {
+ if (DBGetContactSettingDword(hContact, pszProtoName, pszSetting, 0) == dwID)
+ {
+ szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ if (szProto != NULL && !strcmp(szProto, pszProtoName))
+ return hContact;
+ }
+ hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0);
+ }
+ return INVALID_HANDLE_VALUE;
+}
+
+HANDLE HContactFromID(char* pszProtoName, char* pszSetting, char* pszID)
+{
+ DBVARIANT dbv;
+ HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ while (hContact != NULL) {
+ char* szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
+ if ( !lstrcmpA(szProto, pszProtoName)) {
+ if (DBGetContactSettingString(hContact, pszProtoName, pszSetting, &dbv) == 0) {
+ if (strcmp(pszID, dbv.pszVal) == 0) {
+ DBFreeVariant(&dbv);
+ return hContact;
+ }
+ DBFreeVariant(&dbv);
+ }
+ }
+
+ hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0);
+ }
+ return INVALID_HANDLE_VALUE;
+}
+
+HANDLE HistoryImportFindContact(HWND hdlgProgress, char* szModuleName, DWORD uin, int addUnknown)
+{
+ HANDLE hContact = HContactFromNumericID(szModuleName, "UIN", uin);
+ if (hContact == NULL) {
+ AddMessage( LPGEN("Ignored event from/to self"));
+ return INVALID_HANDLE_VALUE;
+ }
+
+ if (hContact != INVALID_HANDLE_VALUE)
+ return hContact;
+
+ if (!addUnknown)
+ return INVALID_HANDLE_VALUE;
+
+ hContact = (HANDLE)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)szModuleName);
+ DBWriteContactSettingDword(hContact, szModuleName, "UIN", uin);
+ AddMessage( LPGEN("Added contact %u (found in history)"), uin );
+ return hContact;
+}
+
+HANDLE AddContact(HWND hdlgProgress, char* pszProtoName, char* pszUniqueSetting,
+ DBVARIANT* id, DBVARIANT* nick, DBVARIANT* group)
+{
+ HANDLE hContact;
+ char szid[ 40 ];
+ char* pszUserID = ( id->type == DBVT_DWORD ) ? _ltoa( id->dVal, szid, 10 ) : id->pszVal;
+
+ hContact = (HANDLE)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ if ( CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)pszProtoName) != 0) {
+ CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
+ AddMessage( LPGEN("Failed to add %s contact %s"), pszProtoName, pszUserID );
+ FreeVariant( id );
+ FreeVariant( nick );
+ FreeVariant( group );
+ return INVALID_HANDLE_VALUE;
+ }
+
+ WriteVariant( hContact, pszProtoName, pszUniqueSetting, id );
+
+ if ( group->type )
+ CreateGroup( group->type, group->pszVal, hContact );
+
+ if ( nick->type && nick->pszVal[0] ) {
+ WriteVariant( hContact, "CList", "MyHandle", nick );
+ if (nick->type == DBVT_UTF8) {
+ char *tmp = mir_utf8decodeA(nick->pszVal);
+ AddMessage( LPGEN("Added %s contact %s, '%s'"), pszProtoName, pszUserID, tmp );
+ mir_free(tmp);
+ }
+ else AddMessage( LPGEN("Added %s contact %s, '%s'"), pszProtoName, pszUserID, nick->pszVal );
+ }
+ else AddMessage( LPGEN("Added %s contact %s"), pszProtoName, pszUserID );
+
+ FreeVariant( id );
+ FreeVariant( nick );
+ FreeVariant( group );
+ return hContact;
+}
+
+// ------------------------------------------------
+// Creates a group with a specified name in the
+// Miranda contact list.
+// If contact is specified adds it to group
+// ------------------------------------------------
+// Returns 1 if successful and 0 when it fails.
+int CreateGroup(BYTE type, const char* name, HANDLE hContact)
+{
+ int groupId;
+ TCHAR *tmp, *tszGrpName;
+ char groupIdStr[11];
+ size_t cbName;
+
+ if (type == DBVT_UTF8)
+ tmp = mir_utf8decodeT( name );
+ else if (type == DBVT_WCHAR)
+ tmp = mir_u2t(( wchar_t* )name );
+ else
+ tmp = mir_a2t( name );
+
+ if ( tmp == NULL )
+ return 0;
+
+ cbName = _tcslen(tmp);
+ tszGrpName = _alloca(( cbName+2 )*sizeof( TCHAR ));
+ tszGrpName[0] = 1 | GROUPF_EXPANDED;
+ _tcscpy( tszGrpName+1, tmp );
+ mir_free( tmp );
+
+ // Check for duplicate & find unused id
+ for (groupId = 0; ; groupId++) {
+ DBVARIANT dbv;
+ itoa(groupId, groupIdStr,10);
+ if (DBGetContactSettingTString(NULL, "CListGroups", groupIdStr, &dbv))
+ break;
+
+ if ( !lstrcmp(dbv.ptszVal + 1, tszGrpName + 1 )) {
+ if (hContact)
+ DBWriteContactSettingTString( hContact, "CList", "Group", tszGrpName+1 );
+ else {
+ char *str = mir_t2a(tszGrpName + 1);
+ AddMessage( LPGEN("Skipping duplicate group %s."), str);
+ mir_free(str);
+ }
+
+ DBFreeVariant(&dbv);
+ return 0;
+ }
+
+ DBFreeVariant(&dbv);
+ }
+
+ DBWriteContactSettingTString( NULL, "CListGroups", groupIdStr, tszGrpName );
+
+ if (hContact)
+ DBWriteContactSettingTString( hContact, "CList", "Group", tszGrpName+1 );
+
+ return 1;
+}
+
+// Returns TRUE if the event already exist in the database
+BOOL IsDuplicateEvent(HANDLE hContact, DBEVENTINFO dbei)
+{
+ static DWORD dwPreviousTimeStamp = -1;
+ static HANDLE hPreviousContact = INVALID_HANDLE_VALUE;
+ static HANDLE hPreviousDbEvent = NULL;
+
+ HANDLE hExistingDbEvent;
+ DWORD dwEventTimeStamp;
+ DBEVENTINFO dbeiExisting;
+
+ // get last event
+ if (!(hExistingDbEvent = (HANDLE)CallService(MS_DB_EVENT_FINDLAST, (WPARAM)hContact, 0)))
+ return FALSE;
+
+ ZeroMemory(&dbeiExisting, sizeof(dbeiExisting));
+ dbeiExisting.cbSize = sizeof(dbeiExisting);
+ CallService(MS_DB_EVENT_GET, (WPARAM)hExistingDbEvent, (LPARAM)&dbeiExisting);
+ dwEventTimeStamp = dbeiExisting.timestamp;
+
+ // compare with last timestamp
+ if (dbei.timestamp > dwEventTimeStamp)
+ {
+ // remember event
+ hPreviousDbEvent = hExistingDbEvent;
+ dwPreviousTimeStamp = dwEventTimeStamp;
+ return FALSE;
+ }
+
+ if (hContact != hPreviousContact)
+ {
+ hPreviousContact = hContact;
+ // remember event
+ hPreviousDbEvent = hExistingDbEvent;
+ dwPreviousTimeStamp = dwEventTimeStamp;
+
+ // get first event
+ if (!(hExistingDbEvent = (HANDLE)CallService(MS_DB_EVENT_FINDFIRST, (WPARAM)hContact, 0)))
+ return FALSE;
+
+ ZeroMemory(&dbeiExisting, sizeof(dbeiExisting));
+ dbeiExisting.cbSize = sizeof(dbeiExisting);
+ CallService(MS_DB_EVENT_GET, (WPARAM)hExistingDbEvent, (LPARAM)&dbeiExisting);
+ dwEventTimeStamp = dbeiExisting.timestamp;
+
+ // compare with first timestamp
+ if (dbei.timestamp <= dwEventTimeStamp)
+ {
+ // remember event
+ dwPreviousTimeStamp = dwEventTimeStamp;
+ hPreviousDbEvent = hExistingDbEvent;
+
+ if ( dbei.timestamp != dwEventTimeStamp )
+ return FALSE;
+ }
+
+ }
+ // check for equal timestamps
+ if (dbei.timestamp == dwPreviousTimeStamp)
+ {
+ ZeroMemory(&dbeiExisting, sizeof(dbeiExisting));
+ dbeiExisting.cbSize = sizeof(dbeiExisting);
+ CallService(MS_DB_EVENT_GET, (WPARAM)hPreviousDbEvent, (LPARAM)&dbeiExisting);
+
+ if ((dbei.timestamp == dbeiExisting.timestamp) &&
+ (dbei.eventType == dbeiExisting.eventType) &&
+ (dbei.cbBlob == dbeiExisting.cbBlob) &&
+ ((dbei.flags&DBEF_SENT) == (dbeiExisting.flags&DBEF_SENT)))
+ return TRUE;
+
+ // find event with another timestamp
+ hExistingDbEvent = (HANDLE)CallService(MS_DB_EVENT_FINDNEXT, (WPARAM)hPreviousDbEvent, 0);
+ while (hExistingDbEvent != NULL)
+ {
+ ZeroMemory(&dbeiExisting, sizeof(dbeiExisting));
+ dbeiExisting.cbSize = sizeof(dbeiExisting);
+ CallService(MS_DB_EVENT_GET, (WPARAM)hExistingDbEvent, (LPARAM)&dbeiExisting);
+
+ if (dbeiExisting.timestamp != dwPreviousTimeStamp)
+ {
+ // use found event
+ hPreviousDbEvent = hExistingDbEvent;
+ dwPreviousTimeStamp = dbeiExisting.timestamp;
+ break;
+ }
+
+ hPreviousDbEvent = hExistingDbEvent;
+ hExistingDbEvent = (HANDLE)CallService(MS_DB_EVENT_FINDNEXT, (WPARAM)hExistingDbEvent, 0);
+ }
+ }
+
+ hExistingDbEvent = hPreviousDbEvent;
+
+ if (dbei.timestamp <= dwPreviousTimeStamp)
+ {
+ // look back
+ while (hExistingDbEvent != NULL)
+ {
+ ZeroMemory(&dbeiExisting, sizeof(dbeiExisting));
+ dbeiExisting.cbSize = sizeof(dbeiExisting);
+ CallService(MS_DB_EVENT_GET, (WPARAM)hExistingDbEvent, (LPARAM)&dbeiExisting);
+
+ if (dbei.timestamp > dbeiExisting.timestamp)
+ {
+ // remember event
+ hPreviousDbEvent = hExistingDbEvent;
+ dwPreviousTimeStamp = dbeiExisting.timestamp;
+ return FALSE;
+ }
+
+ // Compare event with import candidate
+ if ((dbei.timestamp == dbeiExisting.timestamp) &&
+ (dbei.eventType == dbeiExisting.eventType) &&
+ (dbei.cbBlob == dbeiExisting.cbBlob) &&
+ ((dbei.flags&DBEF_SENT) == (dbeiExisting.flags&DBEF_SENT)))
+ {
+ // remember event
+ hPreviousDbEvent = hExistingDbEvent;
+ dwPreviousTimeStamp = dbeiExisting.timestamp;
+ return TRUE;
+ }
+
+ // Get previous event in chain
+ hExistingDbEvent = (HANDLE)CallService(MS_DB_EVENT_FINDPREV, (WPARAM)hExistingDbEvent, 0);
+ }
+
+ }
+ else
+ {
+ // look forward
+ while (hExistingDbEvent != NULL)
+ {
+ ZeroMemory(&dbeiExisting, sizeof(dbeiExisting));
+ dbeiExisting.cbSize = sizeof(dbeiExisting);
+ CallService(MS_DB_EVENT_GET, (WPARAM)hExistingDbEvent, (LPARAM)&dbeiExisting);
+
+ if (dbei.timestamp < dbeiExisting.timestamp)
+ {
+ // remember event
+ hPreviousDbEvent = hExistingDbEvent;
+ dwPreviousTimeStamp = dbeiExisting.timestamp;
+ return FALSE;
+ }
+
+ // Compare event with import candidate
+ if ((dbei.timestamp == dbeiExisting.timestamp) &&
+ (dbei.eventType == dbeiExisting.eventType) &&
+ (dbei.cbBlob == dbeiExisting.cbBlob) &&
+ ((dbei.flags&DBEF_SENT) == (dbeiExisting.flags&DBEF_SENT)))
+ {
+ // remember event
+ hPreviousDbEvent = hExistingDbEvent;
+ dwPreviousTimeStamp = dbeiExisting.timestamp;
+ return TRUE;
+ }
+
+ // Get next event in chain
+ hExistingDbEvent = (HANDLE)CallService(MS_DB_EVENT_FINDNEXT, (WPARAM)hExistingDbEvent, 0);
+ }
+
+ }
+ // reset last event
+ hPreviousContact = INVALID_HANDLE_VALUE;
+ return FALSE;
+}
diff --git a/plugins/Dbx_mmap_SA/Import_SA/mirabilis.c b/plugins/Dbx_mmap_SA/Import_SA/mirabilis.c
new file mode 100644
index 0000000000..6d99757d4d
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Import_SA/mirabilis.c
@@ -0,0 +1,1492 @@
+/*
+
+Import plugin for Miranda IM
+
+Copyright (C) 2001-2005 Martin Öberg, Richard Hughes, Roland Rabien & Tristan Van de Vreede
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+// ==============
+// == INCLUDES ==
+// ==============
+
+#include "import.h"
+#include "mirabilis.h"
+
+BOOL IsDuplicateEvent(HANDLE hContact, DBEVENTINFO dbei);
+BOOL IsProtocolLoaded(char* pszProtocolName);
+HANDLE HContactFromNumericID(char* pszProtoName, char* pszSetting, DWORD dwID);
+HANDLE AddContact(HWND hdlgProgress, char* pszProtoName, char* pszUniqueSetting, DBVARIANT* id, DBVARIANT* nick, DBVARIANT* group);
+
+// ====================
+// ====================
+// == IMPLEMENTATION ==
+// ====================
+// ====================
+
+static void SearchForDatabases(HWND hdlg, const TCHAR *dbPath, const TCHAR *type)
+{
+ HANDLE hFind;
+ WIN32_FIND_DATA fd;
+ TCHAR szSearchPath[MAX_PATH];
+ TCHAR szRootName[MAX_PATH],*str2;
+
+ int i;
+
+ wsprintf(szSearchPath, _T("%s\\*.idx"), dbPath);
+ hFind=FindFirstFile(szSearchPath,&fd);
+ if(hFind!=INVALID_HANDLE_VALUE) {
+ do {
+ lstrcpy(szRootName,fd.cFileName);
+ str2=_tcsrchr(szRootName,'.');
+ if(str2!=NULL) *str2=0;
+ if(lstrlen(szRootName)>3 && !lstrcmpi(szRootName+lstrlen(szRootName)-3,_T("tmp")))
+ continue;
+ lstrcat(szRootName,type);
+ i=SendDlgItemMessage(hdlg,IDC_LIST,LB_ADDSTRING,0,(LPARAM)szRootName);
+ str2 = (TCHAR*)mir_alloc((lstrlen(dbPath) + 2+lstrlen(fd.cFileName))*sizeof(TCHAR));
+ wsprintf(str2, _T("%s\\%s"), dbPath, fd.cFileName);
+ SendDlgItemMessage(hdlg,IDC_LIST,LB_SETITEMDATA,i,(LPARAM)str2);
+ }
+ while( FindNextFile( hFind, &fd ));
+
+ FindClose(hFind);
+ }
+}
+
+INT_PTR CALLBACK MirabilisPageProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam)
+{
+ switch(message) {
+ case WM_INITDIALOG:
+ {
+ HKEY hKey;
+ LONG lResult;
+ int i;
+ TranslateDialogDefault(hdlg);
+ if (ERROR_SUCCESS != (lResult = RegOpenKeyEx(HKEY_CURRENT_USER, _T("Software\\Mirabilis\\ICQ\\DefaultPrefs"), 0, KEY_QUERY_VALUE, &hKey)))
+ lResult = RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("Software\\Mirabilis\\ICQ\\DefaultPrefs"), 0, KEY_QUERY_VALUE, &hKey);
+
+ if (lResult == ERROR_SUCCESS) {
+ TCHAR dbPath[MAX_PATH];
+ DWORD cch;
+ cch=sizeof(dbPath);
+ if(ERROR_SUCCESS==RegQueryValueEx(hKey,_T("New Database"),NULL,NULL,(LPBYTE)dbPath,&cch))
+ SearchForDatabases(hdlg,dbPath,_T(" (99a)"));
+ cch=sizeof(dbPath);
+ if(ERROR_SUCCESS==RegQueryValueEx(hKey,_T("99b Database"),NULL,NULL,(LPBYTE)dbPath,&cch))
+ SearchForDatabases(hdlg,dbPath,_T(" (99b)"));
+ cch=sizeof(dbPath);
+ if(ERROR_SUCCESS==RegQueryValueEx(hKey,_T("2000a Database"),NULL,NULL,(LPBYTE)dbPath,&cch))
+ SearchForDatabases(hdlg,dbPath,_T(" (2000a)"));
+ cch=sizeof(dbPath);
+ if(ERROR_SUCCESS==RegQueryValueEx(hKey,_T("2000b Database"),NULL,NULL,(LPBYTE)dbPath,&cch))
+ SearchForDatabases(hdlg,dbPath,_T(" (2000b)"));
+ cch=sizeof(dbPath);
+ if(ERROR_SUCCESS==RegQueryValueEx(hKey,_T("2001a Database"),NULL,NULL,(LPBYTE)dbPath,&cch))
+ SearchForDatabases(hdlg,dbPath,_T(" (2001a)"));
+ cch=sizeof(dbPath);
+ if(ERROR_SUCCESS==RegQueryValueEx(hKey,_T("2001b Database"),NULL,NULL,(LPBYTE)dbPath,&cch))
+ SearchForDatabases(hdlg,dbPath,_T(" (2001b)"));
+ cch=sizeof(dbPath);
+ if(ERROR_SUCCESS==RegQueryValueEx(hKey,_T("2002a Database"),NULL,NULL,(LPBYTE)dbPath,&cch))
+ SearchForDatabases(hdlg,dbPath,_T(" (2002a)"));
+ cch=sizeof(dbPath);
+ if(ERROR_SUCCESS==RegQueryValueEx(hKey,_T("2003a Database"),NULL,NULL,(LPBYTE)dbPath,&cch))
+ SearchForDatabases(hdlg,dbPath,_T(" (2003a)"));
+ }
+
+ for (i = 0; i < cICQAccounts; i++)
+ {
+ SendDlgItemMessage(hdlg, IDC_MIRABILISACCOUNT, CB_ADDSTRING, 0, (LPARAM)tszICQAccountName[i]);
+ }
+ SendDlgItemMessage(hdlg, IDC_MIRABILISACCOUNT, CB_SETCURSEL, 0, 0);
+
+ SetTimer(hdlg,1,2000,NULL);
+ SendMessage(hdlg,WM_TIMER,0,0);
+ return TRUE;
+ }
+ case WM_TIMER:
+ { HANDLE hMirabilisMutex;
+ hMirabilisMutex=OpenMutexA(MUTEX_ALL_ACCESS,FALSE,"Mirabilis ICQ Mutex");
+ if(hMirabilisMutex!=NULL) {
+ CloseHandle(hMirabilisMutex);
+ ShowWindow(GetDlgItem(hdlg,IDC_MIRABILISRUNNING),SW_SHOW);
+ }
+ else ShowWindow(GetDlgItem(hdlg,IDC_MIRABILISRUNNING),SW_HIDE);
+ }
+ break;
+ case WM_COMMAND:
+ switch(LOWORD(wParam)) {
+ case IDC_BACK:
+ PostMessage(GetParent(hdlg),WIZM_GOTOPAGE,IDD_IMPORTTYPE,(LPARAM)ImportTypePageProc);
+ break;
+ case IDOK:
+ { TCHAR filename[MAX_PATH];
+ GetDlgItemText(hdlg,IDC_FILENAME,filename,SIZEOF(filename));
+ if(_taccess(filename,4)) {
+ MessageBox(hdlg,TranslateT("The given file does not exist. Please check that you have entered the name correctly."),TranslateT("Mirabilis Import"),MB_OK);
+ break;
+ }
+ lstrcpy(importFile,filename);
+ iICQAccount = SendDlgItemMessage(hdlg, IDC_MIRABILISACCOUNT, CB_GETCURSEL, 0, 0);
+ PostMessage(GetParent(hdlg),WIZM_GOTOPAGE,IDD_OPTIONS,(LPARAM)MirabilisOptionsPageProc);
+ break;
+ }
+ case IDCANCEL:
+ PostMessage(GetParent(hdlg),WM_CLOSE,0,0);
+ break;
+ case IDC_LIST:
+ if(HIWORD(wParam)==LBN_SELCHANGE) {
+ int sel=SendDlgItemMessage(hdlg,IDC_LIST,LB_GETCURSEL,0,0);
+ if(sel==LB_ERR) break;
+ SetDlgItemText(hdlg,IDC_FILENAME,(TCHAR*)SendDlgItemMessage(hdlg,IDC_LIST,LB_GETITEMDATA,sel,0));
+ }
+ break;
+ case IDC_OTHER:
+ { OPENFILENAME ofn;
+ TCHAR str[MAX_PATH], text[256];
+ int index;
+
+ // TranslateTS doesnt translate \0 separated strings
+ index = mir_sntprintf(text, 64, _T("%s (*.idx)"), TranslateT("Mirabilis ICQ database indexes")) + 1;
+ _tcscpy(text + index, _T("*.idx")); index += 6;
+ index += mir_sntprintf(text + index, 64, _T("%s (*.*)"), TranslateT("All Files")) + 1;
+ _tcscpy(text + index, _T("*.*")); index += 4;
+ text[index] = 0;
+
+ GetDlgItemText(hdlg,IDC_FILENAME,str,SIZEOF(str));
+ ZeroMemory(&ofn, sizeof(ofn));
+ ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
+ ofn.hwndOwner = hdlg;
+ ofn.lpstrFilter = text;
+ ofn.lpstrFile = str;
+ ofn.Flags = OFN_FILEMUSTEXIST | OFN_EXPLORER | OFN_NOCHANGEDIR | OFN_DONTADDTORECENT;
+ ofn.nMaxFile = SIZEOF(str);
+ ofn.lpstrDefExt = _T("idx");
+ if(GetOpenFileName(&ofn))
+ SetDlgItemText(hdlg,IDC_FILENAME,str);
+ break;
+ }
+ }
+ break;
+
+ case WM_DESTROY:
+ { int i;
+ for(i=SendDlgItemMessage(hdlg,IDC_LIST,LB_GETCOUNT,0,0)-1;i>=0;i--)
+ mir_free((char*)SendDlgItemMessage(hdlg,IDC_LIST,LB_GETITEMDATA,i,0));
+ break;
+ }
+ }
+ return FALSE;
+}
+
+
+INT_PTR CALLBACK MirabilisOptionsPageProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam)
+{
+ switch(message) {
+ case WM_INITDIALOG:
+ TranslateDialogDefault(hdlg);
+ EnableWindow(GetDlgItem(hdlg, IDC_RADIO_ALL), TRUE);
+ EnableWindow(GetDlgItem(hdlg, IDC_STATIC_ALL), TRUE);
+ EnableWindow(GetDlgItem(hdlg, IDC_RADIO_CONTACTS), TRUE);
+ EnableWindow(GetDlgItem(hdlg, IDC_STATIC_CONTACTS), TRUE);
+ CheckDlgButton(hdlg, IDC_RADIO_ALL, BST_CHECKED);
+ return TRUE;
+
+ case WM_COMMAND:
+ switch(LOWORD(wParam)) {
+ case IDC_BACK:
+ PostMessage(GetParent(hdlg), WIZM_GOTOPAGE, IDD_MIRABILISDB, (LPARAM)MirabilisPageProc);
+ break;
+ case IDOK:
+ if (IsDlgButtonChecked(hdlg, IDC_RADIO_ALL)) {
+ DoImport = MirabilisImport;
+ nImportOption = IMPORT_ALL;
+ nCustomOptions = IOPT_MSGSENT|IOPT_MSGRECV|IOPT_URLSENT|IOPT_URLRECV;
+ PostMessage(GetParent(hdlg), WIZM_GOTOPAGE, IDD_PROGRESS, (LPARAM)ProgressPageProc);
+ break;
+ }
+ if (IsDlgButtonChecked(hdlg, IDC_RADIO_CONTACTS)) {
+ DoImport = MirabilisImport;
+ nImportOption = IMPORT_CONTACTS;
+ nCustomOptions = 0;
+ PostMessage(GetParent(hdlg), WIZM_GOTOPAGE, IDD_PROGRESS, (LPARAM)ProgressPageProc);
+ break;
+ }
+ break;
+ case IDCANCEL:
+ PostMessage(GetParent(hdlg), WM_CLOSE, 0, 0);
+ break;
+ }
+ break;
+ }
+
+ return FALSE;
+}
+
+static int GetHighestIndexEntry(void)
+{
+ struct TIdxIndexEntry *entry;
+ DWORD ofs;
+
+ ofs=*(PDWORD)(pIdx+12);
+ for(;;) {
+ entry=(struct TIdxIndexEntry*)(pIdx+ofs);
+ if(entry->entryIdLow==(DWORD)-2) return ((struct TIdxDatEntry*)entry)->entryId;
+ if(entry->ofsHigher>=0xF0000000) ofs=entry->ofsInHere;
+ else ofs=entry->ofsHigher;
+ }
+}
+
+static int GetIdDatOfs(DWORD id)
+{
+ struct TIdxIndexEntry *entry;
+ DWORD ofs = *(PDWORD)(pIdx+12);
+ for(;;) {
+ entry=(struct TIdxIndexEntry*)(pIdx+ofs);
+ if(entry->entryIdLow==(DWORD)-2) {
+ if(entry->entryIdHigh==id) return ((struct TIdxDatEntry*)entry)->datOfs;
+ return 0;
+ }
+ if(id<entry->entryIdLow) ofs=entry->ofsLower;
+ else if(entry->ofsHigher<0xF0000000 && id>=entry->entryIdHigh) ofs=entry->ofsHigher;
+ else ofs=entry->ofsInHere;
+ }
+ return 0;
+}
+
+static int GetDatEntryType(DWORD ofs)
+{
+ return *(int*)(pDat+ofs+4);
+}
+
+DWORD GetDBVersion()
+{
+ dwDBVersion = *(PDWORD)(pIdx+16);
+
+ switch (dwDBVersion) {
+ case DBV99A:
+ AddMessage( LPGEN("This looks like a ICQ 99a database."));
+ break;
+ case DBV99B:
+ AddMessage( LPGEN("This looks like a ICQ 99b database."));
+ break;
+ case DBV2000A:
+ AddMessage( LPGEN("This looks like a ICQ 2000a database."));
+ break;
+ case DBV2000B:
+ AddMessage( LPGEN("This looks like a ICQ 2000b database."));
+ break;
+ case DBV2001A:
+ AddMessage( LPGEN("This looks like a ICQ 2001, 2002 or 2003a database."));
+ break;
+ default:
+ AddMessage( LPGEN("This database is an unknown version."));
+ return 0;
+ }
+
+ return dwDBVersion;
+}
+
+int GetEntryVersion(WORD wSeparatorValue)
+{
+ int nVersion;
+
+ if (wSeparatorValue < ENTRYV99A)
+ nVersion = 0; // Cannot handle ICQ98 contacts
+ else if ((wSeparatorValue >= ENTRYV99A) && (wSeparatorValue < ENTRYV99B))
+ nVersion = ENTRYV99A;
+ else if ((wSeparatorValue >= ENTRYV99B) && (wSeparatorValue < ENTRYV2000A))
+ nVersion = ENTRYV99B;
+ else if ((wSeparatorValue >= ENTRYV2000A) && (wSeparatorValue < ENTRYV2000B))
+ nVersion = ENTRYV2000A;
+ else if ((wSeparatorValue >= ENTRYV2000B) && (wSeparatorValue < ENTRYV2001A))
+ nVersion = ENTRYV2000B;
+ else if ((wSeparatorValue >= ENTRYV2001A) && (wSeparatorValue < ENTRYV2001B))
+ nVersion = ENTRYV2001A;
+ else if ((wSeparatorValue >= ENTRYV2001B) && (wSeparatorValue < ENTRYV2002A))
+ nVersion = ENTRYV2001B;
+ else if (wSeparatorValue >= ENTRYV2002A)
+ nVersion = ENTRYV2002A;
+ else
+ nVersion = ENTRYVUNKNOWN; // Just in case... Skip undocumented contact versions
+
+ return nVersion;
+}
+
+DWORD ReadSubList(DWORD dwOffset)
+{
+ DWORD dwSubType, dwProperties, n;
+
+ #ifdef _LOGGING
+ AddMessage( LPGEN("Attempting to parse sub list at offset %u."), dwOffset);
+ #endif
+
+ // Check number of properties in sub list
+ dwProperties = *(PDWORD)(pDat+dwOffset);
+ dwOffset+=4;
+
+ // Check sub list type
+ dwSubType = *(PBYTE)(pDat+dwOffset);
+ dwOffset+=1;
+
+ switch (dwSubType){
+ case 0x6B:
+ for(n=0;n<dwProperties;n++) dwOffset+=*(PWORD)(pDat+dwOffset)+2;
+ break;
+ case 0x6E:
+ for(n=0;n<dwProperties;n++) {
+ if (!(dwOffset = ReadPropertyBlock(dwOffset, NULL, NULL))) return 0;
+ }
+ break;
+ default:
+ // Unknown sub list type
+ AddMessage( LPGEN("Error: Unknown sub list type (%u) at offset %u."), dwSubType, dwOffset);
+ return 0;
+ }
+
+ return dwOffset;
+}
+
+DWORD ReadPropertyBlock(DWORD dwOffset, char* SearchWord, int* nSearchResult)
+{
+ DWORD n, dwProperties, nameOfs;
+ WORD nameLen;
+
+ #ifdef _LOGGING
+ AddMessage( LPGEN("Attempting to parse property block at offset %u."), dwOffset );
+ #endif
+
+ // Reset search result
+ if (SearchWord) *nSearchResult = 0;
+
+ // Check number of properties in block
+ dwOffset+=2;
+ dwProperties = *(PDWORD)(pDat+dwOffset);
+
+ // Scan all properties and search for
+ // 'SearchWord' (if it has been specified).
+ dwOffset+=4;
+ for(n=0;n<dwProperties;n++) {
+ nameLen=*(PWORD)(pDat+dwOffset); // Length of current property name
+ dwOffset+=2;
+ nameOfs=dwOffset; // Save pointer to start of name
+ dwOffset+=nameLen; // dwOffset now points to property value type
+
+ if ( SearchWord ) {
+ // Is this the property we are searching for?
+ if(!lstrcmpA((char*)(pDat+nameOfs),SearchWord)){
+ *nSearchResult = 1;
+ return dwOffset;
+ } }
+
+ // Increase 'dwOffset' to point to length of next property
+ switch(*(pDat+dwOffset)) {
+ case 0x64:
+ case 0x65: dwOffset+=2; break;
+ case 0x66:
+ case 0x67: dwOffset+=3; break;
+ case 0x68:
+ case 0x69: dwOffset+=5; break;
+ case 0x6b: dwOffset+=*(PWORD)(pDat+dwOffset+1)+3; break;
+ case 0x6d:
+ dwOffset = ReadSubList(dwOffset+1);
+ if (!dwOffset) return 0;
+ break;
+ case 0x6f: dwOffset+=*(PDWORD)(pDat+dwOffset+1)+5; break;
+ default:
+ // Unknown property value type
+ AddMessage( LPGEN("Error: Unknown datatype (%u) at offset %u."), *(pDat+dwOffset), dwOffset);
+ return 0;
+ } }
+
+ // We have reached the end without finding
+ // the property we searched for
+ if (SearchWord) *nSearchResult = 0;
+
+ // Return offset to the byte right after the
+ // property list
+ return dwOffset;
+}
+
+DWORD ReadPropertyBlockList(DWORD dwOffset, char* SearchWord, int* nSearchResult)
+{
+ DWORD dwBlocks, n;
+
+ #ifdef _LOGGING
+ AddMessage( LPGEN("Attempting to parse property block list at offset %u."), dwOffset );
+ #endif
+
+ // Check number of blocks in list
+ dwBlocks = *(PDWORD)(pDat+dwOffset);
+
+ // Scan all blocks and search for 'SearchWord' (if
+ // it has been specified).
+ dwOffset += 4;
+ for(n = 0;n<dwBlocks;n++) {
+ if (!(dwOffset = ReadPropertyBlock(dwOffset, SearchWord, nSearchResult))) {
+ AddMessage( LPGEN("Failed to read Property block."));
+ return 0;
+ }
+ if (SearchWord)
+ // Was the property found in the block?
+ if (*nSearchResult) return dwOffset;
+ }
+
+ // We have reached the end without finding
+ // the property we searched for
+ if (SearchWord) *nSearchResult = 0;
+
+ // Return offset to the byte right after the
+ // property list
+ return dwOffset;
+}
+
+DWORD ReadWavList(DWORD dwOffset)
+{
+ DWORD dwWavEntries, n;
+ WORD wNameLen;
+
+ #ifdef _LOGGING
+ AddMessage( LPGEN("Attempting to parse wav file list at offset %u."), dwOffset);
+ #endif
+
+ // Check number of wav entries
+ dwWavEntries = *(PDWORD)(pDat+dwOffset);
+
+ // Read entire list
+ dwOffset+=4;
+ for(n = 0;n<dwWavEntries;n++) {
+ wNameLen = *(PWORD)(pDat+dwOffset+0x0A);
+ dwOffset += wNameLen + 0x0C;
+ }
+
+ // Return the offset to the byte right
+ // after the list
+ return dwOffset;
+}
+
+DWORD FindMyDetails(void)
+{
+ DWORD dwOffset = GetIdDatOfs(1005);
+
+ if (!dwOffset) return 0;
+ if(*(PDWORD)(pDat+dwOffset+0x08) != 1005) return 0;
+ if(*(PBYTE)(pDat+dwOffset+0x0C) != 0xE4) return 0;
+ if(*(int*)(pDat+dwOffset+0x1e) != 'USER') return 0;
+ if(*(PDWORD)(pDat+dwOffset+0x22) != 6) return 0;
+
+ return dwOffset;
+}
+
+// dwOffset must point to MyDetails
+DWORD FindGroupList(DWORD dwOffset)
+{
+ DWORD n, dwPhoneEntries;
+ WORD wSeparatorValue;
+ int nFormat;
+
+ wSeparatorValue = *(PWORD)(pDat+dwOffset+0x1c);
+ nFormat = GetEntryVersion(wSeparatorValue);
+
+ #ifdef _LOGGING
+ AddMessage( LPGEN("Attempting to parse group list, type %d."), nFormat );
+ #endif
+
+ switch (nFormat) {
+ case ENTRYV99A:
+ if (!(dwOffset = ReadWavList(dwOffset+0x54))) return 0;
+ if (!(dwOffset = ReadPropertyBlock(dwOffset+38, NULL, NULL))) return 0;
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // User name
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // Nick name
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // First name
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // Last name
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // Primary e-mail
+ dwOffset += 0x13; // Various fixed length data
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // Home city
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // Home state
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // Additional details
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // User homepage
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // Home phone number
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // Notes
+ dwOffset += 0x08; // Various fixed length data
+ dwOffset += 0x04; // ++ UNKNOWN ++
+ dwPhoneEntries = *(PDWORD)(pDat+dwOffset); // Phonebook starts here
+ dwOffset += 0x04;
+ for(n = 0;n<dwPhoneEntries;n++){
+ dwOffset += *(PWORD)(pDat+dwOffset)+2;
+ dwOffset += *(PWORD)(pDat+dwOffset)+2;
+ dwOffset += *(PWORD)(pDat+dwOffset)+2;
+ dwOffset += *(PWORD)(pDat+dwOffset)+2;
+ dwOffset += 2;
+ dwOffset += *(PWORD)(pDat+dwOffset)+2;
+ }
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // Picture file name
+ dwOffset += 0x06; // ++ UNKNOWN ++ (8 enligt spec)
+ dwOffset += 0x06; // Various fixed length data
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // Secondary e-mail
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // Old e-mail
+ dwOffset += 0x04; // ++ UNKNOWN ++
+ dwOffset += 0x03; // Various fixed length data
+ dwOffset += 0x08; // ++ UNKNOWN ++
+ dwOffset += 0x03; // Various fixed length data
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // Home street address
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // Home fax number
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // Home cell phone number
+ dwOffset += 0x04; // ++ UNKNOWN ++
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // Company Div/Dept
+ dwOffset += 0x01; // Occupation
+ dwOffset += 0x04; // ++ UNKNOWN ++
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // Company position
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // Company name
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // Work street address
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // Work state
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // Work city
+ dwOffset += 0x08; // Various fixed length data
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // Work phone number
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // Work fax number
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // Work homepage
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // Past background #1
+ dwOffset += 0x02; // Past background #1 category
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // Past background #2
+ dwOffset += 0x02; // Past background #2 category
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // Past background #3
+ dwOffset += 0x02; // Past background #3 category
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // Affiliation #1
+ dwOffset += 0x02; // Affiliation #1 category
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // Affiliation #2
+ dwOffset += 0x02; // Affiliation #2 category
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // Affiliation #3
+ dwOffset += 0x02; // Affiliation #3 category
+ dwOffset += 0x14; // ++ UNKNOWN ++
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // Interest #1
+ dwOffset += 0x02; // Interest #1 category
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // Interest #2
+ dwOffset += 0x02; // Interest #2 category
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // Interest #3
+ dwOffset += 0x02; // Interest #3 category
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // Interest #4
+ dwOffset += 0x02; // Interest #4 category
+ dwOffset += 0x28; // ++ UNKNOWN ++
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // Password
+ dwOffset += 0x04; // ++ UNKNOWN ++
+ dwOffset += 0x0E; // ++ UNKNOWN ++
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // POP3 account name
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // POP3 account password
+ dwOffset += *(PWORD)(pDat+dwOffset)+2; // POP server name
+ dwOffset += 0x15; // ++ UNKNOWN ++
+ return dwOffset;
+
+ case ENTRYV99B:
+ if (!(dwOffset = ReadWavList(dwOffset+0x2C))) return 0;
+ if (!(dwOffset = ReadPropertyBlockList(dwOffset+0x02, NULL, NULL))) return 0;
+ dwOffset += 0x08;
+ dwPhoneEntries = *(PDWORD)(pDat+dwOffset); // Phonebook
+ dwOffset += 0x04;
+ for(n = 0;n<dwPhoneEntries;n++){
+ dwOffset += *(PWORD)(pDat+dwOffset)+2;
+ dwOffset += *(PWORD)(pDat+dwOffset)+2;
+ dwOffset += *(PWORD)(pDat+dwOffset)+2;
+ dwOffset += *(PWORD)(pDat+dwOffset)+2;
+ dwOffset += 2;
+ dwOffset += *(PWORD)(pDat+dwOffset)+2;
+ }
+ return dwOffset + 0x06;
+
+ case ENTRYV2000A:
+ case ENTRYV2000B:
+ case ENTRYV2002A:
+ if (!(dwOffset = ReadWavList(dwOffset+0x2C))) return 0;
+ if (!(dwOffset = ReadPropertyBlockList(dwOffset+0x02, NULL, NULL))) return 0;
+ return dwOffset + 0x06;
+
+ case ENTRYV2001A:
+ case ENTRYV2001B:
+ if (!(dwOffset = ReadPropertyBlockList(dwOffset+0x2C, NULL, NULL))) return 0;
+ return dwOffset + 0x06;
+
+ default:
+ AddMessage( LPGEN("default"));
+ return 0;
+ }
+}
+
+// ------------------------------------------------
+// Finds the name of a group with a specific GroupID.
+// ------------------------------------------------
+// dwGroupID is the GroupID of the group.
+// Returns a pointer to the name string or NULL if
+// it was not found.
+char* GetGroupName(DWORD dwGroupID)
+{
+ DWORD dwGroups, n, tmpOfs, dwOffset;
+ char* strGroupName = 0;
+ int nSearchResult;
+
+ // Check for the existence of any group
+ if (!dwGroupListOfs) return 0;
+ dwOffset = dwGroupListOfs;
+ dwGroups = *(PDWORD)(pDat + dwOffset);
+ if (dwGroups == 0) return 0;
+
+ dwOffset += 4;
+
+ // Examine all groups
+ switch (dwDBVersion) {
+ case DBV99A:
+ case DBV99B:
+ for (n = 0; n < dwGroups; n++){
+ if (dwGroupID == *(PDWORD)(pDat + dwOffset)){
+ if (*(PWORD)(pDat + dwOffset + 4) > 1)
+ return 6 + (char*)(pDat + dwOffset);
+
+ break;
+ }
+ else
+ // Skip to next group
+ dwOffset += *(PWORD)(pDat + dwOffset + 4) + 12;
+ }
+ break;
+
+ case DBV2000A:
+ case DBV2000B:
+ case DBV2001A:
+ for (n = 0; n < dwGroups; n++){
+ if (tmpOfs = ReadPropertyBlock(dwOffset, "GroupID", &nSearchResult)){
+ if (nSearchResult) {
+ if (dwGroupID == *(PDWORD)(pDat + tmpOfs + 1)){
+ strGroupName = 3 + (char*)(pDat + ReadPropertyBlock(dwOffset, "GroupName", &nSearchResult));
+ if (nSearchResult) {
+ if ((DWORD)*(strGroupName - 2) > 1)
+ return strGroupName;
+ break;
+ } } } }
+
+ // Skip to next group
+ if ( dwOffset != ReadPropertyBlock(dwOffset, NULL, NULL))
+ break;
+ }
+ break;
+ }
+
+ // The GroupID was not found, or it was found
+ // but the group did not have a name, or there
+ // was an error during parsing.
+ return 0;
+}
+
+// ------------------------------------------------
+// Scans a group list and adds all found groups to
+// the Miranda contact list
+// ------------------------------------------------
+// dwOffset must point to the number of entries in
+// the following group list.
+// Returns the number of added groups, or -1 if an error
+// occurred
+
+int ImportGroups()
+{
+ DWORD dwGroups, n, tmpOfs, dwOffset;
+ int nImported = 0;
+ int nSearchResult, nFormat;
+ WORD wSeparatorValue;
+
+ if (!(dwOffset = FindMyDetails())) {
+ AddMessage( LPGEN("ERROR: Failed to find owner information."));
+ return -1;
+ }
+
+ wSeparatorValue = *(PWORD)(pDat + dwOffset + 0x1c);
+ nFormat = GetEntryVersion(wSeparatorValue);
+
+ dwGroupListOfs = dwOffset = FindGroupList(dwOffset);
+ if (!dwOffset) {
+ AddMessage( LPGEN("ERROR: Failed to find contact list groups."));
+ #ifdef _LOGGING
+ { // If this is a debug build, dump MyDetails block to disk
+ FILE *stream;
+ DWORD dwSize;
+ dwOffset = FindMyDetails();
+ dwSize = *(PDWORD)(pDat + dwOffset);
+ stream = fopen("import_grouplist_dump.bin", "w");
+ fwrite(pDat + dwOffset, 1, dwSize, stream);
+ fclose(stream);
+ }
+ #endif
+ return -1;
+ }
+
+ // Check number of groups
+ dwGroups = *(PDWORD)(pDat + dwOffset);
+ if (dwGroups > 0)
+ AddMessage( LPGEN("Importing groups."));
+ else {
+ AddMessage( LPGEN("This database does not contain any contact groups."));
+ return 0;
+ }
+
+ dwOffset += 4;
+
+ // Import all groups with a name
+ switch (nFormat) {
+ case ENTRYV99A:
+ case ENTRYV99B:
+ for (n = 0; n < dwGroups; n++){
+ if (*(PWORD)(pDat+dwOffset+4) > 1) {
+ if ( CreateGroup(DBVT_ASCIIZ, (char*)(pDat + dwOffset) + 6, NULL ))
+ nImported++;
+ dwOffset += *(PWORD)(pDat + dwOffset + 4) + 12;
+ } }
+ break;
+
+ case ENTRYV2000A:
+ case ENTRYV2000B:
+ case ENTRYV2001A:
+ case ENTRYV2001B:
+ case ENTRYV2002A:
+ for (n = 0; n < dwGroups; n++){
+ if (tmpOfs = ReadPropertyBlock(dwOffset, "GroupName", &nSearchResult)){
+ if (nSearchResult) {
+ if (CreateGroup( DBVT_ASCIIZ, (char*)(pDat + tmpOfs + 3), NULL ))
+ nImported++;
+ } }
+
+ dwOffset = ReadPropertyBlock(dwOffset, NULL, NULL);
+ if (!dwOffset) {
+ AddMessage( LPGEN("ERROR: An error occurred while importing groups."));
+ AddMessage( LPGEN("All groups may not have not been imported."));
+ #ifdef _LOGGING
+ { // If this is a debug build, dump MyDetails block to disk
+ FILE *stream;
+ DWORD dwSize;
+ dwOffset = FindMyDetails();
+ dwSize = *(PDWORD)(pDat + dwOffset);
+ stream = fopen("import_grouplist_dump.bin", "w");
+ fwrite(pDat + dwOffset, 1, dwSize, stream);
+ fclose(stream);
+ }
+ #endif
+ return -1;
+ } }
+ break;
+
+ default:
+ return -1;
+ }
+
+ return nImported;
+}
+
+// Imports the contact at offset dwOffset
+// Returns the HANDLE of the Miranda contact
+// or INVALID_HANDLE_VALUE on failure
+
+HANDLE ImportContact(DWORD dwOffset)
+{
+ int nContactVersion, nSearchResult;
+ BYTE Status;
+ WORD wSeparatorValue;
+ DWORD dwGroup, dwUIN = 0, tmpOfs = 0;
+ char *strNickname = 0, *strGroupName = 0;
+
+ if (*(int*)(pDat + dwOffset + 4) != DATENTRY_CONTACT)
+ return INVALID_HANDLE_VALUE;
+
+ if (*(int*)(pDat + dwOffset + 0x1e) != 'USER')
+ return INVALID_HANDLE_VALUE;
+
+ #ifdef _LOGGING
+ { // If this is a debug build, dump contact to disk
+ FILE *stream;
+ DWORD dwSize;
+ dwSize = *(PDWORD)(pDat + dwOffset);
+ stream = fopen("import_last_contact.bin", "w");
+ fwrite(pDat + dwOffset, 1, dwSize, stream);
+ fclose(stream);
+ }
+ #endif
+
+ Status = *(pDat + dwOffset + 0x22);
+ wSeparatorValue = *(PWORD)(pDat + dwOffset + 0x1c);
+ nContactVersion = GetEntryVersion(wSeparatorValue);
+
+ dwGroup = *(PDWORD)(pDat + dwOffset + 0x26);
+ if (dwGroup >= 1000)
+ strGroupName = GetGroupName(dwGroup);
+
+ if (Status == 5)
+ return INVALID_HANDLE_VALUE; // Skip deleted contacts
+
+ if ((Status != 2) && (Status != 3)) {
+ AddMessage( LPGEN("Skipping inactive contact."));
+ return INVALID_HANDLE_VALUE;
+ }
+
+ if ((nContactVersion < ENTRYV99A) || (nContactVersion == 0)) {
+ AddMessage( LPGEN("Skipping contact with unsupported version."));
+ return INVALID_HANDLE_VALUE;
+ }
+
+ switch(nContactVersion){
+ case ENTRYV99A:
+ if (!(dwOffset = ReadWavList(dwOffset + 0x54))) return INVALID_HANDLE_VALUE;
+ if (!(dwOffset = ReadPropertyBlock(dwOffset + 0x26, NULL, NULL))) return INVALID_HANDLE_VALUE;
+ // Check for custom nickname
+ if (*(PWORD)(pDat + dwOffset) > 1) strNickname = (char*)(dwOffset + pDat + 2);
+ // Find UIN
+ dwOffset += *(PWORD)(pDat + dwOffset) + 2; // Custom nick name
+ dwOffset += *(PWORD)(pDat + dwOffset) + 2; // Nick name
+ dwOffset += *(PWORD)(pDat + dwOffset) + 2; // First name
+ dwOffset += *(PWORD)(pDat + dwOffset) + 2; // Last name
+ dwOffset += *(PWORD)(pDat + dwOffset) + 2; // E-mail
+ dwUIN = *(PDWORD)(pDat + dwOffset); // UIN
+ break;
+
+ case ENTRYV99B:
+ case ENTRYV2000A:
+ case ENTRYV2000B:
+ if (!(dwOffset = ReadWavList(dwOffset + 0x2C))) return INVALID_HANDLE_VALUE;
+ tmpOfs = ReadPropertyBlockList(dwOffset + 0x02, "UIN", &nSearchResult);
+ if (nSearchResult) dwUIN = *(PDWORD)(pDat + tmpOfs + 1);
+ tmpOfs = ReadPropertyBlockList(dwOffset + 0x02, "MyDefinedHandle", &nSearchResult);
+ if (nSearchResult) strNickname = (char*)(tmpOfs + pDat + 3);
+ break;
+
+ case ENTRYV2001A:
+ case ENTRYV2001B:
+ tmpOfs = ReadPropertyBlockList(dwOffset + 0x2C, "MyDefinedHandle", &nSearchResult);
+ if (nSearchResult) strNickname = (char*)(tmpOfs + pDat + 3);
+ tmpOfs = ReadPropertyBlockList(dwOffset + 0x2C, "UIN", &nSearchResult);
+ if (nSearchResult) dwUIN = *(PDWORD)(pDat + tmpOfs + 1);
+ break;
+
+ case ENTRYV2002A:
+ tmpOfs = ReadPropertyBlockList(dwOffset + 0x32, "MyDefinedHandle", &nSearchResult);
+ if (nSearchResult) strNickname = (char*)(tmpOfs + pDat + 3);
+ tmpOfs = ReadPropertyBlockList(dwOffset + 0x32, "UIN", &nSearchResult);
+ if (nSearchResult) dwUIN = *(PDWORD)(pDat + tmpOfs + 1);
+ break;
+ }
+
+ if (!dwUIN) {
+ AddMessage( LPGEN("Skipping unrecognizable contact."));
+ return INVALID_HANDLE_VALUE;
+ }
+
+ if (dwUIN < 10000) {
+ AddMessage( LPGEN("Skipping non-ICQ contact %u."), dwUIN );
+ return INVALID_HANDLE_VALUE;
+ }
+
+ if (HContactFromNumericID( szICQModuleName[ iICQAccount ], "UIN", dwUIN) == INVALID_HANDLE_VALUE) {
+ DBVARIANT id, nick, group;
+ id.type = DBVT_DWORD; id.dVal = dwUIN;
+ if ( strNickname != NULL && strlen(strNickname) > 0 )
+ nick.type = DBVT_ASCIIZ, nick.pszVal = strNickname;
+ else
+ nick.type = DBVT_DELETED;
+ group.type = DBVT_ASCIIZ, group.pszVal = strGroupName;
+ return AddContact(hdlgProgress, szICQModuleName[ iICQAccount ], "UIN", &id, &nick, &group);
+ }
+ else {
+ if ((strNickname != NULL) && (strlen(strNickname) > 0))
+ AddMessage( LPGEN("Skipping duplicate ICQ contact %u, %s"), dwUIN, strNickname);
+ else
+ AddMessage( LPGEN("Skipping duplicate ICQ contact %u"), dwUIN);
+ }
+
+ // Failure
+ return INVALID_HANDLE_VALUE;
+}
+
+BOOL ImportMessage(DWORD dwOffset)
+{
+ struct TDatMessage *msg = (struct TDatMessage*)(pDat + dwOffset);
+ struct TDatEntryFooter *footer;
+ DBEVENTINFO dbei;
+ HANDLE hContact;
+ int nUCTOffset;
+ TIME_ZONE_INFORMATION TimeZoneInformation;
+ int nHistoryCount = 0;
+
+ // Get timestamp offset. In ICQ, event timestamps are stored
+ // as UTC + (0-TZ offset). YES! That's the negation of the
+ // timezone offset, only God and Mirabilis knows why.
+ GetTimeZoneInformation(&TimeZoneInformation);
+ nUCTOffset = -TimeZoneInformation.Bias * 60;
+
+ // Ignore messages in 'Deleted' folder
+ if (msg->filingStatus&FILING_DELETED)
+ return FALSE;
+
+ // Skip messages from non-icq contacts
+ if (msg->uin < 10000) {
+ AddMessage( LPGEN("Ignoring msg from user %d at ofs %d."), msg->uin, dwOffset );
+ return FALSE;
+ }
+
+ // Ignore received messages?
+ if (( msg->filingStatus & FILING_RECEIVED ) && !( nCustomOptions & IOPT_MSGRECV ))
+ return FALSE;
+
+ // Ignores sent messages?
+ if ( !(msg->filingStatus & FILING_RECEIVED) && !( nCustomOptions & IOPT_MSGSENT ))
+ return FALSE;
+
+ // Check if contact exists in Miranda database
+ hContact = HistoryImportFindContact(hdlgProgress, szICQModuleName[ iICQAccount ], msg->uin, nCustomOptions&IOPT_ADDUNKNOWN);
+ if (hContact == INVALID_HANDLE_VALUE)
+ return FALSE; // Contact couldn't be found/added
+
+ // Convert the event to a Miranda dbevent
+ footer = (struct TDatEntryFooter*)(pDat + dwOffset + msg->textLen + offsetof(struct TDatMessage, text));
+ ZeroMemory(&dbei, sizeof(dbei));
+ dbei.cbSize = sizeof(dbei);
+ dbei.eventType = EVENTTYPE_MESSAGE;
+ dbei.flags = footer->sent == 1 ? DBEF_SENT : DBEF_READ;
+ dbei.szModule = szICQModuleName[ iICQAccount ];
+ // Convert timestamp
+ dbei.timestamp = footer->timestamp + nUCTOffset;
+ dbei.cbBlob = msg->textLen;
+ dbei.pBlob = (PBYTE)alloca(msg->textLen);
+ CopyMemory(dbei.pBlob, msg->text, dbei.cbBlob);
+ dbei.pBlob[dbei.cbBlob - 1] = 0;
+
+ // Check for duplicate entries
+ if (IsDuplicateEvent(hContact, dbei)) {
+ nDupes++;
+ }
+ else {
+ if (CallService(MS_DB_EVENT_ADD, (WPARAM)hContact, (LPARAM)&dbei))
+ nMessagesCount++;
+ }
+
+ return TRUE;
+}
+
+BOOL ImportExtendedMessage(DWORD dwOffset)
+{
+ struct TDatMessage *msg = (struct TDatMessage*)(pDat + dwOffset);
+ struct TDatEntryFooter *footer;
+ DBEVENTINFO dbei;
+ HANDLE hContact;
+ int nUCTOffset;
+ TIME_ZONE_INFORMATION TimeZoneInformation;
+ int nHistoryCount = 0;
+ char* pszText = 0;
+ DWORD dwRichTextOffset = 0;
+ DWORD wRichTextLength = 0;
+ DWORD wLength = 0;
+ BOOL bFreeMe = FALSE;
+
+ // Get timestamp offset. In ICQ, event timestamps are stored
+ // as UTC + (0-TZ offset). YES! That's the negation of the
+ // timezone offset, only God and Mirabilis knows why.
+ GetTimeZoneInformation(&TimeZoneInformation);
+ nUCTOffset = -TimeZoneInformation.Bias * 60;
+
+ // Ignore messages in 'Deleted' folder
+ if (msg->filingStatus&FILING_DELETED)
+ return FALSE;
+
+ // Skip messages from non-icq contacts
+ if (msg->uin < 10000) {
+ AddMessage( LPGEN("Ignoring msg from user %d at ofs %d."), msg->uin, dwOffset );
+ return FALSE;
+ }
+
+ // Ignore received messages?
+ if (( msg->filingStatus & FILING_RECEIVED) && !( nCustomOptions & IOPT_MSGRECV ))
+ return FALSE;
+
+ // Ignore sent messages?
+ if ( !( msg->filingStatus & FILING_RECEIVED ) && !( nCustomOptions & IOPT_MSGSENT ))
+ return FALSE;
+
+ // Check if contact exists in Miranda database
+ hContact = HistoryImportFindContact(hdlgProgress, szICQModuleName[ iICQAccount ], msg->uin, nCustomOptions&IOPT_ADDUNKNOWN);
+ if (hContact == INVALID_HANDLE_VALUE)
+ return FALSE; // Contact couldn't be found/added
+
+ // Find a piece of usable text content
+ if (msg->textLen <= 1) {
+ // Skip past the RTF segment
+ wRichTextLength = *(PWORD)(pDat + dwOffset + 0x2A + msg->textLen + 0x21);
+ dwRichTextOffset = dwOffset + 0x2A + msg->textLen + 0x23;
+
+ // Use the UTF-8 text segment
+ wLength = *(PWORD)(pDat + dwRichTextOffset + wRichTextLength);
+ if (wLength <= 1) {
+ AddMessage( LPGEN("Ignoring msg with no text from %d ofs %d."), msg->uin, dwOffset );
+ return FALSE;
+ }
+ pszText = _strdup(pDat + dwRichTextOffset + wRichTextLength + 2);
+ bFreeMe = TRUE;
+ mir_utf8decode(pszText, NULL);
+ wLength = (DWORD)strlen(pszText)+1;
+ }
+ else {
+ // Use the ANSI text segment
+ wLength = msg->textLen;
+ pszText = pDat + dwOffset + 0x2A;
+ }
+
+ // Convert the event to a Miranda dbevent
+ footer = (struct TDatEntryFooter*)(pDat + dwOffset + msg->textLen + offsetof(struct TDatMessage, text));
+ ZeroMemory(&dbei, sizeof(dbei));
+ dbei.cbSize = sizeof(dbei);
+ dbei.eventType = EVENTTYPE_MESSAGE;
+ dbei.flags = footer->sent == 1 ? DBEF_SENT : DBEF_READ;
+ dbei.szModule = szICQModuleName[ iICQAccount ];
+ // Convert timestamp
+ dbei.timestamp = footer->timestamp + nUCTOffset;
+ dbei.cbBlob = wLength;
+ dbei.pBlob = (PBYTE)calloc(wLength,1);
+ CopyMemory(dbei.pBlob, pszText, dbei.cbBlob);
+ dbei.pBlob[dbei.cbBlob - 1] = 0;
+
+ // Check for duplicate entries
+ if (IsDuplicateEvent(hContact, dbei)) {
+ nDupes++;
+ }
+ else {
+ if (CallService(MS_DB_EVENT_ADD, (WPARAM)hContact, (LPARAM)&dbei))
+ nMessagesCount++;
+ }
+
+ free(dbei.pBlob);
+ if (bFreeMe)
+ free(pszText);
+
+ return TRUE;
+}
+
+BOOL ImportURLMessage(DWORD dwOffset)
+{
+ struct TDatMessage *msg = (struct TDatMessage*)(pDat + dwOffset);
+ struct TDatEntryFooter *footer;
+ DBEVENTINFO dbei;
+ HANDLE hContact;
+ int nUCTOffset;
+ TIME_ZONE_INFORMATION TimeZoneInformation;
+ int nHistoryCount = 0;
+ char *pSeparator;
+
+ // Get timestamp offset. In ICQ, event timestamps are stored
+ // as UTC + (0-TZ offset). YES! That's the negation of the
+ // timezone offset, only God and Mirabilis knows why.
+ GetTimeZoneInformation(&TimeZoneInformation);
+ nUCTOffset = -TimeZoneInformation.Bias * 60;
+
+ // Ignore URLs in 'Deleted' folder
+ if (msg->filingStatus&FILING_DELETED)
+ return FALSE;
+
+ // Skip URLs from non-icq contacts
+ if (msg->uin < 10000) {
+ AddMessage( LPGEN("Ignoring msg from user %d at ofs %d."), msg->uin, dwOffset );
+ return FALSE;
+ }
+
+ // Ignore received URLs?
+ if (( msg->filingStatus & FILING_RECEIVED ) && !( nCustomOptions & IOPT_URLRECV ))
+ return FALSE;
+
+ // Ignores sent URLs?
+ if ( !( msg->filingStatus & FILING_RECEIVED ) && !( nCustomOptions & IOPT_URLSENT ))
+ return FALSE;
+
+ // Check if contact exists in Miranda database
+ hContact = HistoryImportFindContact(hdlgProgress, szICQModuleName[ iICQAccount ], msg->uin, nCustomOptions&IOPT_ADDUNKNOWN);
+ if (hContact == INVALID_HANDLE_VALUE)
+ return FALSE; // Contact couldn't be found/added
+
+ // Convert the event to a Miranda dbevent
+ footer = (struct TDatEntryFooter*)(pDat + dwOffset + msg->textLen + offsetof(struct TDatMessage, text));
+ ZeroMemory(&dbei, sizeof(dbei));
+ dbei.cbSize = sizeof(dbei);
+ dbei.eventType = EVENTTYPE_URL;
+ dbei.flags = footer->sent == 1 ? DBEF_SENT : DBEF_READ;
+ dbei.szModule = szICQModuleName[ iICQAccount ];
+ // Convert timestamp
+ dbei.timestamp = footer->timestamp + nUCTOffset;
+ dbei.cbBlob = msg->textLen;
+ dbei.pBlob = (PBYTE)alloca(msg->textLen);
+ CopyMemory(dbei.pBlob, msg->text, dbei.cbBlob);
+ dbei.pBlob[dbei.cbBlob - 1] = 0;
+ // Separate URL and description
+ pSeparator = strchr((char*)dbei.pBlob, 0xFE);
+ if (pSeparator != NULL)
+ *pSeparator = 0;
+
+ // Check for duplicate entries
+ if (IsDuplicateEvent(hContact, dbei))
+ nDupes++;
+ else if (CallService(MS_DB_EVENT_ADD, (WPARAM)hContact, (LPARAM)&dbei))
+ nMessagesCount++;
+
+ return TRUE;
+}
+
+BOOL ImportEvent(DWORD dwOffset)
+{
+ struct TDatMessage *msg = (struct TDatMessage*)(pDat + dwOffset);
+
+ // Events have IDs > 2000
+ if (msg->hdr.entryId < 2001) {
+ AddMessage( LPGEN("Skipping event with ID < 2001."));
+ return FALSE;
+ }
+
+ // Separate code paths based on the event signature
+ switch (msg->hdr.subType) {
+
+ case SUBTYPE_MESSAGE: // All kinds of messages
+ switch (msg->type) {
+ case 1: // Normal message
+ if ((nCustomOptions&IOPT_MSGRECV) || (nCustomOptions&IOPT_MSGSENT)) {
+ return ImportMessage(dwOffset);
+ }
+ break;
+
+ case 4: // URL
+ if ((nCustomOptions&IOPT_URLSENT) || (nCustomOptions&IOPT_URLRECV)) {
+ return ImportURLMessage(dwOffset);
+ }
+ break;
+
+ case 6: // Request for authorization
+ #ifdef _LOGGING
+ AddMessage( LPGEN("Skipping 'Request for auth.' msg, ofs %d."), dwOffset );
+ #endif
+ break;
+
+ case 7: // Authorization request denied
+ #ifdef _LOGGING
+ AddMessage( LPGEN("Skipping 'Auth. denied' msg, ofs %d."), dwOffset );
+ #endif
+ break;
+
+ case 8: // Authorization request accepted
+ #ifdef _LOGGING
+ AddMessage( LPGEN("Skipping 'Auth. accepted' msg, ofs %d."), dwOffset );
+ #endif
+ break;
+
+ case 9: // System message
+ #ifdef _LOGGING
+ AddMessage( LPGEN("Skipping 'System message', ofs %d."), dwOffset );
+ #endif
+ break;
+
+ case 12: // You were added
+ #ifdef _LOGGING
+ AddMessage( LPGEN("Skipping 'You were added' msg, ofs %d."), dwOffset );
+ #endif
+ break;
+
+ case 13: // WWWPager ?
+ #ifdef _LOGGING
+ AddMessage( LPGEN("Skipping 'WWW Pager' msg, ofs %d."), dwOffset );
+ #endif
+ break;
+
+ case 14: // Email Express ?
+ #ifdef _LOGGING
+ AddMessage( LPGEN("Skipping 'Email Express' msg, ofs %d."), dwOffset );
+ #endif
+ break;
+
+ case 19: // Contact list
+ #ifdef _LOGGING
+ AddMessage( LPGEN("Skipping 'Contact' msg, ofs %d."), dwOffset );
+ #endif
+ break;
+
+ case 21: // Phonecall request?
+ #ifdef _LOGGING
+ AddMessage( LPGEN("Skipping 'Phonecall' msg (?), ofs %d."), dwOffset );
+ #endif
+ break;
+
+ case 26: // SMS request?
+ #ifdef _LOGGING
+ AddMessage( LPGEN("Skipping 'SMS' msg (?), ofs %d."), dwOffset );
+ #endif
+ break;
+
+ case 29: // Active list invitation ??
+ #ifdef _LOGGING
+ AddMessage( LPGEN("Skipping 29 msg, ofs %d."), dwOffset );
+ #endif
+ break;
+
+ case 30: // Birthday reminder
+ #ifdef _LOGGING
+ AddMessage( LPGEN("Skipping 'Birthday' msg (?), ofs %d."), dwOffset );
+ #endif
+ break;
+
+ case 32: // Unknown (Tomer)
+ #ifdef _LOGGING
+ AddMessage( LPGEN("Skipping 32 msg, ofs %d."), dwOffset );
+ #endif
+ break;
+
+ default:
+ AddMessage( LPGEN("Skipping unknown 0xE0 subtype (%d), ofs %d."), msg->type, dwOffset );
+
+ #ifdef _LOGGING
+ { // If this is a debug build, dump entry to disk
+ FILE *stream;
+ DWORD dwSize = *(PDWORD)(pDat + dwOffset);
+ wsprintfA(str, "import_unknown_E0subtype_%u-%u.bin", msg->type, dwOffset);
+ stream = fopen(str, "w");
+ fwrite(pDat + dwOffset, 1, dwSize, stream);
+ fclose(stream);
+ }
+ #endif
+
+ return FALSE;
+ }
+ break;
+
+ case SUBTYPE_CHATREQUEST: // 0xE1
+ #ifdef _LOGGING
+ if (nImportOption != IMPORT_CONTACTS)
+ AddMessage( LPGEN("Skipping 'Chat request' msg, ofs %d."), dwOffset );
+ #endif
+ break;
+
+ case SUBTYPE_FILEREQUEST: // 0xE2
+ #ifdef _LOGGING
+ if (nImportOption != IMPORT_CONTACTS)
+ AddMessage( LPGEN("Skipping file message offset %d."), dwOffset );
+ #endif
+ break;
+
+ case 0xE3: // External (IPhone, Battlecom) Maybe general voice calls?
+ #ifdef _LOGGING
+ if (nImportOption != IMPORT_CONTACTS)
+ AddMessage( LPGEN("Skipping message type 0xE3 at offset %d."), dwOffset );
+ #endif
+ break;
+
+ case 0xE4: // My details
+ break;
+ case 0xE5: // Contact
+ break;
+ case 0xE6: // Reminder
+ break;
+ case 0xE7: // Addressbook
+ break;
+ case 0xEC: // Voice message
+ break;
+ case 0xED: // Unknown, something to do with chatting and .CHT files
+ // if (importHistory) {
+ // wsprintf(str, "Skipping message type 0xED at offset %d.", dwOffset);
+ // AddMessage( LPGEN(str);
+ // }
+ break;
+ case 0xEE: // Note
+ break;
+ case 0xEF: // Event folder
+ break;
+ // case 0xF0: // Unknown
+ // if (importHistory) {
+ // wsprintf(str, "Skipping message type 0xF0 at offset %d.", dwOffset);
+ // AddMessage( LPGEN(str);
+ // }
+ // break;
+ case 0xF1: // Server list
+ break;
+ // case 0xF6: // Unknown
+ // if (importHistory) {
+ // wsprintf(str, "Skipping message type 0xF6 at offset %d.", dwOffset);
+ // AddMessage( LPGEN(str);
+ // }
+ // break;
+ case 0x50: // Extended message, ICQ 2000a+?
+ if (nImportOption != IMPORT_CONTACTS) {
+ return ImportExtendedMessage(dwOffset);
+ }
+ break;
+
+ case 0xA0: // URL message type 2
+ if (nImportOption != IMPORT_CONTACTS) {
+ if ((msg->filingStatus&FILING_RECEIVED) || (nCustomOptions&IOPT_URLRECV)) {
+ return ImportURLMessage(dwOffset);
+ }
+ }
+ break;
+
+ default:
+ if (nImportOption != IMPORT_CONTACTS) {
+ AddMessage( LPGEN("Skipping unknown event type %d at offset %d."), msg->hdr.subType, dwOffset );
+
+#ifdef _LOGGING
+ { // If this is a debug build, dump entry to disk
+ FILE *stream;
+ DWORD dwSize;
+ dwSize = *(PDWORD)(pDat + dwOffset);
+ wsprintfA(str, "import_unknown_eventtype_%u-%u.bin", msg->hdr.subType, dwOffset);
+ stream = fopen(str, "w");
+ fwrite(pDat + dwOffset, 1, dwSize, stream);
+ fclose(stream);
+ }
+#endif
+
+ }
+ break;
+ }
+
+ return FALSE;
+}
+
+
+static void MirabilisImport(HWND hdlgProgressWnd)
+{
+ HANDLE hIdx, hDat, hIdxMapping, hDatMapping;
+ DWORD i, ofs, highestIndexEntry;
+ TCHAR datFilename[MAX_PATH];
+ MSG msg;
+ DWORD dwTimer;
+
+
+ int status = 0;
+ hdlgProgress = hdlgProgressWnd;
+ nDupes = nContactsCount = nMessagesCount = 0;
+
+ SetProgress(0);
+ lstrcpy(datFilename, importFile);
+ {
+ TCHAR* str2;
+ str2 = _tcsrchr(datFilename,'.');
+ if ( str2 != NULL )
+ lstrcpy(str2, _T(".dat"));
+ }
+
+ hIdx = CreateFile(importFile, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);
+ if (hIdx == INVALID_HANDLE_VALUE) {
+ AddMessage( LPGEN("Failed to open index file"));
+ AddMessage( LPGEN("Import aborted"));
+ SetProgress(100);
+ return;
+ }
+
+ hDat = CreateFile(datFilename, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);
+ if (hDat == INVALID_HANDLE_VALUE) {
+ AddMessage( LPGEN("Failed to open database file"));
+ AddMessage( LPGEN("Import aborted"));
+ SetProgress(100);
+ return;
+ }
+
+ // Creating file mappings
+ hIdxMapping = CreateFileMapping(hIdx, NULL, PAGE_READONLY, 0, 0, NULL);
+ hDatMapping = CreateFileMapping(hDat, NULL, PAGE_READONLY, 0, 0, NULL);
+
+ // Mapping views of files
+ pIdx = (PBYTE)MapViewOfFile(hIdxMapping, FILE_MAP_READ, 0, 0, 0);
+ pDat = (PBYTE)MapViewOfFile(hDatMapping, FILE_MAP_READ, 0, 0, 0);
+
+ // Is this a supported format?
+ if (GetDBVersion()) {
+ AddMessage( "" );
+
+ highestIndexEntry = GetHighestIndexEntry();
+
+ // Import groups
+ nGroupsCount = ImportGroups();
+ if (nGroupsCount < 0) {
+ AddMessage( LPGEN("Group import was not completed."));
+ nGroupsCount = 0;
+ }
+ AddMessage( "" );
+
+ // Start benchmark timer
+ dwTimer = time(NULL);
+
+ if ( !IsProtocolLoaded( szICQModuleName[iICQAccount] )) {
+ AddMessage( LPGEN("ICQ account is not installed."));
+ AddMessage( LPGEN("No ICQ contacts or history will be imported."));
+ AddMessage( "" );
+ }
+ else {
+ // Configure database for fast writing
+ CallService(MS_DB_SETSAFETYMODE, FALSE, 0);
+
+ // Import contacts
+ AddMessage( LPGEN("Importing contacts"));
+ for (i = 2001; i <= highestIndexEntry; i++) { //event ids start at 2001
+ if (!(i%10)) {
+ if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+ }
+ }
+ if (!(i%100))
+ SetProgress(100 * (i - 2001) / (highestIndexEntry - 2001));
+
+ ofs = GetIdDatOfs(i);
+ if (ofs != 0) {
+ if (ImportContact(ofs) != INVALID_HANDLE_VALUE)
+ nContactsCount++;
+ }
+ }
+ AddMessage( "" );
+
+ // Import history
+ if (nImportOption != IMPORT_CONTACTS) {
+ AddMessage( LPGEN("Importing history (this may take a while)"));
+ for (i = 2001; i <= highestIndexEntry; i++) { //event ids start at 2001
+ if (!(i%10)) {
+ if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+ }
+ }
+
+ if (!(i%100))
+ SetProgress(100 * (i - 2001) / (highestIndexEntry - 2001));
+
+ ofs = GetIdDatOfs(i);
+ if (ofs != 0) ImportEvent(ofs);
+ }
+ AddMessage( "" );
+ }
+
+ // Restore database writing mode
+ CallService(MS_DB_SETSAFETYMODE, TRUE, 0);
+ }
+
+ dwTimer = time(NULL) - dwTimer;
+
+ AddMessage( LPGEN("Import completed in %d seconds."), dwTimer );
+ SetProgress(100);
+ AddMessage( LPGEN("Added %d contacts and %d groups."), nContactsCount, nGroupsCount );
+ if ( nImportOption != IMPORT_CONTACTS )
+ AddMessage( LPGEN("Added %d events and skipped %d duplicates."), nMessagesCount, nDupes );
+ }
+
+ UnmapViewOfFile(pDat);
+ UnmapViewOfFile(pIdx);
+ CloseHandle(hDatMapping);
+ CloseHandle(hIdxMapping);
+ CloseHandle(hDat);
+ CloseHandle(hIdx);
+}
diff --git a/plugins/Dbx_mmap_SA/Import_SA/mirabilis.h b/plugins/Dbx_mmap_SA/Import_SA/mirabilis.h
new file mode 100644
index 0000000000..47f10141e1
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Import_SA/mirabilis.h
@@ -0,0 +1,200 @@
+/*
+
+Import plugin for Miranda IM
+
+Copyright (C) 2001,2002,2003,2004 Martin Öberg, Richard Hughes, Roland Rabien & Tristan Van de Vreede
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+
+
+#ifndef MIRABILIS_H
+#define MIRABILIS_H
+
+#include <windows.h>
+#include <newpluginapi.h>
+#include <m_database.h>
+
+// ======================
+// == GLOBAL FUNCTIONS ==
+// ======================
+
+HANDLE HistoryImportFindContact(HWND hdlgProgress, char* szModuleName, DWORD uin,int addUnknown);
+
+// =====================
+// == LOCAL FUNCTIONS ==
+// =====================
+
+
+// Main function
+static void MirabilisImport(HWND hdlgProgressWnd);
+
+// GUI callbacks
+INT_PTR CALLBACK ImportTypePageProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam);
+INT_PTR CALLBACK FinishedPageProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam);
+INT_PTR CALLBACK ProgressPageProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam);
+INT_PTR CALLBACK MirabilisPageProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam);
+INT_PTR CALLBACK MirabilisOptionsPageProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam);
+
+// Helper functions for entries
+static int GetHighestIndexEntry(void);
+static int GetIdDatOfs(DWORD id);
+static int GetDatEntryType(DWORD ofs);
+DWORD FindMyDetails(void);
+
+// Parsing functions
+DWORD GetDBVersion();
+int GetEntryVersion(WORD wSeparatorValue);
+DWORD ReadPropertyBlock(DWORD dwOffset, char* SearchWord, int* nSearchResult);
+DWORD ReadSubList(DWORD dwOffset);
+DWORD ReadPropertyBlock(DWORD dwOffset, char* SearchWord, int* nSearchResult);
+DWORD ReadPropertyBlockList(DWORD dwOffset, char* SearchWord, int* nSearchResult);
+DWORD ReadWavList(DWORD ofs);
+DWORD FindGroupList(DWORD dwOffset);
+char* GetGroupName(DWORD dwGroupID);
+int ImportGroups();
+static HANDLE ImportContact(DWORD dwOffset);
+
+BOOL ImportEvent(DWORD dwOffset);
+BOOL ImportMessage(DWORD dwOffset);
+BOOL ImportExtendedMessage(DWORD dwOffset);
+BOOL ImportURLMessage(DWORD dwOffset);
+
+
+
+
+// ======================
+// == GLOBAL VARIABLES ==
+// ======================
+
+extern TCHAR importFile[MAX_PATH];
+extern void (*DoImport)(HWND);
+extern int nImportOption;
+extern int nCustomOptions;
+
+
+extern int cICQAccounts;
+extern char ** szICQModuleName;
+extern TCHAR ** tszICQAccountName;
+extern int iICQAccount;
+
+// =====================
+// == LOCAL VARIABLES ==
+// =====================
+
+static DWORD dwDBVersion;
+static DWORD dwGroupListOfs;
+static PBYTE pIdx,pDat;
+
+// =============
+// == DEFINES ==
+// =============
+
+// Contact versions
+// These numbers are not 100% accurate
+#define ENTRYVUNKNOWN -1
+#define ENTRYV99A 200
+#define ENTRYV99B 300
+#define ENTRYV2000A 400
+#define ENTRYV2000B 455
+#define ENTRYV2001A 500
+#define ENTRYV2001B 515
+#define ENTRYV2002A 533
+
+// Database versions
+#define DBV99A 10
+#define DBV99B 14
+#define DBV2000A 17
+#define DBV2000B 18
+#define DBV2001A 19 // This is used by ICQ 2001a, 2001b & 2002a
+
+#define DATENTRY_UNFILED (DWORD)(-1)
+#define DATENTRY_MESSAGE 0
+#define DATENTRY_CONTACT 1
+#define DATENTRY_IGNORED 2
+#define DATENTRY_SYSTEM 9
+
+#define MAX_NON_ICQ_CONTACTS 100
+
+#define SUBTYPE_NEWMESSAGE 0x50
+#define SUBTYPE_NEWURL 0xA0
+
+#define SUBTYPE_MESSAGE 0xE0 //Message / URL Message / Request For Authorization / "Authorization" / System Request / "You Were Added" / Contacts List
+#define SUBTYPE_CHATREQUEST 0xE1
+#define SUBTYPE_FILEREQUEST 0xE2
+#define SUBTYPE_MYDETAILS 0xE4
+#define SUBTYPE_CONTACTINFO 0xE5
+#define SUBTYPE_REMINDER 0xE6
+#define SUBTYPE_ADDRESSBOOK 0xE7
+#define SUBTYPE_VOICEMSG 0xEC //???
+#define SUBTYPE_NOTE 0xEE
+#define SUBTYPE_EVENTFOLDER 0xEF
+#define SUBTYPE_SERVERLIST 0xF1 //and objectionable word list
+#define SUBTYPE_X1 0xF6 //(new to ICQ 99b???)
+
+#define FILING_RECEIVED 0x01
+#define FILING_DELETED 0x02
+#define FILING_MESSAGE 0x04
+#define MSGTYPE_MESSAGE 1
+#define MSGTYPE_URL 4
+#define MSGTYPE_CLIST 19
+#include <pshpack1.h>
+
+struct TIdxDatEntry {
+ DWORD status; //-2=valid, else is an index entry
+ DWORD entryId;
+ DWORD ofsNext,ofsPrev;
+ DWORD datOfs;
+};
+
+struct TIdxIndexEntry {
+ DWORD entryIdLow;
+ DWORD entryIdHigh;
+ DWORD ofsLower;
+ DWORD ofsInHere;
+ DWORD ofsHigher;
+};
+
+struct TDatEntryHeader {
+ DWORD entrySize; //in bytes
+ DWORD entryType; //DATENTRY_* constant
+ DWORD entryId; //same as in index
+ BYTE subType; //SUBTYPE_* constant
+ BYTE signature[15];
+};
+
+struct TDatEntryFooter {
+ DWORD unknown;
+ DWORD sent; //1 if sent, 0 if received
+ WORD separator;
+ DWORD timestamp; //unix time
+};
+
+struct TDatMessage {
+ struct TDatEntryHeader hdr; //hdr.entryType==DATENTRY_MESSAGE && hdr.subType==MSGTYPE_MESSAGE
+ WORD separator;
+ DWORD filingStatus; //FILING_* flags
+ WORD type; //MSGTYPE_* constant
+ DWORD uin;
+ WORD textLen;
+ char text[1]; //0xFE separates description & URL in URLs
+ //a struct TDatEntryFooter comes here
+};
+
+#include <poppack.h>
+
+#endif
diff --git a/plugins/Dbx_mmap_SA/Import_SA/miranda.c b/plugins/Dbx_mmap_SA/Import_SA/miranda.c
new file mode 100644
index 0000000000..6812557533
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Import_SA/miranda.c
@@ -0,0 +1,1502 @@
+/*
+
+Import plugin for Miranda IM
+
+Copyright (C) 2001-2005 Martin Öberg, Richard Hughes, Roland Rabien & Tristan Van de Vreede
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+// ==============
+// == INCLUDES ==
+// ==============
+
+#include "import.h"
+
+#include "mirandadb0700.h"
+
+// ======================
+// == GLOBAL FUNCTIONS ==
+// ======================
+
+HANDLE HContactFromNumericID(char* pszProtoName, char* pszSetting, DWORD dwID);
+HANDLE HContactFromID(char* pszProtoName, char* pszSetting, char* pszID);
+
+HANDLE AddContact(HWND hdlgProgress, char* pszProtoName, char* pszUniqueSetting, DBVARIANT* id, DBVARIANT* nick, DBVARIANT* group);
+
+BOOL IsProtocolLoaded(char* pszProtocolName);
+BOOL IsDuplicateEvent(HANDLE hContact, DBEVENTINFO dbei);
+
+INT_PTR CALLBACK ImportTypePageProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam);
+INT_PTR CALLBACK FinishedPageProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam);
+INT_PTR CALLBACK ProgressPageProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam);
+INT_PTR CALLBACK MirandaOptionsPageProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam);
+INT_PTR CALLBACK MirandaAdvOptionsPageProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam);
+
+// =====================
+// == LOCAL FUNCTIONS ==
+// =====================
+
+void MirandaImport(HWND hdlgProgress);
+int CheckFileFormat(HANDLE hFile);
+static HANDLE ImportContact(HANDLE hDbFile, struct DBContact Contact);
+static void ImportHistory(HANDLE hDbFile, struct DBContact Contact, PROTOCOLDESCRIPTOR **protocol, int protoCount);
+static int ImportGroups(HANDLE hDbFile, struct DBHeader *pdbHeader);
+
+#define NEWSTR_ALLOCA(A) (A==NULL)?NULL:strcpy((char*)alloca(strlen(A)+1),A)
+
+// Comment: The Find* functions only return a file offset.
+// The Get* functions actually reads the requested
+// data from the file and gives you a pointer to a structure
+// containing the data.
+
+DWORD FindFirstContact(struct DBHeader* pDbHeader);
+DWORD FindNextContact(struct DBContact* pDbContact);
+DWORD FindNextEvent(HANDLE hDbFile, DWORD dwOffset);
+DWORD FindOwnerContact(struct DBHeader* pDbHeader);
+
+int GetContactCount(struct DBHeader* pDbHeader);
+BOOL GetContact(HANDLE hDbFile, DWORD dwOffset, struct DBContact* pDbContact);
+BOOL GetSetting(HANDLE hDbFile, struct DBContact* pDbContact, char* pszModuleName, char* pszSettingName, DBVARIANT* pValue);
+char* GetNextSetting(char* pDbSetting);
+BOOL GetSettings(HANDLE hDbFile, DWORD dwOffset, struct DBContactSettings** pDbSettings);
+struct DBContactSettings* GetSettingsGroupByModuleName(HANDLE hdbFile, struct DBContact* pDbContact, char* pszName);
+DWORD GetBlobSize(struct DBContactSettings* pDbSettings);
+int GetSettingByName(struct DBContactSettings* pDbSettings, char* pszSettingName, DBVARIANT* pValue);
+int GetSettingValue(char* pBlob,DBVARIANT* pValue);
+
+BOOL GetEvent(HANDLE hDbFile, DWORD dwOffset, DBEVENTINFO* pDBEI);
+char* GetName(HANDLE hDbFile, DWORD dwOffset);
+
+
+// ======================
+// == GLOBAL VARIABLES ==
+// ======================
+
+extern void (*DoImport)(HWND);
+extern int nImportOption;
+extern int nCustomOptions;
+
+
+// =====================
+// == LOCAL VARIABLES ==
+// =====================
+
+TCHAR importFile[MAX_PATH];
+HWND hdlgProgress;
+DWORD dwFileSize;
+
+DWORD nDupes;
+DWORD nContactsCount;
+DWORD nMessagesCount;
+DWORD nGroupsCount;
+DWORD nSkippedEvents;
+DWORD nSkippedContacts;
+
+time_t dwSinceDate = 0;
+
+// =============
+// == DEFINES ==
+// =============
+
+#define EVENTTYPE_MESSAGE 0
+#define EVENTTYPE_URL 1
+#define EVENTTYPE_FILE 1002
+
+
+// Supported database versions
+#define DB_INVALID 0x00000000 // Unknown or corrupted DAT
+#define DB_000700 0x00000700 // Miranda 0.1.0.0 - 0.1.2.2+
+
+// DAT file signature
+struct DBSignature {
+ char name[15];
+ BYTE eof;
+};
+
+static struct DBSignature dbSignature={"Miranda ICQ DB",0x1A};
+
+// Unsane: Secured signature
+static struct DBSignature dbSignatureEncrypted={"Miranda ICQ SD",0x1A};
+
+// ====================
+// ====================
+// == IMPLEMENTATION ==
+// ====================
+// ====================
+
+static void SearchForLists(HWND hdlg, const TCHAR *mirandaPath, const TCHAR *mirandaProf, const TCHAR *pattern, const TCHAR *type)
+{
+ HANDLE hFind;
+ WIN32_FIND_DATA fd;
+ TCHAR szSearchPath[MAX_PATH];
+ TCHAR szRootName[MAX_PATH];
+ TCHAR* str2;
+ int i;
+
+ mir_sntprintf(szSearchPath, SIZEOF(szSearchPath), _T("%s\\%s"), mirandaPath, pattern);
+ hFind = FindFirstFile(szSearchPath, &fd);
+ if (hFind != INVALID_HANDLE_VALUE)
+ {
+ do
+ {
+ _tcscpy(szRootName, fd.cFileName);
+ str2 = _tcsrchr(szRootName, '.');
+ if (str2 != NULL) *str2 = 0;
+ if (mirandaProf == NULL || _tcsicmp(mirandaProf, szRootName))
+ {
+ _tcscat(szRootName, type);
+ i = SendDlgItemMessage(hdlg, IDC_LIST, LB_ADDSTRING, 0, (LPARAM)szRootName);
+ str2 = (TCHAR*)mir_alloc((_tcslen(mirandaPath) + 2 + _tcslen(fd.cFileName)) * sizeof(TCHAR));
+ wsprintf(str2, _T("%s\\%s"), mirandaPath, fd.cFileName);
+ SendDlgItemMessage(hdlg, IDC_LIST, LB_SETITEMDATA, i, (LPARAM)str2);
+ }
+ }
+ while( FindNextFile( hFind, &fd ));
+
+ FindClose( hFind );
+ }
+}
+
+INT_PTR CALLBACK MirandaPageProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam)
+{
+ switch(message) {
+ case WM_INITDIALOG:
+ TranslateDialogDefault(hdlg);
+ {
+ TCHAR *pfd, *pfd1, *pfd2, *pfn;
+
+ REPLACEVARSDATA dat = {0};
+ dat.cbSize = sizeof(dat);
+ dat.dwFlags = RVF_TCHAR;
+
+ pfd = (TCHAR*)CallService(MS_UTILS_REPLACEVARS, (WPARAM)_T("%miranda_path%\\Profiles"), (LPARAM)&dat);
+ pfd1 = (TCHAR*)CallService(MS_UTILS_REPLACEVARS, (WPARAM)_T("%miranda_path%"), (LPARAM)&dat);
+ pfd2 = (TCHAR*)CallService(MS_UTILS_REPLACEVARS, (WPARAM)_T("%miranda_profile%"), (LPARAM)&dat);
+ pfn = (TCHAR*)CallService(MS_UTILS_REPLACEVARS, (WPARAM)_T("%miranda_profilename%"), (LPARAM)&dat);
+
+ SearchForLists(hdlg, pfd2, pfn, _T("*.dat"), _T(" (Miranda IM v0.x)"));
+ // Unsane: check for exclude equal or used profiles
+ if (lstrcmpi(pfd1, pfd2))
+ SearchForLists(hdlg, pfd1, NULL, _T("*.dat"), _T(" (Miranda IM v0.x)"));
+ if (lstrcmpi(pfd, pfd2))
+ SearchForLists(hdlg, pfd, NULL, _T("*.dat"), _T(" (Miranda IM v0.x)"));
+
+ mir_free(pfn);
+ mir_free(pfd2);
+ mir_free(pfd1);
+ mir_free(pfd);
+ return TRUE;
+ }
+
+ case WM_COMMAND:
+ switch(LOWORD(wParam)) {
+ case IDC_BACK:
+ PostMessage(GetParent(hdlg),WIZM_GOTOPAGE,IDD_IMPORTTYPE,(LPARAM)ImportTypePageProc);
+ break;
+
+ case IDOK:
+ {
+ TCHAR filename[MAX_PATH];
+
+ GetDlgItemText(hdlg, IDC_FILENAME, filename, SIZEOF(filename));
+ if (_taccess(filename, 4)) {
+ MessageBox(hdlg, TranslateT("The given file does not exist. Please check that you have entered the name correctly."), TranslateT("Miranda Import"), MB_OK);
+ break;
+ }
+ lstrcpy(importFile, filename);
+ PostMessage(GetParent(hdlg),WIZM_GOTOPAGE,IDD_OPTIONS,(LPARAM)MirandaOptionsPageProc);
+ }
+ break;
+
+ case IDCANCEL:
+ PostMessage(GetParent(hdlg),WM_CLOSE,0,0);
+ break;
+
+ case IDC_LIST:
+ if(HIWORD(wParam)==LBN_SELCHANGE) {
+ int sel = SendDlgItemMessage(hdlg, IDC_LIST, LB_GETCURSEL, 0, 0);
+ if (sel == LB_ERR) break;
+ SetDlgItemText(hdlg, IDC_FILENAME, (TCHAR*)SendDlgItemMessage(hdlg, IDC_LIST, LB_GETITEMDATA, sel, 0));
+ }
+ break;
+
+ case IDC_OTHER:
+ {
+ OPENFILENAME ofn;
+ TCHAR str[MAX_PATH], text[256];
+ TCHAR *pfd;
+ int index;
+
+ pfd = Utils_ReplaceVarsT(_T("%miranda_profile%"));
+
+ // TranslateTS doesnt translate \0 separated strings
+ index = mir_sntprintf(text, 64, _T("%s (*.dat)"), TranslateT("Miranda IM database")) + 1;
+ _tcscpy(text + index, _T("*.dat")); index += 6;
+ index += mir_sntprintf(text + index, 64, _T("%s (*.*)"), TranslateT("All Files")) + 1;
+ _tcscpy(text + index, _T("*.*")); index += 4;
+ text[index] = 0;
+
+ GetDlgItemText(hdlg, IDC_FILENAME, str, SIZEOF(str));
+ ZeroMemory(&ofn, sizeof(ofn));
+ ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
+ ofn.hwndOwner = hdlg;
+ ofn.lpstrFilter = text;
+ ofn.lpstrDefExt = _T("dat");
+ ofn.lpstrFile = str;
+ ofn.Flags = OFN_FILEMUSTEXIST | OFN_EXPLORER | OFN_NOCHANGEDIR | OFN_DONTADDTORECENT;
+ ofn.nMaxFile = SIZEOF(str);
+ ofn.lpstrInitialDir = pfd;
+ if (GetOpenFileName(&ofn))
+ SetDlgItemText(hdlg,IDC_FILENAME,str);
+
+ mir_free(pfd);
+ break;
+ }
+ }
+ break;
+ case WM_DESTROY:
+ {
+ int i;
+
+ for(i=SendDlgItemMessage(hdlg,IDC_LIST,LB_GETCOUNT,0,0)-1;i>=0;i--)
+ mir_free((char*)SendDlgItemMessage(hdlg,IDC_LIST,LB_GETITEMDATA,i,0));
+ break;
+ } }
+
+ return FALSE;
+}
+
+
+INT_PTR CALLBACK MirandaOptionsPageProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam)
+{
+ switch(message) {
+ case WM_INITDIALOG:
+ TranslateDialogDefault(hdlg);
+ EnableWindow(GetDlgItem(hdlg,IDC_RADIO_ALL), TRUE);
+ EnableWindow(GetDlgItem(hdlg,IDC_STATIC_ALL), TRUE);
+ EnableWindow(GetDlgItem(hdlg,IDC_RADIO_CONTACTS), TRUE);
+ EnableWindow(GetDlgItem(hdlg,IDC_STATIC_CONTACTS), TRUE);
+ EnableWindow(GetDlgItem(hdlg,IDC_RADIO_CUSTOM), TRUE);
+ EnableWindow(GetDlgItem(hdlg,IDC_STATIC_CUSTOM), TRUE);
+ CheckDlgButton(hdlg,IDC_RADIO_ALL,BST_UNCHECKED);
+ return TRUE;
+
+ case WM_COMMAND:
+ switch(LOWORD(wParam)) {
+ case IDC_BACK:
+ PostMessage(GetParent(hdlg),WIZM_GOTOPAGE,IDD_MIRANDADB,(LPARAM)MirandaPageProc);
+ break;
+
+ case IDOK:
+ if(IsDlgButtonChecked(hdlg,IDC_RADIO_ALL)) {
+ nImportOption = IMPORT_ALL;
+ nCustomOptions = 0;//IOPT_MSGSENT|IOPT_MSGRECV|IOPT_URLSENT|IOPT_URLRECV;
+ DoImport = MirandaImport;
+ PostMessage(GetParent(hdlg),WIZM_GOTOPAGE,IDD_PROGRESS,(LPARAM)ProgressPageProc);
+ break;
+ }
+
+ if(IsDlgButtonChecked(hdlg,IDC_RADIO_CONTACTS)) {
+ nImportOption = IMPORT_CONTACTS;
+ nCustomOptions = 0;
+ DoImport = MirandaImport;
+ PostMessage(GetParent(hdlg),WIZM_GOTOPAGE,IDD_PROGRESS,(LPARAM)ProgressPageProc);
+ break;
+ }
+
+ if(IsDlgButtonChecked(hdlg,IDC_RADIO_CUSTOM)) {
+ PostMessage(GetParent(hdlg),WIZM_GOTOPAGE,IDD_ADVOPTIONS,(LPARAM)MirandaAdvOptionsPageProc);
+ break;
+ }
+ break;
+
+ case IDCANCEL:
+ PostMessage(GetParent(hdlg), WM_CLOSE, 0, 0);
+ break;
+ }
+ break;
+ }
+ return FALSE;
+}
+
+static const UINT InControls[]={IDC_IN_MSG,IDC_IN_URL,IDC_IN_FT,IDC_IN_OTHER};
+static const UINT OutControls[]={IDC_OUT_MSG,IDC_OUT_URL,IDC_OUT_FT,IDC_OUT_OTHER};
+static const UINT SysControls[]={IDC_CONTACTS, IDC_SYSTEM};
+
+INT_PTR CALLBACK MirandaAdvOptionsPageProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam)
+{
+ switch(message) {
+ case WM_INITDIALOG:
+ TranslateDialogDefault(hdlg);
+ {
+ struct tm *TM = NULL;
+ struct _SYSTEMTIME ST = {0};
+
+ dwSinceDate = DBGetContactSettingDword(NULL,IMPORT_MODULE,"ImportSinceTS",time(NULL));
+
+ TM = localtime(&dwSinceDate);
+
+ ST.wYear = TM->tm_year + 1900;
+ ST.wMonth = TM->tm_mon + 1;
+ ST.wDay = TM->tm_mday;
+
+ DateTime_SetSystemtime(GetDlgItem(hdlg,IDC_DATETIMEPICKER),GDT_VALID,&ST);
+ }
+ return TRUE;
+
+ case WM_COMMAND:
+ switch(LOWORD(wParam)) {
+ case IDC_BACK:
+ PostMessage(GetParent(hdlg),WIZM_GOTOPAGE,IDD_OPTIONS,(LPARAM)MirandaOptionsPageProc);
+ break;
+
+ case IDOK:
+ DoImport = MirandaImport;
+ nImportOption = IMPORT_CUSTOM;
+ nCustomOptions = 0;
+
+ if (IsDlgButtonChecked(hdlg,IDC_CONTACTS))
+ nCustomOptions |= IOPT_CONTACTS | IOPT_GROUPS;
+ if (IsDlgButtonChecked(hdlg,IDC_SYSTEM))
+ nCustomOptions |= IOPT_SYSTEM;
+
+ // incoming
+ if (IsDlgButtonChecked(hdlg,IDC_IN_MSG))
+ nCustomOptions |= IOPT_MSGRECV;
+ if (IsDlgButtonChecked(hdlg,IDC_IN_URL))
+ nCustomOptions |= IOPT_URLRECV;
+ if (IsDlgButtonChecked(hdlg,IDC_IN_FT))
+ nCustomOptions |= IOPT_FILERECV;
+ if (IsDlgButtonChecked(hdlg,IDC_IN_OTHER))
+ nCustomOptions |= IOPT_OTHERRECV;
+
+ // outgoing
+ if (IsDlgButtonChecked(hdlg,IDC_OUT_MSG))
+ nCustomOptions |= IOPT_MSGSENT;
+ if (IsDlgButtonChecked(hdlg,IDC_OUT_URL))
+ nCustomOptions |= IOPT_URLSENT;
+ if (IsDlgButtonChecked(hdlg,IDC_OUT_FT))
+ nCustomOptions |= IOPT_FILESENT;
+ if (IsDlgButtonChecked(hdlg,IDC_OUT_OTHER))
+ nCustomOptions |= IOPT_OTHERSENT;
+
+ // since date
+ dwSinceDate = 0;
+
+ if ( IsDlgButtonChecked( hdlg, IDC_SINCE )) {
+ struct _SYSTEMTIME ST = {0};
+
+ if (DateTime_GetSystemtime(GetDlgItem(hdlg,IDC_DATETIMEPICKER), &ST) == GDT_VALID) {
+ struct tm TM = {0};
+
+ TM.tm_mday = ST.wDay;
+ TM.tm_mon = ST.wMonth - 1;
+ TM.tm_year = ST.wYear - 1900;
+
+ dwSinceDate = mktime(&TM);
+
+ DBWriteContactSettingDword(NULL,IMPORT_MODULE,"ImportSinceTS",dwSinceDate);
+ } }
+
+ if (nCustomOptions)
+ PostMessage(GetParent(hdlg),WIZM_GOTOPAGE,IDD_PROGRESS,(LPARAM)ProgressPageProc);
+ break;
+
+ case IDCANCEL:
+ PostMessage(GetParent(hdlg), WM_CLOSE, 0, 0);
+ break;
+
+ case IDC_SINCE:
+ EnableWindow(GetDlgItem(hdlg, IDC_DATETIMEPICKER), IsDlgButtonChecked(hdlg, IDC_SINCE));
+ break;
+
+ if (HIWORD(wParam) != STN_CLICKED)
+ break;
+
+ case IDC_ALL:
+ case IDC_INCOMING:
+ case IDC_OUTGOING:
+ {
+ int i;
+
+ if (LOWORD(wParam) == IDC_ALL)
+ for (i = 0; i < sizeof(SysControls)/sizeof(SysControls[0]); i++)
+ CheckDlgButton(hdlg,SysControls[i], !IsDlgButtonChecked(hdlg,SysControls[i]));
+
+ if (LOWORD(wParam) != IDC_OUTGOING)
+ for (i = 0; i < sizeof(InControls)/sizeof(InControls[0]); i++)
+ CheckDlgButton(hdlg,InControls[i], !IsDlgButtonChecked(hdlg,InControls[i]));
+
+ if (LOWORD(wParam) != IDC_INCOMING)
+ for (i = 0; i < sizeof(OutControls)/sizeof(OutControls[0]); i++)
+ CheckDlgButton(hdlg,OutControls[i], !IsDlgButtonChecked(hdlg,OutControls[i]));
+ }
+ break;
+
+ case IDC_MSG:
+ CheckDlgButton(hdlg,IDC_IN_MSG, !IsDlgButtonChecked(hdlg,IDC_IN_MSG));
+ CheckDlgButton(hdlg,IDC_OUT_MSG, !IsDlgButtonChecked(hdlg,IDC_OUT_MSG));
+ break;
+
+ case IDC_URL:
+ CheckDlgButton(hdlg,IDC_IN_URL, !IsDlgButtonChecked(hdlg,IDC_IN_URL));
+ CheckDlgButton(hdlg,IDC_OUT_URL, !IsDlgButtonChecked(hdlg,IDC_OUT_URL));
+ break;
+
+ case IDC_FT:
+ CheckDlgButton(hdlg,IDC_IN_FT, !IsDlgButtonChecked(hdlg,IDC_IN_FT));
+ CheckDlgButton(hdlg,IDC_OUT_FT, !IsDlgButtonChecked(hdlg,IDC_OUT_FT));
+ break;
+
+ case IDC_OTHER:
+ CheckDlgButton(hdlg,IDC_IN_OTHER, !IsDlgButtonChecked(hdlg,IDC_IN_OTHER));
+ CheckDlgButton(hdlg,IDC_OUT_OTHER, !IsDlgButtonChecked(hdlg,IDC_OUT_OTHER));
+ break;
+ }
+ break;
+ }
+ return FALSE;
+}
+
+#ifndef INVALID_SET_FILE_POINTER
+#define INVALID_SET_FILE_POINTER ((DWORD)-1)
+#endif
+
+// Read header from file, returns null on failure
+struct DBHeader* GetHeader(HANDLE hDbFile)
+{
+ struct DBHeader* pdbHeader;
+ DWORD dwBytesRead;
+
+ if (( pdbHeader = calloc(1, sizeof(struct DBHeader))) == NULL )
+ return NULL;
+
+ // Goto start of file
+ if (SetFilePointer(hDbFile, 0, NULL, FILE_BEGIN) == INVALID_SET_FILE_POINTER)
+ return FALSE;
+
+ // Read header
+ if ( !ReadFile(hDbFile, pdbHeader, sizeof(struct DBHeader), &dwBytesRead, NULL ) ||
+ dwBytesRead != sizeof(struct DBHeader))
+ return NULL;
+
+ // Return pointer to header
+ return pdbHeader;
+}
+
+// Unsane: database crypted status
+BOOL bEncrypted;
+// Unsane: crypted database work fuction
+int CheckPassword(WORD version, WORD cryptorUID, TCHAR * szDBName);
+void InitSecurity();
+
+int CheckFileFormat(HANDLE hDbFile)
+{
+ struct DBHeader* pdbHeader;
+ TCHAR* tszDbName;
+
+ // Read header
+ if (( pdbHeader = GetHeader(hDbFile)) == NULL )
+ return DB_INVALID;
+
+ // Check header signature
+ bEncrypted = FALSE;
+ if (memcmp(pdbHeader->signature, &dbSignature, sizeof(pdbHeader->signature))) {
+ // Unsane: if not encrypted signature
+ if (memcmp(pdbHeader->signature, &dbSignatureEncrypted, sizeof(pdbHeader->signature))){
+ AddMessage( LPGEN("Signature mismatch" ));
+ return DB_INVALID;
+ }
+ AddMessage(LPGEN("Database is Secured MMAP database"));
+ // Unsane: check password
+ InitSecurity();
+ tszDbName = _tcsrchr(importFile, _T('\\')) + 1;
+ if (CheckPassword(pdbHeader->checkWord, pdbHeader->cryptorUID, tszDbName)){
+ AddMessage(LPGEN("Secured MMAP: authorization successful"));
+ bEncrypted = TRUE;
+ }
+ else
+ {
+ AddMessage(LPGEN("You are not authorized for access to Database"));
+ return DB_INVALID;
+ }
+ }
+
+ // Determine Miranda version
+ switch (pdbHeader->checkWord) {
+ case DB_000700:
+ AddMessage( LPGEN("This looks like a Miranda database, version 0.1.0.0 or above." ));
+ free(pdbHeader);
+ return DB_000700;
+
+ default:
+ if (!bEncrypted){
+ AddMessage( LPGEN("Version mismatch" ));
+ free(pdbHeader);
+ return DB_INVALID;
+ }
+ break;
+} }
+
+// High level Miranda DB access functions
+// Returns true if pValue points to the requested value
+
+BOOL GetSetting(HANDLE hDbFile, struct DBContact* pDbContact, char* pszModuleName, char* pszSettingName, DBVARIANT* pValue)
+{
+ struct DBContactSettings* pDbSettings;
+ if ( pDbSettings = GetSettingsGroupByModuleName(hDbFile, pDbContact, pszModuleName)) {
+ if ( GetSettingByName( pDbSettings, pszSettingName, pValue )) {
+ free(pDbSettings);
+ return TRUE;
+ }
+ #ifdef _LOGGING
+ AddMessage( LPGEN("Failed to find setting %s" ), pszSettingName );
+ #endif
+ free(pDbSettings);
+ }
+#ifdef _LOGGING
+ else AddMessage( LPGEN("Failed to find module %s" ), pszModuleName );
+#endif
+
+ // Search failed
+ pValue->type = 0;
+ return FALSE;
+}
+
+// **
+// ** CONTACT CHAIN
+// **
+
+// Return offset to first contact
+DWORD FindFirstContact(struct DBHeader* pDbHeader)
+{
+ if (!pDbHeader)
+ return 0;
+
+ return pDbHeader->ofsFirstContact;
+}
+
+DWORD FindOwnerContact(struct DBHeader* pDbHeader)
+{
+ if (!pDbHeader)
+ return 0;
+
+ return pDbHeader->ofsUser;
+}
+
+// Return offset to next contact
+DWORD FindNextContact(struct DBContact* pDbContact)
+{
+ if (!pDbContact)
+ return 0;
+
+ if (pDbContact->signature != DBCONTACT_SIGNATURE)
+ return 0;
+
+ return pDbContact->ofsNext;
+}
+
+
+// Read the contact at offset 'dwOffset'
+// Returns true if successful and pDbContact points to the contact struct
+// pDbContact must point to allocated struct
+BOOL GetContact(HANDLE hDbFile, DWORD dwOffset, struct DBContact* pDbContact)
+{
+ DWORD dwBytesRead;
+
+ // Early reject
+ if (dwOffset == 0 || dwOffset >= dwFileSize)
+ return FALSE;
+
+ // ** Read and verify the struct
+
+ if (SetFilePointer(hDbFile, (LONG)dwOffset, NULL, FILE_BEGIN) == INVALID_SET_FILE_POINTER)
+ return FALSE;
+
+ if ((!ReadFile(hDbFile, pDbContact, sizeof(struct DBContact), &dwBytesRead, NULL)) ||
+ (dwBytesRead != sizeof(struct DBContact)))
+ return FALSE;
+
+ if ((pDbContact->signature != DBCONTACT_SIGNATURE) ||
+ (pDbContact->ofsNext >= dwFileSize))
+ return FALSE; // Contact corrupted
+
+ return TRUE;
+}
+
+// Return ptr to next setting in settings struct
+char* GetNextSetting(char* pDbSetting)
+{
+ // Get next setting
+ pDbSetting = pDbSetting + *pDbSetting+1; // Skip name
+ switch( *(BYTE*)pDbSetting ) {
+ case DBVT_BYTE:
+ pDbSetting = pDbSetting+1+1;
+ break;
+
+ case DBVT_WORD:
+ pDbSetting = pDbSetting+1+2;
+ break;
+
+ case DBVT_DWORD:
+ pDbSetting = pDbSetting+1+4;
+ break;
+
+ case DBVT_ASCIIZ:
+ case DBVT_UTF8:
+ case DBVT_BLOB:
+ case DBVTF_VARIABLELENGTH:
+ pDbSetting = pDbSetting + 3 + *(WORD*)(pDbSetting+1);
+ break;
+
+ case DBVT_DELETED:
+ AddMessage( LPGEN("DEBUG: Deleted setting treated as 0-length setting"));
+ pDbSetting = pDbSetting+1;
+ break;
+
+ default:
+ // Unknown datatype assert
+ AddMessage( LPGEN("ERROR: Faulty settings chain"));
+ return NULL;
+ }
+
+ return pDbSetting;
+}
+
+
+// **
+// ** SETTINGS CHAIN
+// **
+
+// Return the settings at offset 'dwOffset'
+BOOL GetSettingsGroup(HANDLE hDbFile, DWORD dwOffset, struct DBContactSettings** pDbSettings)
+{
+ DWORD dwBytesRead, dwBlobSize, dwHead;
+ struct DBContactSettings pSettings;
+
+ // Early reject
+ if (dwOffset == 0 || dwOffset >= dwFileSize)
+ return FALSE;
+
+ // ** Read and verify the struct
+ if (SetFilePointer(hDbFile, dwOffset, NULL, FILE_BEGIN) == INVALID_SET_FILE_POINTER)
+ return FALSE;
+
+ dwHead = offsetof(struct DBContactSettings, blob);
+ if ((!ReadFile(hDbFile, &pSettings, dwHead, &dwBytesRead, NULL)) ||
+ (dwBytesRead != dwHead))
+ return FALSE;
+
+ if (pSettings.signature != DBCONTACTSETTINGS_SIGNATURE)
+ return FALSE; // Setttings corrupted
+
+ // ** Read the struct and the following blob
+ dwBlobSize = pSettings.cbBlob;
+ if (!(*pDbSettings = calloc(1, sizeof(struct DBContactSettings) + dwBlobSize)))
+ return FALSE;
+
+ memcpy(*pDbSettings, &pSettings, dwHead );
+
+ if ((!ReadFile(hDbFile, (*pDbSettings)->blob, sizeof(struct DBContactSettings) - dwHead + dwBlobSize, &dwBytesRead, NULL)) ||
+ (dwBytesRead != sizeof(struct DBContactSettings) - dwHead + dwBlobSize))
+ {
+ free(*pDbSettings);
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+// pDbContact is a ptr to a struct DBContact
+// Returns pointer to a struct DBContactSettings or NULL
+struct DBContactSettings* GetSettingsGroupByModuleName(HANDLE hDbFile, struct DBContact* pDbContact, char* pszName)
+{
+ char* pszGroupName;
+ struct DBContactSettings* pSettingsGroup;
+ DWORD dwGroupOfs;
+
+ // Get ptr to first settings group
+ if (!(dwGroupOfs = pDbContact->ofsFirstSettings))
+ return NULL; // No settings exists in this contact
+
+ // Loop over all settings groups
+ while (dwGroupOfs && dwGroupOfs < dwFileSize) {
+ pSettingsGroup = NULL;
+
+ // Read and verify the struct
+ if (!GetSettingsGroup(hDbFile, dwGroupOfs, &pSettingsGroup))
+ return NULL; // Bad struct
+
+ // Struct OK, now get the name
+ if ((pszGroupName = GetName(hDbFile, pSettingsGroup->ofsModuleName))) {
+
+ // Is it the right one?
+ if (strcmp(pszGroupName, pszName) == 0) {
+ #ifdef _LOGGING
+ AddMessage( LPGEN("Found module: %s"), pszGroupName );
+ #endif
+ return pSettingsGroup;
+ }
+ #ifdef _LOGGING
+ else AddMessage( LPGEN("Ignoring module: %s"), pszGroupName );
+ #endif
+ }
+ else AddMessage( LPGEN("Warning: Found module with no name"));
+
+ dwGroupOfs = pSettingsGroup->ofsNext;
+
+ if (pSettingsGroup)
+ free(pSettingsGroup);
+ }
+
+ // Search failed
+ return NULL;
+}
+
+// pDbSettings must point to a complete DBContactSettings struct in memory
+int GetSettingByName(struct DBContactSettings* pDbSettings, char* pszSettingName, DBVARIANT* dbv)
+{
+ char pszName[256];
+ // We need at least one setting to start with
+ char* pDbSetting = pDbSettings->blob;
+ if ( !pDbSetting )
+ return FALSE;
+
+ // ** pDbSettings now points to the first setting in this module
+
+ // Loop over all settings
+ while (pDbSetting && *pDbSetting) {
+ memcpy(pszName, pDbSetting+1, *pDbSetting);
+ pszName[*pDbSetting] = 0;
+
+ // Is this the right one?
+ if (strcmp(pszSettingName, pszName) == 0) {
+ return GetSettingValue(pDbSetting, dbv);
+ }
+
+ #ifdef _LOGGING
+ AddMessage( LPGEN("Ignoring setting: %s"), pszName );
+ #endif
+ pDbSetting = GetNextSetting(pDbSetting);
+ }
+
+ // Search failed
+ return FALSE;
+}
+
+// dwSettingpointer points to a valid DBSettings struct
+int GetSettingValue(char* pBlob, DBVARIANT* dbv)
+{
+ #ifdef _LOGGING
+ {
+ char* pszName = calloc((*pBlob)+1, 1);
+ memcpy(pszName, pBlob+1, *pBlob);
+ AddMessage( LPGEN("Getting type %u value for setting: %s"), (BYTE)*(pBlob+(*pBlob)+1), pszName );
+ free(pszName);
+ }
+ #endif
+
+ // Skip name
+ pBlob = pBlob + (*pBlob)+1;
+ dbv->type = ( BYTE )*pBlob++;
+
+ // Check what type it is
+ switch( dbv->type ) {
+ case DBVT_BYTE:
+ dbv->bVal = *pBlob;
+ return TRUE;
+
+ case DBVT_WORD:
+ // Unsane: encrypt WORDs
+ if (bEncrypted)
+ DecodeMemory(pBlob, sizeof(pBlob));
+ dbv->wVal = *(WORD*)pBlob;
+ return TRUE;
+
+ case DBVT_DWORD:
+ // Unsane: encrypt DWORDs
+ if (bEncrypted)
+ DecodeMemory(pBlob, sizeof(pBlob));
+ dbv->dVal = *(DWORD*)pBlob;
+ return TRUE;
+
+ case DBVT_ASCIIZ:
+ case DBVT_UTF8:
+ // Unsane: encrypt STRINGs
+ dbv->cchVal = *(WORD*)pBlob;
+ dbv->pszVal = calloc( dbv->cchVal+1, sizeof( char ));
+ if (bEncrypted)
+ DecodeCopyMemory(dbv->pszVal, pBlob+2, dbv->cchVal);
+ else
+ memcpy( dbv->pszVal, pBlob+2, dbv->cchVal );
+ dbv->pszVal[ dbv->cchVal ] = 0;
+
+ return TRUE;
+
+ case DBVTF_VARIABLELENGTH:
+ case DBVT_BLOB:
+ dbv->cpbVal = *(WORD*)pBlob;
+ dbv->pbVal = calloc( dbv->cpbVal+1, sizeof( char ));
+ // Unsane: encrypt other
+ if (bEncrypted)
+ DecodeCopyMemory(dbv->pszVal, pBlob+2, dbv->cchVal);
+ else
+ memcpy( dbv->pbVal, pBlob+2, dbv->cpbVal );
+ dbv->pbVal[ dbv->cpbVal ] = 0;
+ return TRUE;
+
+ case DBVT_DELETED:
+ AddMessage( LPGEN("DEBUG: Deleted setting treated as 0-length setting"));
+
+ default:
+ dbv->type = DBVT_DELETED;
+ }
+
+ return FALSE;
+}
+
+void FreeVariant( DBVARIANT* dbv )
+{
+ switch( dbv->type ) {
+ case DBVT_ASCIIZ:
+ case DBVT_UTF8:
+ if ( dbv->pszVal )
+ free( dbv->pszVal );
+ break;
+
+ case DBVTF_VARIABLELENGTH:
+ case DBVT_BLOB:
+ if ( dbv->pbVal )
+ free( dbv->pbVal );
+ break;
+ }
+
+ dbv->type = 0;
+}
+
+void WriteVariant( HANDLE hContact, const char* module, const char* var, DBVARIANT* dbv )
+{
+ DBCONTACTWRITESETTING dbw;
+ dbw.szModule = module;
+ dbw.szSetting = var;
+ dbw.value = *dbv;
+ CallService( MS_DB_CONTACT_WRITESETTING, (WPARAM)hContact, (LPARAM)&dbw );
+}
+
+// Returns true if pDBEI has been filled in with nice values
+// Don't forget to free those pointers!
+BOOL GetEvent(HANDLE hDbFile, DWORD dwOffset, DBEVENTINFO* pDBEI)
+{
+ DWORD dwBytesRead;
+ struct DBEvent pEvent;
+ static char pBlob[65536];
+
+ // Early reject
+ if (dwOffset == 0 || dwOffset >= dwFileSize)
+ return FALSE;
+
+ // ** Read and verify the struct
+ if (SetFilePointer(hDbFile, dwOffset, NULL, FILE_BEGIN) == INVALID_SET_FILE_POINTER)
+ return FALSE;
+
+ if (!ReadFile(hDbFile, &pEvent, offsetof(struct DBEvent, blob), &dwBytesRead, NULL) ||
+ (dwBytesRead != offsetof(struct DBEvent, blob)))
+ return FALSE;
+
+ if (pEvent.signature != DBEVENT_SIGNATURE)
+ return FALSE; // Event corrupted
+
+ // ** Read the blob
+ if ((!ReadFile(hDbFile, pBlob, pEvent.cbBlob, &dwBytesRead, NULL)) ||
+ (dwBytesRead != pEvent.cbBlob))
+ {
+ return FALSE;
+ }
+
+ // ** Copy the static part to the event info struct
+ pDBEI->timestamp = pEvent.timestamp;
+ pDBEI->eventType = pEvent.eventType;
+ pDBEI->cbSize = sizeof(DBEVENTINFO);
+ pDBEI->cbBlob = pEvent.cbBlob;
+ pDBEI->pBlob = pBlob;
+ pDBEI->flags = (pEvent.flags & ~(DBEF_SENT+DBEF_READ)) +
+ ((pEvent.flags & DBEF_SENT) ? DBEF_SENT : DBEF_READ ); // Imported events are always marked READ
+
+ if (!(pDBEI->szModule = GetName(hDbFile, pEvent.ofsModuleName))) {
+ return FALSE;
+ }
+
+ // Unsane: encrypt dbevent
+ if (bEncrypted)
+ DecodeMemory(pDBEI->pBlob, pDBEI->cbBlob);
+
+ return TRUE;
+}
+
+// Returns a pointer to a string with the name
+// from a DBModuleName struct if given a file offset
+// Returns NULL on failure
+char* GetName(HANDLE hDbFile, DWORD dwOffset)
+{
+ static DWORD dwLastOffset = 0;
+ static HANDLE hLastDbFile = NULL;
+ static char szName[256] = {0};
+
+ DWORD dwBytesRead;
+ struct DBModuleName pModule;
+
+ // Early reject
+ if (dwOffset == 0 || dwOffset >= dwFileSize)
+ return FALSE;
+
+ // Quick lookup
+ if (dwOffset == dwLastOffset && hDbFile == hLastDbFile)
+ return szName;
+
+ // ** Read and verify the name struct
+ if (SetFilePointer(hDbFile, dwOffset, NULL, FILE_BEGIN) == INVALID_SET_FILE_POINTER)
+ return NULL;
+
+ if ((!ReadFile(hDbFile, &pModule, offsetof(struct DBModuleName, name), &dwBytesRead, NULL)) ||
+ (dwBytesRead != offsetof(struct DBModuleName, name)))
+ return NULL;
+
+ if (pModule.signature != DBMODULENAME_SIGNATURE) {
+ AddMessage( LPGEN("Modulename corrupted"));
+ return NULL; // ModuleName corrupted
+ }
+
+ // ** Name struct OK, now read name into string buffer
+ if ((!ReadFile(hDbFile, szName, pModule.cbName, &dwBytesRead, NULL)) || (dwBytesRead != pModule.cbName)) {
+ return NULL;
+ }
+
+ // terminate string
+ szName[pModule.cbName] = 0;
+
+ // update last offset
+ dwLastOffset = dwOffset;
+ hLastDbFile = hDbFile;
+
+ return szName;
+}
+
+DWORD FindNextEvent(HANDLE hDbFile, DWORD dwOffset)
+{
+ DWORD dwBytesRead;
+ struct DBEvent pEvent;
+
+ // Early reject
+ if (dwOffset == 0 || dwOffset >= dwFileSize)
+ return FALSE;
+
+ // ** Read and verify the struct
+ if (SetFilePointer(hDbFile, dwOffset, NULL, FILE_BEGIN) == INVALID_SET_FILE_POINTER)
+ return FALSE;
+
+ if ((!ReadFile(hDbFile, &pEvent, sizeof(struct DBEvent), &dwBytesRead, NULL)) ||
+ (dwBytesRead != sizeof(struct DBEvent)))
+ return FALSE;
+
+ if ( pEvent.signature != DBEVENT_SIGNATURE || pEvent.ofsNext > dwFileSize )
+ return FALSE; // Event corrupted
+
+ return pEvent.ofsNext;
+}
+
+int ImportGroups(HANDLE hDbFile, struct DBHeader* pdbHeader)
+{
+ struct DBContactSettings* pDbSettings;
+ struct DBContact DbContact;
+ char* pSetting;
+ DWORD dwOffset;
+ int nGroups = 0;
+
+ // Find owner data
+ dwOffset = pdbHeader->ofsUser;
+ if (!GetContact(hDbFile, dwOffset, &DbContact)) {
+ AddMessage( LPGEN("No owner found."));
+ return -1;
+ }
+
+ // Find the module with the groups, and import them all
+ if ( pDbSettings = GetSettingsGroupByModuleName( hDbFile, &DbContact, "CListGroups" )) {
+ /*if (bEncrypted)
+ DecodeMemory(pDbSettings->blob, pDbSettings->cbBlob);*/
+ pSetting = pDbSettings->blob;
+ while ( pSetting && *pSetting ) {
+ DBVARIANT dbv;
+ if ( GetSettingValue( pSetting, &dbv )) {
+ if ( CreateGroup( dbv.type, dbv.pszVal+1, NULL ))
+ nGroups++;
+ FreeVariant( &dbv );
+ }
+ pSetting = GetNextSetting(pSetting);
+ }
+ free(pDbSettings);
+
+ /*if (bEncrypted)
+ EncodeMemory(pDbSettings->blob, pDbSettings->cbBlob);*/
+ }
+
+ return nGroups;
+}
+
+HANDLE ImportContact(HANDLE hDbFile, struct DBContact Contact)
+{
+ HANDLE hContact;
+ DBVARIANT group, nick, dbv;
+ char* pszProtoName;
+ char* pszUniqueSetting;
+ char* pszUserName;
+ char id[ 40 ];
+
+ // Check what protocol this contact belongs to
+ if ( !GetSetting( hDbFile, &Contact, "Protocol", "p", &dbv )) {
+ AddMessage( LPGEN("Skipping contact with no protocol"));
+ return INVALID_HANDLE_VALUE;
+ }
+
+ pszProtoName = NEWSTR_ALLOCA( dbv.pszVal );
+ FreeVariant( &dbv );
+
+ if ( !IsProtocolLoaded( pszProtoName )) {
+ AddMessage( LPGEN("Skipping contact, %s not installed."), pszProtoName );
+ return INVALID_HANDLE_VALUE;
+ }
+
+ // Skip protocols with no unique id setting (some non IM protocols return NULL)
+ pszUniqueSetting = (char*)CallProtoService(pszProtoName, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
+ if ( !pszUniqueSetting || (INT_PTR)pszUniqueSetting == CALLSERVICE_NOTFOUND ) {
+ AddMessage( LPGEN("Skipping non-IM contact (%s)"), pszProtoName );
+ return INVALID_HANDLE_VALUE;
+ }
+
+ if ( !GetSetting(hDbFile, &Contact, pszProtoName, pszUniqueSetting, &dbv )) {
+ AddMessage( LPGEN("Skipping %s contact, ID not found"), pszProtoName );
+ return INVALID_HANDLE_VALUE;
+ }
+
+ // Does the contact already exist?
+ if ( dbv.type == DBVT_DWORD ) {
+ pszUserName = _ltoa( dbv.dVal, id, 10 );
+ hContact = HContactFromNumericID( pszProtoName, pszUniqueSetting, dbv.dVal );
+ }
+ else {
+ pszUserName = NEWSTR_ALLOCA( dbv.pszVal );
+ hContact = HContactFromID( pszProtoName, pszUniqueSetting, dbv.pszVal );
+ }
+
+ if ( hContact != INVALID_HANDLE_VALUE ) {
+ AddMessage( LPGEN("Skipping duplicate %s contact %s"), pszProtoName, pszUserName );
+ FreeVariant( &dbv );
+ return INVALID_HANDLE_VALUE;
+ }
+ // No, add contact and copy some important settings
+ GetSetting(hDbFile, &Contact, "CList", "Group", &group);
+
+ if ( !GetSetting( hDbFile, &Contact, "CList", "MyHandle", &nick ))
+ GetSetting(hDbFile, &Contact, pszProtoName, "Nick", &nick );
+
+ hContact = AddContact( hdlgProgress, pszProtoName, pszUniqueSetting, &dbv, &nick, &group );
+
+ if ( hContact != INVALID_HANDLE_VALUE) {
+
+ // Hidden?
+ if ( GetSetting( hDbFile, &Contact, "CList", "Hidden", &dbv )) {
+ WriteVariant( hContact, "CList", "Hidden", &dbv );
+ FreeVariant( &dbv );
+ }
+ // Ignore settings
+ if ( GetSetting( hDbFile, &Contact, "Ignore", "Mask1", &dbv )) {
+ WriteVariant( hContact, "Ignore", "Mask1", &dbv );
+ FreeVariant( &dbv );
+ }
+
+ // Apparent mode
+ if ( GetSetting( hDbFile, &Contact, pszProtoName, "ApparentMode", &dbv )) {
+ WriteVariant( hContact, pszProtoName, "ApparentMode", &dbv );
+ FreeVariant( &dbv );
+ }
+
+ // Nick
+ if ( GetSetting( hDbFile, &Contact, pszProtoName, "Nick", &dbv )) {
+ WriteVariant( hContact, pszProtoName, "Nick", &dbv );
+ FreeVariant( &dbv );
+ }
+
+ // Myhandle
+ if ( GetSetting( hDbFile, &Contact, pszProtoName, "MyHandle", &dbv )) {
+ WriteVariant( hContact, pszProtoName, "MyHandle", &dbv );
+ FreeVariant( &dbv );
+ }
+
+ // First name
+ if ( GetSetting( hDbFile, &Contact, pszProtoName, "FirstName", &dbv )) {
+ WriteVariant( hContact, pszProtoName, "FirstName", &dbv );
+ FreeVariant( &dbv );
+ }
+
+ // Last name
+ if ( GetSetting( hDbFile, &Contact, pszProtoName, "LastName", &dbv )) {
+ WriteVariant( hContact, pszProtoName, "LastName", &dbv );
+ FreeVariant( &dbv );
+ }
+
+ // About
+ if ( GetSetting( hDbFile, &Contact, pszProtoName, "About", &dbv )) {
+ WriteVariant( hContact, pszProtoName, "About", &dbv );
+ FreeVariant( &dbv );
+ }
+ }
+ else AddMessage( LPGEN("Unknown error while adding %s contact %s"), pszProtoName, pszUserName );
+
+ return hContact;
+}
+
+// This function should always be called after contact import. That is
+// why there are no messages for errors related to contacts. Those
+// would only be a repetition of the messages printed during contact
+// import.
+
+static void ImportHistory(HANDLE hDbFile, struct DBContact Contact, PROTOCOLDESCRIPTOR **protocol, int protoCount)
+{
+ HANDLE hContact = INVALID_HANDLE_VALUE;
+ DWORD dwOffset;
+ MSG msg;
+ DBVARIANT proto;
+ int i, skipAll, bIsVoidContact;
+
+ // Is it contats history import?
+ if ( protoCount == 0 ) {
+
+ // Check what protocol this contact belongs to
+ if ( GetSetting( hDbFile, &Contact, "Protocol", "p", &proto )) {
+
+ // Protocol installed?
+ if ( IsProtocolLoaded( proto.pszVal )) {
+ // Is contact in database?
+ char* pszUniqueSetting = (char*)CallProtoService( proto.pszVal, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
+
+ // Skip protocols with no unique id setting (some non IM protocols return NULL)
+ if ( pszUniqueSetting && ( INT_PTR )pszUniqueSetting != CALLSERVICE_NOTFOUND ) {
+ DBVARIANT dbv;
+ if ( GetSetting( hDbFile, &Contact, proto.pszVal, pszUniqueSetting, &dbv )) {
+ if ( dbv.type == DBVT_DWORD )
+ hContact = HContactFromNumericID( proto.pszVal, pszUniqueSetting, dbv.dVal );
+ else
+ hContact = HContactFromID( proto.pszVal, pszUniqueSetting, dbv.pszVal );
+ FreeVariant( &dbv );
+ } } }
+ FreeVariant( &proto );
+ }
+ }
+ else hContact = NULL; //system history import
+
+ // OK to import this chain?
+ if (hContact == INVALID_HANDLE_VALUE) {
+ nSkippedContacts++;
+ return;
+ }
+
+ i = skipAll = 0;
+ bIsVoidContact = CallService( MS_DB_EVENT_GETCOUNT, ( WPARAM )hContact, 0 ) == 0;
+
+ // Get the start of the event chain
+ dwOffset = Contact.ofsFirstEvent;
+ while (dwOffset) {
+ int skip = 0;
+
+ // Copy the event and import it
+ DBEVENTINFO dbei = { 0 };
+ if (GetEvent(hDbFile, dwOffset, &dbei)) {
+ // check protocols during system history import
+ if (hContact == NULL) {
+ int i;
+ skipAll = 1;
+
+ for(i = 0; i < protoCount; i++)
+ if (!strcmp(dbei.szModule, protocol[i]->szName)) { //&& protocol[i]->type == PROTOTYPE_PROTOCOL)
+ skipAll = 0;
+ break;
+ }
+
+ skip = skipAll;
+ }
+
+ // custom filtering
+ if (!skip && nImportOption == IMPORT_CUSTOM) {
+ BOOL sent = (dbei.flags&DBEF_SENT);
+
+ if (dbei.timestamp < (DWORD)dwSinceDate)
+ skip = 1;
+
+ if (!skip) {
+ if (hContact) {
+ skip = 1;
+ switch(dbei.eventType) {
+ case EVENTTYPE_MESSAGE:
+ if ((sent?IOPT_MSGSENT:IOPT_MSGRECV)&nCustomOptions)
+ skip = 0;
+ break;
+ case EVENTTYPE_FILE:
+ if ((sent?IOPT_FILESENT:IOPT_FILERECV)&nCustomOptions)
+ skip = 0;
+ break;
+ case EVENTTYPE_URL:
+ if ((sent?IOPT_URLSENT:IOPT_URLRECV)&nCustomOptions)
+ skip = 0;
+ break;
+ default:
+ if ((sent?IOPT_OTHERSENT:IOPT_OTHERRECV)&nCustomOptions)
+ skip = 0;
+ break;
+ }
+ }
+ else if ( !( nCustomOptions & IOPT_SYSTEM ))
+ skip = 1;
+ }
+
+ if (skip)
+ nSkippedEvents++;
+ }
+
+ if (!skip) {
+ // Check for duplicate entries
+ if ( !IsDuplicateEvent( hContact, dbei )) {
+ // Add dbevent
+ if (!bIsVoidContact)
+ dbei.flags &= ~DBEF_FIRST;
+ if (CallService(MS_DB_EVENT_ADD, (WPARAM)hContact, (LPARAM)&dbei))
+ nMessagesCount++;
+ else
+ AddMessage( LPGEN("Failed to add message"));
+ }
+ else
+ nDupes++;
+ }
+ }
+
+ if ( !( i%10 )) {
+ if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+ } }
+
+ // skip this chain if needed
+ if ( skipAll )
+ break;
+
+ // Get next event
+ dwOffset = FindNextEvent(hDbFile, dwOffset);
+ i++;
+ }
+}
+
+static void MirandaImport(HWND hdlg)
+{
+ int nDBVersion;
+ int i;
+ int nNumberOfContacts = 0;
+ MSG msg;
+ DWORD dwTimer;
+ DWORD dwOffset;
+ HANDLE hFile;
+ char* pszModuleName = NULL;
+ struct DBHeader* pdbHeader = NULL;
+ struct DBContact Contact;
+
+ // Just to keep the macros happy
+ hdlgProgress = hdlg;
+
+ // Reset statistics
+ nSkippedEvents = 0;
+ nDupes = 0;
+ nContactsCount = 0;
+ nMessagesCount = 0;
+ nGroupsCount = 0;
+ nSkippedContacts = 0;
+ SetProgress(0);
+
+ // Open database
+ hFile = CreateFile(importFile,
+ GENERIC_READ, // open for reading
+ 0, // do not share
+ NULL, // no security
+ OPEN_EXISTING, // existing file only
+ FILE_ATTRIBUTE_NORMAL, // normal file
+ NULL); // no attr. template
+
+ // Read error
+ if (hFile == INVALID_HANDLE_VALUE) {
+ AddMessage( LPGEN("Could not open file."));
+ SetProgress(100);
+ return;
+ }
+
+ // Check filesize
+ dwFileSize = GetFileSize(hFile, NULL) ;
+ if ((dwFileSize == INVALID_FILE_SIZE) || (dwFileSize < sizeof(struct DBHeader))) {
+ AddMessage( LPGEN("This is not a valid Miranda IM database."));
+ SetProgress(100);
+ CloseHandle(hFile);
+ return;
+ }
+
+ // Check header and database version
+ nDBVersion = CheckFileFormat(hFile);
+ if (nDBVersion == DB_INVALID) {
+ AddMessage( LPGEN("This is not a valid Miranda IM database."));
+ SetProgress(100);
+ CloseHandle(hFile);
+ return;
+ }
+
+ // Load database header
+ if (!(pdbHeader = GetHeader(hFile))) {
+ AddMessage( LPGEN("Read failure."));
+ SetProgress(100);
+ CloseHandle(hFile);
+ return;
+ }
+
+ // Get number of contacts
+ nNumberOfContacts = pdbHeader->contactCount;
+ AddMessage( LPGEN("Number of contacts in database: %d"), nNumberOfContacts );
+ AddMessage( "" );
+
+ // Configure database for fast writing
+ CallService(MS_DB_SETSAFETYMODE, FALSE, 0);
+
+ // Start benchmark timer
+ dwTimer = time(NULL);
+
+ // Import Groups
+ if (nImportOption == IMPORT_ALL || (nCustomOptions & IOPT_GROUPS)) {
+ AddMessage( LPGEN("Importing groups."));
+ nGroupsCount = ImportGroups(hFile, pdbHeader);
+ if (nGroupsCount == -1)
+ AddMessage( LPGEN("Group import failed."));
+
+ AddMessage( "" );
+ }
+ // End of Import Groups
+
+ // Import Contacts
+ if (nImportOption != IMPORT_CUSTOM || (nCustomOptions & IOPT_CONTACTS)) {
+ AddMessage( LPGEN("Importing contacts."));
+ i = 1;
+ dwOffset = FindFirstContact(pdbHeader);
+ while (dwOffset && (dwOffset < dwFileSize)) {
+ if (!GetContact(hFile, dwOffset, &Contact)) {
+ AddMessage( LPGEN("ERROR: Chain broken, no valid contact at %d"), dwOffset );
+ SetProgress(100);
+ break;
+ }
+
+ if (ImportContact(hFile, Contact) != INVALID_HANDLE_VALUE)
+ nContactsCount++;
+
+ // Update progress bar
+ SetProgress(100 * i / nNumberOfContacts);
+ i++;
+
+ // Process queued messages
+ if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+ }
+ // Get next contact in chain
+ dwOffset = FindNextContact(&Contact);
+ }
+ }
+ else AddMessage( LPGEN("Skipping new contacts import."));
+ AddMessage( "" );
+ // End of Import Contacts
+
+ // Import history
+ if (nImportOption != IMPORT_CONTACTS) {
+ // Import NULL contact message chain
+ if (nImportOption == IMPORT_ALL || (nCustomOptions & IOPT_SYSTEM)) {
+ AddMessage( LPGEN("Importing system history."));
+ dwOffset = FindOwnerContact(pdbHeader);
+ if (!GetContact(hFile, dwOffset, &Contact)) {
+ AddMessage( LPGEN("ERROR: Chain broken, no valid contact at %d"), dwOffset );
+ SetProgress(100);
+ }
+ else {
+ PROTOCOLDESCRIPTOR **protocol;
+ int protoCount;
+
+ CallService(MS_PROTO_ENUMPROTOCOLS, (WPARAM)&protoCount, (LPARAM)&protocol);
+
+ if (protoCount > 0)
+ ImportHistory(hFile, Contact, protocol, protoCount);
+ }
+ }
+ else AddMessage( LPGEN("Skipping system history import."));
+
+ AddMessage( "" );
+
+ // Import other contact messages
+ if (nImportOption == IMPORT_ALL || (nCustomOptions & 2046)) { // 2 - 1024 types
+ AddMessage( LPGEN("Importing history."));
+ dwOffset = FindFirstContact(pdbHeader);
+ for(i=1; i <= nNumberOfContacts; i++) {
+ if (!GetContact(hFile, dwOffset, &Contact)) {
+ AddMessage( LPGEN("ERROR: Chain broken, no valid contact at %d"), dwOffset );
+ SetProgress(100);
+ break;
+ }
+
+ ImportHistory(hFile, Contact, NULL, 0);
+
+ SetProgress(100 * i / nNumberOfContacts);
+ dwOffset = FindNextContact(&Contact);
+ }
+ }
+ else AddMessage( LPGEN("Skipping history import."));
+
+ AddMessage( "" );
+ }
+ // End of Import History
+
+ // Restore database writing mode
+ CallService(MS_DB_SETSAFETYMODE, TRUE, 0);
+
+ // Clean up before exit
+ CloseHandle(hFile);
+ free(pdbHeader);
+
+ // Stop timer
+ dwTimer = time(NULL) - dwTimer;
+
+ // Print statistics
+ AddMessage( LPGEN("Import completed in %d seconds."), dwTimer );
+ SetProgress(100);
+ AddMessage((nImportOption == IMPORT_CONTACTS) ?
+ LPGEN("Added %d contacts and %d groups.") : LPGEN("Added %d contacts, %d groups and %d events."),
+ nContactsCount, nGroupsCount, nMessagesCount);
+
+ if ( nImportOption != IMPORT_CONTACTS ) {
+ if (nSkippedContacts)
+ AddMessage( LPGEN("Skipped %d contacts."), nSkippedContacts );
+
+ AddMessage((nImportOption == IMPORT_CUSTOM) ?
+ LPGEN("Skipped %d duplicates and %d filtered events.") : LPGEN("Skipped %d duplicates."),
+ nDupes, nSkippedEvents);
+} }
diff --git a/plugins/Dbx_mmap_SA/Import_SA/mirandadb0700.h b/plugins/Dbx_mmap_SA/Import_SA/mirandadb0700.h
new file mode 100644
index 0000000000..07216ddbcf
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Import_SA/mirandadb0700.h
@@ -0,0 +1,148 @@
+/*
+
+Import plugin for Miranda IM
+
+Copyright (C) 2001,2002,2003,2004 Martin Öberg, Richard Hughes, Roland Rabien & Tristan Van de Vreede
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+
+
+//all offsets are relative to the start of the file
+//offsets are 0 if there is nothing in the chain or this is the last in the
+//chain
+
+
+
+
+/* tree diagram
+
+DBHeader
+ |-->end of file (plain offset)
+ |-->first contact (DBContact)
+ | |-->next contact (DBContact)
+ | | \--> ...
+ | |-->first settings (DBContactSettings)
+ | | |-->next settings (DBContactSettings)
+ | | | \--> ...
+ | | \-->module name (DBModuleName)
+ | \-->first/last/firstunread event
+ |-->user contact (DBContact)
+ | |-->next contact=NULL
+ | |-->first settings as above
+ | \-->first/last/firstunread event as above
+ \-->first module name (DBModuleName)
+ \-->next module name (DBModuleName)
+ \--> ...
+*/
+
+#define DB_THIS_VERSION 0x00000700u
+
+#include <pshpack1.h>
+// Unsane: added "checkWord", "cryptorUID" and removed "version" fields
+struct DBHeader {
+ BYTE signature[16]; // 'Miranda ICQ DB',0,26
+ /*
+ DWORD version; //as 4 bytes, ie 1.2.3.10=0x0102030a
+ //this version is 0x00000700
+ */
+
+ WORD checkWord;
+ WORD cryptorUID;
+ DWORD ofsFileEnd; //offset of the end of the database - place to write
+ //new structures
+ DWORD slackSpace; //a counter of the number of bytes that have been
+ //wasted so far due to deleting structures and/or
+ //re-making them at the end. We should compact when
+ //this gets above a threshold
+ DWORD contactCount; //number of contacts in the chain,excluding the user
+ DWORD ofsFirstContact; //offset to first struct DBContact in the chain
+ DWORD ofsUser; //offset to struct DBContact representing the user
+ DWORD ofsFirstModuleName; //offset to first struct DBModuleName in the chain
+};
+
+#define DBCONTACT_SIGNATURE 0x43DECADEu
+struct DBContact {
+ DWORD signature;
+ DWORD ofsNext; //offset to the next contact in the chain. zero if
+ //this is the 'user' contact or the last contact
+ //in the chain
+ DWORD ofsFirstSettings; //offset to the first DBContactSettings in the
+ //chain for this contact.
+ DWORD eventCount; //number of events in the chain for this contact
+ DWORD ofsFirstEvent,ofsLastEvent; //offsets to the first and last DBEvent in
+ //the chain for this contact
+ DWORD ofsFirstUnreadEvent; //offset to the first (chronological) unread event
+ //in the chain, 0 if all are read
+ DWORD timestampFirstUnread; //timestamp of the event at ofsFirstUnreadEvent
+};
+
+#define DBMODULENAME_SIGNATURE 0x4DDECADEu
+struct DBModuleName {
+ DWORD signature;
+ DWORD ofsNext; //offset to the next module name in the chain
+ BYTE cbName; //number of characters in this module name
+ char name[1]; //name, no nul terminator
+};
+
+#define DBCONTACTSETTINGS_SIGNATURE 0x53DECADEu
+struct DBContactSettings {
+ DWORD signature;
+ DWORD ofsNext; //offset to the next contactsettings in the chain
+ DWORD ofsModuleName; //offset to the DBModuleName of the owner of these
+ //settings
+ DWORD cbBlob; //size of the blob in bytes. May be larger than the
+ //actual size for reducing the number of moves
+ //required using granularity in resizing
+ BYTE blob[1]; //the blob. a back-to-back sequence of DBSetting
+ //structs, the last has cbName=0
+};
+
+/* not a valid structure, content is figured out on the fly
+struct DBSetting {
+ BYTE cbName; //number of bytes in the name of this setting
+ //this =0 marks the end
+ char szName[...]; //setting name, excluding nul
+ BYTE dataType; //type of data. see m_database.h, db/contact/getsetting
+ union { //a load of types of data, length is defined by dataType
+ BYTE bVal; WORD wVal; DWORD dVal;
+ struct {
+ WORD cbString;
+ char szVal[...]; //excludes nul terminator
+ };
+ struct {
+ WORD cbBlob;
+ BYTE blobVal[...];
+ };
+ };
+};
+*/
+
+#define DBEVENT_SIGNATURE 0x45DECADEu
+struct DBEvent {
+ DWORD signature;
+ DWORD ofsPrev,ofsNext; //offset to the previous and next events in the
+ //chain. Chain is sorted chronologically
+ DWORD ofsModuleName; //offset to a DBModuleName struct of the name of
+ //the owner of this event
+ DWORD timestamp; //seconds since 00:00:00 01/01/1970
+ DWORD flags; //see m_database.h, db/event/add
+ WORD eventType; //module-defined event type
+ DWORD cbBlob; //number of bytes in the blob
+ BYTE blob[1]; //the blob. module-defined formatting
+};
+#include <poppack.h>
diff --git a/plugins/Dbx_mmap_SA/Import_SA/mirandahistory.c b/plugins/Dbx_mmap_SA/Import_SA/mirandahistory.c
new file mode 100644
index 0000000000..232d295f8d
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Import_SA/mirandahistory.c
@@ -0,0 +1,208 @@
+/*
+Miranda ICQ: the free icq client for MS Windows
+Copyright (C) 2000-2 Richard Hughes, Roland Rabien & Tristan Van de Vreede
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include <windows.h>
+#include <stdio.h>
+#include <time.h>
+#include "resource.h"
+#include "import.h"
+
+BOOL CALLBACK MirandaPageProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam);
+BOOL CALLBACK FinishedPageProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam);
+BOOL CALLBACK ProgressPageProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam);
+extern char importFile[MAX_PATH];
+extern void (*DoImport)(HWND);
+static void OldMirandaHistoryImport(HWND hdlgProgress);
+HANDLE HContactFromUIN(DWORD uin);
+HANDLE HistoryImportFindContact(HWND hdlgProgress,DWORD uin,int addUnknown);
+static DWORD importOptions;
+
+BOOL CALLBACK MirandaHistoryPageProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam)
+{
+ switch(message) {
+ case WM_INITDIALOG:
+ CheckDlgButton(hdlg,IDC_ADDUNKNOWN,BST_CHECKED);
+ CheckDlgButton(hdlg,IDC_MSGRECV,BST_CHECKED);
+ CheckDlgButton(hdlg,IDC_MSGSENT,BST_CHECKED);
+ CheckDlgButton(hdlg,IDC_URLRECV,BST_CHECKED);
+ CheckDlgButton(hdlg,IDC_URLSENT,BST_CHECKED);
+ CheckDlgButton(hdlg,IDC_AUTHREQ,BST_CHECKED);
+ CheckDlgButton(hdlg,IDC_ADDED,BST_CHECKED);
+ return TRUE;
+ case WM_COMMAND:
+ switch(LOWORD(wParam)) {
+ case IDC_BACK:
+ PostMessage(GetParent(hdlg),WIZM_GOTOPAGE,IDD_MIRANDADB,(LPARAM)MirandaPageProc);
+ break;
+ case IDOK:
+ importOptions=0;
+ if(IsDlgButtonChecked(hdlg,IDC_ADDUNKNOWN)) importOptions|=IOPT_ADDUNKNOWN;
+ if(IsDlgButtonChecked(hdlg,IDC_MSGSENT)) importOptions|=IOPT_MSGSENT;
+ if(IsDlgButtonChecked(hdlg,IDC_MSGRECV)) importOptions|=IOPT_MSGRECV;
+ if(IsDlgButtonChecked(hdlg,IDC_URLSENT)) importOptions|=IOPT_URLSENT;
+ if(IsDlgButtonChecked(hdlg,IDC_URLRECV)) importOptions|=IOPT_URLRECV;
+ if(IsDlgButtonChecked(hdlg,IDC_AUTHREQ)) importOptions|=IOPT_AUTHREQ;
+ if(IsDlgButtonChecked(hdlg,IDC_ADDED)) importOptions|=IOPT_ADDED;
+ DoImport=OldMirandaHistoryImport;
+ PostMessage(GetParent(hdlg),WIZM_GOTOPAGE,IDD_PROGRESS,(LPARAM)ProgressPageProc);
+ break;
+ case IDCANCEL:
+ PostMessage(GetParent(hdlg),WM_CLOSE,0,0);
+ break;
+ }
+ break;
+ }
+ return FALSE;
+}
+
+#define HISTORY_MSGRECV 1
+#define HISTORY_MSGSEND 2
+#define HISTORY_URLRECV 3
+#define HISTORY_URLSEND 4
+#define HISTORY_AUTHREQ 5
+#define HISTORY_ADDED 6
+#define issent(t) ((t)==HISTORY_MSGSEND || (t)==HISTORY_URLSEND)
+static int historyTypeToOption[]={0,IOPT_MSGRECV,IOPT_MSGSENT,IOPT_URLRECV,IOPT_URLSENT,IOPT_AUTHREQ,IOPT_ADDED};
+
+static PBYTE ReadHistoryLines(FILE *fp,int *cbBlob)
+{
+ char str[2048];
+ char *blob;
+ int ofs;
+ *cbBlob=0;
+ blob=NULL;
+ while(fgets(str,sizeof(str),fp) && lstrcmp(str,"\xEE\xEE\xEE\xEE\r\n")) {
+ ofs=*cbBlob;
+ *cbBlob+=lstrlen(str);
+ blob=(char*)realloc(blob,*cbBlob+1);
+ lstrcpy(blob+ofs,str);
+ }
+ if(*cbBlob) {
+ (*cbBlob)--;
+ blob[*cbBlob-1]=0;
+ }
+ else {
+ *cbBlob=1;
+ blob=(char*)malloc(1);
+ blob[0]=0;
+ }
+ return (PBYTE)blob;
+}
+
+static void OldMirandaHistoryImport(HWND hdlgProgress)
+{
+ int fileSize;
+ FILE *fp;
+ char str[2048],*eol,*timeofs;
+ HANDLE hContact;
+ int type;
+ DWORD uin;
+ struct tm tmEventTime;
+ DBEVENTINFO dbei;
+
+ AddMessage("Old Miranda history import routines initialised");
+ fp=fopen(importFile,"rb");
+ AddMessage("Calibrating status support functions");
+ fseek(fp,0,SEEK_END);
+ fileSize=ftell(fp);
+ fseek(fp,0,SEEK_SET);
+ SetProgress(0);
+
+ ZeroMemory(&dbei,sizeof(dbei));
+ dbei.cbSize=sizeof(dbei);
+ dbei.szModule=ICQOSCPROTONAME;
+
+ while(!feof(fp)) {
+ SetProgress(100*ftell(fp)/fileSize);
+ if(fgets(str,sizeof(str),fp)==NULL) break;
+ eol=str+lstrlen(str)-1;
+
+ while(*eol=='\r' || *eol=='\n' && eol!=str-1)
+ *(eol--)=0;
+
+ if(lstrlen(str)<20) continue;
+ type=*eol;
+ uin=strtoul(str,NULL,10);
+ if(uin==0) continue; //skip MSN
+ timeofs=str+lstrlen(str)-20;
+ tmEventTime.tm_hour=atoi(timeofs);
+ timeofs=strchr(timeofs,':');
+ if(timeofs==NULL) continue;
+ tmEventTime.tm_min=atoi(timeofs+1);
+ tmEventTime.tm_sec=0;
+ tmEventTime.tm_isdst=-1;
+ tmEventTime.tm_mday=atoi(timeofs+7);
+ tmEventTime.tm_mon=atoi(timeofs+10)-1;
+ tmEventTime.tm_year=atoi(timeofs+13)-1900;
+ dbei.timestamp=mktime(&tmEventTime)+_timezone;
+ if(!(importOptions&historyTypeToOption[type])) continue;
+ hContact=HistoryImportFindContact(hdlgProgress,uin,importOptions&IOPT_ADDUNKNOWN);
+ if(hContact==INVALID_HANDLE_VALUE) break;
+ dbei.flags=issent(type)?DBEF_SENT:DBEF_READ;
+ switch(type) {
+ case HISTORY_MSGRECV:
+ case HISTORY_MSGSEND:
+ dbei.eventType=EVENTTYPE_MESSAGE;
+ dbei.pBlob=ReadHistoryLines(fp,&dbei.cbBlob);
+ CallService(MS_DB_EVENT_ADD,(WPARAM)hContact,(LPARAM)&dbei);
+ break;
+ case HISTORY_URLRECV:
+ case HISTORY_URLSEND:
+ dbei.eventType=EVENTTYPE_URL;
+ dbei.pBlob=ReadHistoryLines(fp,&dbei.cbBlob);
+ { char *endOfUrl;
+ endOfUrl=strchr(dbei.pBlob,'\r');
+ if(endOfUrl!=NULL) {
+ *endOfUrl=0;
+ dbei.cbBlob--;
+ MoveMemory(endOfUrl+1,endOfUrl+2,dbei.cbBlob-(endOfUrl-dbei.pBlob));
+ }
+ }
+ CallService(MS_DB_EVENT_ADD,(WPARAM)hContact,(LPARAM)&dbei);
+ break;
+ case HISTORY_AUTHREQ:
+ dbei.eventType=EVENTTYPE_AUTHREQUEST;
+ dbei.pBlob=ReadHistoryLines(fp,&dbei.cbBlob);
+ dbei.pBlob=(PBYTE)realloc(dbei.pBlob,dbei.cbBlob+8);
+ MoveMemory(dbei.pBlob+8,dbei.pBlob,dbei.cbBlob);
+ *(PDWORD)dbei.pBlob=uin;
+ *(char*)(dbei.pBlob+4)=0; //leave nick, first, last, email blank
+ *(char*)(dbei.pBlob+5)=0;
+ *(char*)(dbei.pBlob+6)=0;
+ *(char*)(dbei.pBlob+7)=0;
+ dbei.cbBlob+=8;
+ CallService(MS_DB_EVENT_ADD,(WPARAM)(HANDLE)NULL,(LPARAM)&dbei);
+ break;
+ case HISTORY_ADDED:
+ dbei.eventType=EVENTTYPE_ADDED;
+ dbei.pBlob=(PBYTE)malloc(8);
+ dbei.cbBlob=8;
+ *(PDWORD)dbei.pBlob=uin;
+ *(char*)(dbei.pBlob+4)=0; //leave nick, first, last, email blank
+ *(char*)(dbei.pBlob+5)=0;
+ *(char*)(dbei.pBlob+6)=0;
+ *(char*)(dbei.pBlob+7)=0;
+ CallService(MS_DB_EVENT_ADD,(WPARAM)(HANDLE)NULL,(LPARAM)&dbei);
+ break;
+ }
+ }
+ AddMessage("Terminating cached I/O access");
+ fclose(fp);
+ AddMessage("Import completed successfully");
+ SetProgress(100);
+} \ No newline at end of file
diff --git a/plugins/Dbx_mmap_SA/Import_SA/progress.c b/plugins/Dbx_mmap_SA/Import_SA/progress.c
new file mode 100644
index 0000000000..1417868947
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Import_SA/progress.c
@@ -0,0 +1,103 @@
+/*
+
+Import plugin for Miranda IM
+
+Copyright (C) 2001-2005 Martin Öberg, Richard Hughes, Roland Rabien & Tristan Van de Vreede
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+#include <windows.h>
+#include <stdio.h>
+#include <commctrl.h>
+
+#include "import.h"
+
+#define PROGM_START (WM_USER+100)
+
+INT_PTR CALLBACK FinishedPageProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam);
+
+void (*DoImport)(HWND);
+
+INT_PTR CALLBACK ProgressPageProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam)
+{
+ switch(message) {
+ case WM_INITDIALOG:
+ TranslateDialogDefault(hdlg);
+ SendMessage(GetParent(hdlg),WIZM_DISABLEBUTTON,0,0);
+ SendMessage(GetParent(hdlg),WIZM_DISABLEBUTTON,1,0);
+ SendMessage(GetParent(hdlg),WIZM_DISABLEBUTTON,2,0);
+ SendDlgItemMessage(hdlg,IDC_PROGRESS,PBM_SETRANGE,0,MAKELPARAM(0,100));
+ PostMessage(hdlg,PROGM_START,0,0);
+ return TRUE;
+
+ case PROGM_SETPROGRESS:
+ SendDlgItemMessage(hdlg,IDC_PROGRESS,PBM_SETPOS,wParam,0);
+ break;
+
+ case PROGM_ADDMESSAGE:
+ {
+ int i=SendDlgItemMessage(hdlg,IDC_STATUS,LB_ADDSTRING,0,lParam);
+ SendDlgItemMessage(hdlg,IDC_STATUS,LB_SETTOPINDEX,i,0);
+ }
+ break;
+
+ case PROGM_START:
+ DoImport(hdlg);
+ SendMessage(GetParent(hdlg),WIZM_ENABLEBUTTON,1,0);
+ SendMessage(GetParent(hdlg),WIZM_ENABLEBUTTON,2,0);
+ break;
+
+ case WM_COMMAND:
+ switch(LOWORD(wParam)) {
+ case IDOK:
+ PostMessage(GetParent(hdlg),WIZM_GOTOPAGE,IDD_FINISHED,(LPARAM)FinishedPageProc);
+ break;
+ case IDCANCEL:
+ PostMessage(GetParent(hdlg),WM_CLOSE,0,0);
+ break;
+ }
+ break;
+ }
+ return FALSE;
+}
+
+void AddMessage( const char* fmt, ... )
+{
+ va_list args;
+ char msgBuf[ 4096 ];
+ va_start( args, fmt );
+
+ mir_vsnprintf( msgBuf, sizeof(msgBuf), Translate(fmt), args );
+
+ #ifdef _LOGGING
+ {
+ FILE *stream;
+ stream = fopen("Import Debug.log", "a");
+ fprintf(stream, "%s\n", msgBuf);
+ fclose(stream);
+ }
+ #endif
+
+ #if defined( _UNICODE )
+ { TCHAR* str = mir_a2t( msgBuf );
+ SendMessage( hdlgProgress, PROGM_ADDMESSAGE, 0, ( LPARAM )str );
+ mir_free( str );
+ }
+ #else
+ SendMessage( hdlgProgress, PROGM_ADDMESSAGE, 0, ( LPARAM )msgBuf );
+ #endif
+}
diff --git a/plugins/Dbx_mmap_SA/Import_SA/res/import.ico b/plugins/Dbx_mmap_SA/Import_SA/res/import.ico
new file mode 100644
index 0000000000..2d6094d7de
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Import_SA/res/import.ico
Binary files differ
diff --git a/plugins/Dbx_mmap_SA/Import_SA/res/pass.ico b/plugins/Dbx_mmap_SA/Import_SA/res/pass.ico
new file mode 100644
index 0000000000..908883520a
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Import_SA/res/pass.ico
Binary files differ
diff --git a/plugins/Dbx_mmap_SA/Import_SA/resource.h b/plugins/Dbx_mmap_SA/Import_SA/resource.h
new file mode 100644
index 0000000000..915ee8097b
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Import_SA/resource.h
@@ -0,0 +1,68 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by resource.rc
+//
+#define IDC_BACK 3
+#define IDD_WIZARD 101
+#define IDD_OPTIONS 102
+#define IDD_ICQSERVER 104
+#define IDD_LOGIN 105
+#define IDD_IMPORTTYPE 106
+#define IDD_WIZARDINTRO 107
+#define IDD_FINISHED 108
+#define IDD_MIRABILISDB 109
+#define IDD_MIRANDADB 110
+#define IDD_PROGRESS 111
+#define IDD_ADVOPTIONS 112
+#define IDI_IMPORT 177
+#define IDI_PASS 178
+#define IDC_MIRABILIS 1000
+#define IDC_DONTLOADPLUGIN 1001
+#define IDC_MIRANDA 1002
+#define IDC_USEFINDADD 1003
+#define IDC_OTHER 1004
+#define IDC_LIST 1005
+#define IDC_FILENAME 1006
+#define IDC_PROGRESS 1007
+#define IDC_STATUS 1008
+#define IDC_MIRABILISRUNNING 1009
+#define IDC_MIRABILISACCOUNT 1010
+#define IDC_RADIO_ALL 1011
+#define IDC_RADIO_CONTACTS 1012
+#define IDC_RADIO_CUSTOM 1013
+#define IDC_STATIC_ALL 1014
+#define IDC_STATIC_CONTACTS 1015
+#define IDC_STATIC_CUSTOM 1016
+#define IDC_USERPASS 1017
+#define IDC_LANG 1018
+#define IDC_DATETIMEPICKER 1019
+#define IDC_IN_FT 1020
+#define IDC_CONTACTS 1021
+#define IDC_SYSTEM 1022
+#define IDC_SINCE 1023
+#define IDC_IN_MSG 1024
+#define IDC_IN_URL 1025
+#define IDC_OUT_FT 1026
+#define IDC_OUT_MSG 1027
+#define IDC_OUT_URL 1028
+#define IDC_IN_OTHER 1029
+#define IDC_OUT_OTHER 1030
+#define IDC_INCOMING 1031
+#define IDC_OUTGOING 1032
+#define IDC_ALL 1033
+#define IDC_MSG 1034
+#define IDC_URL 1035
+#define IDC_FT 1036
+#define IDC_HEADERBAR 1037
+#define IDC_STATIC -1
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 106
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1038
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/plugins/Dbx_mmap_SA/Import_SA/resource.rc b/plugins/Dbx_mmap_SA/Import_SA/resource.rc
new file mode 100644
index 0000000000..c37ea1cccf
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Import_SA/resource.rc
@@ -0,0 +1,322 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// Ðóññêèé (Ðîññèÿ) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
+LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
+#pragma code_page(1251)
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_IMPORT ICON "res/import.ico"
+IDI_PASS ICON "res/pass.ico"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_LOGIN DIALOGEX 0, 0, 190, 86
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
+EXSTYLE WS_EX_TOPMOST | WS_EX_TOOLWINDOW
+CAPTION "Miranda MMAP Secured Database"
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+ CONTROL "",IDC_HEADERBAR,"MHeaderbarCtrl",0x0,0,0,190,26
+ CTEXT "EN",IDC_LANG,158,34,13,13,SS_CENTERIMAGE | NOT WS_GROUP
+ EDITTEXT IDC_USERPASS,21,34,128,14,ES_PASSWORD | ES_AUTOHSCROLL | WS_GROUP
+ DEFPUSHBUTTON "OK",IDOK,36,71,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,102,71,50,14
+END
+
+IDD_IMPORTTYPE DIALOGEX 0, 0, 220, 114
+STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ LTEXT "Choose how you would like to import:",IDC_STATIC,5,16,210,8
+ CONTROL "From a Miranda IM database.",IDC_MIRANDA,"Button",BS_AUTORADIOBUTTON,11,31,204,10
+ CONTROL "From a Mirabilis ICQ (99a - 2003a) database.",IDC_MIRABILIS,
+ "Button",BS_AUTORADIOBUTTON,11,46,204,10
+ CONTROL "Use the Find/Add contacts tool to populate my contact list.",IDC_USEFINDADD,
+ "Button",BS_AUTORADIOBUTTON,11,61,204,10
+END
+
+IDD_WIZARDINTRO DIALOGEX 0, 0, 220, 114
+STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ LTEXT "This wizard will help you import contacts and message history from Mirabilis ICQ, as well as letting you import from other Miranda IM profiles.",IDC_STATIC,33,12,182,32
+ ICON IDI_IMPORT,IDC_STATIC,5,12,20,20
+ LTEXT "Click ""Next"" to choose the information you wish to import, or click ""Cancel"" to exit the wizard and continue using Miranda.",IDC_STATIC,33,49,182,25
+ CTEXT "It is recommended that you create a backup of your current Miranda profile before importing.",IDC_STATIC,30,81,182,21
+END
+
+IDD_FINISHED DIALOGEX 0, 0, 220, 114
+STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ LTEXT "If you wish to import more information, click ""Next"" to return to the start of the wizard, otherwise click ""Finish"" to start using Miranda.",IDC_STATIC,5,20,210,16
+ LTEXT "You will probably never need to use this wizard again, so you can save memory by not loading it every time you start Miranda. This will mean that the import menu item will no longer be available.",IDC_STATIC,5,41,210,24
+ CONTROL "Do not load the import plugin at startup again",IDC_DONTLOADPLUGIN,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,97,210,10
+ LTEXT "Import completed",IDC_STATIC,5,7,210,8
+ LTEXT "If at a future date you wish to use the wizard again, you can make it load again by going to the Plugins section of the Options dialog box.",IDC_STATIC,5,69,210,24
+END
+
+IDD_MIRABILISDB DIALOGEX 0, 0, 220, 114
+STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ LTEXT "Miranda has found Mirabilis ICQ databases corresponding to the following ICQ numbers. Please select the one you wish to import, or click ""Other Database"" if your database is not listed.",IDC_STATIC,5,5,210,24
+ LISTBOX IDC_LIST,5,31,210,36,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "&Other Database...",IDC_OTHER,149,69,66,14
+ RTEXT "&Filename:",IDC_STATIC,5,88,34,8
+ EDITTEXT IDC_FILENAME,42,86,173,12,ES_AUTOHSCROLL
+ CTEXT "Warning: Mirabilis ICQ running. Import may not be reliable.",IDC_MIRABILISRUNNING,5,101,210,8
+ RTEXT "&Account:",IDC_STATIC,6,74,34,8
+ COMBOBOX IDC_MIRABILISACCOUNT,42,71,102,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
+END
+
+IDD_MIRANDADB DIALOGEX 0, 0, 220, 114
+STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ LTEXT "Miranda has found Miranda profiles with the following names. Please select the one you wish to import, or click ""Other Profile"" if your profile is not listed, or if the list is empty.",IDC_STATIC,5,10,210,24
+ LISTBOX IDC_LIST,5,36,210,36,LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
+ PUSHBUTTON "&Other Profile...",IDC_OTHER,149,74,66,14
+ RTEXT "&Filename:",IDC_STATIC,5,93,34,8
+ EDITTEXT IDC_FILENAME,41,91,174,12,ES_AUTOHSCROLL
+END
+
+IDD_PROGRESS DIALOGEX 0, 0, 220, 114
+STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ LTEXT "Now importing...",IDC_STATIC,5,11,62,8
+ CONTROL "Progress1",IDC_PROGRESS,"msctls_progress32",PBS_SMOOTH | WS_BORDER,5,24,210,10
+ LISTBOX IDC_STATUS,5,38,210,61,NOT LBS_NOTIFY | LBS_NOINTEGRALHEIGHT | LBS_DISABLENOSCROLL | LBS_NOSEL | WS_VSCROLL | WS_TABSTOP
+END
+
+IDD_WIZARD DIALOGEX 0, 0, 220, 143
+STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_CAPTION | WS_SYSMENU
+CAPTION "Import Information Wizard"
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ DEFPUSHBUTTON "&Next >",IDOK,120,124,45,13
+ PUSHBUTTON "Cancel",IDCANCEL,170,124,45,13
+ PUSHBUTTON "< &Back",IDC_BACK,75,124,45,13
+ CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,-7,115,234,1
+END
+
+IDD_OPTIONS DIALOGEX 0, 0, 220, 114
+STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ CONTROL "Import all contacts and all messages",IDC_RADIO_ALL,
+ "Button",BS_AUTORADIOBUTTON | BS_LEFT | BS_TOP | WS_TABSTOP,7,10,206,11
+ CONTROL "Only import contacts",IDC_RADIO_CONTACTS,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,7,42,206,10
+ CONTROL "Custom import",IDC_RADIO_CUSTOM,"Button",BS_AUTORADIOBUTTON | WS_DISABLED | WS_TABSTOP,7,74,206,10
+ LTEXT "Select this if you want to import as much data as possible. This is the recommended option.",IDC_STATIC_ALL,26,20,187,16
+ LTEXT "Select this if you want to import contacts but don't want to import any message history.",IDC_STATIC_CONTACTS,26,52,187,16
+ LTEXT "Select this if you want to cutomize what to import.",IDC_STATIC_CUSTOM,26,84,187,16,WS_DISABLED
+END
+
+IDD_ICQSERVER DIALOGEX 0, 0, 220, 114
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ LTEXT "Miranda has now been configured to automatically download the contacts in your server-side contact list the next time you connect to ICQ.",IDC_STATIC,7,9,206,31
+ LTEXT "If you want to change the way Miranda handles server-side contacts at a later time, you can do this in the ""ICQ Contacts"" page in the Miranda options.",IDC_STATIC,7,44,206,37
+END
+
+IDD_ADVOPTIONS DIALOGEX 0, 0, 220, 114
+STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | DS_CONTROL | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+ CONTROL "New contacts && groups",IDC_CONTACTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,16,100,10
+ CONTROL "System history",IDC_SYSTEM,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,120,16,98,10
+ LTEXT "Select items to import:",IDC_ALL,10,3,201,10,SS_NOTIFY
+ CTEXT "Incoming",IDC_INCOMING,2,34,86,10,SS_NOTIFY
+ CTEXT "Outgoing",IDC_OUTGOING,132,34,86,10,SS_NOTIFY
+ CONTROL "",IDC_IN_MSG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,40,44,10,10
+ CONTROL "",IDC_IN_URL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,40,56,10,10
+ CONTROL "",IDC_IN_FT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,40,68,10,10
+ CONTROL "",IDC_IN_OTHER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,40,80,10,10
+ CONTROL "",IDC_OUT_MSG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,44,10,10
+ CONTROL "",IDC_OUT_URL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,56,10,10
+ CONTROL "",IDC_OUT_FT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,68,10,10
+ CONTROL "",IDC_OUT_OTHER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,80,10,10
+ CONTROL "Only since:",IDC_SINCE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,99,100,10
+ CONTROL "",IDC_DATETIMEPICKER,"SysDateTimePick32",DTS_RIGHTALIGN | WS_DISABLED | WS_TABSTOP,120,97,81,15
+ CTEXT "Messages",IDC_MSG,54,44,112,8,SS_NOTIFY
+ CTEXT "URLs",IDC_URL,54,56,112,8,SS_NOTIFY
+ CTEXT "File Transfers",IDC_FT,54,68,112,8,SS_NOTIFY
+ CTEXT "Other",IDC_OTHER,54,80,112,8,SS_NOTIFY
+ CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,93,222,1
+ CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,31,223,1
+END
+
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO
+BEGIN
+ IDD_LOGIN, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 175
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 78
+ END
+
+ IDD_IMPORTTYPE, DIALOG
+ BEGIN
+ LEFTMARGIN, 5
+ RIGHTMARGIN, 215
+ TOPMARGIN, 5
+ BOTTOMMARGIN, 109
+ END
+
+ IDD_WIZARDINTRO, DIALOG
+ BEGIN
+ LEFTMARGIN, 5
+ RIGHTMARGIN, 215
+ TOPMARGIN, 5
+ BOTTOMMARGIN, 109
+ END
+
+ IDD_FINISHED, DIALOG
+ BEGIN
+ LEFTMARGIN, 5
+ RIGHTMARGIN, 215
+ TOPMARGIN, 5
+ BOTTOMMARGIN, 109
+ END
+
+ IDD_MIRABILISDB, DIALOG
+ BEGIN
+ LEFTMARGIN, 5
+ RIGHTMARGIN, 215
+ TOPMARGIN, 5
+ BOTTOMMARGIN, 109
+ END
+
+ IDD_MIRANDADB, DIALOG
+ BEGIN
+ LEFTMARGIN, 3
+ RIGHTMARGIN, 216
+ TOPMARGIN, 1
+ BOTTOMMARGIN, 113
+ END
+
+ IDD_PROGRESS, DIALOG
+ BEGIN
+ LEFTMARGIN, 5
+ RIGHTMARGIN, 215
+ TOPMARGIN, 5
+ BOTTOMMARGIN, 109
+ END
+
+ IDD_WIZARD, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 215
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 137
+ END
+
+ IDD_OPTIONS, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 213
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 111
+ END
+
+ IDD_ICQSERVER, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 213
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 107
+ END
+
+ IDD_ADVOPTIONS, DIALOG
+ BEGIN
+ VERTGUIDE, 10
+ VERTGUIDE, 45
+ VERTGUIDE, 110
+ VERTGUIDE, 120
+ VERTGUIDE, 175
+ TOPMARGIN, 3
+ HORZGUIDE, 16
+ HORZGUIDE, 34
+ HORZGUIDE, 104
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+
+#endif // Ðóññêèé (Ðîññèÿ) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/plugins/Dbx_mmap_SA/Import_SA/version.h b/plugins/Dbx_mmap_SA/Import_SA/version.h
new file mode 100644
index 0000000000..43c674195b
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Import_SA/version.h
@@ -0,0 +1,22 @@
+#include <m_version.h>
+
+#define __FILEVERSION_STRING MIRANDA_VERSION_FILEVERSION
+#define __VERSION_STRING MIRANDA_VERSION_STRING
+#define __VERSION_DWORD MIRANDA_VERSION_DWORD
+#ifdef _UNICODE
+#if defined(WIN64) || defined(_WIN64)
+ #define __PLUGIN_NAME "Import secured contacts and messages (Unicode x64)"
+#else
+ #define __PLUGIN_NAME "Import secured contacts and messages (Unicode)"
+#endif
+#else
+ #define __PLUGIN_NAME "Import secured contacts and messages "
+#endif
+#define __INTERNAL_NAME "Import_sa"
+#define __FILENAME "Import_sa.dll"
+#define __DESCRIPTION "Imports contacts and messages from Mirabilis ICQ and Miranda IM. Enhanced modification with encrypted database support."
+#define __DESCRIPTIONSHORT "Miranda IM Secured Import Plugin."
+#define __AUTHOR "Miranda team"
+#define __AUTHOREMAIL "info@miranda-im.org"
+#define __AUTHORWEB "http://www.miranda-im.org"
+#define __COPYRIGHT "© 2000-2011 Martin Oberg, Richard Hughes, Dmitry Kuzkin, George Hazan"
diff --git a/plugins/Dbx_mmap_SA/Import_SA/wizard.c b/plugins/Dbx_mmap_SA/Import_SA/wizard.c
new file mode 100644
index 0000000000..0584cba073
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/Import_SA/wizard.c
@@ -0,0 +1,215 @@
+/*
+
+Import plugin for Miranda IM
+
+Copyright (C) 2001-2005 Martin Öberg, Richard Hughes, Roland Rabien & Tristan Van de Vreede
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+#include "import.h"
+
+INT_PTR CALLBACK WizardIntroPageProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam);
+INT_PTR CALLBACK FinishedPageProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam);
+INT_PTR CALLBACK MirabilisPageProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam);
+INT_PTR CALLBACK MirandaPageProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam);
+INT_PTR CALLBACK ICQserverPageProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam);
+
+extern HINSTANCE hInst;
+BOOL IsProtocolLoaded(char* pszProtocolName);
+BOOL EnumICQAccounts();
+void FreeICQAccountsList();
+
+INT_PTR CALLBACK ImportTypePageProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ switch( message ) {
+ case WM_INITDIALOG:
+ TranslateDialogDefault(hdlg);
+ CheckDlgButton(hdlg, IDC_MIRANDA, BST_CHECKED);
+
+ // Disable Mirabilis import if ICQ isn't loaded.
+ if (!EnumICQAccounts())
+ EnableWindow(GetDlgItem(hdlg, IDC_MIRABILIS), FALSE);
+
+ return TRUE;
+
+ case WM_COMMAND:
+ switch( LOWORD( wParam )) {
+ case IDC_BACK:
+ PostMessage(GetParent(hdlg), WIZM_GOTOPAGE, IDD_WIZARDINTRO, (LPARAM)WizardIntroPageProc);
+ break;
+
+ case IDOK:
+ if (IsDlgButtonChecked(hdlg, IDC_MIRANDA))
+ PostMessage(GetParent(hdlg), WIZM_GOTOPAGE, IDD_MIRANDADB, (LPARAM)MirandaPageProc);
+ else if (IsDlgButtonChecked(hdlg, IDC_MIRABILIS))
+ PostMessage(GetParent(hdlg), WIZM_GOTOPAGE, IDD_MIRABILISDB, (LPARAM)MirabilisPageProc);
+ else if (IsDlgButtonChecked(hdlg, IDC_USEFINDADD)) {
+ CallService(MS_FINDADD_FINDADD, 0, 0);
+ PostMessage(GetParent(hdlg), WIZM_GOTOPAGE, IDD_FINISHED, (LPARAM)FinishedPageProc);
+ }
+ break;
+
+ case IDCANCEL:
+ PostMessage(GetParent(hdlg), WM_CLOSE, 0, 0);
+ break;
+ } }
+
+ return FALSE;
+}
+
+INT_PTR CALLBACK WizardIntroPageProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ switch( message ) {
+ case WM_INITDIALOG:
+ TranslateDialogDefault(hdlg);
+ SendMessage(GetParent(hdlg), WIZM_DISABLEBUTTON, 0, 0);
+ return TRUE;
+
+ case WM_COMMAND:
+ switch( LOWORD( wParam )) {
+ case IDOK:
+ PostMessage(GetParent(hdlg), WIZM_GOTOPAGE, IDD_IMPORTTYPE, (LPARAM)ImportTypePageProc);
+ break;
+
+ case IDCANCEL:
+ PostMessage(GetParent(hdlg), WM_CLOSE, 0, 0);
+ break;
+ } }
+
+ return FALSE;
+}
+
+INT_PTR CALLBACK FinishedPageProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ switch( message ) {
+ case WM_INITDIALOG:
+ TranslateDialogDefault(hdlg);
+ SendMessage(GetParent(hdlg), WIZM_DISABLEBUTTON, 0, 0);
+ SendMessage(GetParent(hdlg), WIZM_SETCANCELTEXT, 0, (LPARAM)TranslateT("Finish"));
+ CheckDlgButton(hdlg, IDC_DONTLOADPLUGIN, BST_UNCHECKED);
+ return TRUE;
+
+ case WM_COMMAND:
+ switch( LOWORD( wParam )) {
+ case IDOK:
+ PostMessage(GetParent(hdlg), WIZM_GOTOPAGE, IDD_IMPORTTYPE, (LPARAM)ImportTypePageProc);
+ break;
+
+ case IDCANCEL:
+ if ( IsDlgButtonChecked( hdlg, IDC_DONTLOADPLUGIN )) {
+ char sModuleFileName[MAX_PATH];
+ char *pszFileName;
+
+ GetModuleFileNameA(hInst, sModuleFileName, sizeof(sModuleFileName));
+ pszFileName = strrchr(sModuleFileName, '\\' );
+ if (pszFileName == NULL)
+ pszFileName = sModuleFileName;
+ else
+ pszFileName++;
+
+ // We must lower case here because if a DLL is loaded in two
+ // processes, its file name from GetModuleFileName in one process may
+ // differ in case from its file name in the other process. This will
+ // prevent the plugin from disabling/enabling correctly (this fix relies
+ // on the plugin loader to ignore case)
+ CharLowerA(pszFileName);
+ DBWriteContactSettingByte(NULL, "PluginDisable", pszFileName, 1);
+ }
+ PostMessage(GetParent(hdlg), WM_CLOSE, 0, 0);
+ break;
+ }
+ break;
+ }
+
+ return FALSE;
+}
+
+INT_PTR CALLBACK WizardDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ static HWND hwndPage;
+
+ switch ( message ) {
+ case WM_INITDIALOG:
+ TranslateDialogDefault(hdlg);
+ hwndPage = CreateDialog(hInst, MAKEINTRESOURCE(IDD_WIZARDINTRO), hdlg, WizardIntroPageProc);
+ SetWindowPos(hwndPage, 0, 0, 0, 0, 0, SWP_NOZORDER|SWP_NOSIZE);
+ ShowWindow(hwndPage, SW_SHOW);
+ ShowWindow(hdlg, SW_SHOW);
+ SendMessage(hdlg, WM_SETICON, ICON_BIG, (LPARAM)LoadIcon(hInst,MAKEINTRESOURCE(IDI_IMPORT)));
+ return TRUE;
+
+ case WIZM_GOTOPAGE:
+ DestroyWindow(hwndPage);
+ EnableWindow(GetDlgItem(hdlg, IDC_BACK), TRUE);
+ EnableWindow(GetDlgItem(hdlg, IDOK), TRUE);
+ EnableWindow(GetDlgItem(hdlg, IDCANCEL), TRUE);
+ SetDlgItemText(hdlg, IDCANCEL, TranslateT("Cancel"));
+ hwndPage = CreateDialog(hInst, MAKEINTRESOURCE(wParam), hdlg, (DLGPROC)lParam);
+ SetWindowPos(hwndPage, 0, 0, 0, 0, 0, SWP_NOZORDER|SWP_NOSIZE);
+ ShowWindow(hwndPage, SW_SHOW);
+ break;
+
+ case WIZM_DISABLEBUTTON:
+ switch ( wParam ) {
+ case 0:
+ EnableWindow(GetDlgItem(hdlg, IDC_BACK), FALSE);
+ break;
+
+ case 1:
+ EnableWindow(GetDlgItem(hdlg, IDOK), FALSE);
+ break;
+
+ case 2:
+ EnableWindow(GetDlgItem(hdlg, IDCANCEL), FALSE);
+ break;
+ }
+ break;
+
+ case WIZM_ENABLEBUTTON:
+ switch ( wParam ) {
+ case 0:
+ EnableWindow(GetDlgItem(hdlg, IDC_BACK), TRUE);
+ break;
+
+ case 1:
+ EnableWindow(GetDlgItem(hdlg, IDOK), TRUE);
+ break;
+
+ case 2:
+ EnableWindow(GetDlgItem(hdlg, IDCANCEL), TRUE);
+ break;
+ }
+ break;
+
+ case WIZM_SETCANCELTEXT:
+ SetDlgItemText(hdlg, IDCANCEL, (TCHAR*)lParam);
+ break;
+
+ case WM_COMMAND:
+ SendMessage(hwndPage, WM_COMMAND, wParam, lParam);
+ break;
+
+ case WM_CLOSE:
+ DestroyWindow(hwndPage);
+ DestroyWindow(hdlg);
+
+ FreeICQAccountsList();
+ break;
+ }
+
+ return FALSE;
+}
diff --git a/plugins/Dbx_mmap_SA/commonheaders.c b/plugins/Dbx_mmap_SA/commonheaders.c
new file mode 100644
index 0000000000..c9fe1b2686
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/commonheaders.c
@@ -0,0 +1 @@
+#include "commonheaders.h" \ No newline at end of file
diff --git a/plugins/Dbx_mmap_SA/commonheaders.h b/plugins/Dbx_mmap_SA/commonheaders.h
new file mode 100644
index 0000000000..defc7543ec
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/commonheaders.h
@@ -0,0 +1,127 @@
+/*
+
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2000-2003 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#define MIRANDA_VER 0x0700
+#define MIRANDA_CUSTOM_LP
+
+#define _WIN32_WINNT 0x0501
+#include "m_stdhdr.h"
+
+//windows headers
+
+#include <windows.h>
+
+#include <commctrl.h>
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
+#include <stddef.h>
+#include <process.h>
+#include <io.h>
+#include <string.h>
+#include <direct.h>
+#include <crtdbg.h>
+
+//miranda headers
+#include <newpluginapi.h>
+#include <win2k.h>
+#include <m_plugins.h>
+#include <m_system.h>
+#include <m_database.h>
+#include <m_langpack.h>
+#include <m_utils.h>
+#include <m_options.h>
+
+//non-official miranda-plugins sdk
+#include "m_folders.h"
+
+//own headers
+#include "database.h"
+#include "resource.h"
+#include "version.h"
+
+extern PLUGINLINK *pluginLink;
+
+extern struct MM_INTERFACE memoryManagerInterface;
+extern struct LIST_INTERFACE li;
+
+extern CRITICAL_SECTION csDbAccess;
+extern struct DBHeader dbHeader;
+extern HANDLE hDbFile;
+extern BOOL bEncoding;
+
+#ifdef __GNUC__
+#define mir_i64(x) (x##LL)
+#else
+#define mir_i64(x) (x##i64)
+#endif
+
+//global procedures
+//int InitSkin();
+void EncodeCopyMemory(void * dst, void * src, size_t size );
+void DecodeCopyMemory(void * dst, void * src, size_t size );
+void EncodeDBWrite(DWORD ofs, void * src, size_t size);
+void DecodeDBWrite(DWORD ofs, void * src, size_t size);
+int CheckPassword(WORD checkWord, char * szDBName);
+
+void EncryptDB();
+void DecryptDB();
+void RecryptDB();
+void ChangePwd();
+
+void EncodeEvent(HANDLE hEvent);
+void EncodeContactEvents(HANDLE hContact);
+void DecodeEvent(HANDLE hEvent);
+void DecodeContactEvents(HANDLE hContact);
+void EncodeContactSettings(HANDLE hContact);
+void DecodeContactSettings(HANDLE hContact);
+
+BOOL CALLBACK DlgStdInProc(HWND hDlg, UINT uMsg,WPARAM wParam,LPARAM lParam);
+BOOL CALLBACK DlgStdNewPass(HWND hDlg, UINT uMsg,WPARAM wParam,LPARAM lParam);
+BOOL CALLBACK DlgChangePass(HWND hDlg, UINT uMsg,WPARAM wParam,LPARAM lParam);
+void xModifyMenu(HANDLE hMenu,long flags,const TCHAR* name, HICON hIcon);
+
+#define NEWSTR_ALLOCA(A) (A==NULL)?NULL:strcpy((char*)alloca(strlen(A)+1),A)
+
+typedef struct{
+ void* (__stdcall *GenerateKey)(char* pwd);
+ void (__stdcall *FreeKey)(void* key);
+ void (__stdcall *EncryptMem)(BYTE* data, int size, void* key);
+ void (__stdcall *DecryptMem)(BYTE* data, int size, void* key);
+
+ char* Name;
+ char* Info;
+ char* Author;
+ char* Site;
+ char* Email;
+
+ DWORD Version;
+
+ WORD uid;
+} Cryptor;
+
+typedef struct{
+ char dllname[255];
+ HMODULE hLib;
+ Cryptor* cryptor;
+} CryptoModule; \ No newline at end of file
diff --git a/plugins/Dbx_mmap_SA/database.c b/plugins/Dbx_mmap_SA/database.c
new file mode 100644
index 0000000000..b9c1b9871f
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/database.c
@@ -0,0 +1,224 @@
+/*
+
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2000-2003 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#include "commonheaders.h"
+
+int ProfileManager(char *szDbDest,int cbDbDest);
+int ShouldAutoCreate(void);
+int CreateDbHeaders(HANDLE hFile);
+int InitialiseDbHeaders(void);
+int InitSettings(void);
+void UninitSettings(void);
+int InitContacts(void);
+void UninitContacts(void);
+int InitEvents(void);
+void UninitEvents(void);
+int InitCrypt(void);
+int InitModuleNames(void);
+void UninitModuleNames(void);
+int InitCache(void);
+void UninitCache(void);
+int InitIni(void);
+void UninitIni(void);
+int InitPreset(void);
+void UninitPreset(void);
+int InitDialogs(void);
+void InitSecurity(void);
+void UnloadSecurity(void);
+
+HANDLE hDbFile=INVALID_HANDLE_VALUE;
+CRITICAL_SECTION csDbAccess;
+struct DBHeader dbHeader;
+char szDbPath[MAX_PATH];
+
+static void UnloadDatabase(void)
+{
+ // update profile last modified time
+ DWORD bytesWritten;
+ SetFilePointer(hDbFile,0,NULL,FILE_BEGIN);
+ WriteFile(hDbFile,dbHeader.signature,sizeof(1),&bytesWritten,NULL);
+
+ CloseHandle(hDbFile);
+}
+
+DWORD CreateNewSpace(int bytes)
+{
+ DWORD ofsNew;
+ ofsNew=dbHeader.ofsFileEnd;
+ dbHeader.ofsFileEnd+=bytes;
+ DBWrite(0,&dbHeader,sizeof(dbHeader));
+ log2("newspace %d@%08x",bytes,ofsNew);
+ return ofsNew;
+}
+
+void DeleteSpace(DWORD ofs,int bytes)
+{
+ if (ofs+bytes == dbHeader.ofsFileEnd) {
+ log2("freespace %d@%08x",bytes,ofs);
+ dbHeader.ofsFileEnd=ofs;
+ } else {
+ log2("deletespace %d@%08x",bytes,ofs);
+ dbHeader.slackSpace+=bytes;
+ }
+ DBWrite(0,&dbHeader,sizeof(dbHeader));
+ DBFill(ofs,bytes);
+}
+
+DWORD ReallocSpace(DWORD ofs,int oldSize,int newSize)
+{
+ DWORD ofsNew;
+
+ if (oldSize >= newSize) return ofs;
+
+ if (ofs+oldSize == dbHeader.ofsFileEnd) {
+ ofsNew = ofs;
+ dbHeader.ofsFileEnd+=newSize-oldSize;
+ DBWrite(0,&dbHeader,sizeof(dbHeader));
+ log3("adding newspace %d@%08x+%d",newSize,ofsNew,oldSize);
+ } else {
+ ofsNew=CreateNewSpace(newSize);
+ DBMoveChunk(ofsNew,ofs,oldSize);
+ DeleteSpace(ofs,oldSize);
+ }
+ return ofsNew;
+}
+
+void UnloadDatabaseModule(void)
+{
+ //UninitIni();
+ UninitPreset();
+ UninitEvents();
+ UninitSettings();
+ UninitContacts();
+ UninitModuleNames();
+ UninitCache();
+ UnloadDatabase();
+ UnloadSecurity();
+ DeleteCriticalSection(&csDbAccess);
+}
+
+INT_PTR GetProfileName(WPARAM wParam, LPARAM lParam)
+{
+ char * p = 0;
+ p = strrchr(szDbPath, '\\');
+ if ( p == 0 ) return 1;
+ p++;
+ strncpy((char*)lParam, p, (size_t) wParam);
+ return 0;
+}
+
+int LoadDatabaseModule(void)
+{
+ char szDBName[255];
+ InitializeCriticalSection(&csDbAccess);
+ log0("DB logging running");
+ {
+ DWORD dummy=0;
+ hDbFile=CreateFileA(szDbPath,GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_ALWAYS, 0, NULL);
+ if ( hDbFile == INVALID_HANDLE_VALUE ) {
+ return 1;
+ }
+ if ( !ReadFile(hDbFile,&dbHeader,sizeof(dbHeader),&dummy,NULL) ) {
+ CloseHandle(hDbFile);
+ return 1;
+ }
+ }
+ InitSecurity();
+ CheckDbHeaders(&dbHeader);
+ GetProfileName((WPARAM)50, (LPARAM)szDBName);
+ if(bEncoding && !CheckPassword(dbHeader.checkWord, szDBName)) return 1;
+ //if(ParseCommandLine()) return 1;
+ if(InitCache()) return 1;
+ if(InitModuleNames()) return 1;
+ if(InitContacts()) return 1;
+ if(InitSettings()) return 1;
+ if(InitEvents()) return 1;
+ if(InitCrypt()) return 1;
+ if(InitPreset()) return 1;
+ if(InitDialogs()) return 1;
+ //EncryptDB();
+ return 0;
+}
+
+static DWORD DatabaseCorrupted=0;
+static TCHAR *msg = NULL;
+static DWORD dwErr = 0;
+
+void __cdecl dbpanic(void *arg)
+{
+ if (msg)
+ {
+ TCHAR err[256];
+
+ if (dwErr==ERROR_DISK_FULL)
+ msg = TranslateT("Disk is full. Miranda will now shutdown.");
+
+ mir_sntprintf(err, SIZEOF(err), msg, TranslateT("Database failure. Miranda will now shutdown."), dwErr);
+
+ MessageBox(0,err,TranslateT("Database Error"),MB_SETFOREGROUND|MB_TOPMOST|MB_APPLMODAL|MB_ICONWARNING|MB_OK);
+ }
+ else
+ MessageBox(0,TranslateT("Miranda has detected corruption in your database. This corruption maybe fixed by DBTool. Please download it from http://www.miranda-im.org. Miranda will now shutdown."),
+ TranslateT("Database Panic"),MB_SETFOREGROUND|MB_TOPMOST|MB_APPLMODAL|MB_ICONWARNING|MB_OK);
+
+ TerminateProcess(GetCurrentProcess(),255);
+}
+
+void DatabaseCorruption(TCHAR *text)
+{
+ int kill=0;
+
+ EnterCriticalSection(&csDbAccess);
+ if (DatabaseCorrupted==0) {
+ DatabaseCorrupted++;
+ kill++;
+ msg = text;
+ dwErr = GetLastError();
+ } else {
+ /* db is already corrupted, someone else is dealing with it, wait here
+ so that we don't do any more damage */
+ LeaveCriticalSection(&csDbAccess);
+ Sleep(INFINITE);
+ return;
+ }
+ LeaveCriticalSection(&csDbAccess);
+ if (kill) {
+ _beginthread(dbpanic,0,NULL);
+ Sleep(INFINITE);
+ }
+}
+
+#ifdef DBLOGGING
+void DBLog(const char *file,int line,const char *fmt,...)
+{
+ FILE *fp;
+ va_list vararg;
+ char str[1024];
+
+ va_start(vararg,fmt);
+ mir_vsnprintf(str,sizeof(str),fmt,vararg);
+ va_end(vararg);
+ fp=fopen("c:\\mirandadatabase.log.txt","at");
+ fprintf(fp,"%u: %s %d: %s\n",GetTickCount(),file,line,str);
+ fclose(fp);
+}
+#endif
diff --git a/plugins/Dbx_mmap_SA/database.h b/plugins/Dbx_mmap_SA/database.h
new file mode 100644
index 0000000000..290df81723
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/database.h
@@ -0,0 +1,229 @@
+/*
+
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2000-2003 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+
+//all offsets are relative to the start of the file
+//offsets are 0 if there is nothing in the chain or this is the last in the
+//chain
+
+/* tree diagram
+
+DBHeader
+ |-->end of file (plain offset)
+ |-->first contact (DBContact)
+ | |-->next contact (DBContact)
+ | | \--> ...
+ | |-->first settings (DBContactSettings)
+ | | |-->next settings (DBContactSettings)
+ | | | \--> ...
+ | | \-->module name (DBModuleName)
+ | \-->first/last/firstunread event
+ |-->user contact (DBContact)
+ | |-->next contact=NULL
+ | |-->first settings as above
+ | \-->first/last/firstunread event as above
+ \-->first module name (DBModuleName)
+ \-->next module name (DBModuleName)
+ \--> ...
+*/
+
+//#define DB_RESIZE_GRANULARITY 16384
+#define DB_THIS_VERSION 0x00000700u
+#define DB_SETTINGS_RESIZE_GRANULARITY 128
+
+struct DBSignature {
+ char name[15];
+ BYTE eof;
+};
+
+static struct DBSignature dbSignature={"Miranda ICQ DB",0x1A};
+static struct DBSignature dbSignatureSecured={"Miranda ICQ SD",0x1A};
+
+#include <pshpack1.h>
+struct DBHeader {
+ BYTE signature[16]; // 'Miranda ICQ DB',0,26
+
+ /*
+ DWORD version; //as 4 bytes, ie 1.2.3.10=0x0102030a
+ //this version is 0x00000700
+ */
+
+ WORD checkWord;
+ WORD cryptorUID;
+
+ DWORD ofsFileEnd; //offset of the end of the database - place to write
+ //new structures
+ DWORD slackSpace; //a counter of the number of bytes that have been
+ //wasted so far due to deleting structures and/or
+ //re-making them at the end. We should compact when
+ //this gets above a threshold
+ DWORD contactCount; //number of contacts in the chain,excluding the user
+ DWORD ofsFirstContact; //offset to first struct DBContact in the chain
+ DWORD ofsUser; //offset to struct DBContact representing the user
+ DWORD ofsFirstModuleName; //offset to first struct DBModuleName in the chain
+};
+
+#define DBCONTACT_SIGNATURE 0x43DECADEu
+struct DBContact {
+ DWORD signature;
+ DWORD ofsNext; //offset to the next contact in the chain. zero if
+ //this is the 'user' contact or the last contact
+ //in the chain
+ DWORD ofsFirstSettings; //offset to the first DBContactSettings in the
+ //chain for this contact.
+ DWORD eventCount; //number of events in the chain for this contact
+ DWORD ofsFirstEvent,ofsLastEvent; //offsets to the first and last DBEvent in
+ //the chain for this contact
+ DWORD ofsFirstUnreadEvent; //offset to the first (chronological) unread event
+ //in the chain, 0 if all are read
+ DWORD timestampFirstUnread; //timestamp of the event at ofsFirstUnreadEvent
+};
+
+#define DBMODULENAME_SIGNATURE 0x4DDECADEu
+struct DBModuleName {
+ DWORD signature;
+ DWORD ofsNext; //offset to the next module name in the chain
+ BYTE cbName; //number of characters in this module name
+ char name[1]; //name, no nul terminator
+};
+
+#define DBCONTACTSETTINGS_SIGNATURE 0x53DECADEu
+struct DBContactSettings {
+ DWORD signature;
+ DWORD ofsNext; //offset to the next contactsettings in the chain
+ DWORD ofsModuleName; //offset to the DBModuleName of the owner of these
+ //settings
+ DWORD cbBlob; //size of the blob in bytes. May be larger than the
+ //actual size for reducing the number of moves
+ //required using granularity in resizing
+ BYTE blob[1]; //the blob. a back-to-back sequence of DBSetting
+ //structs, the last has cbName=0
+};
+
+/* not a valid structure, content is figured out on the fly
+struct DBSetting {
+ BYTE cbName; //number of bytes in the name of this setting
+ //this =0 marks the end
+ char szName[...]; //setting name, excluding nul
+ BYTE dataType; //type of data. see m_database.h, db/contact/getsetting
+ union { //a load of types of data, length is defined by dataType
+ BYTE bVal; WORD wVal; DWORD dVal;
+ struct {
+ WORD cbString;
+ char szVal[...]; //excludes nul terminator
+ };
+ struct {
+ WORD cbBlob;
+ BYTE blobVal[...];
+ };
+ };
+};
+*/
+
+#define DBEVENT_SIGNATURE 0x45DECADEu
+struct DBEvent {
+ DWORD signature;
+ DWORD ofsPrev,ofsNext; //offset to the previous and next events in the
+ //chain. Chain is sorted chronologically
+ DWORD ofsModuleName; //offset to a DBModuleName struct of the name of
+ //the owner of this event
+ DWORD timestamp; //seconds since 00:00:00 01/01/1970
+ DWORD flags; //see m_database.h, db/event/add
+ WORD eventType; //module-defined event type
+ DWORD cbBlob; //number of bytes in the blob
+ BYTE blob[1]; //the blob. module-defined formatting
+};
+#include <poppack.h>
+
+typedef struct
+{
+ BYTE bIsResident;
+ char name[1];
+}
+ DBCachedSettingName;
+
+typedef struct
+{
+ char* name;
+ DBVARIANT value;
+}
+ DBCachedGlobalValue;
+
+typedef struct DBCachedContactValue_tag
+{
+ char* name;
+ DBVARIANT value;
+ struct DBCachedContactValue_tag* next;
+}
+ DBCachedContactValue;
+
+typedef struct
+{
+ HANDLE hContact;
+ HANDLE hNext;
+ DBCachedContactValue* first;
+ DBCachedContactValue* last;
+}
+ DBCachedContactValueList;
+
+//databasecorruption: with NULL called if any signatures are broken. very very fatal
+void DatabaseCorruption(TCHAR *text);
+PBYTE DBRead(DWORD ofs,int bytesRequired,int *bytesAvail); //any preview result could be invalidated by the next call
+void DBWrite(DWORD ofs,PVOID pData,int count);
+void DBFill(DWORD ofs,int bytes);
+void DBFlush(int setting);
+void DBMoveChunk(DWORD ofsDest,DWORD ofsSource,int bytes);
+DWORD CreateNewSpace(int bytes);
+void DeleteSpace(DWORD ofs,int bytes);
+DWORD ReallocSpace(DWORD ofs,int oldSize,int newSize);
+void GetProfileDirectory(char *szPath,int cbPath);
+int GetDefaultProfilePath(char *szPath,int cbPath,int *specified);
+int ShouldShowProfileManager(void);
+int CheckDbHeaders(struct DBHeader * hdr);
+int CreateDbHeaders(HANDLE hFile);
+int LoadDatabaseModule(void);
+void UnloadDatabaseModule(void);
+
+#define MAXCACHEDREADSIZE 65536
+
+//#define DBLOGGING
+
+#ifdef _DEBUG
+//#define DBLOGGING
+#endif
+#ifdef DBLOGGING
+void DBLog(const char *file,int line,const char *fmt,...);
+#define logg() DBLog(__FILE__,__LINE__,"")
+#define log0(s) DBLog(__FILE__,__LINE__,s)
+#define log1(s,a) DBLog(__FILE__,__LINE__,s,a)
+#define log2(s,a,b) DBLog(__FILE__,__LINE__,s,a,b)
+#define log3(s,a,b,c) DBLog(__FILE__,__LINE__,s,a,b,c)
+#define log4(s,a,b,c,d) DBLog(__FILE__,__LINE__,s,a,b,c,d)
+#else
+#define logg()
+#define log0(s)
+#define log1(s,a)
+#define log2(s,a,b)
+#define log3(s,a,b,c)
+#define log4(s,a,b,c,d)
+#endif
diff --git a/plugins/Dbx_mmap_SA/db3x_mmap.dep b/plugins/Dbx_mmap_SA/db3x_mmap.dep
new file mode 100644
index 0000000000..d24c17434f
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/db3x_mmap.dep
@@ -0,0 +1,23 @@
+# Microsoft Developer Studio Generated Dependency File, included by db3x_mmap.mak
+
+.\commonheaders.c : \
+ "..\..\include\m_database.h"\
+ "..\..\include\m_langpack.h"\
+ "..\..\include\m_plugins.h"\
+ "..\..\include\m_stdhdr.h"\
+ "..\..\include\m_system.h"\
+ "..\..\include\m_utils.h"\
+ "..\..\include\m_version.h"\
+ "..\..\include\newpluginapi.h"\
+ "..\..\include\win2k.h"\
+ ".\commonheaders.h"\
+ ".\database.h"\
+ ".\version.h"\
+
+
+.\resource.rc : \
+ "..\..\include\m_version.h"\
+ ".\db3x_mmap.rc"\
+ ".\version.h"\
+ ".\version.rc"\
+
diff --git a/plugins/Dbx_mmap_SA/db3x_mmap.mak b/plugins/Dbx_mmap_SA/db3x_mmap.mak
new file mode 100644
index 0000000000..85cb23c44c
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/db3x_mmap.mak
@@ -0,0 +1,555 @@
+# Microsoft Developer Studio Generated NMAKE File, Based on db3x_mmap.dsp
+!IF "$(CFG)" == ""
+CFG=db3x_mmap - Win32 Debug
+!MESSAGE No configuration specified. Defaulting to db3x_mmap - Win32 Debug.
+!ENDIF
+
+!IF "$(CFG)" != "db3x_mmap - Win32 Release" && "$(CFG)" != "db3x_mmap - Win32 Debug"
+!MESSAGE Invalid configuration "$(CFG)" specified.
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "db3x_mmap.mak" CFG="db3x_mmap - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "db3x_mmap - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "db3x_mmap - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+!ERROR An invalid configuration is specified.
+!ENDIF
+
+!IF "$(OS)" == "Windows_NT"
+NULL=
+!ELSE
+NULL=nul
+!ENDIF
+
+!IF "$(CFG)" == "db3x_mmap - Win32 Release"
+
+OUTDIR=.\Release
+INTDIR=.\Release
+
+ALL : "..\..\bin\release\plugins\dbx_mmap.dll"
+
+
+CLEAN :
+ -@erase "$(INTDIR)\commonheaders.obj"
+ -@erase "$(INTDIR)\database.obj"
+ -@erase "$(INTDIR)\db3x_mmap.pch"
+ -@erase "$(INTDIR)\dbcache.obj"
+ -@erase "$(INTDIR)\dbcontacts.obj"
+ -@erase "$(INTDIR)\dbevents.obj"
+ -@erase "$(INTDIR)\dbheaders.obj"
+ -@erase "$(INTDIR)\dbmodulechain.obj"
+ -@erase "$(INTDIR)\dbsettings.obj"
+ -@erase "$(INTDIR)\encrypt.obj"
+ -@erase "$(INTDIR)\init.obj"
+ -@erase "$(INTDIR)\resource.res"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(INTDIR)\vc60.pdb"
+ -@erase "$(OUTDIR)\dbx_mmap.exp"
+ -@erase "$(OUTDIR)\dbx_mmap.lib"
+ -@erase "$(OUTDIR)\dbx_mmap.map"
+ -@erase "$(OUTDIR)\dbx_mmap.pdb"
+ -@erase "..\..\bin\release\plugins\dbx_mmap.dll"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP=cl.exe
+CPP_PROJ=/nologo /MD /W3 /Zi /O1 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "db3x_mmap_EXPORTS" /Fp"$(INTDIR)\db3x_mmap.pch" /Yu"commonheaders.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+MTL=midl.exe
+MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32
+RSC=rc.exe
+RSC_PROJ=/l 0x809 /fo"$(INTDIR)\resource.res" /d "NDEBUG"
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\db3x_mmap.bsc"
+BSC32_SBRS= \
+
+LINK32=link.exe
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x5130000" /dll /incremental:no /pdb:"$(OUTDIR)\dbx_mmap.pdb" /map:"$(INTDIR)\dbx_mmap.map" /debug /machine:I386 /out:"../../bin/release/plugins/dbx_mmap.dll" /implib:"$(OUTDIR)\dbx_mmap.lib" /IGNORE:4089
+LINK32_OBJS= \
+ "$(INTDIR)\commonheaders.obj" \
+ "$(INTDIR)\database.obj" \
+ "$(INTDIR)\dbcache.obj" \
+ "$(INTDIR)\dbcontacts.obj" \
+ "$(INTDIR)\dbevents.obj" \
+ "$(INTDIR)\dbheaders.obj" \
+ "$(INTDIR)\dbmodulechain.obj" \
+ "$(INTDIR)\dbsettings.obj" \
+ "$(INTDIR)\encrypt.obj" \
+ "$(INTDIR)\init.obj" \
+ "$(INTDIR)\resource.res"
+
+"..\..\bin\release\plugins\dbx_mmap.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ELSEIF "$(CFG)" == "db3x_mmap - Win32 Debug"
+
+OUTDIR=.\Debug
+INTDIR=.\Debug
+# Begin Custom Macros
+OutDir=.\Debug
+# End Custom Macros
+
+ALL : "..\..\bin\debug\plugins\dbx_mmap.dll" "$(OUTDIR)\db3x_mmap.bsc"
+
+
+CLEAN :
+ -@erase "$(INTDIR)\commonheaders.obj"
+ -@erase "$(INTDIR)\commonheaders.sbr"
+ -@erase "$(INTDIR)\database.obj"
+ -@erase "$(INTDIR)\database.sbr"
+ -@erase "$(INTDIR)\db3x_mmap.pch"
+ -@erase "$(INTDIR)\dbcache.obj"
+ -@erase "$(INTDIR)\dbcache.sbr"
+ -@erase "$(INTDIR)\dbcontacts.obj"
+ -@erase "$(INTDIR)\dbcontacts.sbr"
+ -@erase "$(INTDIR)\dbevents.obj"
+ -@erase "$(INTDIR)\dbevents.sbr"
+ -@erase "$(INTDIR)\dbheaders.obj"
+ -@erase "$(INTDIR)\dbheaders.sbr"
+ -@erase "$(INTDIR)\dbmodulechain.obj"
+ -@erase "$(INTDIR)\dbmodulechain.sbr"
+ -@erase "$(INTDIR)\dbsettings.obj"
+ -@erase "$(INTDIR)\dbsettings.sbr"
+ -@erase "$(INTDIR)\encrypt.obj"
+ -@erase "$(INTDIR)\encrypt.sbr"
+ -@erase "$(INTDIR)\init.obj"
+ -@erase "$(INTDIR)\init.sbr"
+ -@erase "$(INTDIR)\resource.res"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(INTDIR)\vc60.pdb"
+ -@erase "$(OUTDIR)\db3x_mmap.bsc"
+ -@erase "$(OUTDIR)\dbx_mmap.exp"
+ -@erase "$(OUTDIR)\dbx_mmap.lib"
+ -@erase "$(OUTDIR)\dbx_mmap.map"
+ -@erase "$(OUTDIR)\dbx_mmap.pdb"
+ -@erase "..\..\bin\debug\plugins\dbx_mmap.dll"
+ -@erase "..\..\bin\debug\plugins\dbx_mmap.ilk"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP=cl.exe
+CPP_PROJ=/nologo /MDd /W3 /Gm /ZI /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DB3X_EXPORTS" /Fr"$(INTDIR)\\" /Fp"$(INTDIR)\db3x_mmap.pch" /Yu"commonheaders.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+MTL=midl.exe
+MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32
+RSC=rc.exe
+RSC_PROJ=/l 0x809 /fo"$(INTDIR)\resource.res" /d "_DEBUG"
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\db3x_mmap.bsc"
+BSC32_SBRS= \
+ "$(INTDIR)\commonheaders.sbr" \
+ "$(INTDIR)\database.sbr" \
+ "$(INTDIR)\dbcache.sbr" \
+ "$(INTDIR)\dbcontacts.sbr" \
+ "$(INTDIR)\dbevents.sbr" \
+ "$(INTDIR)\dbheaders.sbr" \
+ "$(INTDIR)\dbmodulechain.sbr" \
+ "$(INTDIR)\dbsettings.sbr" \
+ "$(INTDIR)\encrypt.sbr" \
+ "$(INTDIR)\init.sbr"
+
+"$(OUTDIR)\db3x_mmap.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
+ $(BSC32) @<<
+ $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
+LINK32=link.exe
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\dbx_mmap.pdb" /map:"$(INTDIR)\dbx_mmap.map" /debug /machine:I386 /out:"../../bin/debug/plugins/dbx_mmap.dll" /implib:"$(OUTDIR)\dbx_mmap.lib" /pdbtype:sept
+LINK32_OBJS= \
+ "$(INTDIR)\commonheaders.obj" \
+ "$(INTDIR)\database.obj" \
+ "$(INTDIR)\dbcache.obj" \
+ "$(INTDIR)\dbcontacts.obj" \
+ "$(INTDIR)\dbevents.obj" \
+ "$(INTDIR)\dbheaders.obj" \
+ "$(INTDIR)\dbmodulechain.obj" \
+ "$(INTDIR)\dbsettings.obj" \
+ "$(INTDIR)\encrypt.obj" \
+ "$(INTDIR)\init.obj" \
+ "$(INTDIR)\resource.res"
+
+"..\..\bin\debug\plugins\dbx_mmap.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ELSEIF "$(CFG)" == "db3x_mmap - Win32 Debug Unicode"
+
+OUTDIR=.\Debug_Unicode
+INTDIR=.\Debug_Unicode
+# Begin Custom Macros
+OutDir=.\Debug_Unicode
+# End Custom Macros
+
+ALL : "..\..\bin\debug Unicode\plugins\dbx_mmap.dll" "$(OUTDIR)\db3x_mmap.bsc"
+
+
+CLEAN :
+ -@erase "$(INTDIR)\commonheaders.obj"
+ -@erase "$(INTDIR)\commonheaders.sbr"
+ -@erase "$(INTDIR)\database.obj"
+ -@erase "$(INTDIR)\database.sbr"
+ -@erase "$(INTDIR)\db3x_mmap.pch"
+ -@erase "$(INTDIR)\dbcache.obj"
+ -@erase "$(INTDIR)\dbcache.sbr"
+ -@erase "$(INTDIR)\dbcontacts.obj"
+ -@erase "$(INTDIR)\dbcontacts.sbr"
+ -@erase "$(INTDIR)\dbevents.obj"
+ -@erase "$(INTDIR)\dbevents.sbr"
+ -@erase "$(INTDIR)\dbheaders.obj"
+ -@erase "$(INTDIR)\dbheaders.sbr"
+ -@erase "$(INTDIR)\dbmodulechain.obj"
+ -@erase "$(INTDIR)\dbmodulechain.sbr"
+ -@erase "$(INTDIR)\dbsettings.obj"
+ -@erase "$(INTDIR)\dbsettings.sbr"
+ -@erase "$(INTDIR)\encrypt.obj"
+ -@erase "$(INTDIR)\encrypt.sbr"
+ -@erase "$(INTDIR)\init.obj"
+ -@erase "$(INTDIR)\init.sbr"
+ -@erase "$(INTDIR)\resource.res"
+ -@erase "$(INTDIR)\vc60.idb"
+ -@erase "$(INTDIR)\vc60.pdb"
+ -@erase "$(OUTDIR)\db3x_mmap.bsc"
+ -@erase "$(OUTDIR)\dbx_mmap.exp"
+ -@erase "$(OUTDIR)\dbx_mmap.lib"
+ -@erase "$(OUTDIR)\dbx_mmap.map"
+ -@erase "$(OUTDIR)\dbx_mmap.pdb"
+ -@erase "..\..\bin\debug Unicode\plugins\dbx_mmap.dll"
+ -@erase "..\..\bin\debug Unicode\plugins\dbx_mmap.ilk"
+
+"$(OUTDIR)" :
+ if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
+
+CPP=cl.exe
+CPP_PROJ=/nologo /MDd /W3 /Gm /ZI /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "UNICODE" /D "_USRDLL" /D "DB3X_EXPORTS" /Fr"$(INTDIR)\\" /Fp"$(INTDIR)\db3x_mmap.pch" /Yu"commonheaders.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
+
+.c{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.obj::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.c{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cpp{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+.cxx{$(INTDIR)}.sbr::
+ $(CPP) @<<
+ $(CPP_PROJ) $<
+<<
+
+MTL=midl.exe
+MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32
+RSC=rc.exe
+RSC_PROJ=/l 0x809 /fo"$(INTDIR)\resource.res" /i "../../include" /d "_DEBUG"
+BSC32=bscmake.exe
+BSC32_FLAGS=/nologo /o"$(OUTDIR)\db3x_mmap.bsc"
+BSC32_SBRS= \
+ "$(INTDIR)\commonheaders.sbr" \
+ "$(INTDIR)\database.sbr" \
+ "$(INTDIR)\dbcache.sbr" \
+ "$(INTDIR)\dbcontacts.sbr" \
+ "$(INTDIR)\dbevents.sbr" \
+ "$(INTDIR)\dbheaders.sbr" \
+ "$(INTDIR)\dbmodulechain.sbr" \
+ "$(INTDIR)\dbsettings.sbr" \
+ "$(INTDIR)\encrypt.sbr" \
+ "$(INTDIR)\init.sbr"
+
+"$(OUTDIR)\db3x_mmap.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
+ $(BSC32) @<<
+ $(BSC32_FLAGS) $(BSC32_SBRS)
+<<
+
+LINK32=link.exe
+LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\dbx_mmap.pdb" /map:"$(INTDIR)\dbx_mmap.map" /debug /machine:I386 /out:"../../bin/debug Unicode/plugins/dbx_mmap.dll" /implib:"$(OUTDIR)\dbx_mmap.lib" /pdbtype:sept
+LINK32_OBJS= \
+ "$(INTDIR)\commonheaders.obj" \
+ "$(INTDIR)\database.obj" \
+ "$(INTDIR)\dbcache.obj" \
+ "$(INTDIR)\dbcontacts.obj" \
+ "$(INTDIR)\dbevents.obj" \
+ "$(INTDIR)\dbheaders.obj" \
+ "$(INTDIR)\dbmodulechain.obj" \
+ "$(INTDIR)\dbsettings.obj" \
+ "$(INTDIR)\encrypt.obj" \
+ "$(INTDIR)\init.obj" \
+ "$(INTDIR)\resource.res"
+
+"..\..\bin\debug Unicode\plugins\dbx_mmap.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
+ $(LINK32) @<<
+ $(LINK32_FLAGS) $(LINK32_OBJS)
+<<
+
+!ENDIF
+
+!IF "$(NO_EXTERNAL_DEPS)" != "1"
+!IF EXISTS("db3x_mmap.dep")
+!INCLUDE "db3x_mmap.dep"
+!ELSE
+!MESSAGE Warning: cannot find "db3x_mmap.dep"
+!ENDIF
+!ENDIF
+
+
+!IF "$(CFG)" == "db3x_mmap - Win32 Release" || "$(CFG)" == "db3x_mmap - Win32 Debug"
+SOURCE=.\commonheaders.c
+
+!IF "$(CFG)" == "db3x_mmap - Win32 Release"
+
+CPP_SWITCHES=/nologo /MD /W3 /Zi /O1 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "db3x_mmap_EXPORTS" /Fp"$(INTDIR)\db3x_mmap.pch" /Yc"commonheaders.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
+
+"$(INTDIR)\commonheaders.obj" "$(INTDIR)\db3x_mmap.pch" : $(SOURCE) "$(INTDIR)"
+ $(CPP) @<<
+ $(CPP_SWITCHES) $(SOURCE)
+<<
+
+
+!ELSEIF "$(CFG)" == "db3x_mmap - Win32 Debug"
+
+CPP_SWITCHES=/nologo /MDd /W3 /Gm /ZI /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DB3X_EXPORTS" /Fr"$(INTDIR)\\" /Fp"$(INTDIR)\db3x_mmap.pch" /Yc"commonheaders.h" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c
+
+"$(INTDIR)\commonheaders.obj" "$(INTDIR)\commonheaders.sbr" "$(INTDIR)\db3x_mmap.pch" : $(SOURCE) "$(INTDIR)"
+ $(CPP) @<<
+ $(CPP_SWITCHES) $(SOURCE)
+<<
+
+
+!ENDIF
+
+SOURCE=.\database.c
+
+!IF "$(CFG)" == "db3x_mmap - Win32 Release"
+
+
+"$(INTDIR)\database.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\db3x_mmap.pch"
+
+
+!ELSEIF "$(CFG)" == "db3x_mmap - Win32 Debug"
+
+
+"$(INTDIR)\database.obj" "$(INTDIR)\database.sbr" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\db3x_mmap.pch"
+
+
+!ENDIF
+
+SOURCE=.\dbcache.c
+
+!IF "$(CFG)" == "db3x_mmap - Win32 Release"
+
+
+"$(INTDIR)\dbcache.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\db3x_mmap.pch"
+
+
+!ELSEIF "$(CFG)" == "db3x_mmap - Win32 Debug"
+
+
+"$(INTDIR)\dbcache.obj" "$(INTDIR)\dbcache.sbr" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\db3x_mmap.pch"
+
+
+!ENDIF
+
+SOURCE=.\dbcontacts.c
+
+!IF "$(CFG)" == "db3x_mmap - Win32 Release"
+
+
+"$(INTDIR)\dbcontacts.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\db3x_mmap.pch"
+
+
+!ELSEIF "$(CFG)" == "db3x_mmap - Win32 Debug"
+
+
+"$(INTDIR)\dbcontacts.obj" "$(INTDIR)\dbcontacts.sbr" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\db3x_mmap.pch"
+
+
+!ENDIF
+
+SOURCE=.\dbevents.c
+
+!IF "$(CFG)" == "db3x_mmap - Win32 Release"
+
+
+"$(INTDIR)\dbevents.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\db3x_mmap.pch"
+
+
+!ELSEIF "$(CFG)" == "db3x_mmap - Win32 Debug"
+
+
+"$(INTDIR)\dbevents.obj" "$(INTDIR)\dbevents.sbr" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\db3x_mmap.pch"
+
+
+!ENDIF
+
+SOURCE=.\dbheaders.c
+
+!IF "$(CFG)" == "db3x_mmap - Win32 Release"
+
+
+"$(INTDIR)\dbheaders.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\db3x_mmap.pch"
+
+
+!ELSEIF "$(CFG)" == "db3x_mmap - Win32 Debug"
+
+
+"$(INTDIR)\dbheaders.obj" "$(INTDIR)\dbheaders.sbr" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\db3x_mmap.pch"
+
+
+!ENDIF
+
+SOURCE=.\dbmodulechain.c
+
+!IF "$(CFG)" == "db3x_mmap - Win32 Release"
+
+
+"$(INTDIR)\dbmodulechain.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\db3x_mmap.pch"
+
+
+!ELSEIF "$(CFG)" == "db3x_mmap - Win32 Debug"
+
+
+"$(INTDIR)\dbmodulechain.obj" "$(INTDIR)\dbmodulechain.sbr" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\db3x_mmap.pch"
+
+
+!ENDIF
+
+SOURCE=.\dbsettings.c
+
+!IF "$(CFG)" == "db3x_mmap - Win32 Release"
+
+
+"$(INTDIR)\dbsettings.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\db3x_mmap.pch"
+
+
+!ELSEIF "$(CFG)" == "db3x_mmap - Win32 Debug"
+
+
+"$(INTDIR)\dbsettings.obj" "$(INTDIR)\dbsettings.sbr" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\db3x_mmap.pch"
+
+
+!ENDIF
+
+SOURCE=.\encrypt.c
+
+!IF "$(CFG)" == "db3x_mmap - Win32 Release"
+
+
+"$(INTDIR)\encrypt.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\db3x_mmap.pch"
+
+
+!ELSEIF "$(CFG)" == "db3x_mmap - Win32 Debug"
+
+
+"$(INTDIR)\encrypt.obj" "$(INTDIR)\encrypt.sbr" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\db3x_mmap.pch"
+
+
+!ENDIF
+
+SOURCE=.\init.c
+
+!IF "$(CFG)" == "db3x_mmap - Win32 Release"
+
+
+"$(INTDIR)\init.obj" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\db3x_mmap.pch"
+
+
+!ELSEIF "$(CFG)" == "db3x_mmap - Win32 Debug"
+
+
+"$(INTDIR)\init.obj" "$(INTDIR)\init.sbr" : $(SOURCE) "$(INTDIR)" "$(INTDIR)\db3x_mmap.pch"
+
+
+!ENDIF
+
+SOURCE=.\resource.rc
+
+"$(INTDIR)\resource.res" : $(SOURCE) "$(INTDIR)"
+ $(RSC) $(RSC_PROJ) $(SOURCE)
+
+
+
+!ENDIF
+
diff --git a/plugins/Dbx_mmap_SA/db3x_mmap.rc b/plugins/Dbx_mmap_SA/db3x_mmap.rc
new file mode 100644
index 0000000000..60d38275d8
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/db3x_mmap.rc
@@ -0,0 +1,275 @@
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include <winres.h>
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// Ðóññêèé (Ðîññèÿ) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS)
+LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
+#pragma code_page(1251)
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_LOGIN DIALOGEX 0, 0, 190, 86
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
+EXSTYLE WS_EX_TOPMOST | WS_EX_TOOLWINDOW
+CAPTION "Login to Miranda IM"
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+ CONTROL "",IDC_HEADERBAR,"MHeaderbarCtrl",0x0,0,0,190,26
+ CTEXT "EN",IDC_LANG,158,34,13,13,SS_CENTERIMAGE | NOT WS_GROUP
+ EDITTEXT IDC_USERPASS,21,34,128,14,ES_PASSWORD | ES_AUTOHSCROLL | WS_GROUP
+ DEFPUSHBUTTON "OK",IDOK,36,64,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,102,64,50,14
+ CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,0,55,190,1
+END
+
+IDD_NEWPASS DIALOGEX 0, 0, 190, 102
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
+EXSTYLE WS_EX_TOPMOST | WS_EX_TOOLWINDOW
+CAPTION "New password"
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+ CONTROL "",IDC_HEADERBAR,"MHeaderbarCtrl",0x0,0,0,190,26
+ CTEXT "EN",IDC_LANG,158,34,13,13,SS_CENTERIMAGE | NOT WS_GROUP
+ EDITTEXT IDC_USERPASS1,21,34,128,14,ES_PASSWORD | ES_AUTOHSCROLL
+ EDITTEXT IDC_USERPASS2,21,54,128,14,ES_PASSWORD | ES_AUTOHSCROLL
+ DEFPUSHBUTTON "OK",IDOK,36,84,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,100,84,50,14
+ CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,0,77,190,1
+END
+
+IDD_CHANGEPASS DIALOGEX 0, 0, 190, 148
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
+EXSTYLE WS_EX_TOOLWINDOW
+CAPTION "Change password"
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+ CONTROL "",IDC_HEADERBAR,"MHeaderbarCtrl",0x0,0,0,190,26
+ CTEXT "EN",IDC_LANG,158,42,13,13,SS_CENTERIMAGE | NOT WS_GROUP
+ EDITTEXT IDC_OLDPASS,21,42,128,14,ES_PASSWORD | ES_AUTOHSCROLL
+ EDITTEXT IDC_NEWPASS1,21,77,128,14,ES_PASSWORD | ES_AUTOHSCROLL
+ EDITTEXT IDC_NEWPASS2,21,98,128,14,ES_PASSWORD | ES_AUTOHSCROLL
+ DEFPUSHBUTTON "Change",IDOK,11,127,50,14
+ PUSHBUTTON "Remove",IDREMOVE,69,127,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,126,127,50,14
+ LTEXT "New password",IDC_NEWPASSINFO,11,66,163,10,0,WS_EX_TRANSPARENT
+ CONTROL "",IDC_STATIC,"Static",SS_ETCHEDFRAME,0,119,190,1
+ LTEXT "Old password",IDC_NEWPASSINFO2,11,31,140,10,0,WS_EX_TRANSPARENT
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO
+BEGIN
+ IDD_CHANGEPASS, DIALOG
+ BEGIN
+ TOPMARGIN, 7
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_ICON2 ICON "icos\\logo.ico"
+IDI_ICON3 ICON "icos\\pass.ico"
+#endif // Ðóññêèé (Ðîññèÿ) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+// Àíãëèéñêèé (ÑØÀ) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_INSTALLINI DIALOGEX 0, 0, 212, 102
+STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+EXSTYLE WS_EX_CONTROLPARENT
+CAPTION "Install Database Settings"
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ DEFPUSHBUTTON "Yes",IDOK,26,83,50,14
+ PUSHBUTTON "No",IDCANCEL,81,83,50,14
+ LTEXT "A file containing new database settings has been placed in the Miranda IM directory.",IDC_STATIC,5,5,202,16
+ LTEXT "Do you want to import the settings now?",IDC_STATIC,5,69,202,8
+ PUSHBUTTON "No to all",IDC_NOTOALL,136,83,50,14
+ LTEXT "",IDC_ININAME,5,24,143,16,SS_NOPREFIX | SS_CENTERIMAGE
+ PUSHBUTTON "&View contents",IDC_VIEWINI,149,25,58,14
+ LTEXT "Security systems to prevent malicious changes are in place and you will be warned before changes that are not known to be safe.",IDC_SECURITYINFO,5,43,202,24
+END
+
+IDD_WARNINICHANGE DIALOGEX 0, 0, 187, 113
+STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+EXSTYLE WS_EX_CONTROLPARENT
+CAPTION "Database Setting Change"
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ LTEXT "Database settings are being imported from",IDC_STATIC,5,5,177,8
+ CONTROL "",IDC_ININAME,"Static",SS_SIMPLE | SS_NOPREFIX | WS_GROUP,5,13,177,8
+ LTEXT "This file wishes to change the setting",IDC_STATIC,5,24,177,8
+ CONTROL "",IDC_SETTINGNAME,"Static",SS_SIMPLE | SS_NOPREFIX | WS_GROUP,12,33,170,8
+ LTEXT "to the value",IDC_STATIC,5,42,177,8
+ CONTROL "",IDC_NEWVALUE,"Static",SS_SIMPLE | SS_NOPREFIX | WS_GROUP,12,51,170,8
+ LTEXT "",IDC_SECURITYINFO,5,60,177,8
+ LTEXT "Do you want to allow this change?",IDC_STATIC,5,71,177,8
+ CONTROL "&Allow all further changes to this section",IDC_WARNNOMORE,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,80,169,10
+ DEFPUSHBUTTON "&Yes",IDYES,5,94,50,14
+ PUSHBUTTON "&No",IDNO,59,94,50,14
+ PUSHBUTTON "Cancel Import",IDCANCEL,123,94,59,14
+END
+
+IDD_INIIMPORTDONE DIALOGEX 0, 0, 186, 73
+STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+EXSTYLE WS_EX_CONTROLPARENT
+CAPTION "Database Import Complete"
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ LTEXT "The import has completed from",IDC_STATIC,5,5,176,8
+ CONTROL "",IDC_ININAME,"Static",SS_SIMPLE | SS_NOPREFIX | WS_GROUP,5,13,176,8
+ LTEXT "What do you want to do with the file now?",IDC_STATIC,5,24,176,8
+ PUSHBUTTON "&Recycle",IDC_RECYCLE,5,36,50,14
+ PUSHBUTTON "&Delete",IDC_DELETE,68,36,50,14
+ EDITTEXT IDC_NEWNAME,5,55,117,12,ES_AUTOHSCROLL
+ PUSHBUTTON "&Move/Rename",IDC_MOVE,124,54,57,14
+ PUSHBUTTON "&Leave",IDC_LEAVE,131,36,50,14
+END
+
+IDD_OPTIONS DIALOGEX 0, 0, 318, 188
+STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_CHILD
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+ GROUPBOX "Database encryption",IDC_ENC,4,87,307,96,0,WS_EX_RIGHT
+ CONTROL "",IDC_MODULES,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,6,3,305,80
+ LTEXT "Info:",IDC_STATIC,9,97,35,8,0,WS_EX_RIGHT
+ EDITTEXT IDC_INFO,49,97,256,21,ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY | ES_WANTRETURN | NOT WS_BORDER | WS_VSCROLL
+ LTEXT "Author:",IDC_STATIC,9,123,35,8,0,WS_EX_RIGHT
+ EDITTEXT IDC_AUTHOR,49,123,256,12,ES_AUTOHSCROLL | ES_READONLY | ES_WANTRETURN | NOT WS_BORDER
+ LTEXT "Site:",IDC_STATIC,9,135,35,8,0,WS_EX_RIGHT
+ CONTROL "",IDC_SITE,"Hyperlink",WS_TABSTOP,49,135,256,12
+ LTEXT "Email:",IDC_STATIC,9,147,35,8,0,WS_EX_RIGHT
+ CONTROL "",IDC_EMAIL,"Hyperlink",WS_TABSTOP,49,147,256,12
+ LTEXT "Unique ID:",IDC_STATIC,9,166,35,8,0,WS_EX_RIGHT
+ EDITTEXT IDC_UID,49,166,256,12,ES_AUTOHSCROLL | ES_READONLY | ES_WANTRETURN | NOT WS_BORDER
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO
+BEGIN
+ IDD_INSTALLINI, DIALOG
+ BEGIN
+ LEFTMARGIN, 5
+ RIGHTMARGIN, 207
+ TOPMARGIN, 5
+ BOTTOMMARGIN, 97
+ END
+
+ IDD_WARNINICHANGE, DIALOG
+ BEGIN
+ LEFTMARGIN, 5
+ RIGHTMARGIN, 182
+ TOPMARGIN, 5
+ BOTTOMMARGIN, 108
+ END
+
+ IDD_INIIMPORTDONE, DIALOG
+ BEGIN
+ LEFTMARGIN, 5
+ RIGHTMARGIN, 181
+ TOPMARGIN, 5
+ BOTTOMMARGIN, 68
+ END
+
+ IDD_OPTIONS, DIALOG
+ BEGIN
+ LEFTMARGIN, 6
+ RIGHTMARGIN, 311
+ VERTGUIDE, 9
+ VERTGUIDE, 44
+ VERTGUIDE, 49
+ VERTGUIDE, 193
+ VERTGUIDE, 248
+ VERTGUIDE, 305
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 181
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include <winres.h>\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+#endif // Àíãëèéñêèé (ÑØÀ) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/plugins/Dbx_mmap_SA/db3x_mmap_8.sln b/plugins/Dbx_mmap_SA/db3x_mmap_8.sln
new file mode 100644
index 0000000000..133d10e562
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/db3x_mmap_8.sln
@@ -0,0 +1,26 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "db3x_mmap", "db3x_mmap_8.vcproj", "{20D781FB-4A20-4B75-B863-304A47182966}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug Unicode|Win32 = Debug Unicode|Win32
+ Debug|Win32 = Debug|Win32
+ Release Unicode|Win32 = Release Unicode|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {20D781FB-4A20-4B75-B863-304A47182966}.Debug Unicode|Win32.ActiveCfg = Debug Unicode|Win32
+ {20D781FB-4A20-4B75-B863-304A47182966}.Debug Unicode|Win32.Build.0 = Debug Unicode|Win32
+ {20D781FB-4A20-4B75-B863-304A47182966}.Debug|Win32.ActiveCfg = Debug|Win32
+ {20D781FB-4A20-4B75-B863-304A47182966}.Debug|Win32.Build.0 = Debug|Win32
+ {20D781FB-4A20-4B75-B863-304A47182966}.Release Unicode|Win32.ActiveCfg = Release Unicode|Win32
+ {20D781FB-4A20-4B75-B863-304A47182966}.Release Unicode|Win32.Build.0 = Release Unicode|Win32
+ {20D781FB-4A20-4B75-B863-304A47182966}.Release|Win32.ActiveCfg = Release|Win32
+ {20D781FB-4A20-4B75-B863-304A47182966}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/plugins/Dbx_mmap_SA/db3x_mmap_8.vcproj b/plugins/Dbx_mmap_SA/db3x_mmap_8.vcproj
new file mode 100644
index 0000000000..70cc70e524
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/db3x_mmap_8.vcproj
@@ -0,0 +1,579 @@
+<?xml version="1.0" encoding="windows-1251"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="db3x_mmap"
+ ProjectGUID="{20D781FB-4A20-4B75-B863-304A47182966}"
+ RootNamespace="db3x_mmap"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/db3x.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../include;../ExternalAPI"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DB3X_EXPORTS"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="commonheaders.h"
+ AssemblerListingLocation=""
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)/dbx_mmap_sa.dll"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ GenerateMapFile="false"
+ MapFileName=""
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/db3x.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ InlineFunctionExpansion="2"
+ FavorSizeOrSpeed="2"
+ OmitFramePointers="true"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../include;../ExternalAPI"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DB3X_EXPORTS"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="commonheaders.h"
+ AssemblerListingLocation=""
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ OutputFile="$(OutDir)/dbx_mmap_sa.dll"
+ SuppressStartupBanner="true"
+ AdditionalManifestDependencies="type=&apos;Win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; processorArchitecture=&apos;X86&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos;"
+ GenerateDebugInformation="true"
+ GenerateMapFile="false"
+ MapFileName=""
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="1"
+ BaseAddress="0x5130000"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug Unicode|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/db3x.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../include;../ExternalAPI"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DB3X_EXPORTS"
+ StringPooling="false"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ EnableFunctionLevelLinking="true"
+ FloatingPointModel="0"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="commonheaders.h"
+ AssemblerListingLocation=""
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="p:\debug\plugins\dbx_mmap_sa.dll"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ GenerateMapFile="false"
+ MapFileName=""
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release Unicode|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/db3x.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ InlineFunctionExpansion="2"
+ FavorSizeOrSpeed="2"
+ OmitFramePointers="true"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../include;../ExternalAPI"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DB3X_EXPORTS"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="commonheaders.h"
+ AssemblerListingLocation=""
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ OutputFile="$(OutDir)\dbx_mmap_sa.dll"
+ SuppressStartupBanner="true"
+ AdditionalManifestDependencies="type=&apos;Win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; processorArchitecture=&apos;X86&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos;"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ GenerateMapFile="false"
+ MapFileName=""
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="1"
+ BaseAddress="0x5130000"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ <AssemblyReference
+ RelativePath="System.dll"
+ AssemblyName="System, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
+ MinFrameworkVersion="131072"
+ />
+ <AssemblyReference
+ RelativePath="System.Data.dll"
+ AssemblyName="System.Data, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=x86"
+ MinFrameworkVersion="131072"
+ />
+ <AssemblyReference
+ RelativePath="System.Drawing.dll"
+ AssemblyName="System.Drawing, Version=2.0.0.0, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
+ MinFrameworkVersion="131072"
+ />
+ <AssemblyReference
+ RelativePath="System.Windows.Forms.dll"
+ AssemblyName="System.Windows.Forms, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
+ MinFrameworkVersion="131072"
+ />
+ <AssemblyReference
+ RelativePath="System.XML.dll"
+ AssemblyName="System.Xml, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
+ MinFrameworkVersion="131072"
+ />
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath=".\backup.c"
+ >
+ </File>
+ <File
+ RelativePath=".\commonheaders.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\database.c"
+ >
+ </File>
+ <File
+ RelativePath=".\dbcache.c"
+ >
+ </File>
+ <File
+ RelativePath=".\dbcontacts.c"
+ >
+ </File>
+ <File
+ RelativePath=".\dbevents.c"
+ >
+ </File>
+ <File
+ RelativePath=".\dbheaders.c"
+ >
+ </File>
+ <File
+ RelativePath=".\dbmodulechain.c"
+ >
+ </File>
+ <File
+ RelativePath=".\dbpreset.c"
+ >
+ </File>
+ <File
+ RelativePath=".\dbsettings.c"
+ >
+ </File>
+ <File
+ RelativePath=".\dialogs.c"
+ >
+ </File>
+ <File
+ RelativePath=".\encrypt.c"
+ >
+ </File>
+ <File
+ RelativePath=".\init.c"
+ >
+ </File>
+ <File
+ RelativePath=".\security.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath=".\commonheaders.h"
+ >
+ </File>
+ <File
+ RelativePath=".\database.h"
+ >
+ </File>
+ <File
+ RelativePath=".\m_securemmap.h"
+ >
+ </File>
+ <File
+ RelativePath=".\options.h"
+ >
+ </File>
+ <File
+ RelativePath=".\resource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\version.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ <File
+ RelativePath=".\db3x_mmap.rc"
+ >
+ </File>
+ <File
+ RelativePath=".\icos\logo.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\icos\pass.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\version.rc"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/plugins/Dbx_mmap_SA/db3x_mmap_sa.dsp b/plugins/Dbx_mmap_SA/db3x_mmap_sa.dsp
new file mode 100644
index 0000000000..7cd1188ff5
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/db3x_mmap_sa.dsp
@@ -0,0 +1,158 @@
+# Microsoft Developer Studio Project File - Name="db3x_mmap" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=db3x_mmap - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "db3x_mmap.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "db3x_mmap.mak" CFG="db3x_mmap - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "db3x_mmap - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "db3x_mmap - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""$/Miranda/miranda/plugins/db3x_mmap", WKIAAAAA"
+# PROP Scc_LocalPath "."
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "db3x_mmap - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "db3x_mmap_EXPORTS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /Zi /O1 /I "../../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "db3x_mmap_EXPORTS" /Yu"commonheaders.h" /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x809 /d "NDEBUG"
+# ADD RSC /l 0x809 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /base:"0x5130000" /dll /map /debug /machine:I386 /out:"../../bin/release/plugins/dbx_mmap.dll" /IGNORE:4089
+# SUBTRACT LINK32 /pdb:none /incremental:yes
+
+!ELSEIF "$(CFG)" == "db3x_mmap - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DB3X_EXPORTS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "../../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DB3X_EXPORTS" /Fr /Yu"commonheaders.h" /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x809 /d "_DEBUG"
+# ADD RSC /l 0x809 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /map /debug /machine:I386 /out:"../../bin/debug/plugins/dbx_mmap.dll" /pdbtype:sept
+# SUBTRACT LINK32 /pdb:none /incremental:no
+
+!ENDIF
+
+# Begin Target
+
+# Name "db3x_mmap - Win32 Release"
+# Name "db3x_mmap - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\commonheaders.c
+# ADD CPP /Yc"commonheaders.h"
+# End Source File
+# Begin Source File
+
+SOURCE=.\database.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\dbcache.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\dbcontacts.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\dbevents.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\dbheaders.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\dbmodulechain.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\dbsettings.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\encrypt.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\init.c
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\commonheaders.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\database.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\resource.rc
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/plugins/Dbx_mmap_SA/db3x_mmap_sa.dsw b/plugins/Dbx_mmap_SA/db3x_mmap_sa.dsw
new file mode 100644
index 0000000000..97289a3e14
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/db3x_mmap_sa.dsw
@@ -0,0 +1,33 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "db3x_mmap"=.\db3x_mmap.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+ begin source code control
+ "$/Miranda/miranda/plugins/db3x_mmap", WKIAAAAA
+ .
+ end source code control
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/plugins/Dbx_mmap_SA/db3x_mmap_sa.vcproj b/plugins/Dbx_mmap_SA/db3x_mmap_sa.vcproj
new file mode 100644
index 0000000000..b90bc743ef
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/db3x_mmap_sa.vcproj
@@ -0,0 +1,611 @@
+<?xml version="1.0" encoding="windows-1251"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="db3x_mmap_sa"
+ ProjectGUID="{20D781FB-4A20-4B75-B863-304A47182966}"
+ RootNamespace="db3x_mmap_sa">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../include;../ExternalAPI"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DB3X_EXPORTS"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ EnableFunctionLevelLinking="TRUE"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="commonheaders.h"
+ AssemblerListingLocation=""
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="comctl32.lib"
+ OutputFile="$(OutDir)/dbx_mmap_sa.dll"
+ SuppressStartupBanner="TRUE"
+ GenerateDebugInformation="TRUE"
+ GenerateMapFile="FALSE"
+ MapFileName=""/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="TRUE"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/db3x.tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="2057"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2"
+ WholeProgramOptimization="TRUE">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ InlineFunctionExpansion="2"
+ FavorSizeOrSpeed="2"
+ OmitFramePointers="TRUE"
+ WholeProgramOptimization="TRUE"
+ AdditionalIncludeDirectories="../include;../ExternalAPI"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DB3X_EXPORTS"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ UsePrecompiledHeader="0"
+ PrecompiledHeaderThrough="commonheaders.h"
+ AssemblerListingLocation=""
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="vc7to6.lib comctl32.lib"
+ OutputFile="$(OutDir)/dbx_mmap_sa.dll"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib"
+ IgnoreAllDefaultLibraries="TRUE"
+ GenerateDebugInformation="TRUE"
+ GenerateMapFile="FALSE"
+ MapFileName=""
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="TRUE"
+ BaseAddress="0x5130000"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="TRUE"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/db3x.tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="2057"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Debug Unicode|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="1">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../include;../ExternalAPI"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DB3X_EXPORTS"
+ StringPooling="FALSE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ EnableFunctionLevelLinking="TRUE"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="commonheaders.h"
+ AssemblerListingLocation=""
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="comctl32.lib"
+ OutputFile="$(OutDir)/dbx_mmap_sa.dll"
+ SuppressStartupBanner="TRUE"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ GenerateMapFile="FALSE"
+ MapFileName=""/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="TRUE"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/db3x.tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="2057"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release Unicode|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="1"
+ WholeProgramOptimization="TRUE">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ InlineFunctionExpansion="2"
+ FavorSizeOrSpeed="2"
+ OmitFramePointers="TRUE"
+ WholeProgramOptimization="TRUE"
+ AdditionalIncludeDirectories="../include;../ExternalAPI"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DB3X_EXPORTS"
+ StringPooling="TRUE"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="TRUE"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="commonheaders.h"
+ AssemblerListingLocation=""
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="vc7to6.lib comctl32.lib"
+ OutputFile="$(OutDir)/dbx_mmap_sa.dll"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\lib"
+ IgnoreAllDefaultLibraries="TRUE"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ GenerateMapFile="FALSE"
+ MapFileName=""
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="TRUE"
+ BaseAddress="0x5130000"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="TRUE"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/db3x.tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="2057"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ <AssemblyReference
+ RelativePath="System.dll"/>
+ <AssemblyReference
+ RelativePath="System.Data.dll"/>
+ <AssemblyReference
+ RelativePath="System.Drawing.dll"/>
+ <AssemblyReference
+ RelativePath="System.Windows.Forms.dll"/>
+ <AssemblyReference
+ RelativePath="System.XML.dll"/>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+ <File
+ RelativePath=".\commonheaders.c">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ BrowseInformation="0"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ BrowseInformation="0"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="0"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\database.c">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="0"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\dbcache.c">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="0"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\dbcontacts.c">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="0"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\dbevents.c">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="0"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\dbheaders.c">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="0"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\dbmodulechain.c">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="0"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\dbpreset.c">
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="0"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\dbsettings.c">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="0"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\dialogs.c">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="0"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\encrypt.c">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="0"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\init.c">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="0"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\security.c">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="0"/>
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl">
+ <File
+ RelativePath=".\commonheaders.h">
+ </File>
+ <File
+ RelativePath=".\database.h">
+ </File>
+ <File
+ RelativePath=".\options.h">
+ </File>
+ <File
+ RelativePath=".\resource.h">
+ </File>
+ <File
+ RelativePath=".\version.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+ <File
+ RelativePath=".\db3x_mmap.rc">
+ </File>
+ <File
+ RelativePath=".\icos\logo.ico">
+ </File>
+ <File
+ RelativePath=".\icos\pass.ico">
+ </File>
+ <File
+ RelativePath=".\version.rc">
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/plugins/Dbx_mmap_SA/db3x_mmap_sa_10.sln b/plugins/Dbx_mmap_SA/db3x_mmap_sa_10.sln
new file mode 100644
index 0000000000..58d255d964
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/db3x_mmap_sa_10.sln
@@ -0,0 +1,92 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dbx_mmap_sa", "db3x_mmap_sa_10.vcxproj", "{20D781FB-4A20-4B75-B863-304A47182966}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "db_autobackups", "db_autobackups\db_autobackups_10.vcxproj", "{751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dbtool", "Dbtool\dbtool_10.vcxproj", "{A2E9DA24-95E4-4414-94AF-488A382E276A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "import_sa", "import_sa\import_sa_10.vcxproj", "{9299B507-1AF9-4C93-9560-5F637D1E0C9E}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug Unicode|Win32 = Debug Unicode|Win32
+ Debug Unicode|x64 = Debug Unicode|x64
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Release Unicode|Win32 = Release Unicode|Win32
+ Release Unicode|x64 = Release Unicode|x64
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {20D781FB-4A20-4B75-B863-304A47182966}.Debug Unicode|Win32.ActiveCfg = Debug Unicode|Win32
+ {20D781FB-4A20-4B75-B863-304A47182966}.Debug Unicode|Win32.Build.0 = Debug Unicode|Win32
+ {20D781FB-4A20-4B75-B863-304A47182966}.Debug Unicode|x64.ActiveCfg = Debug Unicode|x64
+ {20D781FB-4A20-4B75-B863-304A47182966}.Debug Unicode|x64.Build.0 = Debug Unicode|x64
+ {20D781FB-4A20-4B75-B863-304A47182966}.Debug|Win32.ActiveCfg = Debug|Win32
+ {20D781FB-4A20-4B75-B863-304A47182966}.Debug|Win32.Build.0 = Debug|Win32
+ {20D781FB-4A20-4B75-B863-304A47182966}.Debug|x64.ActiveCfg = Debug|x64
+ {20D781FB-4A20-4B75-B863-304A47182966}.Debug|x64.Build.0 = Debug|x64
+ {20D781FB-4A20-4B75-B863-304A47182966}.Release Unicode|Win32.ActiveCfg = Release Unicode|Win32
+ {20D781FB-4A20-4B75-B863-304A47182966}.Release Unicode|Win32.Build.0 = Release Unicode|Win32
+ {20D781FB-4A20-4B75-B863-304A47182966}.Release Unicode|x64.ActiveCfg = Release Unicode|x64
+ {20D781FB-4A20-4B75-B863-304A47182966}.Release Unicode|x64.Build.0 = Release Unicode|x64
+ {20D781FB-4A20-4B75-B863-304A47182966}.Release|Win32.ActiveCfg = Release|Win32
+ {20D781FB-4A20-4B75-B863-304A47182966}.Release|Win32.Build.0 = Release|Win32
+ {20D781FB-4A20-4B75-B863-304A47182966}.Release|x64.ActiveCfg = Release|x64
+ {20D781FB-4A20-4B75-B863-304A47182966}.Release|x64.Build.0 = Release|x64
+ {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Debug Unicode|Win32.ActiveCfg = Debug Unicode|Win32
+ {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Debug Unicode|Win32.Build.0 = Debug Unicode|Win32
+ {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Debug Unicode|x64.ActiveCfg = Debug Unicode|x64
+ {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Debug Unicode|x64.Build.0 = Debug Unicode|x64
+ {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Debug|Win32.ActiveCfg = Debug|Win32
+ {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Debug|Win32.Build.0 = Debug|Win32
+ {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Debug|x64.ActiveCfg = Debug|x64
+ {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Debug|x64.Build.0 = Debug|x64
+ {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Release Unicode|Win32.ActiveCfg = Release Unicode|Win32
+ {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Release Unicode|Win32.Build.0 = Release Unicode|Win32
+ {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Release Unicode|x64.ActiveCfg = Release Unicode|x64
+ {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Release Unicode|x64.Build.0 = Release Unicode|x64
+ {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Release|Win32.ActiveCfg = Release|Win32
+ {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Release|Win32.Build.0 = Release|Win32
+ {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Release|x64.ActiveCfg = Release|x64
+ {751ED05D-AD3E-4EC6-A485-4ECDF1FE6068}.Release|x64.Build.0 = Release|x64
+ {A2E9DA24-95E4-4414-94AF-488A382E276A}.Debug Unicode|Win32.ActiveCfg = Debug Unicode|Win32
+ {A2E9DA24-95E4-4414-94AF-488A382E276A}.Debug Unicode|Win32.Build.0 = Debug Unicode|Win32
+ {A2E9DA24-95E4-4414-94AF-488A382E276A}.Debug Unicode|x64.ActiveCfg = Debug Unicode|x64
+ {A2E9DA24-95E4-4414-94AF-488A382E276A}.Debug Unicode|x64.Build.0 = Debug Unicode|x64
+ {A2E9DA24-95E4-4414-94AF-488A382E276A}.Debug|Win32.ActiveCfg = Debug|Win32
+ {A2E9DA24-95E4-4414-94AF-488A382E276A}.Debug|Win32.Build.0 = Debug|Win32
+ {A2E9DA24-95E4-4414-94AF-488A382E276A}.Debug|x64.ActiveCfg = Debug|x64
+ {A2E9DA24-95E4-4414-94AF-488A382E276A}.Debug|x64.Build.0 = Debug|x64
+ {A2E9DA24-95E4-4414-94AF-488A382E276A}.Release Unicode|Win32.ActiveCfg = Release Unicode|Win32
+ {A2E9DA24-95E4-4414-94AF-488A382E276A}.Release Unicode|Win32.Build.0 = Release Unicode|Win32
+ {A2E9DA24-95E4-4414-94AF-488A382E276A}.Release Unicode|x64.ActiveCfg = Release Unicode|x64
+ {A2E9DA24-95E4-4414-94AF-488A382E276A}.Release Unicode|x64.Build.0 = Release Unicode|x64
+ {A2E9DA24-95E4-4414-94AF-488A382E276A}.Release|Win32.ActiveCfg = Release|Win32
+ {A2E9DA24-95E4-4414-94AF-488A382E276A}.Release|Win32.Build.0 = Release|Win32
+ {A2E9DA24-95E4-4414-94AF-488A382E276A}.Release|x64.ActiveCfg = Release|x64
+ {A2E9DA24-95E4-4414-94AF-488A382E276A}.Release|x64.Build.0 = Release|x64
+ {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Debug Unicode|Win32.ActiveCfg = Debug Unicode|Win32
+ {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Debug Unicode|Win32.Build.0 = Debug Unicode|Win32
+ {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Debug Unicode|x64.ActiveCfg = Debug Unicode|x64
+ {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Debug Unicode|x64.Build.0 = Debug Unicode|x64
+ {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Debug|Win32.Build.0 = Debug|Win32
+ {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Debug|x64.ActiveCfg = Debug|x64
+ {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Debug|x64.Build.0 = Debug|x64
+ {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Release Unicode|Win32.ActiveCfg = Release Unicode|Win32
+ {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Release Unicode|Win32.Build.0 = Release Unicode|Win32
+ {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Release Unicode|x64.ActiveCfg = Release Unicode|x64
+ {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Release Unicode|x64.Build.0 = Release Unicode|x64
+ {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Release|Win32.ActiveCfg = Release|Win32
+ {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Release|Win32.Build.0 = Release|Win32
+ {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Release|x64.ActiveCfg = Release|x64
+ {9299B507-1AF9-4C93-9560-5F637D1E0C9E}.Release|x64.Build.0 = Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/plugins/Dbx_mmap_SA/db3x_mmap_sa_10.vcxproj b/plugins/Dbx_mmap_SA/db3x_mmap_sa_10.vcxproj
new file mode 100644
index 0000000000..b37994e1c7
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/db3x_mmap_sa_10.vcxproj
@@ -0,0 +1,540 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug Unicode|Win32">
+ <Configuration>Debug Unicode</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug Unicode|x64">
+ <Configuration>Debug Unicode</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release Unicode|Win32">
+ <Configuration>Release Unicode</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release Unicode|x64">
+ <Configuration>Release Unicode</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectName>dbx_mmap_sa</ProjectName>
+ <ProjectGuid>{20D781FB-4A20-4B75-B863-304A47182966}</ProjectGuid>
+ <RootNamespace>db3x_mmap_sa</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64/Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64/Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\</IntDir>
+ <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</IgnoreImportLibrary>
+ <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</IgnoreImportLibrary>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">$(SolutionDir)$(Configuration)64/Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">$(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">$(SolutionDir)$(Configuration)64/Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">$(SolutionDir)$(Configuration)64/Obj/$(ProjectName)\</IntDir>
+ <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">true</IgnoreImportLibrary>
+ <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">true</IgnoreImportLibrary>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" />
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Debug/db3x.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;DB3X_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>commonheaders.h</PrecompiledHeaderFile>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <MapFileName>
+ </MapFileName>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TypeLibraryName>.\Debug/db3x.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;DB3X_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>commonheaders.h</PrecompiledHeaderFile>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0809</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <GenerateMapFile>false</GenerateMapFile>
+ <MapFileName>
+ </MapFileName>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Release/db3x.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;DB3X_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>commonheaders.h</PrecompiledHeaderFile>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <MapFileName>
+ </MapFileName>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <BaseAddress>0x5130000</BaseAddress>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TypeLibraryName>.\Release/db3x.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;DB3X_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>commonheaders.h</PrecompiledHeaderFile>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0809</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <GenerateMapFile>false</GenerateMapFile>
+ <MapFileName>
+ </MapFileName>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <BaseAddress>0x5130000</BaseAddress>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Debug/db3x.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;DB3X_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>commonheaders.h</PrecompiledHeaderFile>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <StringPooling>false</StringPooling>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <MapFileName>
+ </MapFileName>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TypeLibraryName>.\Debug/db3x.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;DB3X_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>commonheaders.h</PrecompiledHeaderFile>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <StringPooling>false</StringPooling>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <MapFileName>
+ </MapFileName>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Release/db3x.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;DB3X_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>commonheaders.h</PrecompiledHeaderFile>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <MapFileName>
+ </MapFileName>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <BaseAddress>0x5130000</BaseAddress>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TypeLibraryName>.\Release/db3x.tlb</TypeLibraryName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <OmitFramePointers>true</OmitFramePointers>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;DB3X_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>commonheaders.h</PrecompiledHeaderFile>
+ <WarningLevel>Level3</WarningLevel>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <MapFileName>
+ </MapFileName>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <BaseAddress>0x5130000</BaseAddress>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <Reference Include="System">
+ <CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
+ <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
+ </Reference>
+ <Reference Include="System.Data">
+ <CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
+ <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
+ </Reference>
+ <Reference Include="System.Drawing">
+ <CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
+ <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
+ </Reference>
+ <Reference Include="System.Windows.Forms">
+ <CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
+ <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
+ </Reference>
+ <Reference Include="System.Xml">
+ <CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
+ <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="commonheaders.c">
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
+ </ClCompile>
+ <ClCompile Include="database.c" />
+ <ClCompile Include="dbcache.c" />
+ <ClCompile Include="dbcontacts.c" />
+ <ClCompile Include="dbevents.c" />
+ <ClCompile Include="dbheaders.c" />
+ <ClCompile Include="dbmodulechain.c" />
+ <ClCompile Include="dbpreset.c" />
+ <ClCompile Include="dbsettings.c" />
+ <ClCompile Include="dialogs.c" />
+ <ClCompile Include="encrypt.c" />
+ <ClCompile Include="init.c" />
+ <ClCompile Include="security.c" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="commonheaders.h" />
+ <ClInclude Include="database.h" />
+ <ClInclude Include="options.h" />
+ <ClInclude Include="resource.h" />
+ <ClInclude Include="version.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="db3x_mmap.rc" />
+ <ResourceCompile Include="version.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="icos\logo.ico" />
+ <None Include="icos\pass.ico" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/plugins/Dbx_mmap_SA/db3x_mmap_sa_10.vcxproj.filters b/plugins/Dbx_mmap_SA/db3x_mmap_sa_10.vcxproj.filters
new file mode 100644
index 0000000000..b1a8ff852a
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/db3x_mmap_sa_10.vcxproj.filters
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4faf3f6f-953b-4e0c-aa3a-246accd395cc}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{26f1ddd9-261b-4512-8da8-b3e786b0e35c}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{4eb47a45-3e87-400a-bfb3-05c2d9cbb32b}</UniqueIdentifier>
+ <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="commonheaders.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="database.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="dbcache.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="dbcontacts.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="dbevents.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="dbheaders.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="dbmodulechain.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="dbpreset.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="dbsettings.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="dialogs.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="encrypt.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="init.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="security.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="commonheaders.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="database.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="options.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="resource.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="version.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="db3x_mmap.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ <ResourceCompile Include="version.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="icos\logo.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="icos\pass.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/plugins/Dbx_mmap_SA/db3x_mmap_sa_8.vcproj b/plugins/Dbx_mmap_SA/db3x_mmap_sa_8.vcproj
new file mode 100644
index 0000000000..800f2414a2
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/db3x_mmap_sa_8.vcproj
@@ -0,0 +1,755 @@
+<?xml version="1.0" encoding="windows-1251"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="db3x_mmap_sa"
+ ProjectGUID="{20D781FB-4A20-4B75-B863-304A47182966}"
+ RootNamespace="db3x_mmap_sa"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/db3x.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../include;../ExternalAPI"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DB3X_EXPORTS"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="commonheaders.h"
+ AssemblerListingLocation=""
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)/dbx_mmap_sa.dll"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ GenerateMapFile="false"
+ MapFileName=""
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/db3x.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ InlineFunctionExpansion="2"
+ FavorSizeOrSpeed="2"
+ OmitFramePointers="true"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../include;../ExternalAPI"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DB3X_EXPORTS"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="commonheaders.h"
+ AssemblerListingLocation=""
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ OutputFile="$(OutDir)/dbx_mmap_sa.dll"
+ SuppressStartupBanner="true"
+ AdditionalManifestDependencies="type=&apos;Win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; processorArchitecture=&apos;X86&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos;"
+ GenerateDebugInformation="true"
+ GenerateMapFile="false"
+ MapFileName=""
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="1"
+ BaseAddress="0x5130000"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug Unicode|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/db3x.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../include;../ExternalAPI"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DB3X_EXPORTS"
+ StringPooling="false"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ EnableFunctionLevelLinking="true"
+ FloatingPointModel="0"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="commonheaders.h"
+ AssemblerListingLocation=""
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(OutDir)/dbx_mmap_sa.dll"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ GenerateMapFile="false"
+ MapFileName=""
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release Unicode|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/db3x.tlb"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ InlineFunctionExpansion="2"
+ FavorSizeOrSpeed="2"
+ OmitFramePointers="true"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../include;../ExternalAPI"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DB3X_EXPORTS"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="commonheaders.h"
+ AssemblerListingLocation=""
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ OutputFile="$(OutDir)/dbx_mmap_sa.dll"
+ SuppressStartupBanner="true"
+ AdditionalManifestDependencies="type=&apos;Win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; processorArchitecture=&apos;X86&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos;"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(TargetDir)$(TargetName).pdb"
+ GenerateMapFile="false"
+ MapFileName=""
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="1"
+ BaseAddress="0x5130000"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ <AssemblyReference
+ RelativePath="System.dll"
+ AssemblyName="System, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
+ />
+ <AssemblyReference
+ RelativePath="System.Data.dll"
+ AssemblyName="System.Data, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=x86"
+ />
+ <AssemblyReference
+ RelativePath="System.Drawing.dll"
+ AssemblyName="System.Drawing, Version=2.0.0.0, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
+ />
+ <AssemblyReference
+ RelativePath="System.Windows.Forms.dll"
+ AssemblyName="System.Windows.Forms, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
+ />
+ <AssemblyReference
+ RelativePath="System.XML.dll"
+ AssemblyName="System.Xml, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
+ />
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath=".\backup.c"
+ >
+ </File>
+ <File
+ RelativePath=".\commonheaders.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ BrowseInformation="0"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ BrowseInformation="0"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\database.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\dbcache.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\dbcontacts.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\dbevents.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\dbheaders.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\dbmodulechain.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\dbpreset.c"
+ >
+ </File>
+ <File
+ RelativePath=".\dbsettings.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\dialogs.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\encrypt.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\init.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\security.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="0"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath=".\commonheaders.h"
+ >
+ </File>
+ <File
+ RelativePath=".\database.h"
+ >
+ </File>
+ <File
+ RelativePath=".\m_securemmap.h"
+ >
+ </File>
+ <File
+ RelativePath=".\options.h"
+ >
+ </File>
+ <File
+ RelativePath=".\resource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\version.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ <File
+ RelativePath=".\db3x_mmap.rc"
+ >
+ </File>
+ <File
+ RelativePath=".\icos\logo.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\icos\pass.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\version.rc"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/plugins/Dbx_mmap_SA/db3x_mmap_sa_9.sln b/plugins/Dbx_mmap_SA/db3x_mmap_sa_9.sln
new file mode 100644
index 0000000000..36ab2c5334
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/db3x_mmap_sa_9.sln
@@ -0,0 +1,38 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dbx_mmap_sa", "db3x_mmap_sa_9.vcproj", "{20D781FB-4A20-4B75-B863-304A47182966}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug Unicode|Win32 = Debug Unicode|Win32
+ Debug Unicode|x64 = Debug Unicode|x64
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Release Unicode|Win32 = Release Unicode|Win32
+ Release Unicode|x64 = Release Unicode|x64
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {20D781FB-4A20-4B75-B863-304A47182966}.Debug Unicode|Win32.ActiveCfg = Debug Unicode|Win32
+ {20D781FB-4A20-4B75-B863-304A47182966}.Debug Unicode|Win32.Build.0 = Debug Unicode|Win32
+ {20D781FB-4A20-4B75-B863-304A47182966}.Debug Unicode|x64.ActiveCfg = Debug Unicode|x64
+ {20D781FB-4A20-4B75-B863-304A47182966}.Debug Unicode|x64.Build.0 = Debug Unicode|x64
+ {20D781FB-4A20-4B75-B863-304A47182966}.Debug|Win32.ActiveCfg = Debug|Win32
+ {20D781FB-4A20-4B75-B863-304A47182966}.Debug|Win32.Build.0 = Debug|Win32
+ {20D781FB-4A20-4B75-B863-304A47182966}.Debug|x64.ActiveCfg = Debug|x64
+ {20D781FB-4A20-4B75-B863-304A47182966}.Debug|x64.Build.0 = Debug|x64
+ {20D781FB-4A20-4B75-B863-304A47182966}.Release Unicode|Win32.ActiveCfg = Release Unicode|Win32
+ {20D781FB-4A20-4B75-B863-304A47182966}.Release Unicode|Win32.Build.0 = Release Unicode|Win32
+ {20D781FB-4A20-4B75-B863-304A47182966}.Release Unicode|x64.ActiveCfg = Release Unicode|x64
+ {20D781FB-4A20-4B75-B863-304A47182966}.Release Unicode|x64.Build.0 = Release Unicode|x64
+ {20D781FB-4A20-4B75-B863-304A47182966}.Release|Win32.ActiveCfg = Release|Win32
+ {20D781FB-4A20-4B75-B863-304A47182966}.Release|Win32.Build.0 = Release|Win32
+ {20D781FB-4A20-4B75-B863-304A47182966}.Release|x64.ActiveCfg = Release|x64
+ {20D781FB-4A20-4B75-B863-304A47182966}.Release|x64.Build.0 = Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/plugins/Dbx_mmap_SA/db3x_mmap_sa_9.vcproj b/plugins/Dbx_mmap_SA/db3x_mmap_sa_9.vcproj
new file mode 100644
index 0000000000..6c30afd5b7
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/db3x_mmap_sa_9.vcproj
@@ -0,0 +1,961 @@
+<?xml version="1.0" encoding="windows-1251"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="dbx_mmap_sa"
+ ProjectGUID="{20D781FB-4A20-4B75-B863-304A47182966}"
+ RootNamespace="db3x_mmap_sa"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../include;../ExternalAPI"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DB3X_EXPORTS"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="commonheaders.h"
+ AssemblerListingLocation=""
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="comctl32.lib"
+ OutputFile="$(OutDir)/dbx_mmap_sa.dll"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ MapFileName=""
+ RandomizedBaseAddress="1"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)64/Plugins\"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)64/Obj/$(ProjectName)\"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../include;../ExternalAPI"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DB3X_EXPORTS"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="commonheaders.h"
+ AssemblerListingLocation=""
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="comctl32.lib"
+ OutputFile="$(OutDir)/dbx_mmap_sa.dll"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ MapFileName=""
+ RandomizedBaseAddress="1"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ InlineFunctionExpansion="2"
+ FavorSizeOrSpeed="2"
+ OmitFramePointers="true"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../include;../ExternalAPI"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DB3X_EXPORTS"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="commonheaders.h"
+ AssemblerListingLocation=""
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ OutputFile="$(OutDir)/dbx_mmap_sa.dll"
+ SuppressStartupBanner="true"
+ AdditionalManifestDependencies="type=&apos;Win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; processorArchitecture=&apos;X86&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos;"
+ GenerateDebugInformation="true"
+ GenerateMapFile="false"
+ MapFileName=""
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="1"
+ BaseAddress="0x5130000"
+ RandomizedBaseAddress="1"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)64/Plugins\"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)64/Obj/$(ProjectName)\"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ InlineFunctionExpansion="2"
+ FavorSizeOrSpeed="2"
+ OmitFramePointers="true"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../include;../ExternalAPI"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DB3X_EXPORTS"
+ StringPooling="true"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="commonheaders.h"
+ AssemblerListingLocation=""
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="3"
+ CompileAs="0"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ OutputFile="$(OutDir)/dbx_mmap_sa.dll"
+ SuppressStartupBanner="true"
+ AdditionalManifestDependencies="type=&apos;Win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; processorArchitecture=&apos;X86&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos;"
+ GenerateDebugInformation="true"
+ GenerateMapFile="false"
+ MapFileName=""
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="1"
+ BaseAddress="0x5130000"
+ RandomizedBaseAddress="1"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug Unicode|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../include;../ExternalAPI"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DB3X_EXPORTS"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="commonheaders.h"
+ AssemblerListingLocation=""
+ WarningLevel="3"
+ DebugInformationFormat="4"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="comctl32.lib"
+ GenerateDebugInformation="true"
+ MapFileName=""
+ RandomizedBaseAddress="1"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug Unicode|x64"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)64/Plugins\"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)64/Obj/$(ProjectName)\"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../include;../ExternalAPI"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DB3X_EXPORTS"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="commonheaders.h"
+ AssemblerListingLocation=""
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="comctl32.lib"
+ GenerateDebugInformation="true"
+ MapFileName=""
+ RandomizedBaseAddress="1"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release Unicode|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)/Plugins"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ InlineFunctionExpansion="2"
+ FavorSizeOrSpeed="2"
+ OmitFramePointers="true"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../include;../ExternalAPI"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DB3X_EXPORTS"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="commonheaders.h"
+ AssemblerListingLocation=""
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ AdditionalDependencies="comctl32.lib"
+ AdditionalManifestDependencies="type=&apos;Win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; processorArchitecture=&apos;X86&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos;"
+ GenerateDebugInformation="true"
+ MapFileName=""
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ BaseAddress="0x5130000"
+ RandomizedBaseAddress="1"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release Unicode|x64"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)64/Plugins\"
+ IntermediateDirectory="$(SolutionDir)$(ConfigurationName)64/Obj/$(ProjectName)\"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="3"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ InlineFunctionExpansion="2"
+ FavorSizeOrSpeed="2"
+ OmitFramePointers="true"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../include;../ExternalAPI"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DB3X_EXPORTS"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="commonheaders.h"
+ AssemblerListingLocation=""
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="true"
+ AdditionalDependencies="comctl32.lib"
+ AdditionalManifestDependencies="type=&apos;Win32&apos; name=&apos;Microsoft.Windows.Common-Controls&apos; version=&apos;6.0.0.0&apos; processorArchitecture=&apos;X86&apos; publicKeyToken=&apos;6595b64144ccf1df&apos; language=&apos;*&apos;"
+ GenerateDebugInformation="true"
+ MapFileName=""
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ BaseAddress="0x5130000"
+ RandomizedBaseAddress="1"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ <AssemblyReference
+ RelativePath="System.dll"
+ AssemblyName="System, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
+ MinFrameworkVersion="131072"
+ />
+ <AssemblyReference
+ RelativePath="System.Data.dll"
+ AssemblyName="System.Data, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=x86"
+ MinFrameworkVersion="131072"
+ />
+ <AssemblyReference
+ RelativePath="System.Drawing.dll"
+ AssemblyName="System.Drawing, Version=2.0.0.0, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
+ MinFrameworkVersion="131072"
+ />
+ <AssemblyReference
+ RelativePath="System.Windows.Forms.dll"
+ AssemblyName="System.Windows.Forms, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
+ MinFrameworkVersion="131072"
+ />
+ <AssemblyReference
+ RelativePath="System.XML.dll"
+ AssemblyName="System.Xml, Version=2.0.0.0, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"
+ MinFrameworkVersion="131072"
+ />
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath=".\commonheaders.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Unicode|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Unicode|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\database.c"
+ >
+ </File>
+ <File
+ RelativePath=".\dbcache.c"
+ >
+ </File>
+ <File
+ RelativePath=".\dbcontacts.c"
+ >
+ </File>
+ <File
+ RelativePath=".\dbevents.c"
+ >
+ </File>
+ <File
+ RelativePath=".\dbheaders.c"
+ >
+ </File>
+ <File
+ RelativePath=".\dbmodulechain.c"
+ >
+ </File>
+ <File
+ RelativePath=".\dbpreset.c"
+ >
+ </File>
+ <File
+ RelativePath=".\dbsettings.c"
+ >
+ </File>
+ <File
+ RelativePath=".\dialogs.c"
+ >
+ </File>
+ <File
+ RelativePath=".\encrypt.c"
+ >
+ </File>
+ <File
+ RelativePath=".\init.c"
+ >
+ </File>
+ <File
+ RelativePath=".\security.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath=".\commonheaders.h"
+ >
+ </File>
+ <File
+ RelativePath=".\database.h"
+ >
+ </File>
+ <File
+ RelativePath=".\options.h"
+ >
+ </File>
+ <File
+ RelativePath=".\resource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\version.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ <File
+ RelativePath=".\db3x_mmap.rc"
+ >
+ </File>
+ <File
+ RelativePath=".\icos\logo.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\icos\pass.ico"
+ >
+ </File>
+ <File
+ RelativePath=".\version.rc"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/plugins/Dbx_mmap_SA/dbcache.c b/plugins/Dbx_mmap_SA/dbcache.c
new file mode 100644
index 0000000000..8e177c6f6d
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/dbcache.c
@@ -0,0 +1,206 @@
+/*
+
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2000-2003 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#include "commonheaders.h"
+
+BOOL safetyMode = TRUE;
+static UINT_PTR flushBuffersTimerId;
+
+static PBYTE pNull = 0;
+static PBYTE pDbCache = NULL;
+static HANDLE hMap = NULL;
+static DWORD dwFileSize = 0;
+static DWORD ChunkSize = 65536;
+static DWORD flushFailTick = 0;
+
+
+void Map()
+{
+ hMap = CreateFileMapping(hDbFile, NULL, PAGE_READWRITE, 0, dwFileSize, NULL);
+
+ if (hMap)
+ {
+ pDbCache = MapViewOfFile(hMap, FILE_MAP_ALL_ACCESS/*FILE_MAP_WRITE*/, 0, 0 ,0);
+ if (!pDbCache)
+ DatabaseCorruption( _T("%s (MapViewOfFile failed. Code: %d)"));
+ }
+ else
+ DatabaseCorruption( _T("%s (CreateFileMapping failed. Code: %d)"));
+}
+
+void ReMap(DWORD needed)
+{
+ KillTimer(NULL,flushBuffersTimerId);
+
+ log3("remapping %d + %d (file end: %d)",dwFileSize,needed,dbHeader.ofsFileEnd);
+
+ if (needed > ChunkSize)
+ {
+ if (needed + dwFileSize > dbHeader.ofsFileEnd + ChunkSize)
+ DatabaseCorruption( _T("%s (Too large increment)"));
+ else
+ {
+ DWORD x = dbHeader.ofsFileEnd/ChunkSize;
+ dwFileSize = (x+1)*ChunkSize;
+ }
+ }
+ else
+ dwFileSize += ChunkSize;
+
+// FlushViewOfFile(pDbCache, 0);
+ UnmapViewOfFile(pDbCache);
+ pDbCache = NULL;
+ CloseHandle(hMap);
+
+ Map();
+}
+
+void DBMoveChunk(DWORD ofsDest,DWORD ofsSource,int bytes)
+{
+ int x = 0;
+ log3("move %d %08x->%08x",bytes,ofsSource,ofsDest);
+ if (ofsDest+bytes>dwFileSize) ReMap(ofsDest+bytes-dwFileSize);
+ if (ofsSource+bytes>dwFileSize) {
+ x = ofsSource+bytes-dwFileSize;
+ log0("buggy move!");
+ _ASSERT(0);
+ }
+ if (x > 0)
+ ZeroMemory(pDbCache+ofsDest+bytes-x, x);
+ if (ofsSource < dwFileSize)
+ MoveMemory(pDbCache+ofsDest,pDbCache+ofsSource, bytes-x);
+
+ logg();
+}
+
+//we are assumed to be in a mutex here
+PBYTE DBRead(DWORD ofs,int bytesRequired,int *bytesAvail)
+{
+ // buggy read
+ if (ofs>=dwFileSize) {
+ log2("read from outside %d@%08x",bytesRequired,ofs);
+ if (bytesAvail!=NULL) *bytesAvail = ChunkSize;
+ return pNull;
+ }
+ log3((ofs+bytesRequired>dwFileSize)?"read %d@%08x, only %d avaliable":"read %d@%08x",bytesRequired,ofs,dwFileSize-ofs);
+ if (bytesAvail!=NULL) *bytesAvail = dwFileSize - ofs;
+ return pDbCache+ofs;
+}
+
+//we are assumed to be in a mutex here
+void DBWrite(DWORD ofs,PVOID pData,int bytes)
+{
+ log2("write %d@%08x",bytes,ofs);
+ if (ofs+bytes>dwFileSize) ReMap(ofs+bytes-dwFileSize);
+ MoveMemory(pDbCache+ofs,pData,bytes);
+ logg();
+}
+
+//we are assumed to be in a mutex here
+void DBFill(DWORD ofs,int bytes)
+{
+ log2("zerofill %d@%08x",bytes,ofs);
+ if (ofs+bytes<=dwFileSize)
+ ZeroMemory(pDbCache+ofs,bytes);
+ logg();
+}
+
+static VOID CALLBACK DoBufferFlushTimerProc(HWND hwnd, UINT message, UINT_PTR idEvent, DWORD dwTime)
+{
+ if (!pDbCache) return;
+
+ KillTimer(NULL,flushBuffersTimerId);
+ log0("tflush1");
+ if (FlushViewOfFile(pDbCache, 0) == 0) {
+ if (flushFailTick == 0)
+ flushFailTick = GetTickCount();
+ else if (GetTickCount() - flushFailTick > 5000)
+ DatabaseCorruption(NULL);
+ }
+ else
+ flushFailTick = 0;
+ log0("tflush2");
+}
+
+void DBFlush(int setting)
+{
+ if(!setting) {
+ log0("nflush1");
+ if(safetyMode && pDbCache) {
+ if (FlushViewOfFile(pDbCache, 0) == 0) {
+ if (flushFailTick == 0)
+ flushFailTick = GetTickCount();
+ else if (GetTickCount() - flushFailTick > 5000)
+ DatabaseCorruption(NULL);
+ }
+ else
+ flushFailTick = 0;
+ }
+ log0("nflush2");
+ return;
+ }
+ KillTimer(NULL,flushBuffersTimerId);
+ flushBuffersTimerId=SetTimer(NULL,flushBuffersTimerId,50,DoBufferFlushTimerProc);
+}
+
+static INT_PTR CacheSetSafetyMode(WPARAM wParam,LPARAM lParam)
+{
+ EnterCriticalSection(&csDbAccess);
+ safetyMode=wParam;
+ LeaveCriticalSection(&csDbAccess);
+ DBFlush(1);
+ return 0;
+}
+
+int InitCache(void)
+{
+ DWORD x;
+ SYSTEM_INFO sinf;
+
+ GetSystemInfo(&sinf);
+ ChunkSize = sinf.dwAllocationGranularity;
+
+ dwFileSize = GetFileSize(hDbFile, NULL);
+
+ // Align to chunk
+ x = dwFileSize % ChunkSize;
+ if (x) dwFileSize += ChunkSize - x;
+
+ Map();
+
+ // zero region for reads outside the file
+ pNull = calloc(ChunkSize,1);
+
+ CreateServiceFunction(MS_DB_SETSAFETYMODE,CacheSetSafetyMode);
+
+ return 0;
+}
+
+void UninitCache(void)
+{
+ KillTimer(NULL,flushBuffersTimerId);
+ FlushViewOfFile(pDbCache, 0);
+ UnmapViewOfFile(pDbCache);
+ CloseHandle(hMap);
+ if (pNull) free(pNull);
+}
diff --git a/plugins/Dbx_mmap_SA/dbcontacts.c b/plugins/Dbx_mmap_SA/dbcontacts.c
new file mode 100644
index 0000000000..0803f1f746
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/dbcontacts.c
@@ -0,0 +1,299 @@
+/*
+
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2000-2003 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#include "commonheaders.h"
+
+extern HANDLE hCacheHeap;
+extern SortedList lContacts;
+extern HANDLE hLastCachedContact;
+
+INT_PTR GetContactSettingStatic(WPARAM wParam,LPARAM lParam);
+void FreeCachedVariant( DBVARIANT* V );
+
+static INT_PTR GetContactCount(WPARAM wParam,LPARAM lParam);
+static INT_PTR FindFirstContact(WPARAM wParam,LPARAM lParam);
+static INT_PTR FindNextContact(WPARAM wParam,LPARAM lParam);
+static INT_PTR DeleteContact(WPARAM wParam,LPARAM lParam);
+static INT_PTR AddContact(WPARAM wParam,LPARAM lParam);
+static INT_PTR IsDbContact(WPARAM wParam,LPARAM lParam);
+
+static HANDLE hContactDeletedEvent,hContactAddedEvent;
+
+
+int InitContacts(void)
+{
+ CreateServiceFunction(MS_DB_CONTACT_GETCOUNT,GetContactCount);
+ CreateServiceFunction(MS_DB_CONTACT_FINDFIRST,FindFirstContact);
+ CreateServiceFunction(MS_DB_CONTACT_FINDNEXT,FindNextContact);
+ CreateServiceFunction(MS_DB_CONTACT_DELETE,DeleteContact);
+ CreateServiceFunction(MS_DB_CONTACT_ADD,AddContact);
+ CreateServiceFunction(MS_DB_CONTACT_IS,IsDbContact);
+ hContactDeletedEvent=CreateHookableEvent(ME_DB_CONTACT_DELETED);
+ hContactAddedEvent=CreateHookableEvent(ME_DB_CONTACT_ADDED);
+ return 0;
+}
+
+void UninitContacts(void)
+{
+}
+
+DBCachedContactValueList* AddToCachedContactList(HANDLE hContact, int index)
+{
+ DBCachedContactValueList* VL;
+ VL = (DBCachedContactValueList*)HeapAlloc(hCacheHeap,HEAP_ZERO_MEMORY,sizeof(DBCachedContactValueList));
+ VL->hContact = hContact;
+ if (index == -1) li.List_GetIndex(&lContacts,VL,&index);
+ li.List_Insert(&lContacts,VL,index);
+ return VL;
+}
+
+static INT_PTR GetContactCount(WPARAM wParam,LPARAM lParam)
+{
+ int ret;
+
+ EnterCriticalSection(&csDbAccess);
+ ret=dbHeader.contactCount;
+ LeaveCriticalSection(&csDbAccess);
+ return ret;
+}
+
+#define proto_module "Protocol"
+#define proto_setting "p"
+
+static int CheckProto(HANDLE hContact, const char *proto)
+{
+ static char protobuf[MAX_PATH] = {0};
+ static DBVARIANT dbv;
+ static DBCONTACTGETSETTING sVal = {proto_module,proto_setting,&dbv};
+
+ dbv.type = DBVT_ASCIIZ;
+ dbv.pszVal = protobuf;
+ dbv.cchVal = sizeof(protobuf);
+
+ if (GetContactSettingStatic((WPARAM)hContact, (LPARAM )&sVal) != 0
+ || (dbv.type != DBVT_ASCIIZ)) return 0;
+
+ return !strcmp(protobuf,proto);
+}
+
+static INT_PTR FindFirstContact(WPARAM wParam,LPARAM lParam)
+{
+ INT_PTR ret = 0;
+ EnterCriticalSection(&csDbAccess);
+ ret = (INT_PTR)dbHeader.ofsFirstContact;
+ if (lParam && !CheckProto((HANDLE)ret,(const char*)lParam))
+ ret = FindNextContact((WPARAM)ret,lParam);
+ LeaveCriticalSection(&csDbAccess);
+ return ret;
+}
+
+static INT_PTR FindNextContact(WPARAM wParam,LPARAM lParam)
+{
+ int index;
+ struct DBContact *dbc;
+ DBCachedContactValueList VLtemp, *VL = NULL;
+ VLtemp.hContact = (HANDLE)wParam;
+ EnterCriticalSection(&csDbAccess);
+ while(VLtemp.hContact) {
+ if ( li.List_GetIndex(&lContacts,&VLtemp,&index)) {
+ VL = ( DBCachedContactValueList* )lContacts.items[index];
+ if (VL->hNext != NULL) {
+ if (!lParam || CheckProto(VL->hNext,(const char*)lParam)) {
+ LeaveCriticalSection(&csDbAccess);
+ return (INT_PTR)VL->hNext;
+ }
+ else {
+ VLtemp.hContact = VL->hNext;
+ continue;
+ } } }
+
+ dbc=(struct DBContact*)DBRead((DWORD)VLtemp.hContact,sizeof(struct DBContact),NULL);
+ if (dbc->signature!=DBCONTACT_SIGNATURE)
+ break;
+ else {
+ if ( VL == NULL )
+ VL = AddToCachedContactList(VLtemp.hContact,index);
+
+ VL->hNext = (HANDLE)dbc->ofsNext;
+ if (VL->hNext != NULL && (!lParam || CheckProto(VL->hNext,(const char*)lParam))) {
+ LeaveCriticalSection(&csDbAccess);
+ return (INT_PTR)VL->hNext;
+ }
+ VLtemp.hContact = VL->hNext;
+ } }
+ LeaveCriticalSection(&csDbAccess);
+ return 0;
+}
+
+static INT_PTR DeleteContact(WPARAM wParam,LPARAM lParam)
+{
+ struct DBContact *dbc,*dbcPrev;
+ DWORD ofsThis,ofsNext,ofsFirstEvent;
+ struct DBContactSettings *dbcs;
+ struct DBEvent *dbe;
+ int index;
+
+ if((HANDLE)wParam==NULL) return 1;
+ EnterCriticalSection(&csDbAccess);
+ dbc=(struct DBContact*)DBRead(wParam,sizeof(struct DBContact),NULL);
+ if(dbc->signature!=DBCONTACT_SIGNATURE) {
+ LeaveCriticalSection(&csDbAccess);
+ return 1;
+ }
+ if ( (HANDLE)wParam == (HANDLE)dbHeader.ofsUser ) {
+ LeaveCriticalSection(&csDbAccess);
+ log0("FATAL: del of user chain attempted.");
+ return 1;
+ }
+ log0("del contact");
+ LeaveCriticalSection(&csDbAccess);
+ //call notifier while outside mutex
+ NotifyEventHooks(hContactDeletedEvent,wParam,0);
+ //get back in
+ EnterCriticalSection(&csDbAccess);
+
+ { DBCachedContactValueList VLtemp;
+ VLtemp.hContact = (HANDLE)wParam;
+ if ( li.List_GetIndex(&lContacts,&VLtemp,&index))
+ {
+ DBCachedContactValueList *VL = ( DBCachedContactValueList* )lContacts.items[index];
+ DBCachedContactValue* V = VL->first;
+ while ( V != NULL ) {
+ DBCachedContactValue* V1 = V->next;
+ FreeCachedVariant(&V->value);
+ HeapFree( hCacheHeap, 0, V );
+ V = V1;
+ }
+ HeapFree( hCacheHeap, 0, VL );
+
+ if (VLtemp.hContact == hLastCachedContact)
+ hLastCachedContact = NULL;
+ li.List_Remove(&lContacts,index);
+ } }
+
+ dbc=(struct DBContact*)DBRead(wParam,sizeof(struct DBContact),NULL);
+ //delete settings chain
+ ofsThis=dbc->ofsFirstSettings;
+ ofsFirstEvent=dbc->ofsFirstEvent;
+ while(ofsThis) {
+ dbcs=(struct DBContactSettings*)DBRead(ofsThis,sizeof(struct DBContactSettings),NULL);
+ ofsNext=dbcs->ofsNext;
+ DeleteSpace(ofsThis,offsetof(struct DBContactSettings,blob)+dbcs->cbBlob);
+ ofsThis=ofsNext;
+ }
+ //delete event chain
+ ofsThis=ofsFirstEvent;
+ while(ofsThis) {
+ dbe=(struct DBEvent*)DBRead(ofsThis,sizeof(struct DBEvent),NULL);
+ ofsNext=dbe->ofsNext;
+ DeleteSpace(ofsThis,offsetof(struct DBEvent,blob)+dbe->cbBlob);
+ ofsThis=ofsNext;
+ }
+ //find previous contact in chain and change ofsNext
+ dbc=(struct DBContact*)DBRead(wParam,sizeof(struct DBContact),NULL);
+ if(dbHeader.ofsFirstContact==wParam) {
+ dbHeader.ofsFirstContact=dbc->ofsNext;
+ DBWrite(0,&dbHeader,sizeof(dbHeader));
+ }
+ else {
+ ofsNext=dbc->ofsNext;
+ ofsThis=dbHeader.ofsFirstContact;
+ dbcPrev=(struct DBContact*)DBRead(ofsThis,sizeof(struct DBContact),NULL);
+ while(dbcPrev->ofsNext!=wParam) {
+ if(dbcPrev->ofsNext==0) DatabaseCorruption(NULL);
+ ofsThis=dbcPrev->ofsNext;
+ dbcPrev=(struct DBContact*)DBRead(ofsThis,sizeof(struct DBContact),NULL);
+ }
+ dbcPrev->ofsNext=ofsNext;
+ DBWrite(ofsThis,dbcPrev,sizeof(struct DBContact));
+ {
+ DBCachedContactValueList VLtemp;
+ VLtemp.hContact = (HANDLE)ofsThis;
+ if ( li.List_GetIndex(&lContacts,&VLtemp,&index))
+ {
+ DBCachedContactValueList *VL = ( DBCachedContactValueList* )lContacts.items[index];
+ VL->hNext = ( HANDLE )ofsNext;
+ } }
+ }
+ //delete contact
+ DeleteSpace(wParam,sizeof(struct DBContact));
+ //decrement contact count
+ dbHeader.contactCount--;
+ DBWrite(0,&dbHeader,sizeof(dbHeader));
+ DBFlush(0);
+ //quit
+ LeaveCriticalSection(&csDbAccess);
+ return 0;
+}
+
+static INT_PTR AddContact(WPARAM wParam,LPARAM lParam)
+{
+ struct DBContact dbc;
+ DWORD ofsNew;
+
+ log0("add contact");
+ EnterCriticalSection(&csDbAccess);
+ ofsNew=CreateNewSpace(sizeof(struct DBContact));
+ dbc.signature=DBCONTACT_SIGNATURE;
+ dbc.eventCount=0;
+ dbc.ofsFirstEvent=dbc.ofsLastEvent=0;
+ dbc.ofsFirstSettings=0;
+ dbc.ofsNext=dbHeader.ofsFirstContact;
+ dbc.ofsFirstUnreadEvent=0;
+ dbc.timestampFirstUnread=0;
+ dbHeader.ofsFirstContact=ofsNew;
+ dbHeader.contactCount++;
+ DBWrite(ofsNew,&dbc,sizeof(struct DBContact));
+ DBWrite(0,&dbHeader,sizeof(dbHeader));
+ DBFlush(0);
+
+ AddToCachedContactList((HANDLE)ofsNew, -1);
+
+ LeaveCriticalSection(&csDbAccess);
+ NotifyEventHooks(hContactAddedEvent,(WPARAM)ofsNew,0);
+ return (INT_PTR)ofsNew;
+}
+
+static INT_PTR IsDbContact(WPARAM wParam,LPARAM lParam)
+{
+ struct DBContact *dbc;
+ DWORD ofsContact=(DWORD)wParam;
+ int ret;
+
+ EnterCriticalSection(&csDbAccess);
+ {
+ int index;
+ DBCachedContactValueList VLtemp;
+ VLtemp.hContact = (HANDLE)wParam;
+ if ( li.List_GetIndex(&lContacts,&VLtemp,&index))
+ ret = TRUE;
+ else {
+ dbc=(struct DBContact*)DBRead(ofsContact,sizeof(struct DBContact),NULL);
+ ret=dbc->signature==DBCONTACT_SIGNATURE;
+ if (ret)
+ AddToCachedContactList((HANDLE)wParam, index);
+ } }
+
+ LeaveCriticalSection(&csDbAccess);
+ return ret;
+}
diff --git a/plugins/Dbx_mmap_SA/dbevents.c b/plugins/Dbx_mmap_SA/dbevents.c
new file mode 100644
index 0000000000..afc3838b6d
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/dbevents.c
@@ -0,0 +1,499 @@
+/*
+
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2000-2003 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#include "commonheaders.h"
+
+extern BOOL safetyMode;
+
+DWORD GetModuleNameOfs(const char *szName);
+char *GetModuleNameByOfs(DWORD ofs);
+
+static INT_PTR GetEventCount(WPARAM wParam,LPARAM lParam);
+static INT_PTR AddEvent(WPARAM wParam,LPARAM lParam);
+static INT_PTR DeleteEvent(WPARAM wParam,LPARAM lParam);
+static INT_PTR GetBlobSize(WPARAM wParam,LPARAM lParam);
+static INT_PTR GetEvent(WPARAM wParam,LPARAM lParam);
+static INT_PTR MarkEventRead(WPARAM wParam,LPARAM lParam);
+static INT_PTR GetEventContact(WPARAM wParam,LPARAM lParam);
+static INT_PTR FindFirstEvent(WPARAM wParam,LPARAM lParam);
+static INT_PTR FindFirstUnreadEvent(WPARAM wParam,LPARAM lParam);
+static INT_PTR FindLastEvent(WPARAM wParam,LPARAM lParam);
+static INT_PTR FindNextEvent(WPARAM wParam,LPARAM lParam);
+static INT_PTR FindPrevEvent(WPARAM wParam,LPARAM lParam);
+
+static HANDLE hEventDeletedEvent,hEventAddedEvent,hEventFilterAddedEvent;
+
+int InitEvents(void)
+{
+ CreateServiceFunction(MS_DB_EVENT_GETCOUNT,GetEventCount);
+ CreateServiceFunction(MS_DB_EVENT_ADD,AddEvent);
+ CreateServiceFunction(MS_DB_EVENT_DELETE,DeleteEvent);
+ CreateServiceFunction(MS_DB_EVENT_GETBLOBSIZE,GetBlobSize);
+ CreateServiceFunction(MS_DB_EVENT_GET,GetEvent);
+ CreateServiceFunction(MS_DB_EVENT_MARKREAD,MarkEventRead);
+ CreateServiceFunction(MS_DB_EVENT_GETCONTACT,GetEventContact);
+ CreateServiceFunction(MS_DB_EVENT_FINDFIRST,FindFirstEvent);
+ CreateServiceFunction(MS_DB_EVENT_FINDFIRSTUNREAD,FindFirstUnreadEvent);
+ CreateServiceFunction(MS_DB_EVENT_FINDLAST,FindLastEvent);
+ CreateServiceFunction(MS_DB_EVENT_FINDNEXT,FindNextEvent);
+ CreateServiceFunction(MS_DB_EVENT_FINDPREV,FindPrevEvent);
+ hEventDeletedEvent=CreateHookableEvent(ME_DB_EVENT_DELETED);
+ hEventAddedEvent=CreateHookableEvent(ME_DB_EVENT_ADDED);
+ hEventFilterAddedEvent=CreateHookableEvent(ME_DB_EVENT_FILTER_ADD);
+ return 0;
+}
+
+void UninitEvents(void)
+{
+}
+
+static INT_PTR GetEventCount(WPARAM wParam,LPARAM lParam)
+{
+ INT_PTR ret;
+ struct DBContact *dbc;
+
+ EnterCriticalSection(&csDbAccess);
+ if(wParam==0) wParam=dbHeader.ofsUser;
+ dbc=(struct DBContact*)DBRead(wParam,sizeof(struct DBContact),NULL);
+ if(dbc->signature!=DBCONTACT_SIGNATURE) ret=-1;
+ else ret=dbc->eventCount;
+ LeaveCriticalSection(&csDbAccess);
+ return ret;
+}
+
+static INT_PTR AddEvent(WPARAM wParam,LPARAM lParam)
+{
+ DBEVENTINFO *dbei=(DBEVENTINFO*)lParam;
+ struct DBContact dbc;
+ struct DBEvent dbe,*dbeTest;
+ DWORD ofsNew,ofsModuleName,ofsContact,ofsThis;
+ BOOL neednotify;
+
+ if(dbei==NULL||dbei->cbSize!=sizeof(DBEVENTINFO)) return 0;
+ if(dbei->timestamp==0) return 0;
+ if (NotifyEventHooks(hEventFilterAddedEvent,wParam,lParam)) {
+ return 0;
+ }
+ EnterCriticalSection(&csDbAccess);
+ if(wParam==0) ofsContact=dbHeader.ofsUser;
+ else ofsContact=(DWORD)wParam;
+ dbc=*(struct DBContact*)DBRead(ofsContact,sizeof(struct DBContact),NULL);
+ if(dbc.signature!=DBCONTACT_SIGNATURE) {
+ LeaveCriticalSection(&csDbAccess);
+ return 0;
+ }
+ ofsNew=CreateNewSpace(offsetof(struct DBEvent,blob)+dbei->cbBlob);
+ ofsModuleName=GetModuleNameOfs(dbei->szModule);
+
+ dbe.signature=DBEVENT_SIGNATURE;
+ dbe.ofsModuleName=ofsModuleName;
+ dbe.timestamp=dbei->timestamp;
+ dbe.flags=dbei->flags;
+ dbe.eventType=dbei->eventType;
+ dbe.cbBlob=dbei->cbBlob;
+ //find where to put it - sort by timestamp
+ if(dbc.eventCount==0) {
+ dbe.ofsPrev=wParam;
+ dbe.ofsNext=0;
+ dbe.flags|=DBEF_FIRST;
+ dbc.ofsFirstEvent=dbc.ofsLastEvent=ofsNew;
+ }
+ else {
+ dbeTest=(struct DBEvent*)DBRead(dbc.ofsFirstEvent,sizeof(struct DBEvent),NULL);
+ // Should new event be placed before first event in chain?
+ if (dbei->timestamp < dbeTest->timestamp) {
+ dbe.ofsPrev=wParam;
+ dbe.ofsNext=dbc.ofsFirstEvent;
+ dbe.flags|=DBEF_FIRST;
+ dbc.ofsFirstEvent=ofsNew;
+ dbeTest=(struct DBEvent*)DBRead(dbe.ofsNext,sizeof(struct DBEvent),NULL);
+ dbeTest->flags&=~DBEF_FIRST;
+ dbeTest->ofsPrev=ofsNew;
+ DBWrite(dbe.ofsNext,dbeTest,sizeof(struct DBEvent));
+ }
+ else {
+ // Loop through the chain, starting at the end
+ ofsThis = dbc.ofsLastEvent;
+ dbeTest = (struct DBEvent*)DBRead(ofsThis, sizeof(struct DBEvent), NULL);
+ for(;;) {
+ // If the new event's timesstamp is equal to or greater than the
+ // current dbevent, it will be inserted after. If not, continue
+ // with the previous dbevent in chain.
+ if (dbe.timestamp >= dbeTest->timestamp) {
+ dbe.ofsPrev = ofsThis;
+ dbe.ofsNext = dbeTest->ofsNext;
+ dbeTest->ofsNext = ofsNew;
+ DBWrite(ofsThis, dbeTest, sizeof(struct DBEvent));
+ if (dbe.ofsNext == 0)
+ dbc.ofsLastEvent = ofsNew;
+ else {
+ dbeTest = (struct DBEvent*)DBRead(dbe.ofsNext, sizeof(struct DBEvent), NULL);
+ dbeTest->ofsPrev = ofsNew;
+ DBWrite(dbe.ofsNext, dbeTest, sizeof(struct DBEvent));
+ }
+ break;
+ }
+ ofsThis = dbeTest->ofsPrev;
+ dbeTest = (struct DBEvent*)DBRead(ofsThis, sizeof(struct DBEvent), NULL);
+ }
+ }
+ }
+ dbc.eventCount++;
+ if(!(dbe.flags&(DBEF_READ|DBEF_SENT))) {
+ if(dbe.timestamp<dbc.timestampFirstUnread || dbc.timestampFirstUnread==0) {
+ dbc.timestampFirstUnread=dbe.timestamp;
+ dbc.ofsFirstUnreadEvent=ofsNew;
+ }
+ neednotify = TRUE;
+ }
+ else neednotify = safetyMode;
+
+ DBWrite(ofsContact,&dbc,sizeof(struct DBContact));
+ DBWrite(ofsNew,&dbe,offsetof(struct DBEvent,blob));
+ EncodeDBWrite(ofsNew+offsetof(struct DBEvent,blob),dbei->pBlob,dbei->cbBlob);
+ DBFlush(0);
+
+ LeaveCriticalSection(&csDbAccess);
+ log1("add event @ %08x",ofsNew);
+
+ // Notify only in safe mode or on really new events
+ if (neednotify)
+ NotifyEventHooks(hEventAddedEvent,wParam,(LPARAM)ofsNew);
+
+ return (INT_PTR)ofsNew;
+}
+
+static INT_PTR DeleteEvent(WPARAM wParam,LPARAM lParam)
+{
+ struct DBContact dbc;
+ DWORD ofsContact,ofsThis;
+ struct DBEvent dbe,*dbeNext,*dbePrev;
+
+ EnterCriticalSection(&csDbAccess);
+ if(wParam==0) ofsContact=dbHeader.ofsUser;
+ else ofsContact=wParam;
+ dbc=*(struct DBContact*)DBRead(ofsContact,sizeof(struct DBContact),NULL);
+ dbe=*(struct DBEvent*)DBRead(lParam,sizeof(struct DBEvent),NULL);
+ if(dbc.signature!=DBCONTACT_SIGNATURE || dbe.signature!=DBEVENT_SIGNATURE) {
+ LeaveCriticalSection(&csDbAccess);
+ return 1;
+ }
+ log1("delete event @ %08x",wParam);
+ LeaveCriticalSection(&csDbAccess);
+ //call notifier while outside mutex
+ NotifyEventHooks(hEventDeletedEvent,wParam,lParam);
+ //get back in
+ EnterCriticalSection(&csDbAccess);
+ dbc=*(struct DBContact*)DBRead(ofsContact,sizeof(struct DBContact),NULL);
+ dbe=*(struct DBEvent*)DBRead(lParam,sizeof(struct DBEvent),NULL);
+ //check if this was the first unread, if so, recalc the first unread
+ if(dbc.ofsFirstUnreadEvent==(DWORD)lParam) {
+ dbeNext=&dbe;
+ for(;;) {
+ if(dbeNext->ofsNext==0) {
+ dbc.ofsFirstUnreadEvent=0;
+ dbc.timestampFirstUnread=0;
+ break;
+ }
+ ofsThis=dbeNext->ofsNext;
+ dbeNext=(struct DBEvent*)DBRead(ofsThis,sizeof(struct DBEvent),NULL);
+ if(!(dbeNext->flags&(DBEF_READ|DBEF_SENT))) {
+ dbc.ofsFirstUnreadEvent=ofsThis;
+ dbc.timestampFirstUnread=dbeNext->timestamp;
+ break;
+ }
+ }
+ }
+ //get previous and next events in chain and change offsets
+ if(dbe.flags&DBEF_FIRST) {
+ if(dbe.ofsNext==0) {
+ dbc.ofsFirstEvent=dbc.ofsLastEvent=0;
+ }
+ else {
+ dbeNext=(struct DBEvent*)DBRead(dbe.ofsNext,sizeof(struct DBEvent),NULL);
+ dbeNext->flags|=DBEF_FIRST;
+ dbeNext->ofsPrev=dbe.ofsPrev;
+ DBWrite(dbe.ofsNext,dbeNext,sizeof(struct DBEvent));
+ dbc.ofsFirstEvent=dbe.ofsNext;
+ }
+ }
+ else {
+ if(dbe.ofsNext==0) {
+ dbePrev=(struct DBEvent*)DBRead(dbe.ofsPrev,sizeof(struct DBEvent),NULL);
+ dbePrev->ofsNext=0;
+ DBWrite(dbe.ofsPrev,dbePrev,sizeof(struct DBEvent));
+ dbc.ofsLastEvent=dbe.ofsPrev;
+ }
+ else {
+ dbePrev=(struct DBEvent*)DBRead(dbe.ofsPrev,sizeof(struct DBEvent),NULL);
+ dbePrev->ofsNext=dbe.ofsNext;
+ DBWrite(dbe.ofsPrev,dbePrev,sizeof(struct DBEvent));
+ dbeNext=(struct DBEvent*)DBRead(dbe.ofsNext,sizeof(struct DBEvent),NULL);
+ dbeNext->ofsPrev=dbe.ofsPrev;
+ DBWrite(dbe.ofsNext,dbeNext,sizeof(struct DBEvent));
+ }
+ }
+ //delete event
+ DeleteSpace(lParam,offsetof(struct DBEvent,blob)+dbe.cbBlob);
+ //decrement event count
+ dbc.eventCount--;
+ DBWrite(ofsContact,&dbc,sizeof(struct DBContact));
+ DBFlush(0);
+ //quit
+ LeaveCriticalSection(&csDbAccess);
+ return 0;
+}
+
+static INT_PTR GetBlobSize(WPARAM wParam,LPARAM lParam)
+{
+ INT_PTR ret;
+ struct DBEvent *dbe;
+
+ EnterCriticalSection(&csDbAccess);
+ dbe=(struct DBEvent*)DBRead(wParam,sizeof(struct DBEvent),NULL);
+ if(dbe->signature!=DBEVENT_SIGNATURE) ret=-1;
+ else ret=dbe->cbBlob;
+
+ LeaveCriticalSection(&csDbAccess);
+ return ret;
+}
+
+void EncodeContactEvents(HANDLE hContact)
+{
+ HANDLE hEvent;
+
+ hEvent = (HANDLE)FindFirstEvent((WPARAM)hContact, 0);
+ if(hEvent == 0) return;
+ do{
+ EncodeEvent(hEvent);
+ }while (hEvent = (HANDLE)FindNextEvent((WPARAM)hEvent, 0));
+}
+
+extern Cryptor* CryptoEngine;
+extern void* key;
+
+void EncodeEvent(HANDLE hEvent)
+{
+ struct DBEvent *dbe;
+
+ dbe=(struct DBEvent*)DBRead((DWORD)hEvent,sizeof(struct DBEvent),NULL);
+ if(dbe->signature=DBEVENT_SIGNATURE){
+ CryptoEngine->EncryptMem(DBRead((DWORD)hEvent + offsetof(struct DBEvent,blob), dbe->cbBlob, NULL), dbe->cbBlob, key);
+ //EncodeDBWrite((DWORD)hEvent + offsetof(struct DBEvent,blob), DBRead((DWORD)hEvent + offsetof(struct DBEvent,blob), dbe->cbBlob, NULL), dbe->cbBlob);
+ }
+
+}
+
+void DecodeEvent(HANDLE hEvent)
+{
+ struct DBEvent *dbe;
+
+ dbe=(struct DBEvent*)DBRead((DWORD)hEvent,sizeof(struct DBEvent),NULL);
+ if(dbe->signature=DBEVENT_SIGNATURE){
+ CryptoEngine->DecryptMem(DBRead((DWORD)hEvent + offsetof(struct DBEvent,blob), dbe->cbBlob, NULL), dbe->cbBlob, key);
+ }
+
+}
+
+void DecodeContactEvents(HANDLE hContact)
+{
+ HANDLE hEvent;
+
+ hEvent = (HANDLE)FindFirstEvent((WPARAM)hContact, 0);
+ if(hEvent == 0) return;
+ do{
+ DecodeEvent(hEvent);
+ }while (hEvent = (HANDLE)FindNextEvent((WPARAM)hEvent, 0));
+}
+
+
+INT_PTR GetEvent(WPARAM wParam, LPARAM lParam)
+{
+ struct DBEvent *dbe;
+ DBEVENTINFO *dbei=(DBEVENTINFO*)lParam;
+ int bytesToCopy,i;
+
+ if(dbei==NULL||dbei->cbSize!=sizeof(DBEVENTINFO)) return 1;
+ if(dbei->cbBlob>0 && dbei->pBlob==NULL) {
+ dbei->cbBlob = 0;
+ return 1;
+ }
+ EnterCriticalSection(&csDbAccess);
+ dbe=(struct DBEvent*)DBRead(wParam,sizeof(struct DBEvent),NULL);
+ if(dbe->signature!=DBEVENT_SIGNATURE) {
+ LeaveCriticalSection(&csDbAccess);
+ return 1;
+ }
+ dbei->szModule=GetModuleNameByOfs(dbe->ofsModuleName);
+ dbei->timestamp=dbe->timestamp;
+ dbei->flags=dbe->flags;
+ dbei->eventType=dbe->eventType;
+ if(dbei->cbBlob<dbe->cbBlob) bytesToCopy=dbei->cbBlob;
+ else bytesToCopy=dbe->cbBlob;
+ dbei->cbBlob=dbe->cbBlob;
+ if (bytesToCopy && dbei->pBlob)
+ {
+ for(i=0;;i+=MAXCACHEDREADSIZE) {
+ if(bytesToCopy-i<=MAXCACHEDREADSIZE) {
+ DecodeCopyMemory(dbei->pBlob+i,DBRead(wParam+offsetof(struct DBEvent,blob)+i,bytesToCopy-i,NULL),bytesToCopy-i);
+ break;
+ }
+ DecodeCopyMemory(dbei->pBlob+i,DBRead(wParam+offsetof(struct DBEvent,blob)+i,MAXCACHEDREADSIZE,NULL),MAXCACHEDREADSIZE);
+ }
+ }
+ LeaveCriticalSection(&csDbAccess);
+ return 0;
+}
+
+static INT_PTR MarkEventRead(WPARAM wParam,LPARAM lParam)
+{
+ INT_PTR ret;
+ struct DBEvent *dbe;
+ struct DBContact dbc;
+ DWORD ofsThis;
+
+ EnterCriticalSection(&csDbAccess);
+ if(wParam==0) wParam=dbHeader.ofsUser;
+ dbc=*(struct DBContact*)DBRead(wParam,sizeof(struct DBContact),NULL);
+ dbe=(struct DBEvent*)DBRead(lParam,sizeof(struct DBEvent),NULL);
+ if(dbe->signature!=DBEVENT_SIGNATURE || dbc.signature!=DBCONTACT_SIGNATURE) {
+ LeaveCriticalSection(&csDbAccess);
+ return -1;
+ }
+ if(dbe->flags&DBEF_READ || dbe->flags&DBEF_SENT) {
+ ret=(INT_PTR)dbe->flags;
+ LeaveCriticalSection(&csDbAccess);
+ return ret;
+ }
+ log1("mark read @ %08x",wParam);
+ dbe->flags|=DBEF_READ;
+ DBWrite(lParam,dbe,sizeof(struct DBEvent));
+ ret=(int)dbe->flags;
+ if(dbc.ofsFirstUnreadEvent==(DWORD)lParam) {
+ for(;;) {
+ if(dbe->ofsNext==0) {
+ dbc.ofsFirstUnreadEvent=0;
+ dbc.timestampFirstUnread=0;
+ break;
+ }
+ ofsThis=dbe->ofsNext;
+ dbe=(struct DBEvent*)DBRead(ofsThis,sizeof(struct DBEvent),NULL);
+ if(!(dbe->flags&(DBEF_READ|DBEF_SENT))) {
+ dbc.ofsFirstUnreadEvent=ofsThis;
+ dbc.timestampFirstUnread=dbe->timestamp;
+ break;
+ }
+ }
+ }
+ DBWrite(wParam,&dbc,sizeof(struct DBContact));
+ DBFlush(0);
+ LeaveCriticalSection(&csDbAccess);
+ return ret;
+}
+
+static INT_PTR GetEventContact(WPARAM wParam,LPARAM lParam)
+{
+ int ret;
+ struct DBEvent *dbe;
+
+ EnterCriticalSection(&csDbAccess);
+ dbe=(struct DBEvent*)DBRead(wParam,sizeof(struct DBEvent),NULL);
+ if(dbe->signature!=DBEVENT_SIGNATURE) {
+ LeaveCriticalSection(&csDbAccess);
+ return -1;
+ }
+ while(!(dbe->flags&DBEF_FIRST))
+ dbe=(struct DBEvent*)DBRead(dbe->ofsPrev,sizeof(struct DBEvent),NULL);
+ ret=(INT_PTR)dbe->ofsPrev;
+ LeaveCriticalSection(&csDbAccess);
+ return ret;
+}
+
+static INT_PTR FindFirstEvent(WPARAM wParam,LPARAM lParam)
+{
+ INT_PTR ret;
+ struct DBContact *dbc;
+
+ EnterCriticalSection(&csDbAccess);
+ if(wParam==0) wParam=dbHeader.ofsUser;
+ dbc=(struct DBContact*)DBRead(wParam,sizeof(struct DBContact),NULL);
+ if(dbc->signature!=DBCONTACT_SIGNATURE) ret=0;
+ else ret=(INT_PTR)dbc->ofsFirstEvent;
+ LeaveCriticalSection(&csDbAccess);
+ return ret;
+}
+
+static INT_PTR FindFirstUnreadEvent(WPARAM wParam,LPARAM lParam)
+{
+ INT_PTR ret;
+ struct DBContact *dbc;
+
+ EnterCriticalSection(&csDbAccess);
+ if(wParam==0) wParam=dbHeader.ofsUser;
+ dbc=(struct DBContact*)DBRead(wParam,sizeof(struct DBContact),NULL);
+ if(dbc->signature!=DBCONTACT_SIGNATURE) ret=0;
+ else ret=(INT_PTR)dbc->ofsFirstUnreadEvent;
+ LeaveCriticalSection(&csDbAccess);
+ return ret;
+}
+
+static INT_PTR FindLastEvent(WPARAM wParam,LPARAM lParam)
+{
+ INT_PTR ret;
+ struct DBContact *dbc;
+
+ EnterCriticalSection(&csDbAccess);
+ if(wParam==0) wParam=dbHeader.ofsUser;
+ dbc=(struct DBContact*)DBRead(wParam,sizeof(struct DBContact),NULL);
+ if(dbc->signature!=DBCONTACT_SIGNATURE) ret=0;
+ else ret=(INT_PTR)dbc->ofsLastEvent;
+ LeaveCriticalSection(&csDbAccess);
+ return ret;
+}
+
+static INT_PTR FindNextEvent(WPARAM wParam,LPARAM lParam)
+{
+ INT_PTR ret;
+ struct DBEvent *dbe;
+
+ EnterCriticalSection(&csDbAccess);
+ dbe=(struct DBEvent*)DBRead(wParam,sizeof(struct DBEvent),NULL);
+ if(dbe->signature!=DBEVENT_SIGNATURE) ret=0;
+ else ret=(INT_PTR)dbe->ofsNext;
+ LeaveCriticalSection(&csDbAccess);
+ return ret;
+}
+
+static INT_PTR FindPrevEvent(WPARAM wParam,LPARAM lParam)
+{
+ INT_PTR ret;
+ struct DBEvent *dbe;
+
+ EnterCriticalSection(&csDbAccess);
+ dbe=(struct DBEvent*)DBRead(wParam,sizeof(struct DBEvent),NULL);
+ if(dbe->signature!=DBEVENT_SIGNATURE) ret=0;
+ else if(dbe->flags&DBEF_FIRST) ret=0;
+ else ret=(INT_PTR)dbe->ofsPrev;
+ LeaveCriticalSection(&csDbAccess);
+ return ret;
+}
diff --git a/plugins/Dbx_mmap_SA/dbheaders.c b/plugins/Dbx_mmap_SA/dbheaders.c
new file mode 100644
index 0000000000..16c33dff2f
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/dbheaders.c
@@ -0,0 +1,75 @@
+/*
+
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2000-2003 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#include "commonheaders.h"
+
+//the cache has not been loaded when these functions are used
+
+int CreateDbHeaders(HANDLE hFile)
+{
+ struct DBContact user;
+ DWORD bytesWritten;
+
+ CopyMemory(dbHeader.signature,&dbSignature,sizeof(dbHeader.signature));
+ dbHeader.checkWord = 0x0700;
+ dbHeader.cryptorUID = 0x0000;
+ dbHeader.ofsFileEnd=sizeof(struct DBHeader);
+ dbHeader.slackSpace=0;
+ dbHeader.contactCount=0;
+ dbHeader.ofsFirstContact=0;
+ dbHeader.ofsFirstModuleName=0;
+ dbHeader.ofsUser=0;
+ //create user
+ dbHeader.ofsUser=dbHeader.ofsFileEnd;
+ dbHeader.ofsFileEnd+=sizeof(struct DBContact);
+
+ SetFilePointer(hFile,0,NULL,FILE_BEGIN);
+ WriteFile(hFile,&dbHeader,sizeof(dbHeader),&bytesWritten,NULL);
+ user.signature=DBCONTACT_SIGNATURE;
+ user.ofsNext=0;
+ user.ofsFirstSettings=0;
+ user.eventCount=0;
+ user.ofsFirstEvent=user.ofsLastEvent=0;
+ SetFilePointer(hFile,dbHeader.ofsUser,NULL,FILE_BEGIN);
+ WriteFile(hFile,&user,sizeof(struct DBContact),&bytesWritten,NULL);
+ FlushFileBuffers(hFile);
+ return 0;
+}
+
+int CheckDbHeaders(struct DBHeader * hdr)
+{
+ if(memcmp(hdr->signature,&dbSignatureSecured,sizeof(hdr->signature)) == 0){
+ bEncoding = 1;
+ }else{
+ bEncoding = 0;
+ if(memcmp(hdr->signature,&dbSignature,sizeof(hdr->signature))) return 1;
+ if(hdr->checkWord!=0x0700) return 2;
+ }
+ if(hdr->ofsUser==0) return 3;
+ return 0;
+}
+
+int InitialiseDbHeaders(void)
+{
+ return 0;
+}
diff --git a/plugins/Dbx_mmap_SA/dbmodulechain.c b/plugins/Dbx_mmap_SA/dbmodulechain.c
new file mode 100644
index 0000000000..1af4226419
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/dbmodulechain.c
@@ -0,0 +1,192 @@
+/*
+
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2000-2003 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#include "commonheaders.h"
+
+static INT_PTR EnumModuleNames(WPARAM wParam,LPARAM lParam);
+
+typedef struct {
+ char *name;
+ DWORD ofs;
+} ModuleName;
+
+HANDLE hModHeap = NULL;
+static SortedList lMods, lOfs;
+
+static int ModCompare( ModuleName *mn1, ModuleName *mn2 )
+{
+ return strcmp( mn1->name, mn2->name );
+}
+
+static int OfsCompare( ModuleName *mn1, ModuleName *mn2 )
+{
+ return ( mn1->ofs - mn2->ofs );
+}
+
+void AddToList(char *name, DWORD len, DWORD ofs)
+{
+ int index;
+ ModuleName *mn = (ModuleName*)HeapAlloc(hModHeap,0,sizeof(ModuleName));
+ mn->name = name;
+ mn->ofs = ofs;
+
+ if (li.List_GetIndex(&lMods,mn,&index))
+ DatabaseCorruption( _T("%s (Module Name not unique)"));
+
+ li.List_Insert(&lMods,mn,index);
+
+ if (li.List_GetIndex(&lOfs,mn,&index))
+ DatabaseCorruption( _T("%s (Module Offset not unique)"));
+
+ li.List_Insert(&lOfs,mn,index);
+}
+
+
+int InitModuleNames(void)
+{
+ struct DBModuleName *dbmn;
+ DWORD ofsThis;
+ int nameLen;
+ char *mod;
+
+ hModHeap=HeapCreate(0,0,0);
+ lMods.sortFunc=ModCompare;
+ lMods.increment=50;
+ lOfs.sortFunc=OfsCompare;
+ lOfs.increment=50;
+
+ ofsThis=dbHeader.ofsFirstModuleName;
+ dbmn=(struct DBModuleName*)DBRead(ofsThis,sizeof(struct DBModuleName),NULL);
+ while(ofsThis) {
+ if(dbmn->signature!=DBMODULENAME_SIGNATURE) DatabaseCorruption(NULL);
+
+ nameLen=dbmn->cbName;
+
+ mod = (char*)HeapAlloc(hModHeap,0,nameLen+1);
+ CopyMemory(mod,DBRead(ofsThis+offsetof(struct DBModuleName,name),nameLen,NULL),nameLen);
+ mod[nameLen] = 0;
+
+ AddToList(mod, nameLen, ofsThis);
+
+ ofsThis=dbmn->ofsNext;
+ dbmn=(struct DBModuleName*)DBRead(ofsThis,sizeof(struct DBModuleName),NULL);
+ }
+ CreateServiceFunction(MS_DB_MODULES_ENUM,EnumModuleNames);
+ return 0;
+}
+
+void UninitModuleNames(void)
+{
+ HeapDestroy(hModHeap);
+ li.List_Destroy(&lMods);
+ li.List_Destroy(&lOfs);
+}
+
+static DWORD FindExistingModuleNameOfs(const char *szName)
+{
+ static ModuleName *lastmn = NULL;
+ ModuleName mn, *pmn;
+ int index;
+
+ mn.name = (char*)szName;
+ mn.ofs = 0;
+
+ if (lastmn && ModCompare(&mn,lastmn) == 0)
+ return lastmn->ofs;
+
+ if (li.List_GetIndex(&lMods,&mn,&index)) {
+ pmn = (ModuleName*)lMods.items[index];
+ lastmn = pmn;
+ return pmn->ofs;
+ }
+
+ return 0;
+}
+
+//will create the offset if it needs to
+DWORD GetModuleNameOfs(const char *szName)
+{
+ struct DBModuleName dbmn;
+ int nameLen;
+ DWORD ofsNew,ofsExisting;
+ char *mod;
+
+ ofsExisting=FindExistingModuleNameOfs(szName);
+ if(ofsExisting) return ofsExisting;
+
+ nameLen = (int)strlen(szName);
+
+ //need to create the module name
+ ofsNew=CreateNewSpace(nameLen+offsetof(struct DBModuleName,name));
+ dbmn.signature=DBMODULENAME_SIGNATURE;
+ dbmn.cbName=nameLen;
+ dbmn.ofsNext=dbHeader.ofsFirstModuleName;
+ dbHeader.ofsFirstModuleName=ofsNew;
+ DBWrite(0,&dbHeader,sizeof(dbHeader));
+ DBWrite(ofsNew,&dbmn,offsetof(struct DBModuleName,name));
+ DBWrite(ofsNew+offsetof(struct DBModuleName,name),(PVOID)szName,nameLen);
+ DBFlush(0);
+
+ //add to cache
+ mod = (char*)HeapAlloc(hModHeap,0,nameLen+1);
+ strcpy(mod,szName);
+ AddToList(mod, nameLen, ofsNew);
+
+ //quit
+ return ofsNew;
+}
+
+char *GetModuleNameByOfs(DWORD ofs)
+{
+ static ModuleName *lastmn = NULL;
+ ModuleName mn, *pmn;
+ int index;
+
+ if (lastmn && lastmn->ofs == ofs)
+ return lastmn->name;
+
+ mn.name = NULL;
+ mn.ofs = ofs;
+
+ if (li.List_GetIndex(&lOfs,&mn,&index)) {
+ pmn = (ModuleName*)lOfs.items[index];
+ lastmn = pmn;
+ return pmn->name;
+ }
+
+ DatabaseCorruption(NULL);
+ return NULL;
+}
+
+static INT_PTR EnumModuleNames(WPARAM wParam,LPARAM lParam)
+{
+ int i;
+ int ret;
+ ModuleName *pmn;
+ for(i = 0; i < lMods.realCount; i++) {
+ pmn = (ModuleName *)lMods.items[i];
+ ret=((DBMODULEENUMPROC)lParam)(pmn->name,pmn->ofs,wParam);
+ if(ret) return ret;
+ }
+ return 0;
+}
diff --git a/plugins/Dbx_mmap_SA/dbpreset.c b/plugins/Dbx_mmap_SA/dbpreset.c
new file mode 100644
index 0000000000..0bb6ebd3a0
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/dbpreset.c
@@ -0,0 +1,299 @@
+/*
+
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2000-2003 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+// Miranda Memory-Mapped Secured DataBase
+// (C) Artem Shpynov aka FYR, Igonin Vitaliy aka chaos.persei, Victor Pavlychko aka nullbie, 2007 - 2008
+
+#include "commonheaders.h"
+
+/* Public API */
+int InitPreset();
+void UninitPreset();
+
+int DBPreset_QuerySetting (const char *szModule, const char *szSetting, DBVARIANT *dbv, BOOL isStatic);
+int DBPreset_CompareSetting (const char *szModule, const char *szSetting, DBVARIANT *dbv);
+
+/* Preset cache item */
+typedef struct
+{
+ DWORD dwHash;
+ char *szModule;
+ char *szSetting;
+ DBVARIANT dbv;
+} DBPresetItem;
+
+static DBPresetItem * DBPresetItem_Create (char *szModule, char *szSetting, BYTE bType);
+static void DBPresetItem_Destroy (DBPresetItem *item);
+static void DBPresetItem_Hash (DBPresetItem *item);
+static int DBPresetItem_Cmp (DBPresetItem *item1, DBPresetItem *item2);
+
+SortedList *lstPresets = NULL;
+
+int InitPreset()
+{
+ char szIniPath[MAX_PATH];
+ char szLine[2048];
+ int lineLength;
+ char szSection[128];
+ FILE *fp;
+
+ GetModuleFileNameA(GetModuleHandle(NULL), szIniPath, SIZEOF(szIniPath));
+ strcpy(strrchr(szIniPath, '\\')+1, "dbpreset.ini");
+
+ fp=fopen(szIniPath,"rt");
+
+ // no preset
+ if (!fp) return 0;
+
+ lstPresets = li.List_Create(0, 50);
+ lstPresets->sortFunc = DBPresetItem_Cmp;
+
+ while(!feof(fp))
+ {
+ if(fgets(szLine,sizeof(szLine),fp)==NULL) break;
+ lineLength=lstrlenA(szLine);
+ while(lineLength && (BYTE)(szLine[lineLength-1])<=' ') szLine[--lineLength]='\0';
+ if(szLine[0]==';' || szLine[0]<=' ') continue;
+ if(szLine[0]=='[')
+ {
+ char *szEnd=strchr(szLine+1,']');
+ if(szEnd==NULL) continue;
+ if(szLine[1]=='!')
+ szSection[0]='\0';
+ else
+ lstrcpynA(szSection, szLine+1, (int)min(sizeof(szSection), szEnd-szLine));
+ } else
+ {
+ char *szValue;
+ char szName[128];
+ DBPresetItem *item;
+
+ if(szSection[0]=='\0') continue;
+ szValue=strchr(szLine,'=');
+ if(szValue==NULL) continue;
+ lstrcpynA(szName, szLine, (int)min(sizeof(szName), szValue-szLine+1));
+ szValue++;
+
+ switch(szValue[0])
+ {
+ case 'b':
+ case 'B':
+ item = DBPresetItem_Create(szSection, szName, DBVT_BYTE);
+ item->dbv.bVal = (BYTE)strtol(szValue+1,NULL,0);
+ li.List_InsertPtr(lstPresets, item);
+ break;
+ case 'w':
+ case 'W':
+ item = DBPresetItem_Create(szSection, szName, DBVT_WORD);
+ item->dbv.wVal = (WORD)strtol(szValue+1,NULL,0);
+ li.List_InsertPtr(lstPresets, item);
+ break;
+ case 'd':
+ case 'D':
+ item = DBPresetItem_Create(szSection, szName, DBVT_DWORD);
+ item->dbv.dVal = (DWORD)strtoul(szValue+1,NULL,0);
+ li.List_InsertPtr(lstPresets, item);
+ break;
+ case 's':
+ case 'S':
+ item = DBPresetItem_Create(szSection, szName, DBVT_ASCIIZ);
+ item->dbv.pszVal = mir_strdup(szValue+1);
+ li.List_InsertPtr(lstPresets, item);
+ break;
+ case 'u':
+ case 'U':
+ item = DBPresetItem_Create(szSection, szName, DBVT_UTF8);
+ item->dbv.pszVal = mir_strdup(szValue+1);
+ li.List_InsertPtr(lstPresets, item);
+ break;
+ case 'n':
+ case 'N':
+ {
+ PBYTE buf;
+ int len;
+ char *pszValue,*pszEnd;
+
+ buf=(PBYTE)mir_alloc(lstrlenA(szValue+1));
+ for(len=0,pszValue=szValue+1;;len++) {
+ buf[len]=(BYTE)strtol(pszValue,&pszEnd,0x10);
+ if(pszValue==pszEnd) break;
+ pszValue=pszEnd;
+ }
+
+ item = DBPresetItem_Create(szSection, szName, DBVT_BLOB);
+ item->dbv.pbVal = buf;
+ item->dbv.cpbVal = len;
+ li.List_InsertPtr(lstPresets, item);
+ break;
+ }
+ }
+ }
+ }
+ fclose(fp);
+
+ return 0;
+}
+
+void UninitPreset()
+{
+ int i;
+ if (!lstPresets) return;
+ for (i = 0; i < lstPresets->realCount; ++i)
+ DBPresetItem_Destroy(lstPresets->items[i]);
+ li.List_Destroy(lstPresets);
+}
+
+int DBPreset_QuerySetting(const char *szModule, const char *szSetting, DBVARIANT *dbv, BOOL isStatic)
+{
+ DBPresetItem *item;
+ DBPresetItem search = {0};
+
+ if (!lstPresets) return FALSE;
+
+ search.szModule = (char *)szModule;
+ search.szSetting = (char *)szSetting;
+ DBPresetItem_Hash(&search);
+ item = li.List_Find(lstPresets, &search);
+
+ if (!item) return FALSE;
+
+ dbv->type = item->dbv.type;
+ switch (item->dbv.type)
+ {
+ case DBVT_BYTE: dbv->bVal = item->dbv.bVal; return TRUE;
+ case DBVT_WORD: dbv->wVal = item->dbv.wVal; return TRUE;
+ case DBVT_DWORD: dbv->dVal = item->dbv.dVal; return TRUE;
+
+ case DBVT_UTF8:
+ case DBVT_ASCIIZ:
+ if (isStatic && dbv->pszVal)
+ lstrcpynA(dbv->pszVal, item->dbv.pszVal, dbv->cchVal);
+ else if (!isStatic)
+ dbv->pszVal = mir_strdup(item->dbv.pszVal);
+ return TRUE;
+
+ default:
+ return FALSE;
+ }
+
+ return FALSE;
+}
+
+int DBPreset_CompareSetting(const char *szModule, const char *szSetting, DBVARIANT *dbv)
+{
+ DBPresetItem *item;
+ DBPresetItem search = {0};
+
+ if (!lstPresets) return FALSE;
+
+ search.szModule = (char *)szModule;
+ search.szSetting = (char *)szSetting;
+ DBPresetItem_Hash(&search);
+ item = li.List_Find(lstPresets, &search);
+
+ if (!item) return FALSE;
+ if (item->dbv.type != item->dbv.type) return FALSE;
+ switch (item->dbv.type)
+ {
+ case DBVT_BYTE: return dbv->bVal == item->dbv.bVal ? TRUE : FALSE;
+ case DBVT_WORD: return dbv->wVal == item->dbv.wVal ? TRUE : FALSE;
+ case DBVT_DWORD: return dbv->dVal == item->dbv.dVal ? TRUE : FALSE;
+ case DBVT_UTF8:
+ case DBVT_ASCIIZ: return strcmp(dbv->pszVal, item->dbv.pszVal) ? FALSE : TRUE;
+ }
+
+ return FALSE;
+}
+
+static DBPresetItem *DBPresetItem_Create(char *szModule, char *szSetting, BYTE bType)
+{
+ DBPresetItem *item = (DBPresetItem *)mir_alloc(sizeof(DBPresetItem));
+ item->szModule = mir_strdup(szModule);
+ item->szSetting = mir_strdup(szSetting);
+ DBPresetItem_Hash(item);
+ item->dbv.type = bType;
+ return item;
+}
+
+static void DBPresetItem_Destroy(DBPresetItem *item)
+{
+ if (!item) return;
+ if (item->szModule)
+ {
+ mir_free(item->szModule);
+ item->szModule = NULL;
+ }
+ if (item->szSetting)
+ {
+ mir_free(item->szSetting);
+ item->szSetting = NULL;
+ }
+
+ switch (item->dbv.type)
+ {
+ case DBVT_ASCIIZ:
+ case DBVT_UTF8:
+ case DBVT_WCHAR:
+ {
+ if (item->dbv.pszVal)
+ mir_free(item->dbv.pszVal);
+ item->dbv.pszVal=0;
+ break;
+ }
+ case DBVT_BLOB:
+ {
+ if (item->dbv.pbVal)
+ mir_free(item->dbv.pbVal);
+ item->dbv.pbVal=0;
+ break;
+ }
+ }
+ item->dbv.type = 0;
+}
+
+static void DBPresetItem_Hash(DBPresetItem *item)
+{
+ int i;
+ int shift=0;
+ item->dwHash=0;
+ for(i=0;item->szModule[i];i++)
+ {
+ item->dwHash^=item->szModule[i]<<shift;
+ if (shift>24) item->dwHash^=(item->szModule[i]>>(32-shift))&0x7F;
+ shift=(shift+5)&0x1F;
+ }
+ for(i=0;item->szSetting[i];i++)
+ {
+ item->dwHash^=item->szSetting[i]<<shift;
+ if (shift>24) item->dwHash^=(item->szSetting[i]>>(32-shift))&0x7F;
+ shift=(shift+5)&0x1F;
+ }
+}
+
+static int DBPresetItem_Cmp(DBPresetItem *item1, DBPresetItem *item2)
+{
+ int cmp;
+ if (item1->dwHash < item2->dwHash) return -1;
+ if (item1->dwHash > item2->dwHash) return 1;
+ if (cmp = strcmp(item1->szModule, item2->szModule)) return cmp;
+ return strcmp(item1->szSetting, item2->szSetting);
+}
diff --git a/plugins/Dbx_mmap_SA/dbsettings.c b/plugins/Dbx_mmap_SA/dbsettings.c
new file mode 100644
index 0000000000..bf876d0570
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/dbsettings.c
@@ -0,0 +1,1170 @@
+/*
+
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2000-2003 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#include "commonheaders.h"
+
+int DBPreset_QuerySetting(const char *szModule, const char *szSetting, DBVARIANT *dbv, BOOL isStatic);
+int DBPreset_CompareSetting(const char *szModule, const char *szSetting, DBVARIANT *dbv);
+
+DWORD GetModuleNameOfs(const char *szName);
+DBCachedContactValueList* AddToCachedContactList(HANDLE hContact, int index);
+
+HANDLE hCacheHeap = NULL;
+SortedList lContacts = {0};
+HANDLE hLastCachedContact = NULL;
+static DBCachedContactValueList *LastVL = NULL;
+
+static int mirCp = CP_ACP;
+
+static SortedList lSettings={0}, lGlobalSettings={0}, lResidentSettings={0};
+static HANDLE hSettingChangeEvent = NULL;
+
+
+static DWORD GetSettingsGroupOfsByModuleNameOfs(struct DBContact *dbc,DWORD ofsModuleName)
+{
+ struct DBContactSettings *dbcs;
+ DWORD ofsThis;
+
+ ofsThis=dbc->ofsFirstSettings;
+ while(ofsThis) {
+ dbcs=(struct DBContactSettings*)DBRead(ofsThis,sizeof(struct DBContactSettings),NULL);
+ if(dbcs->signature!=DBCONTACTSETTINGS_SIGNATURE) DatabaseCorruption(NULL);
+ if(dbcs->ofsModuleName==ofsModuleName)
+ return ofsThis;
+
+ ofsThis=dbcs->ofsNext;
+ }
+ return 0;
+}
+
+static DWORD __inline GetSettingValueLength(PBYTE pSetting)
+{
+ if(pSetting[0]&DBVTF_VARIABLELENGTH) return 2+*(PWORD)(pSetting+1);
+ return pSetting[0];
+}
+
+static char* InsertCachedSetting( const char* szName, size_t cbNameLen, int index )
+{
+ char* newValue = (char*)HeapAlloc( hCacheHeap, 0, cbNameLen );
+ *newValue = 0;
+ strcpy(newValue+1,szName+1);
+ li.List_Insert(&lSettings,newValue,index);
+ return newValue;
+}
+
+static char* GetCachedSetting(const char *szModuleName,const char *szSettingName, int moduleNameLen, int settingNameLen)
+{
+ static char *lastsetting = NULL;
+ int index;
+ char szFullName[512];
+
+ strcpy(szFullName+1,szModuleName);
+ szFullName[moduleNameLen+1]='/';
+ strcpy(szFullName+moduleNameLen+2,szSettingName);
+
+ if (lastsetting && strcmp(szFullName+1,lastsetting) == 0)
+ return lastsetting;
+
+ if (li.List_GetIndex(&lSettings,szFullName,&index))
+ lastsetting = (char*)lSettings.items[index]+1;
+ else
+ lastsetting = InsertCachedSetting( szFullName, settingNameLen+moduleNameLen+3, index )+1;
+
+ return lastsetting;
+}
+
+static void SetCachedVariant( DBVARIANT* s /* new */, DBVARIANT* d /* cached */ )
+{
+ char* szSave = ( d->type == DBVT_UTF8 || d->type == DBVT_ASCIIZ ) ? d->pszVal : NULL;
+
+ memcpy( d, s, sizeof( DBVARIANT ));
+ if (( s->type == DBVT_UTF8 || s->type == DBVT_ASCIIZ ) && s->pszVal != NULL ) {
+ if ( szSave != NULL )
+ d->pszVal = (char*)HeapReAlloc(hCacheHeap,0,szSave,strlen(s->pszVal)+1);
+ else
+ d->pszVal = (char*)HeapAlloc(hCacheHeap,0,strlen(s->pszVal)+1);
+ strcpy(d->pszVal,s->pszVal);
+ }
+ else if ( szSave != NULL )
+ HeapFree(hCacheHeap,0,szSave);
+
+#ifdef DBLOGGING
+ switch( d->type ) {
+ case DBVT_BYTE: log1( "set cached byte: %d", d->bVal ); break;
+ case DBVT_WORD: log1( "set cached word: %d", d->wVal ); break;
+ case DBVT_DWORD: log1( "set cached dword: %d", d->dVal ); break;
+ case DBVT_UTF8:
+ case DBVT_ASCIIZ: log1( "set cached string: '%s'", d->pszVal ); break;
+ default: log1( "set cached crap: %d", d->type ); break;
+ }
+#endif
+}
+
+void FreeCachedVariant( DBVARIANT* V )
+{
+ if (( V->type == DBVT_ASCIIZ || V->type == DBVT_UTF8 ) && V->pszVal != NULL )
+ HeapFree(hCacheHeap,0,V->pszVal);
+}
+
+static DBVARIANT* GetCachedValuePtr( HANDLE hContact, char* szSetting, int bAllocate )
+{
+ int index;
+
+ if ( hContact == 0 ) {
+ DBCachedGlobalValue Vtemp, *V;
+ Vtemp.name = szSetting;
+ if ( li.List_GetIndex(&lGlobalSettings,&Vtemp,&index)) {
+ V = (DBCachedGlobalValue*)lGlobalSettings.items[index];
+ if ( bAllocate == -1 ) {
+ FreeCachedVariant( &V->value );
+ li.List_Remove(&lGlobalSettings,index);
+ HeapFree(hCacheHeap,0,V);
+ return NULL;
+ } }
+ else {
+ if ( bAllocate != 1 )
+ return NULL;
+
+ V = (DBCachedGlobalValue*)HeapAlloc(hCacheHeap,HEAP_ZERO_MEMORY,sizeof(DBCachedGlobalValue));
+ V->name = szSetting;
+ li.List_Insert(&lGlobalSettings,V,index);
+ }
+
+ return &V->value;
+ }
+ else {
+ DBCachedContactValue *V, *V1;
+ DBCachedContactValueList VLtemp,*VL;
+
+ if (hLastCachedContact==hContact && LastVL) {
+ VL = LastVL;
+ }
+ else {
+ VLtemp.hContact=hContact;
+
+ if ( !li.List_GetIndex(&lContacts,&VLtemp,&index))
+ {
+ if ( bAllocate != 1 )
+ return NULL;
+
+ VL = AddToCachedContactList(hContact,index);
+ }
+ else VL = (DBCachedContactValueList*)lContacts.items[index];
+
+ LastVL = VL;
+ hLastCachedContact = hContact;
+ }
+
+ for ( V = VL->first; V != NULL; V = V->next)
+ if (V->name == szSetting)
+ break;
+
+ if ( V == NULL ) {
+ if ( bAllocate != 1 )
+ return NULL;
+
+ V = HeapAlloc(hCacheHeap,HEAP_ZERO_MEMORY,sizeof(DBCachedContactValue));
+ if (VL->last)
+ VL->last->next = V;
+ else
+ VL->first = V;
+ VL->last = V;
+ V->name = szSetting;
+ }
+ else if ( bAllocate == -1 ) {
+ LastVL = NULL;
+ FreeCachedVariant(&V->value);
+ if ( VL->first == V ) {
+ VL->first = V->next;
+ if (VL->last == V)
+ VL->last = V->next; // NULL
+ }
+ else
+ for ( V1 = VL->first; V1 != NULL; V1 = V1->next )
+ if ( V1->next == V ) {
+ V1->next = V->next;
+ if (VL->last == V)
+ VL->last = V1;
+ break;
+ }
+ HeapFree(hCacheHeap,0,V);
+ return NULL;
+ }
+
+ return &V->value;
+} }
+
+#define NeedBytes(n) if(bytesRemaining<(n)) pBlob=(PBYTE)DBRead(ofsBlobPtr,(n),&bytesRemaining)
+#define MoveAlong(n) {int x=n; pBlob+=(x); ofsBlobPtr+=(x); bytesRemaining-=(x);}
+#define VLT(n) ((n==DBVT_UTF8)?DBVT_ASCIIZ:n)
+static __inline int GetContactSettingWorker(HANDLE hContact,DBCONTACTGETSETTING *dbcgs,int isStatic)
+{
+ struct DBContact *dbc;
+ DWORD ofsModuleName,ofsContact,ofsSettingsGroup,ofsBlobPtr;
+ int settingNameLen,moduleNameLen;
+ int bytesRemaining;
+ PBYTE pBlob;
+ char* szCachedSettingName;
+
+ if ((!dbcgs->szSetting) || (!dbcgs->szModule))
+ return 1;
+ // the db format can't tolerate more than 255 bytes of space (incl. null) for settings+module name
+ settingNameLen = (int)strlen(dbcgs->szSetting);
+ moduleNameLen = (int)strlen(dbcgs->szModule);
+ if ( settingNameLen > 0xFE )
+ {
+ #ifdef _DEBUG
+ OutputDebugStringA("GetContactSettingWorker() got a > 255 setting name length. \n");
+ #endif
+ return 1;
+ }
+ if ( moduleNameLen > 0xFE )
+ {
+ #ifdef _DEBUG
+ OutputDebugStringA("GetContactSettingWorker() got a > 255 module name length. \n");
+ #endif
+ return 1;
+ }
+
+ EnterCriticalSection(&csDbAccess);
+
+ log3("get [%08p] %s/%s",hContact,dbcgs->szModule,dbcgs->szSetting);
+
+ szCachedSettingName = GetCachedSetting(dbcgs->szModule,dbcgs->szSetting,moduleNameLen,settingNameLen);
+ {
+ DBVARIANT* pCachedValue = GetCachedValuePtr( hContact, szCachedSettingName, 0 );
+ if ( pCachedValue != NULL ) {
+ if ( pCachedValue->type == DBVT_ASCIIZ || pCachedValue->type == DBVT_UTF8 ) {
+ int cbOrigLen = dbcgs->pValue->cchVal;
+ char* cbOrigPtr = dbcgs->pValue->pszVal;
+ memcpy( dbcgs->pValue, pCachedValue, sizeof( DBVARIANT ));
+ if ( isStatic ) {
+ int cbLen = 0;
+ if ( pCachedValue->pszVal != NULL )
+ cbLen = (int)strlen( pCachedValue->pszVal );
+
+ cbOrigLen--;
+ dbcgs->pValue->pszVal = cbOrigPtr;
+ if(cbLen<cbOrigLen) cbOrigLen=cbLen;
+ CopyMemory(dbcgs->pValue->pszVal,pCachedValue->pszVal,cbOrigLen);
+ dbcgs->pValue->pszVal[cbOrigLen]=0;
+ dbcgs->pValue->cchVal=cbLen;
+ }
+ else {
+ dbcgs->pValue->pszVal = (char*)mir_alloc(strlen(pCachedValue->pszVal)+1);
+ strcpy(dbcgs->pValue->pszVal,pCachedValue->pszVal);
+ }
+ }
+ else
+ memcpy( dbcgs->pValue, pCachedValue, sizeof( DBVARIANT ));
+
+ switch( dbcgs->pValue->type ) {
+ case DBVT_BYTE: log1( "get cached byte: %d", dbcgs->pValue->bVal ); break;
+ case DBVT_WORD: log1( "get cached word: %d", dbcgs->pValue->wVal ); break;
+ case DBVT_DWORD: log1( "get cached dword: %d", dbcgs->pValue->dVal ); break;
+ case DBVT_UTF8:
+ case DBVT_ASCIIZ: log1( "get cached string: '%s'", dbcgs->pValue->pszVal); break;
+ default: log1( "get cached crap: %d", dbcgs->pValue->type ); break;
+ }
+
+ LeaveCriticalSection(&csDbAccess);
+ return ( pCachedValue->type == DBVT_DELETED ) ? 1 : 0;
+ } }
+
+ ofsModuleName=GetModuleNameOfs(dbcgs->szModule);
+ if(hContact==NULL) ofsContact=dbHeader.ofsUser;
+ else ofsContact=(DWORD)hContact;
+ dbc=(struct DBContact*)DBRead(ofsContact,sizeof(struct DBContact),NULL);
+ if(dbc->signature!=DBCONTACT_SIGNATURE) {
+ LeaveCriticalSection(&csDbAccess);
+ return 1;
+ }
+ ofsSettingsGroup=GetSettingsGroupOfsByModuleNameOfs(dbc,ofsModuleName);
+ if(ofsSettingsGroup) {
+ ofsBlobPtr=ofsSettingsGroup+offsetof(struct DBContactSettings,blob);
+ pBlob = DBRead(ofsBlobPtr,sizeof(struct DBContactSettings),&bytesRemaining);
+ while(pBlob[0]) {
+ NeedBytes(1+settingNameLen);
+ if(pBlob[0]==settingNameLen && !memcmp(pBlob+1,dbcgs->szSetting,settingNameLen)) {
+ MoveAlong(1+settingNameLen);
+ NeedBytes(5);
+ if(isStatic && pBlob[0]&DBVTF_VARIABLELENGTH && VLT(dbcgs->pValue->type) != VLT(pBlob[0])) {
+ LeaveCriticalSection(&csDbAccess);
+ return 1;
+ }
+ dbcgs->pValue->type=pBlob[0];
+ switch(pBlob[0]) {
+ case DBVT_DELETED: { /* this setting is deleted */
+ dbcgs->pValue->type=DBVT_DELETED;
+ LeaveCriticalSection(&csDbAccess);
+ return 2;
+ }
+ case DBVT_BYTE: dbcgs->pValue->bVal=pBlob[1]; break;
+ case DBVT_WORD: DecodeCopyMemory(&(dbcgs->pValue->wVal), (PWORD)(pBlob+1), 2); break;
+ case DBVT_DWORD: DecodeCopyMemory(&(dbcgs->pValue->dVal), (PDWORD)(pBlob+1), 4); break;
+ case DBVT_UTF8:
+ case DBVT_ASCIIZ:
+ NeedBytes(3+*(PWORD)(pBlob+1));
+ if(isStatic) {
+ dbcgs->pValue->cchVal--;
+ if(*(PWORD)(pBlob+1)<dbcgs->pValue->cchVal) dbcgs->pValue->cchVal=*(PWORD)(pBlob+1);
+ DecodeCopyMemory(dbcgs->pValue->pszVal,pBlob+3,dbcgs->pValue->cchVal);
+ dbcgs->pValue->pszVal[dbcgs->pValue->cchVal]=0;
+ dbcgs->pValue->cchVal=*(PWORD)(pBlob+1);
+ }
+ else {
+ dbcgs->pValue->pszVal=(char*)mir_alloc(1+*(PWORD)(pBlob+1));
+ DecodeCopyMemory(dbcgs->pValue->pszVal,pBlob+3,*(PWORD)(pBlob+1));
+ dbcgs->pValue->pszVal[*(PWORD)(pBlob+1)]=0;
+ }
+ break;
+ case DBVT_BLOB:
+ NeedBytes(3+*(PWORD)(pBlob+1));
+ if(isStatic) {
+ if(*(PWORD)(pBlob+1)<dbcgs->pValue->cpbVal) dbcgs->pValue->cpbVal=*(PWORD)(pBlob+1);
+ DecodeCopyMemory(dbcgs->pValue->pbVal,pBlob+3,dbcgs->pValue->cpbVal);
+ }
+ else {
+ dbcgs->pValue->pbVal=(char*)mir_alloc(*(PWORD)(pBlob+1));
+ DecodeCopyMemory(dbcgs->pValue->pbVal,pBlob+3,*(PWORD)(pBlob+1));
+ }
+ dbcgs->pValue->cpbVal=*(PWORD)(pBlob+1);
+ break;
+ }
+
+ /**** add to cache **********************/
+ if ( dbcgs->pValue->type != DBVT_BLOB )
+ {
+ DBVARIANT* pCachedValue = GetCachedValuePtr( hContact, szCachedSettingName, 1 );
+ if ( pCachedValue != NULL )
+ SetCachedVariant(dbcgs->pValue,pCachedValue);
+ }
+
+ LeaveCriticalSection(&csDbAccess);
+ logg();
+ return 0;
+ }
+ NeedBytes(1);
+ MoveAlong(pBlob[0]+1);
+ NeedBytes(3);
+ MoveAlong(1+GetSettingValueLength(pBlob));
+ NeedBytes(1);
+ } }
+
+ /**** nullbie: query info from preset **********************/
+ if (!hContact && DBPreset_QuerySetting(dbcgs->szModule, dbcgs->szSetting, dbcgs->pValue, isStatic))
+ {
+ /**** add to cache **********************/
+ if ( dbcgs->pValue->type != DBVT_BLOB )
+ {
+ DBVARIANT* pCachedValue = GetCachedValuePtr( hContact, szCachedSettingName, 1 );
+ if ( pCachedValue != NULL )
+ SetCachedVariant(dbcgs->pValue,pCachedValue);
+ }
+ return 0;
+ }
+
+ /**** add missing setting to cache **********************/
+ if ( dbcgs->pValue->type != DBVT_BLOB )
+ {
+ DBVARIANT* pCachedValue = GetCachedValuePtr( hContact, szCachedSettingName, 1 );
+ if ( pCachedValue != NULL )
+ pCachedValue->type = DBVT_DELETED;
+ }
+
+ LeaveCriticalSection(&csDbAccess);
+ logg();
+ return 1;
+}
+
+static INT_PTR GetContactSetting(WPARAM wParam, LPARAM lParam)
+{
+ DBCONTACTGETSETTING* dgs = ( DBCONTACTGETSETTING* )lParam;
+ dgs->pValue->type = 0;
+ if ( GetContactSettingWorker(( HANDLE )wParam, dgs, 0 ))
+ return 1;
+
+ if ( dgs->pValue->type == DBVT_UTF8 ) {
+ WCHAR* tmp = NULL;
+ char* p = NEWSTR_ALLOCA(dgs->pValue->pszVal);
+ if ( mir_utf8decode( p, &tmp ) != NULL ) {
+ BOOL bUsed = FALSE;
+ int result = WideCharToMultiByte( mirCp, WC_NO_BEST_FIT_CHARS, tmp, -1, NULL, 0, NULL, &bUsed );
+
+ mir_free( dgs->pValue->pszVal );
+
+ if ( bUsed || result == 0 ) {
+ dgs->pValue->type = DBVT_WCHAR;
+ dgs->pValue->pwszVal = tmp;
+ }
+ else {
+ dgs->pValue->type = DBVT_ASCIIZ;
+ dgs->pValue->pszVal = mir_alloc( result );
+ WideCharToMultiByte( mirCp, WC_NO_BEST_FIT_CHARS, tmp, -1, dgs->pValue->pszVal, result, NULL, NULL );
+ mir_free( tmp );
+ }
+ }
+ else {
+ dgs->pValue->type = DBVT_ASCIIZ;
+ mir_free( tmp );
+ } }
+
+ return 0;
+}
+
+static INT_PTR GetContactSettingStr(WPARAM wParam, LPARAM lParam)
+{
+ DBCONTACTGETSETTING* dgs = (DBCONTACTGETSETTING*)lParam;
+ int iSaveType = dgs->pValue->type;
+
+ if ( GetContactSettingWorker(( HANDLE )wParam, dgs, 0 ))
+ return 1;
+
+ if ( iSaveType == 0 || iSaveType == dgs->pValue->type )
+ return 0;
+
+ if ( dgs->pValue->type != DBVT_ASCIIZ && dgs->pValue->type != DBVT_UTF8 )
+ return 1;
+
+ if ( iSaveType == DBVT_WCHAR ) {
+ if ( dgs->pValue->type != DBVT_UTF8 ) {
+ int len = MultiByteToWideChar( CP_ACP, 0, dgs->pValue->pszVal, -1, NULL, 0 );
+ wchar_t* wszResult = ( wchar_t* )mir_alloc(( len+1 )*sizeof( wchar_t ));
+ if ( wszResult == NULL )
+ return 1;
+
+ MultiByteToWideChar( CP_ACP, 0, dgs->pValue->pszVal, -1, wszResult, len );
+ wszResult[ len ] = 0;
+ mir_free( dgs->pValue->pszVal );
+ dgs->pValue->pwszVal = wszResult;
+ }
+ else {
+ char* savePtr = NEWSTR_ALLOCA(dgs->pValue->pszVal);
+ mir_free( dgs->pValue->pszVal );
+ if ( !mir_utf8decode( savePtr, &dgs->pValue->pwszVal ))
+ return 1;
+ }
+ }
+ else if ( iSaveType == DBVT_UTF8 ) {
+ char* tmpBuf = mir_utf8encode( dgs->pValue->pszVal );
+ if ( tmpBuf == NULL )
+ return 1;
+
+ mir_free( dgs->pValue->pszVal );
+ dgs->pValue->pszVal = tmpBuf;
+ }
+ else if ( iSaveType == DBVT_ASCIIZ )
+ mir_utf8decode( dgs->pValue->pszVal, NULL );
+
+ dgs->pValue->type = iSaveType;
+ return 0;
+}
+
+INT_PTR GetContactSettingStatic(WPARAM wParam, LPARAM lParam)
+{
+ DBCONTACTGETSETTING* dgs = (DBCONTACTGETSETTING*)lParam;
+ if ( GetContactSettingWorker(( HANDLE )wParam, dgs, 1 ))
+ return 1;
+
+ if ( dgs->pValue->type == DBVT_UTF8 ) {
+ mir_utf8decode( dgs->pValue->pszVal, NULL );
+ dgs->pValue->type = DBVT_ASCIIZ;
+ }
+
+ return 0;
+}
+
+static INT_PTR FreeVariant(WPARAM wParam, LPARAM lParam)
+{
+ DBVARIANT *dbv=(DBVARIANT*)lParam;
+ if ( dbv == 0 ) return 1;
+ switch ( dbv->type ) {
+ case DBVT_ASCIIZ:
+ case DBVT_UTF8:
+ case DBVT_WCHAR:
+ {
+ if ( dbv->pszVal ) mir_free(dbv->pszVal);
+ dbv->pszVal=0;
+ break;
+ }
+ case DBVT_BLOB:
+ {
+ if ( dbv->pbVal ) mir_free(dbv->pbVal);
+ dbv->pbVal=0;
+ break;
+ }
+ }
+ dbv->type=0;
+ return 0;
+}
+
+static INT_PTR SetSettingResident(WPARAM wParam, LPARAM lParam)
+{
+ size_t cbSettingNameLen = strlen(( char* )lParam) + 2;
+ if (cbSettingNameLen < 512)
+ {
+ char* szSetting;
+ int idx;
+ char szTemp[512];
+ strcpy( szTemp+1, ( char* )lParam );
+
+ EnterCriticalSection(&csDbAccess);
+ if ( !li.List_GetIndex( &lSettings, szTemp, &idx ))
+ szSetting = InsertCachedSetting( szTemp, cbSettingNameLen, idx );
+ else
+ szSetting = lSettings.items[ idx ];
+
+ *szSetting = (char)wParam;
+
+ if ( !li.List_GetIndex( &lResidentSettings, szSetting+1, &idx ))
+ {
+ if (wParam)
+ li.List_Insert(&lResidentSettings,szSetting+1,idx);
+ }
+ else if (!wParam)
+ li.List_Remove(&lResidentSettings,idx);
+
+ LeaveCriticalSection(&csDbAccess);
+ }
+ return 0;
+}
+
+static INT_PTR WriteContactSetting(WPARAM wParam, LPARAM lParam)
+{
+ DBCONTACTWRITESETTING *dbcws=(DBCONTACTWRITESETTING*)lParam;
+ DBCONTACTWRITESETTING tmp;
+ struct DBContact dbc;
+ DWORD ofsModuleName;
+ struct DBContactSettings dbcs;
+ PBYTE pBlob;
+ int settingNameLen=0;
+ int moduleNameLen=0;
+ int settingDataLen=0;
+ int bytesRequired,bytesRemaining;
+ DWORD ofsContact,ofsSettingsGroup,ofsBlobPtr;
+
+ if (dbcws == NULL || dbcws->szSetting==NULL || dbcws->szModule==NULL )
+ return 1;
+
+ // the db format can't tolerate more than 255 bytes of space (incl. null) for settings+module name
+ settingNameLen=(int)strlen(dbcws->szSetting);
+ moduleNameLen=(int)strlen(dbcws->szModule);
+ if ( settingNameLen > 0xFE )
+ {
+ #ifdef _DEBUG
+ OutputDebugStringA("WriteContactSetting() got a > 255 setting name length. \n");
+ #endif
+ return 1;
+ }
+ if ( moduleNameLen > 0xFE )
+ {
+ #ifdef _DEBUG
+ OutputDebugStringA("WriteContactSetting() got a > 255 module name length. \n");
+ #endif
+ return 1;
+ }
+
+ tmp = *dbcws;
+ if (tmp.value.type == DBVT_WCHAR) {
+ if (tmp.value.pszVal != NULL) {
+ char* val = mir_utf8encodeW(tmp.value.pwszVal);
+ if ( val == NULL )
+ return 1;
+
+ tmp.value.pszVal = ( char* )alloca( strlen( val )+1 );
+ strcpy( tmp.value.pszVal, val );
+ mir_free(val);
+ tmp.value.type = DBVT_UTF8;
+ }
+ else return 1;
+ }
+
+ if(tmp.value.type!=DBVT_BYTE && tmp.value.type!=DBVT_WORD && tmp.value.type!=DBVT_DWORD && tmp.value.type!=DBVT_ASCIIZ && tmp.value.type!=DBVT_UTF8 && tmp.value.type!=DBVT_BLOB)
+ return 1;
+ if ((!tmp.szModule) || (!tmp.szSetting) || ((tmp.value.type == DBVT_ASCIIZ || tmp.value.type == DBVT_UTF8 )&& tmp.value.pszVal == NULL) || (tmp.value.type == DBVT_BLOB && tmp.value.pbVal == NULL) )
+ return 1;
+
+ // the db can not tolerate strings/blobs longer than 0xFFFF since the format writes 2 lengths
+ switch( tmp.value.type ) {
+ case DBVT_ASCIIZ: case DBVT_BLOB: case DBVT_UTF8:
+ { size_t len = ( tmp.value.type != DBVT_BLOB ) ? (int)strlen(tmp.value.pszVal) : tmp.value.cpbVal;
+ if ( len >= 0xFFFF ) {
+ #ifdef _DEBUG
+ OutputDebugStringA("WriteContactSetting() writing huge string/blob, rejecting ( >= 0xFFFF ) \n");
+ #endif
+ return 1;
+ }
+ }
+ }
+
+ EnterCriticalSection(&csDbAccess);
+ {
+ char* szCachedSettingName = GetCachedSetting(tmp.szModule, tmp.szSetting, moduleNameLen, settingNameLen);
+ if ( tmp.value.type != DBVT_BLOB ) {
+ DBVARIANT* pCachedValue = GetCachedValuePtr((HANDLE)wParam, szCachedSettingName, 1);
+ if ( pCachedValue != NULL ) {
+ BOOL bIsIdentical = FALSE;
+ if ( pCachedValue->type == tmp.value.type ) {
+ switch(tmp.value.type) {
+ case DBVT_BYTE: bIsIdentical = pCachedValue->bVal == tmp.value.bVal; break;
+ case DBVT_WORD: bIsIdentical = pCachedValue->wVal == tmp.value.wVal; break;
+ case DBVT_DWORD: bIsIdentical = pCachedValue->dVal == tmp.value.dVal; break;
+ case DBVT_UTF8:
+ case DBVT_ASCIIZ: bIsIdentical = strcmp( pCachedValue->pszVal, tmp.value.pszVal ) == 0; break;
+ }
+ if ( bIsIdentical ) {
+ LeaveCriticalSection(&csDbAccess);
+ return 0;
+ }
+ }
+ SetCachedVariant(&tmp.value, pCachedValue);
+ }
+ if ( szCachedSettingName[-1] != 0 ) {
+ LeaveCriticalSection(&csDbAccess);
+ NotifyEventHooks(hSettingChangeEvent,wParam,(LPARAM)&tmp);
+ return 0;
+ }
+ }
+ else GetCachedValuePtr((HANDLE)wParam, szCachedSettingName, -1);
+ }
+
+ ofsModuleName=GetModuleNameOfs(tmp.szModule);
+ if(wParam==0) ofsContact=dbHeader.ofsUser;
+ else ofsContact=wParam;
+
+ dbc=*(struct DBContact*)DBRead(ofsContact,sizeof(struct DBContact),NULL);
+ if(dbc.signature!=DBCONTACT_SIGNATURE) {
+ LeaveCriticalSection(&csDbAccess);
+ return 1;
+ }
+ log0("write setting");
+ //make sure the module group exists
+ ofsSettingsGroup=GetSettingsGroupOfsByModuleNameOfs(&dbc,ofsModuleName);
+ if(ofsSettingsGroup==0) { //module group didn't exist - make it
+ if(tmp.value.type&DBVTF_VARIABLELENGTH) {
+ if(tmp.value.type==DBVT_ASCIIZ || tmp.value.type==DBVT_UTF8) bytesRequired = (int)strlen(tmp.value.pszVal)+2;
+ else if(tmp.value.type==DBVT_BLOB) bytesRequired=tmp.value.cpbVal+2;
+ }
+ else bytesRequired=tmp.value.type;
+ bytesRequired+=2+settingNameLen;
+ bytesRequired+=(DB_SETTINGS_RESIZE_GRANULARITY-(bytesRequired%DB_SETTINGS_RESIZE_GRANULARITY))%DB_SETTINGS_RESIZE_GRANULARITY;
+ ofsSettingsGroup=CreateNewSpace(bytesRequired+offsetof(struct DBContactSettings,blob));
+ dbcs.signature=DBCONTACTSETTINGS_SIGNATURE;
+ dbcs.ofsNext=dbc.ofsFirstSettings;
+ dbcs.ofsModuleName=ofsModuleName;
+ dbcs.cbBlob=bytesRequired;
+ dbcs.blob[0]=0;
+ dbc.ofsFirstSettings=ofsSettingsGroup;
+ DBWrite(ofsContact,&dbc,sizeof(struct DBContact));
+ DBWrite(ofsSettingsGroup,&dbcs,sizeof(struct DBContactSettings));
+ ofsBlobPtr=ofsSettingsGroup+offsetof(struct DBContactSettings,blob);
+ pBlob=(PBYTE)DBRead(ofsBlobPtr,1,&bytesRemaining);
+ }
+ else {
+ dbcs=*(struct DBContactSettings*)DBRead(ofsSettingsGroup,sizeof(struct DBContactSettings),&bytesRemaining);
+ //find if the setting exists
+ ofsBlobPtr=ofsSettingsGroup+offsetof(struct DBContactSettings,blob);
+ pBlob=(PBYTE)DBRead(ofsBlobPtr,1,&bytesRemaining);
+ while(pBlob[0]) {
+ NeedBytes(settingNameLen+1);
+ if(pBlob[0]==settingNameLen && !memcmp(pBlob+1,tmp.szSetting,settingNameLen))
+ break;
+ NeedBytes(1);
+ MoveAlong(pBlob[0]+1);
+ NeedBytes(3);
+ MoveAlong(1+GetSettingValueLength(pBlob));
+ NeedBytes(1);
+ }
+ if(pBlob[0]) { //setting already existed, and up to end of name is in cache
+ MoveAlong(1+settingNameLen);
+ //if different type or variable length and length is different
+ NeedBytes(3);
+ if(pBlob[0]!=tmp.value.type || ((pBlob[0]==DBVT_ASCIIZ || pBlob[0]==DBVT_UTF8) && *(PWORD)(pBlob+1)!=strlen(tmp.value.pszVal)) || (pBlob[0]==DBVT_BLOB && *(PWORD)(pBlob+1)!=tmp.value.cpbVal)) {
+ //bin it
+ int nameLen,valLen;
+ DWORD ofsSettingToCut;
+ NeedBytes(3);
+ nameLen=1+settingNameLen;
+ valLen=1+GetSettingValueLength(pBlob);
+ ofsSettingToCut=ofsBlobPtr-nameLen;
+ MoveAlong(valLen);
+ NeedBytes(1);
+ while(pBlob[0]) {
+ MoveAlong(pBlob[0]+1);
+ NeedBytes(3);
+ MoveAlong(1+GetSettingValueLength(pBlob));
+ NeedBytes(1);
+ }
+ DBMoveChunk(ofsSettingToCut,ofsSettingToCut+nameLen+valLen,ofsBlobPtr+1-ofsSettingToCut);
+ ofsBlobPtr-=nameLen+valLen;
+ pBlob=(PBYTE)DBRead(ofsBlobPtr,1,&bytesRemaining);
+ }
+ else {
+ //replace existing setting at pBlob
+ MoveAlong(1); //skip data type
+ switch(tmp.value.type) {
+ case DBVT_BYTE: DBWrite(ofsBlobPtr,&tmp.value.bVal,1); break;
+ case DBVT_WORD: EncodeDBWrite(ofsBlobPtr,&tmp.value.wVal,2); break;
+ case DBVT_DWORD: EncodeDBWrite(ofsBlobPtr,&tmp.value.dVal,4); break;
+ case DBVT_UTF8:
+ case DBVT_ASCIIZ: EncodeDBWrite(ofsBlobPtr+2,tmp.value.pszVal,(int)strlen(tmp.value.pszVal)); break;
+ case DBVT_BLOB: EncodeDBWrite(ofsBlobPtr+2,tmp.value.pbVal,tmp.value.cpbVal); break;
+ }
+ //quit
+ DBFlush(1);
+ LeaveCriticalSection(&csDbAccess);
+ //notify
+ NotifyEventHooks(hSettingChangeEvent,wParam,(LPARAM)&tmp);
+ return 0;
+ }
+ }
+ }
+ //cannot do a simple replace, add setting to end of list
+ //pBlob already points to end of list
+ //see if it fits
+ if(tmp.value.type&DBVTF_VARIABLELENGTH) {
+ if(tmp.value.type==DBVT_ASCIIZ || tmp.value.type==DBVT_UTF8) bytesRequired = (int)strlen(tmp.value.pszVal)+2;
+ else if(tmp.value.type==DBVT_BLOB) bytesRequired=tmp.value.cpbVal+2;
+ }
+ else bytesRequired=tmp.value.type;
+ bytesRequired+=2+settingNameLen;
+ bytesRequired+=ofsBlobPtr+1-(ofsSettingsGroup+offsetof(struct DBContactSettings,blob));
+ if((DWORD)bytesRequired>dbcs.cbBlob) {
+ //doesn't fit: move entire group
+ struct DBContactSettings *dbcsPrev;
+ DWORD ofsDbcsPrev,ofsNew;
+
+ bytesRequired+=(DB_SETTINGS_RESIZE_GRANULARITY-(bytesRequired%DB_SETTINGS_RESIZE_GRANULARITY))%DB_SETTINGS_RESIZE_GRANULARITY;
+ //find previous group to change its offset
+ ofsDbcsPrev=dbc.ofsFirstSettings;
+ if(ofsDbcsPrev==ofsSettingsGroup) ofsDbcsPrev=0;
+ else {
+ dbcsPrev=(struct DBContactSettings*)DBRead(ofsDbcsPrev,sizeof(struct DBContactSettings),NULL);
+ while(dbcsPrev->ofsNext!=ofsSettingsGroup) {
+ if(dbcsPrev->ofsNext==0) DatabaseCorruption(NULL);
+ ofsDbcsPrev=dbcsPrev->ofsNext;
+ dbcsPrev=(struct DBContactSettings*)DBRead(ofsDbcsPrev,sizeof(struct DBContactSettings),NULL);
+ }
+ }
+
+ //create the new one
+ ofsNew=ReallocSpace(ofsSettingsGroup, dbcs.cbBlob+offsetof(struct DBContactSettings,blob), bytesRequired+offsetof(struct DBContactSettings,blob));
+
+ dbcs.cbBlob=bytesRequired;
+
+ DBWrite(ofsNew,&dbcs,offsetof(struct DBContactSettings,blob));
+ if(ofsDbcsPrev==0) {
+ dbc.ofsFirstSettings=ofsNew;
+ DBWrite(ofsContact,&dbc,sizeof(struct DBContact));
+ }
+ else {
+ dbcsPrev=(struct DBContactSettings*)DBRead(ofsDbcsPrev,sizeof(struct DBContactSettings),NULL);
+ dbcsPrev->ofsNext=ofsNew;
+ DBWrite(ofsDbcsPrev,dbcsPrev,offsetof(struct DBContactSettings,blob));
+ }
+ ofsBlobPtr+=ofsNew-ofsSettingsGroup;
+ ofsSettingsGroup=ofsNew;
+ pBlob=(PBYTE)DBRead(ofsBlobPtr,1,&bytesRemaining);
+ }
+ //we now have a place to put it and enough space: make it
+ DBWrite(ofsBlobPtr,&settingNameLen,1);
+ DBWrite(ofsBlobPtr+1,(PVOID)tmp.szSetting,settingNameLen);
+ MoveAlong(1+settingNameLen);
+ DBWrite(ofsBlobPtr,&tmp.value.type,1);
+ MoveAlong(1);
+ switch(tmp.value.type) {
+ case DBVT_BYTE: DBWrite(ofsBlobPtr,&tmp.value.bVal,1); MoveAlong(1); break;
+ case DBVT_WORD: EncodeDBWrite(ofsBlobPtr,&tmp.value.wVal,2); MoveAlong(2); break;
+ case DBVT_DWORD: EncodeDBWrite(ofsBlobPtr,&tmp.value.dVal,4); MoveAlong(4); break;
+ case DBVT_UTF8:
+ case DBVT_ASCIIZ:
+ { int len = (int)strlen(tmp.value.pszVal);
+ DBWrite(ofsBlobPtr,&len,2);
+ EncodeDBWrite(ofsBlobPtr+2,tmp.value.pszVal,len);
+ MoveAlong(2+len);
+ }
+ break;
+ case DBVT_BLOB:
+ DBWrite(ofsBlobPtr,&tmp.value.cpbVal,2);
+ EncodeDBWrite(ofsBlobPtr+2,tmp.value.pbVal,tmp.value.cpbVal);
+ MoveAlong(2+tmp.value.cpbVal);
+ break;
+ }
+ { BYTE zero=0;
+ DBWrite(ofsBlobPtr,&zero,1);
+ }
+ //quit
+ DBFlush(1);
+ LeaveCriticalSection(&csDbAccess);
+ //notify
+ NotifyEventHooks(hSettingChangeEvent, wParam, (LPARAM)&tmp);
+ return 0;
+}
+
+static INT_PTR DeleteContactSetting(WPARAM wParam, LPARAM lParam)
+{
+ DBCONTACTGETSETTING *dbcgs=(DBCONTACTGETSETTING*)lParam;
+ struct DBContact *dbc;
+ DWORD ofsModuleName,ofsSettingsGroup,ofsBlobPtr;
+ PBYTE pBlob;
+ int settingNameLen,moduleNameLen,bytesRemaining;
+ char* szCachedSettingName;
+ WPARAM saveWparam = wParam;
+
+ if ((!dbcgs->szModule) || (!dbcgs->szSetting))
+ return 1;
+ // the db format can't tolerate more than 255 bytes of space (incl. null) for settings+module name
+ settingNameLen = (int)strlen(dbcgs->szSetting);
+ moduleNameLen = (int)strlen(dbcgs->szModule);
+ if ( settingNameLen > 0xFE )
+ {
+ #ifdef _DEBUG
+ OutputDebugStringA("DeleteContactSetting() got a > 255 setting name length. \n");
+ #endif
+ return 1;
+ }
+ if ( moduleNameLen > 0xFE )
+ {
+ #ifdef _DEBUG
+ OutputDebugStringA("DeleteContactSetting() got a > 255 module name length. \n");
+ #endif
+ return 1;
+ }
+
+ EnterCriticalSection(&csDbAccess);
+ ofsModuleName=GetModuleNameOfs(dbcgs->szModule);
+ if(wParam==0) wParam=dbHeader.ofsUser;
+
+ dbc=(struct DBContact*)DBRead(wParam,sizeof(struct DBContact),NULL);
+ if(dbc->signature!=DBCONTACT_SIGNATURE) {
+ LeaveCriticalSection(&csDbAccess);
+ return 1;
+ }
+ //make sure the module group exists
+ ofsSettingsGroup=GetSettingsGroupOfsByModuleNameOfs(dbc,ofsModuleName);
+ if(ofsSettingsGroup==0) {
+ LeaveCriticalSection(&csDbAccess);
+ return 1;
+ }
+ //find if the setting exists
+ ofsBlobPtr=ofsSettingsGroup+offsetof(struct DBContactSettings,blob);
+ pBlob=(PBYTE)DBRead(ofsBlobPtr,1,&bytesRemaining);
+ while(pBlob[0]) {
+ NeedBytes(settingNameLen+1);
+ if(pBlob[0]==settingNameLen && !memcmp(pBlob+1,dbcgs->szSetting,settingNameLen))
+ break;
+ NeedBytes(1);
+ MoveAlong(pBlob[0]+1);
+ NeedBytes(3);
+ MoveAlong(1+GetSettingValueLength(pBlob));
+ NeedBytes(1);
+ }
+ if(!pBlob[0]) { //setting didn't exist
+ LeaveCriticalSection(&csDbAccess);
+ return 1;
+ }
+ { //bin it
+ int nameLen,valLen;
+ DWORD ofsSettingToCut;
+ MoveAlong(1+settingNameLen);
+ NeedBytes(3);
+ nameLen=1+settingNameLen;
+ valLen=1+GetSettingValueLength(pBlob);
+ ofsSettingToCut=ofsBlobPtr-nameLen;
+ MoveAlong(valLen);
+ NeedBytes(1);
+ while(pBlob[0]) {
+ MoveAlong(pBlob[0]+1);
+ NeedBytes(3);
+ MoveAlong(1+GetSettingValueLength(pBlob));
+ NeedBytes(1);
+ }
+ DBMoveChunk(ofsSettingToCut,ofsSettingToCut+nameLen+valLen,ofsBlobPtr+1-ofsSettingToCut);
+ }
+
+ szCachedSettingName = GetCachedSetting(dbcgs->szModule,dbcgs->szSetting,moduleNameLen,settingNameLen);
+ GetCachedValuePtr((HANDLE)saveWparam, szCachedSettingName, -1 );
+
+ //quit
+ DBFlush(1);
+ LeaveCriticalSection(&csDbAccess);
+ { //notify
+ DBCONTACTWRITESETTING dbcws={0};
+ dbcws.szModule=dbcgs->szModule;
+ dbcws.szSetting=dbcgs->szSetting;
+ dbcws.value.type=DBVT_DELETED;
+ NotifyEventHooks(hSettingChangeEvent,saveWparam,(LPARAM)&dbcws);
+ }
+ return 0;
+}
+
+static INT_PTR EnumContactSettings(WPARAM wParam, LPARAM lParam)
+{
+ DBCONTACTENUMSETTINGS *dbces=(DBCONTACTENUMSETTINGS*)lParam;
+ struct DBContact *dbc;
+ DWORD ofsModuleName,ofsContact,ofsBlobPtr;
+ int bytesRemaining, result;
+ PBYTE pBlob;
+ char szSetting[256];
+
+ if (!dbces->szModule)
+ return -1;
+
+ EnterCriticalSection(&csDbAccess);
+
+ ofsModuleName=GetModuleNameOfs(dbces->szModule);
+ if(wParam==0) ofsContact=dbHeader.ofsUser;
+ else ofsContact=wParam;
+ dbc=(struct DBContact*)DBRead(ofsContact,sizeof(struct DBContact),NULL);
+ if(dbc->signature!=DBCONTACT_SIGNATURE) {
+ LeaveCriticalSection(&csDbAccess);
+ return -1;
+ }
+ dbces->ofsSettings=GetSettingsGroupOfsByModuleNameOfs(dbc,ofsModuleName);
+ if(!dbces->ofsSettings) {
+ LeaveCriticalSection(&csDbAccess);
+ return -1;
+ }
+ ofsBlobPtr=dbces->ofsSettings+offsetof(struct DBContactSettings,blob);
+ pBlob=(PBYTE)DBRead(ofsBlobPtr,1,&bytesRemaining);
+ if(pBlob[0]==0) {
+ LeaveCriticalSection(&csDbAccess);
+ return -1;
+ }
+ result = 0;
+ while(pBlob[0]) {
+ NeedBytes(1);
+ NeedBytes(1+pBlob[0]);
+ CopyMemory(szSetting,pBlob+1,pBlob[0]); szSetting[pBlob[0]]=0;
+ result = (dbces->pfnEnumProc)(szSetting,dbces->lParam);
+ MoveAlong(1+pBlob[0]);
+ NeedBytes(3);
+ MoveAlong(1+GetSettingValueLength(pBlob));
+ NeedBytes(1);
+ }
+ LeaveCriticalSection(&csDbAccess);
+ return result;
+}
+
+static INT_PTR EnumResidentSettings(WPARAM wParam, LPARAM lParam)
+{
+ int i;
+ int ret;
+ for(i = 0; i < lResidentSettings.realCount; i++) {
+ ret=((DBMODULEENUMPROC)lParam)(lResidentSettings.items[i],0,wParam);
+ if(ret) return ret;
+ }
+ return 0;
+}
+
+extern Cryptor* CryptoEngine;
+extern void* key;
+
+void EncodeContactSettings(HANDLE hContact)
+{
+ struct DBContact * contact;
+ struct DBContactSettings * setting;
+ DWORD offset;
+
+ if(!hContact) hContact = (HANDLE)dbHeader.ofsUser;
+ contact = (struct DBContact *)DBRead((DWORD)hContact, sizeof(struct DBContact), NULL);
+ if(contact -> ofsFirstSettings){
+ setting = (struct DBContactSettings *)DBRead(contact -> ofsFirstSettings, sizeof(struct DBContactSettings), NULL);
+ offset = contact -> ofsFirstSettings;
+ do{
+ DWORD ofsBlobPtr;
+ PBYTE pBlob;
+ int bytesRemaining;
+ DWORD len;
+ /*struct DBModuleName * name;
+ char namestr[100];
+ name = DBRead(setting->ofsModuleName, sizeof(struct DBModuleName), &bytesRemaining);
+ memcpy(namestr, name->name, name->cbName);
+ namestr[name->cbName] = '\0';
+ MessageBox(0, namestr, "Module", MB_OK);*/
+ ofsBlobPtr = offset + offsetof(struct DBContactSettings,blob);
+ pBlob=(PBYTE)DBRead(ofsBlobPtr,1,&bytesRemaining);
+ while(pBlob[0]) {
+ NeedBytes(1);
+ NeedBytes(1+pBlob[0]);
+ //CopyMemory(szSetting,pBlob+1,pBlob[0]); szSetting[pBlob[0]]=0;
+ MoveAlong(1+pBlob[0]);
+
+ NeedBytes(5);
+
+ switch(pBlob[0]) {
+ case DBVT_DELETED: break;
+ case DBVT_BYTE: break;
+ case DBVT_WORD:
+ {
+ CryptoEngine->EncryptMem(pBlob+1, 2, key);
+ break;
+ }
+ case DBVT_DWORD:
+ {
+ CryptoEngine->EncryptMem(pBlob+1, 4, key);
+ break;
+ }
+ case DBVT_UTF8:
+ case DBVT_ASCIIZ:
+ case DBVT_BLOB:
+ {
+ NeedBytes(3+*(PWORD)(pBlob+1));
+ len = *(PWORD)(pBlob+1);
+
+ CryptoEngine->EncryptMem(pBlob+3, len, key);
+ break;
+ }
+ }
+ NeedBytes(3);
+ MoveAlong(1+GetSettingValueLength(pBlob));
+ NeedBytes(1);
+ }
+
+ if(setting -> ofsNext){
+ offset = setting -> ofsNext;
+ setting = (struct DBContactSettings *)DBRead(setting -> ofsNext, sizeof(struct DBContactSettings), NULL);
+ }
+ else
+ break;
+ }while(1);
+ }
+
+
+}
+void DecodeContactSettings(HANDLE hContact)
+{
+ struct DBContact * contact;
+ struct DBContactSettings * setting;
+ DWORD offset;
+
+
+ if(!hContact) hContact = (HANDLE)dbHeader.ofsUser;
+ contact = (struct DBContact *)DBRead((DWORD)hContact, sizeof(struct DBContact), NULL);
+ if(contact -> ofsFirstSettings){
+ setting = (struct DBContactSettings *)DBRead(contact -> ofsFirstSettings, sizeof(struct DBContactSettings), NULL);
+ offset = contact -> ofsFirstSettings;
+ do{
+ DWORD ofsBlobPtr;
+ PBYTE pBlob;
+ int bytesRemaining;
+ DWORD len;
+ ofsBlobPtr = offset + offsetof(struct DBContactSettings,blob);
+ pBlob=(PBYTE)DBRead(ofsBlobPtr,1,&bytesRemaining);
+ while(pBlob[0]) {
+ NeedBytes(1);
+ NeedBytes(1+pBlob[0]);
+ //CopyMemory(szSetting,pBlob+1,pBlob[0]); szSetting[pBlob[0]]=0;
+ MoveAlong(1+pBlob[0]);
+
+ NeedBytes(5);
+
+ switch(pBlob[0]) {
+ case DBVT_DELETED: break;
+ case DBVT_BYTE: break;
+ case DBVT_WORD:
+ {
+ CryptoEngine->DecryptMem(pBlob+1, 2, key);
+ break;
+ }
+ case DBVT_DWORD:
+ {
+ CryptoEngine->DecryptMem(pBlob+1, 4, key);
+ break;
+ }
+ case DBVT_UTF8:
+ case DBVT_ASCIIZ:
+ case DBVT_BLOB:
+ {
+ NeedBytes(3+*(PWORD)(pBlob+1));
+ len = *(PWORD)(pBlob+1);
+
+ CryptoEngine->DecryptMem(pBlob+3, len, key);
+ break;
+ }
+ }
+ NeedBytes(3);
+ MoveAlong(1+GetSettingValueLength(pBlob));
+ NeedBytes(1);
+ }
+
+ if(setting -> ofsNext){
+ offset = setting -> ofsNext;
+ setting = (struct DBContactSettings *)DBRead(setting -> ofsNext, sizeof(struct DBContactSettings), NULL);
+ }
+ else
+ break;
+ }while(1);
+ }
+
+}
+/////////////////////////////////////////////////////////////////////////////////////////
+//
+// Module initialization procedure
+
+static int stringCompare( DBCachedSettingName* p1, DBCachedSettingName* p2 )
+{
+ return strcmp( p1->name, p2->name );
+}
+
+static int stringCompare2( char* p1, char* p2 )
+{
+ return strcmp( p1, p2);
+}
+
+int InitSettings(void)
+{
+ CreateServiceFunction(MS_DB_CONTACT_GETSETTING, GetContactSetting);
+ CreateServiceFunction(MS_DB_CONTACT_GETSETTING_STR, GetContactSettingStr);
+ CreateServiceFunction(MS_DB_CONTACT_GETSETTINGSTATIC, GetContactSettingStatic);
+ CreateServiceFunction(MS_DB_CONTACT_FREEVARIANT, FreeVariant);
+ CreateServiceFunction(MS_DB_CONTACT_WRITESETTING, WriteContactSetting);
+ CreateServiceFunction(MS_DB_CONTACT_DELETESETTING, DeleteContactSetting);
+ CreateServiceFunction(MS_DB_CONTACT_ENUMSETTINGS, EnumContactSettings);
+ CreateServiceFunction(MS_DB_SETSETTINGRESIDENT, SetSettingResident);
+ CreateServiceFunction("DB/ResidentSettings/Enum", EnumResidentSettings);
+
+ hSettingChangeEvent=CreateHookableEvent(ME_DB_CONTACT_SETTINGCHANGED);
+
+ hCacheHeap=HeapCreate(0,0,0);
+ lSettings.sortFunc=stringCompare;
+ lSettings.increment=100;
+ lContacts.sortFunc=HandleKeySort;
+ lContacts.increment=50;
+ lGlobalSettings.sortFunc=HandleKeySort;
+ lGlobalSettings.increment=50;
+ lResidentSettings.sortFunc=stringCompare2;
+ lResidentSettings.increment=50;
+
+ mirCp = CallService( MS_LANGPACK_GETCODEPAGE, 0, 0 );
+ return 0;
+}
+
+void UninitSettings(void)
+{
+ HeapDestroy(hCacheHeap);
+ li.List_Destroy(&lContacts);
+ li.List_Destroy(&lSettings);
+ li.List_Destroy(&lGlobalSettings);
+ li.List_Destroy(&lResidentSettings);
+}
diff --git a/plugins/Dbx_mmap_SA/dialogs.c b/plugins/Dbx_mmap_SA/dialogs.c
new file mode 100644
index 0000000000..48c13183f8
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/dialogs.c
@@ -0,0 +1,620 @@
+#include "commonheaders.h"
+#include <m_utils.h>
+#include <m_clist.h>
+#include <m_options.h>
+#include <m_icolib.h>
+
+#include <shlobj.h>
+
+#define MS_DB_CHANGEPASSWORD "DB/ChangePassword"
+
+extern char encryptKey[255];
+extern size_t encryptKeyLength;
+extern HANDLE g_hInst;
+HANDLE hSetPwdMenu;
+
+INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
+BOOL ShowDlgItem(HWND hwndDlg, int iIDCtrl, BOOL bShow)
+{
+ HWND hwndCtrl = GetDlgItem(hwndDlg, iIDCtrl);
+ if (!hwndCtrl) return FALSE;
+
+ // Avoid flickering
+ if (bShow && IsWindowVisible(hwndCtrl))
+ return TRUE;
+
+ return ShowWindow(hwndCtrl, (bShow ? SW_SHOW : SW_HIDE));
+}
+
+BOOL EnableDlgItem(HWND hwndDlg, int iIDCtrl, BOOL bEnable)
+{
+ HWND hwndCtrl = GetDlgItem(hwndDlg, iIDCtrl);
+ if (!hwndCtrl) return FALSE;
+
+ // Avoid flickering
+ if (IsWindowEnabled(hwndCtrl) == bEnable)
+ return (bEnable == FALSE);
+
+ return EnableWindow(hwndCtrl, bEnable);
+}
+
+BOOL IsDlgItemEnabled(HWND hwndDlg, int iIDCtrl)
+{
+ HWND hwndCtrl = GetDlgItem(hwndDlg, iIDCtrl);
+ if (!hwndCtrl) return FALSE;
+ return IsWindowEnabled(hwndCtrl);
+}
+
+
+static int OptionsInit(WPARAM wParam, LPARAM lParam)
+{
+ OPTIONSDIALOGPAGE odp;
+
+ ZeroMemory(&odp, sizeof(odp));
+ odp.cbSize = sizeof(odp);
+ odp.position = -790000000;
+ odp.hInstance = g_hInst;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
+ odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.ptszTitle = TranslateT("Database Features");
+ odp.ptszGroup = TranslateT("Services");
+ odp.pfnDlgProc = DlgProcOptions;
+ CallService( MS_OPT_ADDPAGE, wParam,( LPARAM )&odp );
+
+ return 0;
+}
+
+INT_PTR ChangePassword(WPARAM wParam, LPARAM lParam)
+{
+ if(bEncoding){
+ ChangePwd();
+ }else{
+ EncryptDB();
+ }
+ return 0;
+}
+
+void xModifyMenu(HANDLE hMenu,long flags,const TCHAR* name, HICON hIcon)
+{
+ CLISTMENUITEM menu;
+ ZeroMemory(&menu,sizeof(menu));
+ menu.cbSize = sizeof(menu);
+ menu.flags = CMIM_FLAGS | CMIF_TCHAR;
+ menu.flags |= name ? CMIM_NAME : 0;
+ menu.flags |= hIcon ? CMIM_ICON : 0;
+ menu.flags |= flags;
+ menu.ptszName = (TCHAR*)name;
+ menu.hIcon=hIcon;
+
+ CallService(MS_CLIST_MODIFYMENUITEM,(WPARAM)hMenu,(LPARAM)&menu);
+}
+
+static int ModulesLoad(WPARAM wParam, LPARAM lParam)
+{
+ CLISTMENUITEM menu = {0};
+ SKINICONDESC sid = {0};
+ TCHAR szFile[MAX_PATH];
+ //HANDLE hFirst;
+
+ HookEvent(ME_OPT_INITIALISE, OptionsInit);
+
+ // icolib init
+ GetModuleFileName(g_hInst, szFile, MAX_PATH);
+
+ sid.cbSize = sizeof(sid);
+ sid.ptszDefaultFile = szFile;
+ sid.flags = SIDF_ALL_TCHAR;
+ sid.ptszSection = LPGENT("Database");
+ sid.ptszDescription = LPGENT("Database");
+ sid.pszName = "database";
+ sid.iDefaultIndex = -IDI_ICON2;
+ CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
+
+ sid.ptszDescription = LPGENT("Change Password");
+ sid.pszName = "password";
+ sid.iDefaultIndex = -IDI_ICON3;
+ CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
+
+ menu.cbSize = sizeof(menu);
+ menu.flags = CMIM_ALL | CMIF_TCHAR;
+
+ menu.hIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"database");
+
+ // main menu item
+ menu.ptszName = (bEncoding) ? LPGENT("Change password") : LPGENT("Set password");
+ menu.ptszPopupName = LPGENT("Database");
+ menu.pszService = MS_DB_CHANGEPASSWORD;
+ menu.position = 500100000;
+
+ hSetPwdMenu = (HANDLE)CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&menu);
+
+ ZeroMemory(&menu,sizeof(menu));
+ menu.cbSize = sizeof(menu);
+ menu.flags = CMIM_ICON;
+ menu.hIcon = (HICON)CallService(MS_SKIN2_GETICON, 0, (LPARAM)"password");
+ CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hSetPwdMenu, (LPARAM)&menu);
+
+ return 0;
+}
+
+int UnloadOptions()
+{
+ OleUninitialize();
+ return 0;
+}
+
+
+int InitDialogs()
+{
+ OleInitialize(0);
+ CreateServiceFunction(MS_DB_CHANGEPASSWORD, ChangePassword);
+ HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoad);
+
+ return 0;
+}
+
+extern Cryptor* CryptoEngine;
+
+extern int ModulesCount;
+extern CryptoModule* Modules[100];
+
+//ugly, i know
+#undef LVM_SETITEMTEXT
+#define LVM_SETITEMTEXT LVM_SETITEMTEXTA
+
+int ImageList_AddIcon_IconLibLoaded(HIMAGELIST hIml, char* name)
+{
+ HICON hIcon = (HICON)CallService(MS_SKIN2_GETICON, (WPARAM)NULL, (LPARAM)name);
+ int res = ImageList_AddIcon(hIml, hIcon);
+ return res;
+}
+
+INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ HWND hwndList = GetDlgItem(hwndDlg, IDC_MODULES);
+ LVCOLUMN col;
+ LVITEM item;
+ int i, iRow, iIndex;
+ NMLISTVIEW * hdr = (NMLISTVIEW *) lParam;
+ WORD uid;
+ HIMAGELIST hIml;
+
+ switch ( msg ) {
+ case WM_INITDIALOG:
+ hIml = ImageList_Create(16, 16, ILC_MASK | (IsWinVerXPPlus()? ILC_COLOR32 : ILC_COLOR16), 2, 0);
+ TranslateDialogDefault( hwndDlg );
+
+ ImageList_AddIcon_IconLibLoaded( hIml, "core_main_29" );
+ ImageList_AddIcon_IconLibLoaded( hIml, "core_main_30" );
+ ListView_SetImageList( hwndList, hIml, LVSIL_SMALL );
+
+ col.pszText = NULL;
+ col.mask = LVCF_TEXT | LVCF_WIDTH;
+ col.fmt = LVCFMT_LEFT;
+ col.cx = 50;
+ ListView_InsertColumn(hwndList, 1, &col);
+
+ col.pszText = TranslateT("Dll");
+ col.mask = LVCF_TEXT | LVCF_WIDTH;
+ col.fmt = LVCFMT_LEFT;
+ col.cx = 1000;
+ ListView_InsertColumn(hwndList, 2, &col);
+
+ col.pszText = TranslateT("Name");
+ col.cx = 1000;
+ ListView_InsertColumn(hwndList, 3, &col);
+
+ col.pszText = TranslateT("Version");
+ col.cx = 1000;
+ ListView_InsertColumn(hwndList, 4, &col);
+
+ ListView_SetExtendedListViewStyleEx(hwndList, 0, LVS_EX_CHECKBOXES | LVS_EX_FULLROWSELECT | LVS_EX_SUBITEMIMAGES);
+
+ uid = DBGetContactSettingWord(NULL, "SecureMMAP", "CryptoModule", 0);
+
+ for(i = 0; i < ModulesCount; i++){
+ char buf[100];
+
+ item.mask = LVIF_TEXT;
+ item.iItem = i;
+ item.iSubItem = 0;
+ item.pszText = NULL;
+ iRow = ListView_InsertItem(hwndList, &item);
+
+ ListView_SetItemText(hwndList, iRow, 1, (LPWSTR)Modules[i]->dllname);
+ ListView_SetItemText(hwndList, iRow, 2, (LPWSTR)Modules[i]->cryptor->Name);
+ mir_snprintf(buf,SIZEOF(buf),"%d.%d.%d.%d", HIBYTE(HIWORD(Modules[i]->cryptor->Version)), LOBYTE(HIWORD(Modules[i]->cryptor->Version)), HIBYTE(LOWORD(Modules[i]->cryptor->Version)), LOBYTE(LOWORD(Modules[i]->cryptor->Version)));
+ ListView_SetItemText(hwndList, iRow, 3, (LPWSTR)buf);
+
+ if(uid == Modules[i]->cryptor->uid && bEncoding)
+ ListView_SetCheckState(hwndList, i, 1);
+
+ item.mask = LVIF_IMAGE;
+ item.iItem = iRow;
+ item.iSubItem = 0;
+ item.iImage = ( CryptoEngine == Modules[i]->cryptor && bEncoding ) ? 0 : 1;
+ ListView_SetItem( hwndList, &item );
+ }
+
+ ListView_SetColumnWidth(hwndList, 0, LVSCW_AUTOSIZE);
+ ListView_SetColumnWidth(hwndList, 1, LVSCW_AUTOSIZE);
+ ListView_SetColumnWidth(hwndList, 2, LVSCW_AUTOSIZE);
+ ListView_SetColumnWidth(hwndList, 3, LVSCW_AUTOSIZE);
+ return TRUE;
+
+ case WM_COMMAND:
+ if ( HIWORD(wParam) == STN_CLICKED ) {
+ switch (LOWORD(wParam)) {
+ case IDC_EMAIL:
+ case IDC_SITE:
+ {
+ char buf[512];
+ char * p = &buf[7];
+ lstrcpyA(buf,"mailto:");
+ if ( GetWindowTextA(GetDlgItem(hwndDlg, LOWORD(wParam)), p, SIZEOF(buf) - 7) ) {
+ CallService(MS_UTILS_OPENURL,0,(LPARAM) (LOWORD(wParam)==IDC_EMAIL ? buf : p) );
+ }
+ break;
+ } } }
+ break;
+
+ case WM_NOTIFY:
+ if ( hdr && hdr->hdr.code == LVN_ITEMCHANGED && IsWindowVisible(hdr->hdr.hwndFrom) && hdr->iItem != (-1) ) {
+ iIndex = hdr->iItem;
+ if(hdr->uNewState & 0x2000){
+ for(i = 0; i < ModulesCount; i++){
+ if(i != iIndex) ListView_SetCheckState(hwndList, i, 0);
+ }
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ break;
+ }
+ if(hdr->uNewState & 0x1000){
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ break;
+ }
+ if(hdr->uNewState & LVIS_SELECTED){
+ SetDlgItemTextA(hwndDlg, IDC_AUTHOR, Modules[iIndex]->cryptor->Author);
+ {
+ TCHAR* info_t = mir_a2t((char*)(Modules[iIndex]->cryptor->Info));
+ SetDlgItemText(hwndDlg, IDC_INFO, TranslateTS(info_t));
+ mir_free(info_t);
+ }
+ SetDlgItemTextA(hwndDlg, IDC_SITE, Modules[iIndex]->cryptor->Site);
+ SetDlgItemTextA(hwndDlg, IDC_EMAIL, Modules[iIndex]->cryptor->Email);
+ SetDlgItemTextA(hwndDlg, IDC_ENC, Modules[iIndex]->cryptor->Name);
+ SetDlgItemInt(hwndDlg, IDC_UID, Modules[iIndex]->cryptor->uid, 0);
+ } else {
+ SetDlgItemTextA(hwndDlg, IDC_AUTHOR, "");
+ SetDlgItemTextA(hwndDlg, IDC_INFO, "");
+ SetDlgItemTextA(hwndDlg, IDC_SITE, "");
+ SetDlgItemTextA(hwndDlg, IDC_EMAIL, "");
+ SetDlgItemTextA(hwndDlg, IDC_ENC, "");
+ SetDlgItemTextA(hwndDlg, IDC_UID, "");
+ }
+
+ break;
+ }
+ if (((LPNMHDR)lParam)->code == PSN_APPLY ) {
+ int alg = -1;
+ for(i = 0; i < ModulesCount; i++){
+ if(ListView_GetCheckState(hwndList, i)){
+ alg = i;
+ break;
+ }
+ }
+
+ if(alg > -1){
+ if(!bEncoding){
+ DBWriteContactSettingWord(NULL, "SecureMMAP", "CryptoModule", Modules[alg]->cryptor->uid);
+ EncryptDB();
+ }else{
+ if(Modules[alg]->cryptor->uid != DBGetContactSettingWord(NULL, "SecureMMAP", "CryptoModule", -1)){
+ DBWriteContactSettingWord(NULL, "SecureMMAP", "CryptoModule", Modules[alg]->cryptor->uid);
+ RecryptDB();
+ }
+ }
+ }else{
+ if(bEncoding){
+ DecryptDB();
+ }
+ }
+
+ uid = DBGetContactSettingWord(NULL, "SecureMMAP", "CryptoModule", 0);
+
+ for(i = 0; i < ModulesCount; i++){
+ if(uid == Modules[i]->cryptor->uid && bEncoding)
+ ListView_SetCheckState(hwndList, i, 1);
+
+ item.mask = LVIF_IMAGE;
+ item.iItem = i;
+ item.iSubItem = 0;
+ item.iImage = ( CryptoEngine == Modules[i]->cryptor && bEncoding ) ? 0 : 1;
+
+ ListView_SetItem( hwndList, &item );
+ }
+
+ return TRUE;
+
+ }
+ break;
+ }
+
+ return FALSE;
+}
+UINT oldLangID = 0;
+void LanguageChanged(HWND hDlg)
+{
+ UINT LangID = (UINT)GetKeyboardLayout(0);
+ char Lang[3] = {0};
+ if (LangID != oldLangID)
+ {
+ oldLangID = LangID;
+ GetLocaleInfoA(MAKELCID((LangID & 0xffffffff), SORT_DEFAULT), LOCALE_SABBREVLANGNAME, Lang, 2);
+ Lang[0] = toupper(Lang[0]);
+ Lang[1] = tolower(Lang[1]);
+ SetDlgItemTextA(hDlg, IDC_LANG, Lang);
+ }
+}
+
+extern BOOL wrongPass;
+
+BOOL CALLBACK DlgStdInProc(HWND hDlg, UINT uMsg,WPARAM wParam,LPARAM lParam)
+{
+ HICON hIcon = 0;
+ TCHAR tszHeaderTxt[256];
+ TCHAR* tszDbName;
+ switch(uMsg)
+ {
+ case WM_INITDIALOG:
+ {
+ HWND hwndCtrl;
+// if(pluginLink && ServiceExists(MS_LANGPACK_TRANSLATEDIALOG))
+ TranslateDialogDefault(hDlg);
+
+ hIcon = LoadIcon(g_hInst, MAKEINTRESOURCE(IDI_ICON2));
+ SendMessage(GetDlgItem(hDlg, IDC_HEADERBAR), WM_SETICON, 0, (LPARAM)hIcon);
+
+ if(!wrongPass)
+ {
+ tszDbName = mir_a2t((char*)lParam);
+ mir_sntprintf(tszHeaderTxt, SIZEOF(tszHeaderTxt), _T("%s\n%s"), TranslateT("Please type in your password for"), tszDbName);
+ SetWindowText(GetDlgItem(hDlg, IDC_HEADERBAR), tszHeaderTxt);
+ mir_free(tszDbName);
+ }
+ else
+ {
+ if (wrongPass > 2)
+ {
+ hwndCtrl = GetDlgItem(hDlg, IDC_USERPASS);
+ EnableWindow(hwndCtrl, FALSE);
+ hwndCtrl = GetDlgItem(hDlg, IDOK);
+ EnableWindow(hwndCtrl, FALSE);
+ SetWindowText(GetDlgItem(hDlg, IDC_HEADERBAR), TranslateT("Too many errors!"));
+ }
+ else
+ {
+ SetWindowText(GetDlgItem(hDlg, IDC_HEADERBAR), TranslateT("Password is not correct!"));
+ }
+ }
+ oldLangID = 0;
+ SetTimer(hDlg,1,200,NULL);
+ LanguageChanged(hDlg);
+ return TRUE;
+ }
+
+ case WM_CTLCOLORSTATIC:
+ {
+ if ((HWND)lParam == GetDlgItem(hDlg, IDC_LANG))
+ {
+ SetTextColor((HDC)wParam, GetSysColor(COLOR_HIGHLIGHTTEXT));
+ SetBkMode((HDC)wParam, TRANSPARENT);
+ return (BOOL)GetSysColorBrush(COLOR_HIGHLIGHT);
+ }
+
+ return FALSE;
+ }
+
+ case WM_COMMAND:
+ {
+ UINT uid = LOWORD(wParam);
+
+ if(uid == IDOK){
+ if(!GetWindowLongPtr(hDlg,GWLP_USERDATA))
+ {
+ encryptKeyLength = GetDlgItemTextA(hDlg, IDC_USERPASS, encryptKey, 254);
+ EndDialog(hDlg,IDOK);
+ }else{
+
+ }
+ }else if(uid == IDCANCEL){
+ EndDialog(hDlg,IDCANCEL);
+ }
+ }
+ case WM_TIMER:
+ {
+ LanguageChanged(hDlg);
+ return FALSE;
+ }
+ case WM_DESTROY:
+ {
+ KillTimer(hDlg, 1);
+ DestroyIcon(hIcon);
+ }
+ }
+
+ return FALSE;
+}
+
+BOOL CALLBACK DlgStdNewPass(HWND hDlg, UINT uMsg,WPARAM wParam,LPARAM lParam)
+{
+ HICON hIcon = 0;
+
+ switch(uMsg)
+ {
+ case WM_INITDIALOG:
+ {
+ //if(pluginLink && ServiceExists(MS_LANGPACK_TRANSLATEDIALOG))
+ TranslateDialogDefault(hDlg);
+
+ hIcon = LoadIcon(g_hInst, MAKEINTRESOURCE(IDI_ICON2));
+ SendMessage(GetDlgItem(hDlg, IDC_HEADERBAR), WM_SETICON, 0, (LPARAM)hIcon);
+
+ SetWindowText(GetDlgItem(hDlg, IDC_HEADERBAR), TranslateT("Please enter your new password"));
+
+ oldLangID = 0;
+ SetTimer(hDlg,1,200,NULL);
+ LanguageChanged(hDlg);
+
+ return TRUE;
+ }
+
+ case WM_CTLCOLORSTATIC:
+ {
+ if ((HWND)lParam == GetDlgItem(hDlg, IDC_LANG))
+ {
+ SetTextColor((HDC)wParam, GetSysColor(COLOR_HIGHLIGHTTEXT));
+ SetBkMode((HDC)wParam, TRANSPARENT);
+ return (BOOL)GetSysColorBrush(COLOR_HIGHLIGHT);
+ }
+
+ return FALSE;
+ }
+
+ case WM_COMMAND:
+ {
+ UINT uid = LOWORD(wParam);
+
+ if(uid == IDOK){
+ if(!GetWindowLongPtr(hDlg,GWLP_USERDATA))
+ {
+ char pass1[255], pass2[255];
+ if(GetDlgItemTextA(hDlg, IDC_USERPASS1, pass1, 254) < 3){
+ SetWindowText(GetDlgItem(hDlg, IDC_HEADERBAR), TranslateT("Password is too short!"));
+ SendMessage(GetDlgItem(hDlg, IDC_HEADERBAR), WM_NCPAINT, 0, 0);
+ SetDlgItemTextA(hDlg,IDC_USERPASS1,"");
+ SetDlgItemTextA(hDlg,IDC_USERPASS2,"");
+ }else{
+
+ GetDlgItemTextA(hDlg, IDC_USERPASS2, pass2, 254);
+ if(!strcmp(pass1, pass2)){
+ encryptKeyLength = strlen(pass1);
+ strcpy(encryptKey, pass1);
+ EndDialog(hDlg,IDOK);
+ }else{
+ SetWindowText(GetDlgItem(hDlg, IDC_HEADERBAR), TranslateT("Passwords do not match!"));
+ SendMessage(GetDlgItem(hDlg, IDC_HEADERBAR), WM_NCPAINT, 0, 0);
+ SetDlgItemTextA(hDlg,IDC_USERPASS1,"");
+ SetDlgItemTextA(hDlg,IDC_USERPASS2,"");
+ }
+ }
+ }else{
+
+ }
+ }else if(uid == IDCANCEL){
+ EndDialog(hDlg,IDCANCEL);
+ }
+ }
+ case WM_TIMER:
+ {
+ LanguageChanged(hDlg);
+ return FALSE;
+ }
+ case WM_DESTROY:
+ {
+ KillTimer(hDlg, 1);
+ DestroyIcon(hIcon);
+ return FALSE;
+ }
+ }
+ return FALSE;
+}
+
+char* newPass;
+
+BOOL CALLBACK DlgChangePass(HWND hDlg, UINT uMsg,WPARAM wParam,LPARAM lParam)
+{
+ HICON hIcon = 0;
+
+ switch(uMsg)
+ {
+ case WM_INITDIALOG:
+ {
+ //if(pluginLink && ServiceExists(MS_LANGPACK_TRANSLATEDIALOG))
+ TranslateDialogDefault(hDlg);
+
+ hIcon = LoadIcon(g_hInst, MAKEINTRESOURCE(IDI_ICON2));
+ SendMessage(GetDlgItem(hDlg, IDC_HEADERBAR), WM_SETICON, 0, (LPARAM)hIcon);
+ SetWindowText(GetDlgItem(hDlg, IDC_HEADERBAR), TranslateT("Change password"));
+
+ newPass = (char*)lParam;
+ oldLangID = 0;
+ SetTimer(hDlg,1,200,NULL);
+ LanguageChanged(hDlg);
+
+ return TRUE;
+ }
+
+ case WM_CTLCOLORSTATIC:
+ {
+ if ((HWND)lParam == GetDlgItem(hDlg, IDC_LANG))
+ {
+ SetTextColor((HDC)wParam, GetSysColor(COLOR_HIGHLIGHTTEXT));
+ SetBkMode((HDC)wParam, TRANSPARENT);
+ return (BOOL)GetSysColorBrush(COLOR_HIGHLIGHT);
+ }
+
+ return FALSE;
+ }
+
+ case WM_COMMAND:
+ {
+ UINT uid = LOWORD(wParam);
+
+ if(uid == IDOK){
+ char pass1[255], pass2[255], oldpass[255];
+ GetDlgItemTextA(hDlg, IDC_OLDPASS, oldpass, 254);
+ if(strcmp(oldpass, encryptKey)){
+ SetWindowText(GetDlgItem(hDlg, IDC_HEADERBAR), TranslateT("Wrong password!"));
+ SendMessage(GetDlgItem(hDlg, IDC_HEADERBAR), WM_NCPAINT, 0, 0);
+ break;
+ }
+ if(GetDlgItemTextA(hDlg, IDC_NEWPASS1, pass1, 254) < 3){
+ SetWindowText(GetDlgItem(hDlg, IDC_HEADERBAR), TranslateT("Password is too short!"));
+ SendMessage(GetDlgItem(hDlg, IDC_HEADERBAR), WM_NCPAINT, 0, 0);
+
+ }else{
+ GetDlgItemTextA(hDlg, IDC_NEWPASS2, pass2, 254);
+ if(!strcmp(pass1, pass2)){
+ strcpy(newPass, pass1);
+ EndDialog(hDlg,IDOK);
+ }else{
+ SetWindowText(GetDlgItem(hDlg, IDC_HEADERBAR), TranslateT("Passwords do not match!"));
+ SendMessage(GetDlgItem(hDlg, IDC_HEADERBAR), WM_NCPAINT, 0, 0);
+ }
+ }
+ }else if(uid == IDCANCEL){
+ EndDialog(hDlg,IDCANCEL);
+ }else if(uid == IDREMOVE){
+ char oldpass[255];
+ GetDlgItemTextA(hDlg, IDC_OLDPASS, oldpass, 254);
+ if(strcmp(oldpass, encryptKey)){
+ SetWindowText(GetDlgItem(hDlg, IDC_HEADERBAR), TranslateT("Wrong password!"));
+ SendMessage(GetDlgItem(hDlg, IDC_HEADERBAR), WM_NCPAINT, 0, 0);
+ break;
+ }
+ EndDialog(hDlg, IDREMOVE);
+ }
+ }
+ case WM_TIMER:
+ {
+ LanguageChanged(hDlg);
+ return FALSE;
+ }
+ case WM_DESTROY:
+ {
+ KillTimer(hDlg, 1);
+ return FALSE;
+ }
+ }
+ return FALSE;
+}
diff --git a/plugins/Dbx_mmap_SA/encrypt.c b/plugins/Dbx_mmap_SA/encrypt.c
new file mode 100644
index 0000000000..a42d79eae2
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/encrypt.c
@@ -0,0 +1,66 @@
+/*
+
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2000-2003 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#include "commonheaders.h"
+
+//VERY VERY VERY BASIC ENCRYPTION FUNCTION
+
+
+void Encrypt(char*msg,BOOL up)
+{
+ int i;
+ int jump;
+ if (up)
+ {
+ jump=5;
+ }
+ else
+ {
+ jump=-5;
+ }
+
+ for (i=0;msg[i];i++)
+ {
+ msg[i]=msg[i]+jump;
+ }
+
+}
+
+static INT_PTR EncodeString(WPARAM wParam,LPARAM lParam)
+{
+ Encrypt((char*)lParam,TRUE);
+ return 0;
+}
+
+static INT_PTR DecodeString(WPARAM wParam,LPARAM lParam)
+{
+ Encrypt((char*)lParam,FALSE);
+ return 0;
+}
+
+int InitCrypt(void)
+{
+ CreateServiceFunction(MS_DB_CRYPT_ENCODESTRING,EncodeString);
+ CreateServiceFunction(MS_DB_CRYPT_DECODESTRING,DecodeString);
+ return 0;
+}
diff --git a/plugins/Dbx_mmap_SA/encryption.h b/plugins/Dbx_mmap_SA/encryption.h
new file mode 100644
index 0000000000..73c2d7e13a
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/encryption.h
@@ -0,0 +1,23 @@
+/*
+Miranda ICQ: the free icq client for MS Windows
+Copyright (C) 2000-2 Richard Hughes, Roland Rabien & Tristan Van de Vreede
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+#ifndef MODULAR
+#include <windows.h>
+
+void Encrypt(char*msg,BOOL up);
+#endif \ No newline at end of file
diff --git a/plugins/Dbx_mmap_SA/icos/backup.ico b/plugins/Dbx_mmap_SA/icos/backup.ico
new file mode 100644
index 0000000000..2bd78218d8
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/icos/backup.ico
Binary files differ
diff --git a/plugins/Dbx_mmap_SA/icos/logo.ico b/plugins/Dbx_mmap_SA/icos/logo.ico
new file mode 100644
index 0000000000..908883520a
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/icos/logo.ico
Binary files differ
diff --git a/plugins/Dbx_mmap_SA/icos/pass.ico b/plugins/Dbx_mmap_SA/icos/pass.ico
new file mode 100644
index 0000000000..d3075f98cf
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/icos/pass.ico
Binary files differ
diff --git a/plugins/Dbx_mmap_SA/icos/restart.ico b/plugins/Dbx_mmap_SA/icos/restart.ico
new file mode 100644
index 0000000000..70335391a0
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/icos/restart.ico
Binary files differ
diff --git a/plugins/Dbx_mmap_SA/init.c b/plugins/Dbx_mmap_SA/init.c
new file mode 100644
index 0000000000..38d90b800f
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/init.c
@@ -0,0 +1,221 @@
+/*
+
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2000-2003 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#include "commonheaders.h"
+
+struct MM_INTERFACE mmi;
+struct LIST_INTERFACE li;
+struct UTF8_INTERFACE utfi;
+int hLangpack;
+
+extern char szDbPath[MAX_PATH];
+
+HINSTANCE g_hInst=NULL;
+PLUGINLINK *pluginLink;
+
+PLUGININFOEX pluginInfo = {
+ sizeof(PLUGININFOEX),
+ __PLUGIN_NAME,
+ __VERSION_DWORD,
+ "Provides Miranda database support: global settings, contacts, history, settings per contact. Enhanced modification with Encryption support.",
+ "Miranda-IM project, modification by FYR and chaos.persei, nullbie, Billy_Bons",
+ "chaos.persei@gmail.com; ashpynov@gmail.com; bio@msx.ru; ghazan@miranda-im.org",
+ "Copyright 2000-2011 Miranda IM project, FYR, chaos.persei, induction, nullbie",
+ "http://dbmmapmod.googlecode.com/",
+ UNICODE_AWARE,
+ DEFMOD_DB,
+ // {28FF9B91-3E4D-4f1c-B47C-C641B037FF40}
+ { 0x28ff9b91, 0x3e4d, 0x4f1c, { 0xb4, 0x7c, 0xc6, 0x41, 0xb0, 0x37, 0xff, 0x40 } }
+
+};
+
+static int getCapability( int flag )
+{
+ return 0;
+}
+
+// returns 0 if the profile is created, EMKPRF*
+static int makeDatabase(char * profile, int * error)
+{
+ HANDLE hFile=CreateFileA(profile, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL);
+ if ( hFile != INVALID_HANDLE_VALUE ) {
+ CreateDbHeaders(hFile);
+ CloseHandle(hFile);
+ return 0;
+ }
+ if ( error != NULL ) *error=EMKPRF_CREATEFAILED;
+ return 1;
+}
+
+// returns 0 if the given profile has a valid header
+static int grokHeader( char * profile, int * error )
+{
+ int rc=1;
+ int chk=0;
+ struct DBHeader hdr;
+ HANDLE hFile = INVALID_HANDLE_VALUE;
+ DWORD dummy=0;
+
+ hFile = CreateFileA(profile, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
+ if ( hFile == INVALID_HANDLE_VALUE ) {
+ if ( error != NULL ) *error=EGROKPRF_CANTREAD;
+ return 1;
+ }
+ // read the header, which can fail (for various reasons)
+ if ( !ReadFile(hFile, &hdr, sizeof(struct DBHeader), &dummy, NULL) ) {
+ if ( error != NULL) *error=EGROKPRF_CANTREAD;
+ CloseHandle(hFile);
+ return 1;
+ }
+ chk=CheckDbHeaders(&hdr);
+ if ( chk == 0 ) {
+ // all the internal tests passed, hurrah
+ rc=0;
+ if ( error != NULL ) *error=0;
+ } else {
+ // didn't pass at all, or some did.
+ switch ( chk ) {
+ case 1:
+ {
+ // "Miranda ICQ DB" wasn't present
+ if ( error != NULL ) *error = EGROKPRF_UNKHEADER;
+ break;
+ }
+ case 2:
+ {
+ // header was present, but version information newer
+ if ( error != NULL ) *error= EGROKPRF_VERNEWER;
+ break;
+ }
+ case 3:
+ {
+ // header/version OK, internal data missing
+ if ( error != NULL ) *error=EGROKPRF_DAMAGED;
+ break;
+ }
+ } // switch
+ } //if
+ CloseHandle(hFile);
+ return rc;
+}
+
+// returns 0 if all the APIs are injected otherwise, 1
+static int LoadDatabase( char * profile, void * plink )
+{
+ PLUGINLINK *link = plink;
+#ifdef _DEBUG
+ _CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
+#endif
+ // don't need thread notifications
+ strncpy(szDbPath, profile, sizeof(szDbPath));
+
+ // this is like Load()'s pluginLink
+ pluginLink=link;
+
+ // set the memory, lists & UTF8 manager
+ mir_getLI( &li );
+ mir_getMMI( &mmi );
+ mir_getUTFI( &utfi );
+ mir_getLP( &pluginInfo );
+
+ { // Are we running under unicode Miranda core ?
+ char szVer[MAX_PATH];
+ CallService(MS_SYSTEM_GETVERSIONTEXT, MAX_PATH, (LPARAM)szVer);
+ _strlwr(szVer); // make sure it is lowercase
+
+ /* WARNING!!! You CANNOT remove this code */
+ if (strstr(szVer, "coffee") != NULL)
+ {
+ // We are running under damn violators
+ void (*f)();
+
+ MessageBox(0, TranslateT("Running mmap_sa is forbidden under license violating products, sorry"), TranslateT("Warning!"), MB_OK);
+
+ f = NULL;
+ f();
+ }
+ /* end of protected code */
+ }
+
+ // inject all APIs and hooks into the core
+ return LoadDatabaseModule();
+}
+
+static int UnloadDatabase(int wasLoaded)
+{
+ if ( !wasLoaded) return 0;
+ UnloadDatabaseModule();
+ return 0;
+}
+
+static int getFriendlyName( char * buf, size_t cch, int shortName )
+{
+ strncpy(buf,shortName ? "db3x secured_mmap driver" : "db3x mmap database support",cch);
+ return 0;
+}
+
+static DATABASELINK dblink = {
+ sizeof(DATABASELINK),
+ getCapability,
+ getFriendlyName,
+ makeDatabase,
+ grokHeader,
+ LoadDatabase,
+ UnloadDatabase,
+};
+
+BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD dwReason, LPVOID reserved)
+{
+ g_hInst=hInstDLL;
+ return TRUE;
+}
+
+__declspec(dllexport) DATABASELINK* DatabasePluginInfo(void * reserved)
+{
+ return &dblink;
+}
+
+__declspec(dllexport) PLUGININFOEX * MirandaPluginInfoEx(DWORD mirandaVersion)
+{
+ if ( mirandaVersion < PLUGIN_MAKE_VERSION(0,7,0,0)) {
+ MessageBox( NULL, TranslateT("The dbx_mmap_sa plugin cannot be loaded. It requires Miranda IM 0.7.0.0 or later."), TranslateT("dbx_mmap_sa Plugin"), MB_OK|MB_ICONWARNING|MB_SETFOREGROUND|MB_TOPMOST );
+ return NULL;
+ }
+ return &pluginInfo;
+}
+
+static const MUUID interfaces[] = {MIID_DATABASE, MIID_LAST};
+__declspec(dllexport) const MUUID* MirandaPluginInterfaces(void)
+{
+ return interfaces;
+}
+
+int __declspec(dllexport) Load(PLUGINLINK * link)
+{
+ return 1;
+}
+
+int __declspec(dllexport) Unload(void)
+{
+ return 0;
+}
diff --git a/plugins/Dbx_mmap_SA/options.h b/plugins/Dbx_mmap_SA/options.h
new file mode 100644
index 0000000000..efabf3eba5
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/options.h
@@ -0,0 +1,38 @@
+/*
+
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2000-2003 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#include <m_clist.h>
+#include <m_options.h>
+#include "resource.h"
+
+typedef enum { BT_DISABLED = 0, BT_START = 1, BT_EXIT = 2, BT_PERIODIC = 4} BackupType;
+typedef enum { PT_DAYS, PT_HOURS, PT_MINUTES} PeriodType;
+
+typedef struct Options_tag {
+ int backup_types;
+ unsigned int period;
+ PeriodType period_type;
+ char folder[MAX_PATH];
+ unsigned int num_backups;
+ BOOL disable_progress;
+} Options; \ No newline at end of file
diff --git a/plugins/Dbx_mmap_SA/resource.h b/plugins/Dbx_mmap_SA/resource.h
new file mode 100644
index 0000000000..7b13f6957d
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/resource.h
@@ -0,0 +1,54 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by db3x_mmap.rc
+//
+#define IDC_NOTOALL 3
+#define IDREMOVE 3
+#define IDD_OPTIONS 101
+#define IDD_INSTALLINI 235
+#define IDD_WARNINICHANGE 236
+#define IDD_INIIMPORTDONE 237
+#define IDD_LOGIN 269
+#define IDD_NEWPASS 270
+#define IDI_ICON2 271
+#define IDI_ICON3 272
+#define IDC_LANG 274
+#define IDD_CHANGEPASS 275
+#define IDC_ININAME 1333
+#define IDC_VIEWINI 1334
+#define IDC_SECURITYINFO 1335
+#define IDC_SETTINGNAME 1336
+#define IDC_NEWVALUE 1337
+#define IDC_WARNNOMORE 1338
+#define IDC_DELETE 1339
+#define IDC_RECYCLE 1340
+#define IDC_NEWNAME 1341
+#define IDC_MOVE 1342
+#define IDC_LEAVE 1343
+#define IDC_HEADERBAR 1657
+#define IDC_USERPASS 1658
+#define IDC_ENC 1659
+#define IDC_USERPASS1 1659
+#define IDC_OLDPASS 1660
+#define IDC_USERPASS2 1661
+#define IDC_NEWPASSINFO 1679
+#define IDC_MODULES 1680
+#define IDC_NEWPASSINFO2 1680
+#define IDC_INFO 1682
+#define IDC_AUTHOR 1683
+#define IDC_NEWPASS1 1683
+#define IDC_SITE 1684
+#define IDC_NEWPASS2 1684
+#define IDC_EMAIL 1685
+#define IDC_UID 1686
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 276
+#define _APS_NEXT_COMMAND_VALUE 40018
+#define _APS_NEXT_CONTROL_VALUE 1685
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/plugins/Dbx_mmap_SA/resource.rc b/plugins/Dbx_mmap_SA/resource.rc
new file mode 100644
index 0000000000..47b87e4156
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/resource.rc
@@ -0,0 +1,2 @@
+#include "db3x_mmap.rc"
+#include "version.rc"
diff --git a/plugins/Dbx_mmap_SA/security.c b/plugins/Dbx_mmap_SA/security.c
new file mode 100644
index 0000000000..92a82a4bfe
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/security.c
@@ -0,0 +1,424 @@
+// (C) Artem Shpynov aka FYR and Igonin Vitaliy aka chaos.persei, 2007 - 2008
+
+#include "commonheaders.h"
+
+BOOL bEncoding;
+BOOL bEncProcess = 0;
+
+extern HINSTANCE g_hInst;
+
+extern HANDLE hSetPwdMenu = NULL;
+
+char encryptKey[255];
+size_t encryptKeyLength;
+
+int wrongPass = 0;
+void* key;
+
+Cryptor* CryptoEngine = NULL;
+
+int ModulesCount = 0;
+CryptoModule* Modules[100];
+
+
+void zero_fill(BYTE * pBuf, size_t bufSize)
+{
+ size_t i;
+ for(i = 0; i < bufSize; i++)
+ pBuf[i] = 0;
+}
+
+void InitSecurity()
+{
+ HMODULE hLib;
+ WIN32_FIND_DATAA fd;
+
+ Cryptor* (__stdcall *GetCryptor)();
+
+ HANDLE hFile = FindFirstFileA(".\\plugins\\cryptors\\*.dll", &fd);
+
+ ModulesCount = 0;
+ while (hFile != INVALID_HANDLE_VALUE)
+ {
+ char tmp[255];
+ strcpy(tmp, ".\\plugins\\cryptors\\");
+ strcat(tmp, fd.cFileName);
+
+ hLib = LoadLibraryA(tmp);
+ if(hLib){
+ GetCryptor = (Cryptor* (__stdcall *)()) GetProcAddress(hLib, "GetCryptor");
+ if(GetCryptor){
+ Modules[ModulesCount] = (CryptoModule*) malloc(sizeof(CryptoModule));
+ Modules[ModulesCount]->cryptor = GetCryptor();
+ strcpy(Modules[ModulesCount]->dllname, fd.cFileName);
+ Modules[ModulesCount]->hLib = hLib;
+
+ ModulesCount++;
+ }else{
+ FreeLibrary(hLib);
+ }
+ }
+ if(ModulesCount >= 100) break;
+ if(!FindNextFileA(hFile, &fd)) break;
+ }
+}
+
+void UnloadSecurity()
+{
+ int i;
+
+ if(CryptoEngine) CryptoEngine->FreeKey(key);
+
+ for(i = 0; i < ModulesCount; i++)
+ {
+ FreeLibrary(Modules[i]->hLib);
+ free(Modules[i]);
+ }
+}
+
+void EncoderInit()
+{
+ if(!bEncoding) return;
+
+ encryptKey[encryptKeyLength] = 0;
+ key = CryptoEngine->GenerateKey(encryptKey);
+}
+
+void EncodeCopyMemory(void * dst, void * src, size_t size )
+{
+ memcpy(dst, src, size);
+
+ if(!bEncoding)
+ return;
+
+ CryptoEngine->EncryptMem(dst, (int)size, key);
+}
+
+void DecodeCopyMemory(void * dst, void * src, size_t size )
+{
+ memcpy(dst, src, size);
+
+ if(!bEncoding)
+ return;
+
+ CryptoEngine->DecryptMem(dst, (int)size, key);
+}
+
+void EncodeDBWrite(DWORD ofs, void * src, size_t size)
+{
+ if(bEncoding)
+ {
+ BYTE * buf;
+
+ buf = (BYTE*)GlobalAlloc(GPTR, sizeof(BYTE)*size);
+ EncodeCopyMemory(buf, src, size);
+ DBWrite(ofs, buf, (int)size);
+ GlobalFree(buf);
+ }
+ else
+ {
+ DBWrite(ofs, src, (int)size);
+ }
+}
+
+void DecodeDBWrite(DWORD ofs, void * src, size_t size)
+{
+
+ if(bEncoding)
+ {
+ BYTE * buf;
+
+ buf = (BYTE*)GlobalAlloc(GPTR, sizeof(BYTE)*size);
+ DecodeCopyMemory(buf, src, size);
+ DBWrite(ofs, buf, (int)size);
+ GlobalFree(buf);
+ }
+ else
+ {
+ DBWrite(ofs, src, (int)size);
+ }
+}
+
+int bCheckingPass = 0;
+
+int CheckPassword(WORD checkWord, char * szDBName)
+{
+ WORD ver;
+ int res;
+
+ if(bCheckingPass) return 0;
+ bCheckingPass = 1;
+
+ {
+ int i;
+ int Found = 0;
+ for(i = 0; i < ModulesCount; i++){
+ if(dbHeader.cryptorUID == Modules[i]->cryptor->uid){
+ CryptoEngine = Modules[i]->cryptor;
+ Found = 1;
+ break;
+ }
+ }
+ if(!Found){
+ MessageBoxA(0, "Sorry, but your database encrypted with unknown module", "Error", MB_OK);
+ bCheckingPass = 0;
+ return 0;
+ }
+ }
+
+ while(1){
+ res = DialogBoxParam(g_hInst, MAKEINTRESOURCE(IDD_LOGIN), NULL, (DLGPROC)DlgStdInProc, (LPARAM)szDBName);
+ if(res == IDCANCEL)
+ {
+ wrongPass = 0;
+ bCheckingPass = 0;
+ return 0;
+ }
+ if(encryptKeyLength < 1) continue;
+ EncoderInit();
+ DecodeCopyMemory(&ver, &checkWord, sizeof(checkWord));
+ if(ver == 0x5195)
+ {
+ wrongPass = 0;
+ bCheckingPass = 0;
+ return 1;
+ }
+ wrongPass++;
+ }
+
+ bCheckingPass = 0;
+}
+
+int SelectEncoder()
+{
+ WORD uid;
+ int i;
+
+ if(ModulesCount == 0){
+ MessageBox(0, TranslateT("Crypto modules not found"), TranslateT("Error"), MB_OK);
+ return 1;
+ }
+
+ uid = DBGetContactSettingWord(NULL, "SecureMMAP", "CryptoModule", 0);
+
+ if(uid == 0){
+ MessageBox(0, TranslateT("Crypto module hasn't been chosen, using first one found"), TranslateT("Notice"), MB_OK);
+ DBWriteContactSettingWord(NULL, "SecureMMAP", "CryptoModule", Modules[0]->cryptor->uid);
+ CryptoEngine = Modules[0]->cryptor;
+ }
+ else{
+ int Found = 0;
+ for(i = 0; i < ModulesCount; i++){
+ if(Modules[i]->cryptor->uid == uid){
+ CryptoEngine = Modules[i]->cryptor;
+ Found = 1;
+ break;
+ }
+ }
+ if(!Found){
+ MessageBox(0, TranslateT("Crypto module hasn't been chosen, using first one found"), TranslateT("Notice"), MB_OK);
+ DBWriteContactSettingWord(NULL, "SecureMMAP", "CryptoModule", Modules[0]->cryptor->uid);
+ CryptoEngine = Modules[0]->cryptor;
+ }
+ }
+
+ return 0;
+}
+
+void EncodeAll()
+{
+ HANDLE hContact;
+
+ hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ if(hContact){
+ do{
+ EncodeContactEvents(hContact);
+ EncodeContactSettings(hContact);
+ }while(hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0));
+ }
+
+ EncodeContactEvents(NULL);
+ EncodeContactSettings(NULL);
+}
+
+void DecodeAll()
+{
+ HANDLE hContact;
+
+ hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ if(hContact){
+ do{
+ DecodeContactEvents(hContact);
+ DecodeContactSettings(hContact);
+ }while(hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0));
+ }
+ DecodeContactEvents(NULL);
+ DecodeContactSettings(NULL);
+}
+
+void WritePlainHeader()
+{
+ DWORD bytesWritten;
+
+ memcpy(dbHeader.signature, &dbSignature, sizeof(dbHeader.signature));
+ SetFilePointer(hDbFile,0,NULL,FILE_BEGIN);
+ WriteFile(hDbFile,dbHeader.signature,sizeof(dbHeader.signature),&bytesWritten,NULL);
+ {
+ WORD checkWord;
+ checkWord = 0x0700;
+ memcpy(&dbHeader.checkWord, &checkWord, sizeof(checkWord));
+ WriteFile(hDbFile,&dbHeader.checkWord,sizeof(dbHeader.checkWord),&bytesWritten,NULL);
+
+ dbHeader.cryptorUID = 0x0000; //no encryption
+ WriteFile(hDbFile,&dbHeader.cryptorUID,sizeof(dbHeader.cryptorUID),&bytesWritten,NULL);
+ }
+}
+
+void WriteCryptHeader()
+{
+ DWORD bytesWritten;
+
+ memcpy(dbHeader.signature, &dbSignatureSecured, sizeof(dbHeader.signature));
+ SetFilePointer(hDbFile,0,NULL,FILE_BEGIN);
+ WriteFile(hDbFile,dbHeader.signature,sizeof(dbHeader.signature),&bytesWritten,NULL);
+ {
+ WORD checkWord;
+ checkWord = 0x5195;
+ EncodeCopyMemory(&dbHeader.checkWord, &checkWord, sizeof(checkWord));
+ WriteFile(hDbFile,&dbHeader.checkWord,sizeof(dbHeader.checkWord),&bytesWritten,NULL);
+
+ dbHeader.cryptorUID = CryptoEngine->uid;
+ WriteFile(hDbFile,&dbHeader.cryptorUID,sizeof(dbHeader.cryptorUID),&bytesWritten,NULL);
+ }
+}
+
+void EncryptDB()
+{
+ int action = 0;
+ if(bEncProcess) return;
+
+ if(memcmp(dbHeader.signature, &dbSignatureSecured, sizeof(dbHeader.signature)) == 0){
+ MessageBox(0, TranslateT("DB is already secured!"), TranslateT("Error"), MB_OK);
+ return;
+ }
+
+ if(SelectEncoder()){
+ return;
+ }
+
+ bEncProcess = 1;
+
+ action = DialogBoxParam(g_hInst, MAKEINTRESOURCE(IDD_NEWPASS), NULL, (DLGPROC)DlgStdNewPass, (LPARAM)NULL);
+ if(action != IDOK || !strlen(encryptKey)){
+ bEncProcess = 0;
+ DBWriteContactSettingByte(NULL, "SecureMMAP", "CryptoModule", 0);
+ return;
+ }
+
+ EnterCriticalSection(&csDbAccess);
+
+ bEncoding = 1;
+ EncoderInit();
+
+ EncodeAll();
+
+ LeaveCriticalSection(&csDbAccess);
+
+ WriteCryptHeader();
+
+ xModifyMenu(hSetPwdMenu, 0, LPGENT("Change Password"), 0);
+
+ bEncProcess = 0;
+}
+
+void DecryptDB()
+{
+ char oldKey[255];
+ strcpy(oldKey, encryptKey);
+
+ if(!CheckPassword(dbHeader.checkWord, Translate("current database"))){strcpy(encryptKey, oldKey); encryptKeyLength = strlen(oldKey); return;}
+
+ WritePlainHeader();
+
+ EnterCriticalSection(&csDbAccess);
+ DecodeAll();
+ LeaveCriticalSection(&csDbAccess);
+
+ bEncoding = 0;
+
+ zero_fill(encryptKey, sizeof encryptKey);
+
+ xModifyMenu(hSetPwdMenu, 0, LPGENT("Set Password"), 0);
+
+ DBWriteContactSettingWord(NULL, "SecureMMAP", "CryptoModule", 0);
+
+ CryptoEngine->FreeKey(key);
+
+ CryptoEngine = NULL;
+}
+
+void RecryptDB()
+{
+ EnterCriticalSection(&csDbAccess);
+
+ DecodeAll();
+
+ CryptoEngine->FreeKey(key);
+
+ SelectEncoder();
+
+ bEncoding = 1;
+
+ EncoderInit();
+
+ EncodeAll();
+
+ WriteCryptHeader();
+
+ LeaveCriticalSection(&csDbAccess);
+}
+
+void ChangePwd()
+{
+ char newpass[255] = {0};
+
+ int action = DialogBoxParam(g_hInst, MAKEINTRESOURCE(IDD_CHANGEPASS), NULL, (DLGPROC)DlgChangePass, (LPARAM)newpass);
+
+ if(action == IDCANCEL || (action == IDOK && !strlen(newpass)))
+ return;
+
+ EnterCriticalSection(&csDbAccess);
+
+ DecodeAll();
+
+ CryptoEngine->FreeKey(key);
+
+ if(action == IDREMOVE){
+ WritePlainHeader();
+
+ bEncoding = 0;
+ CryptoEngine = NULL;
+ DBWriteContactSettingWord(NULL, "SecureMMAP", "CryptoModule", 0);
+
+ zero_fill(encryptKey, sizeof encryptKey);
+
+ xModifyMenu(hSetPwdMenu, 0, LPGENT("Set Password"), 0);
+ }
+
+ if(action == IDOK){
+ strcpy(encryptKey, newpass);
+ encryptKeyLength = strlen(newpass);
+
+ bEncoding = 1;
+
+ EncoderInit();
+
+ EncodeAll();
+
+ WriteCryptHeader();
+ }
+
+ zero_fill(newpass, sizeof newpass);
+
+ LeaveCriticalSection(&csDbAccess);
+} \ No newline at end of file
diff --git a/plugins/Dbx_mmap_SA/version.h b/plugins/Dbx_mmap_SA/version.h
new file mode 100644
index 0000000000..f8b9f43246
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/version.h
@@ -0,0 +1,8 @@
+#define __FILEVERSION_STRING 0,7,5,4
+#define __VERSION_STRING "0.7.5.4"
+#define __VERSION_DWORD 0x00070504
+#if defined (_UNICODE)
+ #define __PLUGIN_NAME "Miranda SecuredMMAP database driver (Unicode)"
+#else
+ #define __PLUGIN_NAME "Miranda SecuredMMAP database driver"
+#endif
diff --git a/plugins/Dbx_mmap_SA/version.rc b/plugins/Dbx_mmap_SA/version.rc
new file mode 100644
index 0000000000..4cb51b5037
--- /dev/null
+++ b/plugins/Dbx_mmap_SA/version.rc
@@ -0,0 +1,39 @@
+
+#include <windows.h>
+#include "version.h"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION __FILEVERSION_STRING
+ PRODUCTVERSION __FILEVERSION_STRING
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "041904b0"
+ BEGIN
+ VALUE "FileDescription", "Miranda IM Mmap DataBase Engine 3x"
+ VALUE "FileVersion", __VERSION_STRING
+ VALUE "LegalCopyright", "Copyright (C) 2000-2007"
+ VALUE "OriginalFilename", "dbx_mmap.dll"
+ VALUE "ProductName", "Miranda IM Mmap DataBase Engine 3x"
+ VALUE "ProductVersion", __VERSION_STRING
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x419, 1200
+ END
+END