Aha, thanks, that thread helped me to fix it.
Although, according to AVG, my test program is malware.
Makes AVG sit up and take notice, with dire warnings like:
window not visible
The ones that really confuse me, though, are the "executes from filesystem" warning and the "injects code" warning, because I don't know what they mean. And the injects code has a big, ominous red bar next to it. This program MUST be dangerous!
I do have one more actual question, though. Where does the alleg42.dll need to be, because right now I'm having to stick it into the directory of the .exe