Well without really looking at your code just a reminder
that PRINTER NAME and SHARE NAME can be different.

You need to use the correct information.
 
A discussion of it's use from a LONG time ago can be found here.
http://www.kixtart.org/ubbthreads/showflat.php?Cat=0&Number=37276