3 * ===============================================================
4 * Sample SourceMod Extension
5 * Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
6 * ===============================================================
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 * Version: $Id: extension.cpp 763 2007-05-09 05:20:03Z damagedsoul $
24 #include "extension.h"
25 #include "mysql/MyDriver.h"
31 * @brief Implement extension code here.
34 DBI_MySQL g_MySqlDBI; /**< Global singleton for extension's main interface */
36 SMEXT_LINK(&g_MySqlDBI);
38 bool DBI_MySQL::SDK_OnLoad(char *error, size_t maxlength, bool late)
40 dbi->AddDriver(&g_MyDriver);
45 void DBI_MySQL::SDK_OnUnload()
47 dbi->RemoveDriver(&g_MyDriver);