-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Client code examples #9
Comments
Hi Hagay, I have tested your code against Windows 7 SP1 as server, and I'm successfully creating the file, |
Hi Tal, Thanks for your quick reply. The server is latest windows 10 pro. I Don't have at the moment a windows 7 machine to test against. Maybe i am missing out on the path convention ? On windows explorer the file is available on :
and of course my username is able to list the content of :
"shared" is of course available on the returned shares variable from ListShares method. Can you share a working code to list the content of a share path (similar to my example) ? Thanks Again, Hagay |
Here is a Working example that I tested against Windows 7 SP1 / 8.1 / 10:
|
Thank you very much , i managed to get the file creation/copy to work , also list non "share root" folder :
As for listing share root content, documentation for SMB is very hard to find , i guess "" is correct , becuase if i i use "." i get different status code. |
To open the root directory of the share and list it's content:
BTW, You can use WireShark to see which parameters Windows clients use, and you can also check the Native API documentation (not to be confused with the Win32 API) |
Running my code with your latest commit works fine now. Thanks a lot for all your help and work. |
Hi @TalAloni When trying to use `
` Gives Not Implemented exception, I wanted to list file names so I can read each file in a loop |
@rdang93 Please see the existing examples to retrieve list of file names in a directory. |
Hi,
I am trying to use this library to connect to existing shares on windows machines in order to list/read/write files/directories.
The highlight seem to be creating a server side so i am not sure if the library do indeed support client implementations .
I was able to connect to a remote machine and list the available shares (available to my user) with the following code :
shares variable contains the available shares, from here i could not find a way to list the share content, create a file , read an existing file.
My lead is that i need to use TreeConnect method on smb client :
But in this case i keep getting fs = FILE_DOES_NOT_EXIST and x = Access denied (i do have access).
Any chance for a working code examples ?
Thanks
The text was updated successfully, but these errors were encountered: