Implement directory object in wineserver.

Vitaliy Margolen wine-devel at kievinfo.com
Wed Nov 23 12:21:27 CST 2005


Wednesday, November 23, 2005, 11:05:05 AM, Robert Shearman wrote:
> Alexandre Julliard wrote:

>>Vitaliy Margolen <wine-devel at kievinfo.com> writes:
>>
>>+/* open a new handle to an existing object */
>>+obj_handle_t open_object_dir( const struct object_attr *attr, const struct object_ops *ops,
>>+                              unsigned int access )

> If so, I don't see much of a problem with it. Maybe we shouldn't return
> a handle, but instead return a "struct object *" or a "void *", but 
> passing in struct object_ops * into the function isn't doing anything 
> other than eliminating common code in most of the objects. It doesn't 
> force anything to be exported outside of the implementation of the object.

The part I'm talking about is this:
Using object_attr:
static struct object *create_mapping( const struct object_attr *attr, file_pos_t size, int protect,
                                      obj_handle_t handle )

No using object_attr:
static struct object *create_mapping( const struct object *root, const struct unicode_str *name,
                                      unsigned int attr, file_pos_t size, int protect,
                                      obj_handle_t handle )

And this:
struct object_attr
{
    obj_handle_t              rootdir;     /* RootDirectory */
    struct unicode_str       *name;        /* ObjectName */
    unsigned int              attributes;  /* Attributes */
};

I can replace handle with object * but that will just add more code to
each
[open|close]_[even|mapping|semaphore|timer|namedpipe|winstation|desktop]




More information about the wine-devel mailing list