I'm trying to get certain sounds to play through the sndPlaySound API, but it won't play any sound that has a space in the directory path. I poked around for a solution, and apparently the GetShortPathName function is supposed to do the trick. Problem is, I have absolutely no idea how to implement it. I've been tinkering with VB for years, but never progressed beyond the simple stuff. (The sndPlaySound function came from a script I downloaded a while back.)

Where exactly is the function supposed to go, and what code do I need to put in?