I'm going to say right up front the you're way under gunned for hogs at 100+ yards with either. I've used the 22 mag on coyotes in the 80's out to maybe 150 yards and it was quite unremarkable(using 1985 ammo). Most shot in the boiler room ran off to be found by blood trailing or were bayed by the hounds and finished off. I wouldn't even consider shooting a hog with a 22mag unless at very close range and hitting the brain.
The 17HMR peaks out at coyote sized game at less than 150 yards. I've killed some good sized groundhogs around 100 yards with a single shot in the body. The only coyote I shot with the 17 was around 200 yards and ran off wounded. This little round is a laser beam out to 150 yards compared to a 22lr but is way below the threshold of being a hog gun. It's relatively cheap to shoot and usually very accurate but just doesn't have the bullet weight to be effective on animals over 40#.
Of the two, I prefer the 17HMR as an "in between" round filling the gap between 22lr and .223. Preference based on the fact that, on average, the 17 is more accurate than the 22mag.