|
Thanks, that is what I have tried. But it not work. I check the error codes, get 123 - The file name, directory name, or volume label syntax is incorrect.
Then I removed $ and test, error code is 5, says access denied. Actually I have permission to access that machine.
I appreciate your help all the time...
Eranga
|
|
|
|
|
To replace the path but keep the same file name, do the below.
CString sOri = "C:\\Tmp\\Hello.txt";
CFile file(sOri, CFile::modeRead);
CString sNew = "\\\\192.168.0.3\\doc\\; // Get from some approach.
sNew += file.GetFileName(); // Result in "\\\\192.168.0.3\\doc\\Hello.txt".
Maxwell Chen
|
|
|
|
|
Ok, I solve this and found these things.
1) Should be shared
2) Should login as Admin to the file containing PC
3) Should have rite permission
What you guys think on my conclusion.
I appreciate your help all the time...
Eranga
|
|
|
|
|
Eranga Thennakoon wrote: 1) Should be shared
2) Should login as Admin to the file containing PC
Connecting via the admin share (C$) will get it done, but it would be better to create a specific share, and user account, for just what you need.
Eranga Thennakoon wrote: 3) Should have rite permission
Not necessary if all you're doing is reading from the file.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
DavidCrow wrote: Eranga Thennakoon wrote:
3) Should have rite permission
Not necessary if all you're doing is reading from the file.
but by rite, he meant write or right ?
|
|
|
|
|
toxcct wrote: he meant write or right ?
Yep!
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
DavidCrow wrote: Yep!
ok
|
|
|
|
|
|
DavidCrow wrote:
Not necessary if all you're doing is reading from the file.
Yes it is. Since I read it no need. It's my fault. I got that conclusion when I'm writing something to a file.
I appreciate your help all the time...
Eranga
|
|
|
|
|
how can i get the character inserted last in the edit box control.
last inserted character doesn't mean the last character of the corresponding string variable.
|
|
|
|
|
Handle the keydown (WM_KEYDOWN ) event.
Maxwell Chen
|
|
|
|
|
Can you use of GetWindowText for get string of edit ctrl?
|
|
|
|
|
He wants to know the last character which user inserted.
For example,
Originally the text in the Edit Control was:
Hllo. Then user inserted an 'e ' to become:
Hello.
Maxwell Chen
|
|
|
|
|
I think yes my answer not good.
|
|
|
|
|
But to get the WM_KEYDOWN for a edit box he has to subclass the edit box.
|
|
|
|
|
Subclass the edit control and handle the WM_CHAR message.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
How do i display time and date in an application? the current time and the current date.
|
|
|
|
|
I suggest you to split this daunting task in two steps:
(1) ask the system current date and time.
(2) display the date and time values
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
Its a real answer or a Joke!?
|
|
|
|
|
Every joke is, really, an answer.
(A bit philosophic today...)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
CPallini wrote: Every joke is, really, an answer.
(A bit philosophic today...)
I knew it.
Maxwell Chen
|
|
|
|
|
OMG you got it [^] too!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
Philosophic + vc++ forum then result=?
|
|
|
|
|
Hamid. wrote: Philosophic + vc++ forum then result=?
IF Philosophic = VC + forum THEN result="?"
But..., wait a moment..., OMG infamous VB6 code inside VC++ forum!!!!!!!!!!!!!!!!!!!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
Except it your code has problem where's End IF,or Maybe you want to make a new language (Composite of Vc++ and VB=VBC++ ).
|
|
|
|