I want to access a file on remote machine(10.10.20.30), but i couldnt understand how to login to that machine in my program. Is there any simple win api that takes network path, credentials and returns the handle of file? i just want to access \\10.10.20.30\share folder\test.txt. Any suggestion will be helpful. sorry for not being very clear in coding sense. Detail: I wanted to access a file that is shared in a shared folder but permission is not given to me. I am using <u><b>::CreateFile</b></u> to get the handel of the file . But in this case i am reciveing error code 5 (ACCESS_DENIED). i need to use user (my client) credential (username password) to access file which is shared. I just need handle of file.
Well the requirement is like this at remote machine i do not have EveryOne permission. Let me explain through an example. Suppose there is network with certain domain having atleast 3 computer lets say 5. Now there name are C1(client),C2(destination),C3,C4,C5. Now in this case i will create a file(any type) at C2 machine and will put that in a folder say MyFolder. Now make it share and after that and remove <big>EveryOne</big> from it. After that add C5 as user for accessing it. Now you can see write the some code with just ::CreateFile implementation and run it on both machine C1(client) and C5(it has permission). You will see client(C1) will get error 5 which means ACCESS_DENIED but C5 will execute it and will get the file handle......Now again i am repeating my question i need to get the file handle by any means through my user name and password, And my program will get the handle from that C1 machine..
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)