Please excuse all my typos. I can't seem to write straight at the moment.
It does depend on what is wrong with him. And of course, only a vet can tell you that. I do hope he is ok.
If he has not had his yearly shots, it IS possible he could have come down with Parvo. If so....well, a few dogs do make it through. Mine did.
If he HAS had his hots, then this could be a few different things. Bloody diarrhea, while never to be ignored (as there can sometimes be a serious cause) -can happen from eating something like chocolate, for instance, or even from the diarrhea itself. I asked my vet about this and he said it can happen quite commonly as with diarrhea, as frequent straining can cause some blood in the stools.
But vomiting blood...well that sounds as if it may be serious. He does need to see a vet as soon as possible. In fact, I think you should take him to emergency right away.
I can't tell you how long he will live. That depends on what is wrong with him.
Good luck, and I hope all is ok with your dog
What was he diagnosed with? It sounds like Parvo and at his age he may not make it. However there are probably many other diseases with similar symptoms so it is best for a vet to diagnose and treat your dog. They'll also be able to tell you how long to expect him to live.