Re: Read a file from network share!

Tech-Archive recommends: Fix windows errors by optimizing your registry



Finally I am able to get back to the problem again. I wrote a simple C+
+ 1.52 program to access the file across network and I got the same
error and it the process (ntvdm.exe) is running as normal. Any one has
any comments or suggestions (other than the migration, we are already
working on it, but it is atleast 6 months away).

Thanks.



On Sep 1, 9:02 am, DBC User <dbcu...@xxxxxxxxx> wrote:
Thank you sir I will do that and get back to you.
Thanks.
On Aug 31, 5:28 pm, Joseph M. Newcomer <newco...@xxxxxxxxxxxx> wrote:



Is your program running onVista, or just trying to talk to afilesystem onVista? If it
is running onVista, you need to make sure it is running at a level that allows it to get
access (the "integrity level") as well as running in an account that has the rights to get
access. The point being that you are probably hitting a security issue inVista, and if
you're running onVista, perhaps an issue about how the win16 emulator runs. Can you
write a simple Win16 program that does nothing but open thefile? Then use a tool like
the Process Explorer (available fromwww.sysinternals.com, now part of Microsoft) to see
whether your process is running Medium, High or Low (I suspect Low).
joe

On Fri, 31 Aug 2007 15:21:50 -0700, DBC User <dbcu...@xxxxxxxxx> wrote:
Thank you very much and this is what I got, "Nosuchfileor
directory". Even though the share is mapped and doesn't show
disconnected. Even the program is running from the share. I checked
the users and every one has read access. It seems to me the program is
not finding thedirectory???

Thanks for teaching a valuable lession on errors. I will never forget
this going forward :)

On Aug 31, 4:28 pm, Joseph M. Newcomer <newco...@xxxxxxxxxxxx> wrote:
OK, so what does errno tell you? I forgot this was win16. Everything I said before
applies, of course, just that errno instead of GetLastError() is involved. Note that
Win16 emulation may also be causing additional problems, but without the error code,
there'snoway to even guess! Was it EACCES? EEXIST? ENOENT? You can't just say "it gave
a NULL result". 25 years ago I was using the errno code in the error messages I issued,
e.g.,

fprintf(stderr, "Fileopen error\n%s\n%s\n", filename, strerror(errno));

was my minimum standard for reporting messages to the user.
joe

On Fri, 31 Aug 2007 13:37:42 -0700, DBC User <dbcu...@xxxxxxxxx> wrote:
I forgot to mention this is a VC1.52 code (16 bit) and GetLastError is
a 32bit windows code command. I do have the command and that is under
#ifdef WIN32
MsgBox(MBOX_INFO, "error [%d]", GetLastError());
#endif
and this doesn't get executed. I have a side question, how does this
WIN32 command work?
Thanks

On Aug 31, 3:13 pm, DBC User <dbcu...@xxxxxxxxx> wrote:
I haven't tried the GetLastError() yet. I will add that and get back
to you.
Thanks.
On Aug 31, 2:22 pm, Joseph M. Newcomer <newco...@xxxxxxxxxxxx> wrote:

What did ::GetLastError() return? Without that critical information, there'snoway to
tell.
joe

On Fri, 31 Aug 2007 10:33:26 -0700, DBC User <dbcu...@xxxxxxxxx> wrote:
I wrote a simple C# program and it was able to read thefilewithout
any problem. Please advise.
Thanks.

On Aug 31, 10:35 am, DBC User <dbcu...@xxxxxxxxx> wrote:
Good question, I didn't think about it, let me write a simple c# code
and get back to you.
Thanks.

On Aug 31, 10:13 am, Joseph M. Newcomer <newco...@xxxxxxxxxxxx> wrote:

Can you read thefilefromVistawith any other program running at the same privilege
level as the one you have?
joe

On Fri, 31 Aug 2007 07:25:10 -0700, DBC User <dbcu...@xxxxxxxxx> wrote:
I have VC 1.52 code which reads afilea network share and is working
fine in XP, but when I attempt run the same program fromvistaclient
thefilehandle comes back as null. Does any one know why would that
be?
Thanks.

Joseph M. Newcomer [MVP]
email: newco...@xxxxxxxxxxxx
Web:http://www.flounder.com
MVP Tips:http://www.flounder.com/mvp_tips.htm-Hidequotedtext-

- Show quoted text -

Joseph M. Newcomer [MVP]
email: newco...@xxxxxxxxxxxx
Web:http://www.flounder.com
MVP Tips:http://www.flounder.com/mvp_tips.htm-Hidequotedtext-

- Show quoted text -- Hide quoted text -

- Show quoted text -

Joseph M. Newcomer [MVP]
email: newco...@xxxxxxxxxxxx
Web:http://www.flounder.com
MVP Tips:http://www.flounder.com/mvp_tips.htm-Hidequoted text -

- Show quoted text -

Joseph M. Newcomer [MVP]
email: newco...@xxxxxxxxxxxx
Web:http://www.flounder.com
MVP Tips:http://www.flounder.com/mvp_tips.htm-Hide quoted text -

- Show quoted text -- Hide quoted text -

- Show quoted text -


.



Relevant Pages

  • Re: Read a file from network share!
    ... 25 years ago I was using the errno code in the error messages I issued, ... I do have the command and that is under ... MVP Tips:http://www.flounder.com/mvp_tips.htm-Hidequoted text - ...
    (microsoft.public.vc.mfc)
  • Re: how to block pc
    ... What do you mean by "change the setting of windows"? ... all kind of command that can be used to copy and send and delete ect. ... MVP Tips: http://www.flounder.com/mvp_tips.htm ...
    (microsoft.public.vc.mfc)
  • Re: Read a file from network share!
    ... is running on Vista, you need to make sure it is running at a level that allows it to get ... I do have the command and that is under ... MVP Tips:http://www.flounder.com/mvp_tips.htm-Hidequotedtext - ...
    (microsoft.public.vc.mfc)
  • Re: Read a file from network share!
    ... a 32bit windows code command. ... I do have the command and that is under ... MVP Tips:http://www.flounder.com/mvp_tips.htm-Hide quoted text - ...
    (microsoft.public.vc.mfc)
  • Re: And Steve Goldman chimes in on the MVP vote
    ... THE DUMBEST MVP VOTE IN THE HISTORY OF CIVILIZATION, ... INFAMOUS 112 CE ROMAN EASTERN CHARIOT LEAGUE VOTE AND THE 1,000,276 CE ... Not only did the writers vote for the wrong player, ... Joe Mauer, the first catcher in the history of the ...
    (alt.sports.baseball.ny-yankees)