You know what, I think I've attached the wrong project.
You are right Parksie.
What I meant was, if it returns zero, then there was no error.
If it returns something other than zero, there was an error.
Actually, that was the only thing that had to change.
Just the comparison, and there....
You got the right project.
But don't bother any further. I found a cool web site that has the answer.
I found some cool classes.
I just had to change some stuff because I'm not using MFC for my project. Just plain Win32 API's.
I used a console project just for a test. The real one is plain Win32.