function GetThunderExePath(name)
	local obj = XLGetObject("Xunlei.OSShell.Obj")
	local path = obj:GetCurrentPath()	
	
	local destPath = obj:PathAppendLua(path, "..\\..\\..\\program\\thunder.exe")
	return 1, destPath
end

function GetThunderInstDir(name)
	local suc, path = GetThunderExePath(name)
	if suc==0 then
		return 0, nil
	end
	local obj = XLGetObject("Xunlei.OSShell.Obj")
	path = obj:PathRemoveFileSpec(path)
	path = obj:PathAddBackslash(path)
	path = obj:PathAppendLua(path, "..\\")
	--path = obj:PathAddBackslash(path)

	return 1, path
end


function GetThunderAddinDir(name)
	local suc,path=GetThunderInstDir(name)
	if suc==0 then
		return 0, nil 
	end
	local obj = XLGetObject("Xunlei.OSShell.Obj")
	local AddinDir = obj:GetAddinDir(path)
	return 1, AddinDir
end

function GetCurProcName(name)
	local obj = XLGetObject("Xunlei.OSShell.Obj")
	local fileName = obj:GetModuleFileName()
	fileName = obj:GetFileNameByPath(fileName)
	return 1, fileName
end

function GetSystemPath(name)
	local obj = XLGetObject("Xunlei.OSShell.Obj")
	path = obj:GetSystemPath()
	return 1, path
end