"While battling it, you use a Pokéball on it. If you are successful, you have caught the Pokémon."
the above is WRONG!
A Gengar can only be obtained via trading a Haunter with somebody else. When haunter gets through the other end, it will Evolve into Gengar.
There are glitches which you could possibly use too. Google is your friend.