Wed Feb 27 17:53:00 GMT 2008
On Feb 27 17:03, Dave Korn wrote:
> On 27 February 2008 16:46, Corinna Vinschen wrote:
> > When running readdir() it doesn't find any file in the directory. The
> > reason is that the first call to NtQueryDirectoryFile in
> > fhandler_disk_file::readdir() fails with a very strange error I never
> > saw before and I don't find any useful information about on the net:
> > 0xC00000C3 STATUS_INVALID_NETWORK_RESPONSE
> It means the remote server did not understand (or the redirector could not
> translate) an IRP_MJ_FILE_SYSTEM_CONTROL.
> Was this Samba or a real windows CIFS/SMB server?
It happens on both, Samba and Windows share.
Believe it or not, but the reason was apparently that the
__DIR_cache::__cache buffer used in NtQueryDirectoryFile has to be 8
byte aligned on W2K. That was what caused this
STATUS_INVALID_NETWORK_RESPONSE. When I removed the `char
__name[CYG_MAX_PATH]' member from __DIR_cache, I changed the alignment
of __cache and broke W2K. Oh boy...
Just for the records, it works fine on NT4 and it works fine on XP and
While we're sitting at the bonfire, telling stories:
To be fair to W2K, I found another weirdness which only happens on NT4
and XP, but not on W2K. If a process has an environment variable block
of > 32K characters, if you call the ANSI function GetEnvironmentStringsA,
you get a pointer to the complete environment back on W2K, W2K3, Vista
and W2K8. Only on NT4 and XP the function is broken and returns an
incomplete environment block of the size (full-env-size % 32768). And,
yes, the last variable value in this block is potentially corrupted as
well. Strange that the fix introduced in W2K disappeared in XP, just to
show up in 2K3 again...
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
More information about the Cygwin-developers