DuplicateHandle() question

Conrad Scott Conrad.Scott@dsl.pipex.com
Wed Jun 12 11:15:00 GMT 2002


Egor,

You wrote:
>  All server has to do is to return valid handle on success and 0 on
> error. It's up to client to interpret the results. Or you can make
> server return all handles in some structure so that client will have
> to call server only once. But then again, all server has to do is to
> fill this structure and it's up to client to discard all valid handles
> if at least one of returned handles is 0.

Okay, that's much the conclusion I was coming to but I wanted to make sure I
wasn't missing something. Yes: the client calls the server just once and it
returns a structure containing several handles. I was just trying to
localise the error handling at the server end but I'll follow your advice
here: if the return code (in the structure) indicates an error, the client
will have to go through it and close any valid handles in it.

Thanks for the input.

// Conrad





More information about the Cygwin-developers mailing list