What is Database Plugin
========================
	1. is a dll file whose name is starting with db_
	2. must be placed in the sub-directory /Plugins
	3. has 5 export functions, whose prototypes are
		BOOL CALL_TYPE db_connect(LPSTR);
		BOOL CALL_TYPE db_update(const unsigned char* , int, int, int);
		BOOL CALL_TYPE db_disconnect();
		int  CALL_TYPE db_fetch(info_list_t** phead);
		int  CALL_TYPE db_fetch2(info_list_t** phead);
	   while
		CALL_TYPE is the Calling Convention, and MUST be defined as below:
		#define CALL_TYPE __fastcall

		info_list_t is a info_hash singly linked list struct:
		typedef struct info_list_s {
			struct info_list_s	*next;
			char info[40];
		}info_list_t;			

	   function description:			
		db_connect       to connect to database, its parameter is just a char string passing connection string
		db_update        to update database, parameters from left to right are 
		                 info_hash, number of completed peers, number of active peers, number of active seeders
		db_fetch         to fetch new data from database for first time, parameter is 
		                 a null pointer to a info_hash singly linked list pointer. BCTracker will release this list.
		db_fetch2        to fetch new data from database for next, parameter is 
		                 a null pointer to a info_hash singly linked list pointer. BCTracker will release this list.
		db_disconnect    to close the connection
		
	
How to Write
=============
Taking plugin_sdk/db_mysql as example:
	1. A devlope package provided by mysql is needed before compiling this example. It is including header files, library files, and dll files. That can be achieved by installing windows version mysql(http://dev.mysql.com/downloads/index.html). And we also include it in plugin_sdk/db_mysql/mysql.
	2. Add header files directory to "include files" of VS options; Add lib files directory to "library files" of VS options.
	3. Write .def file to define export symbols, and define it as "Module definaiton file" in linker options.
	4. Build project. Copy the generated db_mysql.dll to .\Plugins. Then copy libmySQL.dll to the folder where BitCometTracker.exe located or %windows%\system32.
	5. Setup Datebase_Connection_String in config dialog of BitCometTracker. 
	   using mysql, the Datebase_Connection_String format is "host:user:passwd:db_name"
	   using ADO, you can use ADO connection string directly, details refer to ado_conn.txt.

