Thanks for the suggestion BrowserUK, I cleaned up the code and need to use strict more often, unfortunately still no luck in figuring this out. My guess is it's something with the parms as I wrote a quick C (and I'm a novice C person as well, but COBOL on the other hand ;^)... ) program to make sure I was passing the correct values for the parms in perl.
And to answer Anonymous Monk, the example I am playing with is more for me in gaining knowledge in working with windows API's and I just happened to pick this particular function.