| |

VerySource

 Forgot password?
 Register
Search
View: 843|Reply: 3

On a local area network, I want to read a file on another computer in a VC ++ program. How can I do this?

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-2-20 23:00:01
| Show all posts |Read mode
I use the following approach:
HINTERNET hInternet; //
hInternet = InternetOpen ("Microsoft Internet Explorer", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0);
InternetConnect (hInternet, "211.111.122.133", INTERNET_DEFAULT_HTTP_PORT, "Administrator", "123456", INTERNET_SERVICE_HTTP, 0,0);
CString m_strGstFile = "\\\\211.111.122.133\\E $\\Electronic map\\National map\\Guilin WGS84\\tab (WGS)\\Guilin.gst"
Open the file: m_ctrlMapX.SetGeoSet (m_strGstFile);

why not?
Reply

Use magic Report

2

Threads

6

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-7-21 14:00:01
| Show all posts
This kind of access according to the local area network is all right.
Use your username and password to connect to each other in your program (or use exec("net use\\211.111.122.133\ipc$ "administrator" /user:"123456" ") to create a connection
Then CFile.open opens.
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 United States

Post time: 2020-7-21 14:45:01
| Show all posts
Very insecure way, the best way is to set up an FTP server on the server, and your client uses FTP to download.
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-8-6 13:30:02
| Show all posts
The FTP map will be downloaded to the client computer, which will cause map data leakage
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list