Giving Heartgard monthly for a very long time can cure Heartworm. It is what we use in our rescue situation on the Reservation where taking all of the heartworm positive dogs in to a clinic for treatment is just simply NOT possible. It is vets that I work with on this project and that recommend this treatment. We have had very good results but it takes over a year often times to get a negative result. The results are always better in dogs with a lighter parasite load then a dog that has a heavier load. The general condition of the dog also is often a factor. We have had success though, even with dogs that were starving and had heavy loads. This is not the most recommended option but sometimes because of financial constraints it is an option. Talk with your vet to see what is recommended for your dog. It is a case of something is definitely better then nothing. Good Luck to you. I hope your dog can recover quickly.
Edit: Sorry wanted to add that they will usually give one dose of Drontal wormer first.
Also, if you want to go the Ivemactin based treatment road, ask the vet about liquid ivermectin, given in low doses. It's much more cost effective than the Heartgaurd, but it has to be closely supervised by your vet. It's very similar to the treatment for Demodex mange, but I think half the amount is given daily.
DO NOT DO THIS ON YOUR OWN!!!!!! IT MUST BE UNDER THE SUPERVSION OF A VET IF USING IVERMECTIN IN ANY FORM.