Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

SMB Protocol, Download files from Windows Shared Folders?

Posted on 1999-01-26
8
Medium Priority
?
646 Views
Last Modified: 2010-04-06
I need to download files from Windows Shared Folders in my Delphi app. The computers are outside my Network, so I need some kind of IP connection. Any help appreciated. Thanks in advance.
0
Comment
Question by:friberg
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
8 Comments
 
LVL 3

Expert Comment

by:williams2
ID: 1363373
I hae done some researching into this area, and I cannot find any generel solution to this problem, therefore I have been developing my own implementation of this, but it is not to be published since I have put some hard time working into this subject. :-(

regards,
Williams
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 1363374
Those computers outside your network, do you have access to them. I mean do you have permission to install and configure software on them?
This is important because you have to set up a connection in some way and the remote computers have to allow you to do this.
And finally what kind of network is there between the systems? Are modems involved, internet, or whatever.
For a start you could look at Virtual Private Networking than comes with Windows 98.
See http://www.microsoft.com/workshop/server/feature/vpnovw.asp for more info.
With Virtual Private Networking you can access remote computers over the internet (or other tcp/ip network) like normal files. If this is not an option it is most likely to use an ftp-server on the remote computers.

0
 
LVL 13

Expert Comment

by:Epsylon
ID: 1363375
If you really want to use SMB look at:

http://premium.microsoft.com/isapi/devonly/prodinfo/msdnprod/msdnlib.idc?theURL=/msdn/library/sdkdoc/cifs/cifs5_1gfm.htm

Search in the tree in the left frame for relevant info on SMB.

please feel free to ask what you don't know...

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:friberg
ID: 1363376
Thanks Epsylon. I have read the SMB spec and have a pretty good idea of how it works. However, I don't know how to implement it in Delphi. I have "read access" to those computers outside my network, and the only feature I want in my Delphi app is file download (possibly a recursive file dir as well, so I know which files are possible to download). Those computers have a direct internet connection and a permanent IP address, so I don't think I have to use a Virtual Private Network.
Do you have a code example for this download feature? Or is it very hard to implement?
Thanks
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 1363377
Well, let's say that have 2 computers with tcp/ip protocol, client for Microsoft networks and file and printer sharing.
IP addresses are 192.168.0.1 and 192.168.0.2.
192.168.0.2 has c:\ shared as C. Then on 192.168.0.1 I can do:

CopyFile('\\192.168.0.2\c\windows\media\the microsoft sound.wav', 'c:\the microsoft sound.wav', True);

This will copy the file.

Or for example:

memo1.lines.LoadFromFile('\\192.168.0.2\c\autoexec.bat')

I am only not sure what you should do if you have to go through a proxyserver/firewall or other security stuff...

0
 

Author Comment

by:friberg
ID: 1363378
Thanks, just what I needed. It was easier than I thought. :-)
Could you please submit it as an answer?

0
 
LVL 13

Accepted Solution

by:
Epsylon earned 800 total points
ID: 1363379
Here it is...
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 1363380
Sometimes I see people creating pages of code when answering question here on experts exchange. When I can do it in just one line I get headaches when I see their code. Yes, it is many times easier that some people think. No offence to you intended. I was wise to ask it here. Actually you saved me a headache :-)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question