So I'm making a VNC push program and I'm having problems with the Copying of the files. I keep getting error #9 and I cannot figure out why.
I am logging into the computer using the WNetAddConnection2 API first:
I get a return of '0' for con, and I have seen '75', '53' before so I know the API login works now. As for my CopyFile calls:Code:con = WNetAddConnection2(networkResource, WindowsPass, WindowsUser, 0)
Code:'Variable's I'm Passing In' 'Source = "C:\fastpush\real412" 'remoteFinalPath = "\\<machine name>\C$\Program Files\RealVNC\VNC4"Any ideas as to what is happening? I can browse to the remote path using the windows run box as I have it typed above...as I have read error 9 is a subscript out of range and I tried a full compile with the IDE no dice.Code:Call CopyFile(Source & "\logmessages.dll", remoteFinalPath & "\logmessages.dll", 0) Call CopyFile(Source & "\vncconfig.exe", remoteFinalPath & "\vncconfig.exe", 0) Call CopyFile(Source & "\vncviewer.exe", remoteFinalPath & "\vncviewer.exe", 0) Call CopyFile(Source & "\winvnc4.exe", remoteFinalPath & "\winvnc4.exe", 0) Call CopyFile(Source & "\wm_hooks.dll", remoteFinalPath & "\wm_hooks.dll", 0) Call CopyFile(Source & "\REGINI.EXE", remoteFinalPath & "\REGINI.EXE", 0) Call CopyFile(Source & "\vnc4.ini", remoteFinalPath & "\vnc4.ini", 0) Call CopyFile(Source & "\machine.ini", remoteFinalPath & "\machine.ini", 0)




Reply With Quote