Re: Read a file from network share!
- From: DBC User <dbcuser@xxxxxxxxx>
- Date: Thu, 20 Sep 2007 13:40:47 -0700
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 -
.
- References:
- Re: Read a file from network share!
- From: Joseph M . Newcomer
- Re: Read a file from network share!
- From: DBC User
- Re: Read a file from network share!
- From: Joseph M . Newcomer
- Re: Read a file from network share!
- From: DBC User
- Re: Read a file from network share!
- Prev by Date: Re: Resize dynamically the size of the CFormView
- Next by Date: don't want to show images for treeview child items
- Previous by thread: Re: Read a file from network share!
- Next by thread: Re: clipping region of a device context.
- Index(es):
Relevant Pages
|