How to read file from remote system share

Toshiba Dvr620 dvd/vcr combo
September 16, 2010 at 04:11:38
Specs: Windows XP
My program goes this way--


std:string FilePath= "\\\\\\temp\\LOG.txt";

std::ofstream FP(FilePath.c_str(), std::ios::out);

cout<<"File not opened"

Now Output is:
File not opened

SO i dont find what exactly here the problem is I have given full acess to share as well.

See More: How to read file from remote system share

Report •

September 16, 2010 at 06:34:01
std:string FilePath= "\\\\\\temp\\LOG.txt";
I'm going to assume this is a copy/paste error, but you only have one colon here.

Something else is going on; call Window's ::GetLastError() to find out what. (You'll have to include Windows.h, obviously.)

Report •

September 17, 2010 at 02:25:57
How can I use GetLastError() method in my problem .I never used this before.

Report •

September 17, 2010 at 05:33:15
Step 1) Follow the link I gave you in my previous response.
Step 2) Paste the function provided in that link.
Step 3) Call that function instead of just dumping your error message.

Report •

Related Solutions

Ask Question