// VCSDK.cpp : Defines the entry point for the DLL application.
//

#include "stdafx.h"

#include "VCSDK.h"


// BOOL APIENTRY DllMain( HANDLE hModule, 
//                        DWORD  ul_reason_for_call, 
//                        LPVOID lpReserved
// 					 )
// {
//     switch (ul_reason_for_call)
// 	{
// 		case DLL_PROCESS_ATTACH:
// 		case DLL_THREAD_ATTACH:
// 		case DLL_THREAD_DETACH:
// 		case DLL_PROCESS_DETACH:
// 			break;
//     }
//     return TRUE;
// }


std::vector<CString> g_Title;
std::vector<CString> g_Data;
std::vector<BOOL>	g_isWeb;




BOOL DLL_EXPORT Search(LPCTSTR lpszSearchName)
{
	//在下一次搜索之前，必须清空
	g_Title.clear();
	g_Data.clear();
	g_isWeb.clear();
	
	
	// 返回假 表示没有搜索到任何内容
	
	g_Title.push_back("测试标题");
	g_Data.push_back("http://www.baidu.com");
	
	
	return TRUE;
}

int DLL_EXPORT GetSize()
{
	return g_Title.size();
}


LPCTSTR DLL_EXPORT GetData(int nIndex,int nType)
{
	LPCTSTR lpszRet = NULL;
	switch (nType)
	{
	case 0:
		lpszRet = g_Title[nIndex];
		break;
	case 1:
		lpszRet = g_Data[nIndex];
		break;
	}
	
	return lpszRet;
}

BOOL DLL_EXPORT IsWeb()
{
	//返回值 代表你返回的内容是网页内容，还是url
	return FALSE;
}