But he doesn't know what else to do. He keeps on panting, getting hotter and hotter until he begins to collapse and go into shock. The kidneys are usually the first organ to suffer irreparable damage from the high body temperature. At that point, even heroic measures may only prolong the agony for a few more days. In this kind of weather, dogs can also overheat from physical exertion, excitement, and even just confinement without access to shade and water.
Prevention is best, of course.
Be very careful about strenuous outdoor activity. Always make sure your dog has access to shade, and lots of fresh, cool water. Water is crucial. Even before you call your vet, get the dog wet and keep him wet, especially his head and his belly. The water evaporating away from the skin surface will cool him faster than immersion in water or drinking water.