You really don't need two return 0s . . . .

AND the seccond is...
I need the password to be passed from the program
Try this (disclaimer: it's not very secure at all), assuming that pg_dump takes the password for the standard input:
Code:
system("echo thisisthepassword | pg_dump focus > \\10.1.65.30\smbtest\backup.backup