Quote:
> I'm porting an app from Unix to NT. I need to get fchmod() to compile and
> work. Here is some sample code:
> int filehandle;
> ...
> filehandle = _open(filename, O_RDWR | O_CREAT | O_BINARY );
> ...
> fchmod(filehandle, S_IRUSR | S_IWUSR );
> Microsoft supports chmod() but requires a filename as a parameter rather
> than the file handle. I need to pass it the file handle.
This is a non-standard function that MS apparently do not support (and
neither do all UNIX flavours). From your code example it seems you have the
filename so I can't see why you don't use chmod(). Also, it seems a bit
weird to change the permissions on an open file - perhaps the logic of the
app you are porting is not quite right.
NeilB