"Hellraiser" and "Candyman" author Clive Barker just scored a big victory in court over his ex-BF -- who accused Barker of having sex with his own HIV-positive cousin before passing the virus on to him -- because his ex's lawsuit has been tossed out of court ... forever.
TMZ broke the story ... Barker's ex-boyfriend Emilian David Armstrong sued the writer in June, claiming Barker gave him HIV in 1996 ... then kicked him out on the street, leaving him destitute.
The lawsuit is crazy -- with allegations of cousin sex, AIDS, S&M, and drug-fueled parties -- but the judge ruled the case was baseless and should not go forward.
The case had previously been thrown out, but the judge gave Armstrong the chance to rework his lawsuit with new evidence. Armstrong never followed through ... so the dismissal is now permanent.